2003-07-10 18:21:08 +00:00
< ?
$pageName = 'Bugs' ;
$focused = " none " ; // Dock icon name to get a border
2003-07-10 18:22:09 +00:00
require " ../parts/preamble.php " ; // Load most of document
2003-07-10 18:21:08 +00:00
?>
2003-07-10 20:33:32 +00:00
< ?
function do_list ( $title , $name , $list , $def )
{
$list = explode ( ',' , $list );
$count = count ( $list );
echo '<TR><TD align="left">' . $title . '</TD><TD align="right">' ;
printf ( " <SELECT name= \" %s \" > " , $name );
for ( $i = 0 ; $i < $count ; $i ++ ) {
printf ( " <OPTION%s>%s</OPTION> " , $def == $list [ $i ] ? " selected " : " " , $list [ $i ]);
}
echo " </SELECT></TD></TR> " ;
}
function do_inputline ( $title , $name , $len , $def )
{
echo '<TR><TD align="left">' . $title . '</TD><TD align="right">' ;
printf ( '<INPUT name="%s" type="text" size="%d" value="%s"></INPUT>' , $name , $len , $def );
echo '</TD></TR>' ;
}
function do_inputtext ( $title , $name , $width , $height , $def )
{
echo '<TR><TD colspan="2" align="left">' . $title . '<BR>' ;
printf ( '<TEXTAREA name="%s" cols="%d" rows="%d">%s</TEXTAREA>' , $name , $width , $height , $def );
echo '</TD></TR>' ;
}
function do_submit ()
{
echo '<TR><TD align="left"></TD><TD align="right">' ;
echo '<INPUT type="submit" value="Submit"></INPUT>' ;
echo '</TD></TR>' ;
}
2003-08-01 21:51:08 +00:00
if ( $fromaddr && $pkg && $version && $severity && $os && $details && $subj ) {
2003-07-11 21:52:01 +00:00
$mail = " " ;
2003-07-10 20:33:32 +00:00
2003-07-11 21:52:01 +00:00
switch ( $pkg ) {
case " QuakeForge " :
$address = " quakeforge-bugs@lists.quakeforge.net " ;
break ;
case " QuakeIIForge " :
$address = " quake2-bugs@lists.quakeforge.net " ;
break ;
case " Newtree " :
$address = " newtree-bugs@lists.quakeforge.net " ;
break ;
case " QFCC " :
$address = " qfcc-bugs@lists.quakeforge.net " ;
break ;
case " Forge " :
$address = " forge-bugs@lists.quakeforge.net " ;
break ;
default :
}
$mail .= " Package: $pkg\n " ;
$mail .= 'Version: ' . StripSlashes ( $version ) . " \n " ;
$mail .= " Severity: $severity\n\n " ;
2003-08-01 21:51:08 +00:00
$mail .= " Sender: $fromaddr\n " ;
2003-07-11 21:52:01 +00:00
$mail .= " Operating System: $os\n\n " ;
$mail .= " Detailed Description: \n " ;
$mail .= $details . " \n " ;
echo " To: <TT> $address </TT><BR> \n " ;
echo 'Subject: <TT>' . StripSlashes ( $subj ) . '</TT><br>' ;
echo '<pre>' . StripSlashes ( $mail ) . '</pre>' ;
2003-07-21 11:58:14 +00:00
mail ( $address , StripSlashes ( $subj ), StripSlashes ( $mail ), " From: \" Bug-Submission Form \" < $address > " );
2003-07-21 11:53:54 +00:00
echo '<P>Bug report sent!</P>' ;
2003-07-10 20:33:32 +00:00
} else {
2003-08-03 22:50:05 +00:00
?> <P><STRONG>Note:</STRONG> All fields <STRONG>must</STRONG> be filled in. Your email address will only be used to let you know when the bug is fixed and/or if more information is needed.</P><FORM name="bug" method="post"><table><?
2003-08-03 22:48:03 +00:00
do_inputline ( " Your email " , " fromaddr " , 30 , $fromaddr );
2003-07-11 21:52:01 +00:00
do_list ( " Package " , " pkg " , " ,QuakeForge,QuakeIIForge,Newtree,QFCC,Forge " , $pkg );
do_inputline ( " Package version " , " version " , 12 , $version );
2003-07-10 20:33:32 +00:00
do_list ( " Operating System " , " os " , " ,Windows,Linux,FreeBSD,NetBSD,OpenBSD,Other " , $os );
2003-07-11 21:52:01 +00:00
do_list ( " Bug Severity " , " severity " , " Normal,Critical,Wishlist " , $severity );
do_inputline ( " Brief Description " , " subj " , 60 , $subj );
2003-07-10 20:33:32 +00:00
do_inputtext ( " Detailed Description " , " details " , 60 , 10 , $details );
do_submit ();
?> </table></FORM><?
}
?>
2003-07-10 18:21:08 +00:00
< ?
2003-07-10 18:22:09 +00:00
require " ../parts/postamble.php " ; // Finish this sucker up
2003-07-10 18:21:08 +00:00
?>