File:  [mozdev] / easysearch / www / bugreport.html
Revision 1.17: download - view: text, annotated - select for diffs - revision graph
Mon Apr 2 11:50:19 2007 UTC (13 years ago) by cdn
Branches: MAIN
CVS tags: HEAD
*** empty log message ***

    1: <?php
    2: $sentOk = 0;
    3: 
    4: function fail() {}
    5: 
    6: 	if(isset($reportbug))
    7: 	{
    8: 		$message = "";
    9: 		$message .= $yourinfo;
   10: 		$message .= "\n\nOS info:\n\n-------------------------------------------------\n\n";
   11: 		$message .= $youros;
   12: 		$message .= "\n\nAdditional info:\n\n-------------------------------------------------\n\n";
   13: 		$message .= $youraddinfo;
   14: 		$sentOk = 0;
   15: 
   16: 		if(fail("andreas@gnunet.nu", "EasySearch BUG report", "$message", "From: \"$yourname\" <$youremail>"))
   17: 		{
   18: 			$sentOk = 1;
   19: 		}
   20: 	}
   21: ?>
   22: <h2>Bug reporting</h3>
   23: <?php
   24: 	if($sentOk)
   25: 	{
   26: 		echo "<h3>Mail delivered!</h3>";
   27: 	}
   28: 	else
   29: 	{
   30: ?>
   31: <script language="javascript">
   32: 
   33: //check form
   34: function checkForm(thisForm)
   35: {
   36: 	if(thisForm.yourname.value == "")
   37: 	{
   38: 		alert("Enter your name");
   39: 		thisForm.yourname.focus();
   40: 	}
   41: 	else if(thisForm.youremail.value == "")
   42: 	{
   43: 		alert("Enter your email address");
   44: 		thisForm.youremail.focus();
   45: 	}
   46: 	else if(thisForm.youros.value == "")
   47: 	{
   48: 		alert("Enter your OS");
   49: 		thisForm.youros.focus();
   50: 	}
   51: 	else if(thisForm.yourinfo.value == "")
   52: 	{
   53: 		alert("Enter whats wrong");
   54: 		thisForm.yourinfo.focus();
   55: 	}
   56: 	else
   57: 	{
   58: 		thisForm.submit();
   59: 	}
   60: }
   61: 
   62: </script>
   63: <form method="post" action="bugreport.html">
   64: <input type="hidden" name="reportbug" value="1">
   65: <table cellpadding="5" cellspacing="0" width="500" style="border-style:dotted;color:#000000;border-width:1px;">
   66: <tr>
   67: 	<td width="150">Your name:</td>
   68: 	<td width="350"><input type="text" name="yourname" size="40"></td>
   69: </tr>
   70: <tr>
   71: 	<td width="150">You email address:</td>
   72: 	<td width="350"><input type="text" name="youremail" size="40"></td>
   73: </tr>
   74: <tr>
   75: 	<td width="150">Your OS (Mac, XP, Linux etc):</td>
   76: 	<td width="350"><input type="text" name="youros" size="40"></td>
   77: </tr>
   78: <tr>
   79: 	<td colspan="2">&nbsp;&nbsp;&nbsp;</td>
   80: </tr>
   81: <tr>
   82: 	<td colspan="2">What's wrong ?:</td>
   83: </tr>
   84: <tr>
   85: 	<td colspan="2">
   86: 		<textarea cols="50" rows="7" name="yourinfo"></textarea>
   87: 	</td>
   88: </tr>
   89: <tr>
   90: 	<td colspan="2">&nbsp;&nbsp;&nbsp;</td>
   91: </tr>
   92: <tr>
   93: 	<td colspan="2">Additional error messages (ex JavaScript console):</td>
   94: </tr>
   95: <tr>
   96: 	<td colspan="2">
   97: 		<textarea cols="50" rows="4" name="youraddinfo"></textarea>
   98: 	</td>
   99: </tr>
  100: <tr>
  101: 	<td colspan="2" align="right"><input type="button" onclick="checkForm(this.form);" value="Send mail!"></td>
  102: </tr>
  103: </table>
  104: </form>
  105: <?php
  106: 	}
  107: ?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>