Annotation of easysearch/www/bugreport.html, revision 1.17

1.1       andreas     1: <?php
1.2       andreas     2: $sentOk = 0;
                      3: 
1.17    ! cdn         4: function fail() {}
        !             5: 
1.1       andreas     6:        if(isset($reportbug))
                      7:        {
1.2       andreas     8:                $message = "";
                      9:                $message .= $yourinfo;
1.15      andreas    10:                $message .= "\n\nOS info:\n\n-------------------------------------------------\n\n";
1.14      andreas    11:                $message .= $youros;
1.15      andreas    12:                $message .= "\n\nAdditional info:\n\n-------------------------------------------------\n\n";
1.2       andreas    13:                $message .= $youraddinfo;
                     14:                $sentOk = 0;
                     15: 
1.17    ! cdn        16:                if(fail("andreas@gnunet.nu", "EasySearch BUG report", "$message", "From: \"$yourname\" <$youremail>"))
1.2       andreas    17:                {
                     18:                        $sentOk = 1;
                     19:                }
1.1       andreas    20:        }
                     21: ?>
1.16      andreas    22: <h2>Bug reporting</h3>
1.2       andreas    23: <?php
                     24:        if($sentOk)
                     25:        {
                     26:                echo "<h3>Mail delivered!</h3>";
                     27:        }
                     28:        else
                     29:        {
                     30: ?>
1.12      andreas    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();
1.13      andreas    45:        }
                     46:        else if(thisForm.youros.value == "")
                     47:        {
                     48:                alert("Enter your OS");
                     49:                thisForm.youros.focus();
1.12      andreas    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>
1.2       andreas    63: <form method="post" action="bugreport.html">
1.1       andreas    64: <input type="hidden" name="reportbug" value="1">
1.11      andreas    65: <table cellpadding="5" cellspacing="0" width="500" style="border-style:dotted;color:#000000;border-width:1px;">
1.2       andreas    66: <tr>
1.10      andreas    67:        <td width="150">Your name:</td>
                     68:        <td width="350"><input type="text" name="yourname" size="40"></td>
1.2       andreas    69: </tr>
1.1       andreas    70: <tr>
1.10      andreas    71:        <td width="150">You email address:</td>
                     72:        <td width="350"><input type="text" name="youremail" size="40"></td>
1.2       andreas    73: </tr>
                     74: <tr>
1.10      andreas    75:        <td width="150">Your OS (Mac, XP, Linux etc):</td>
                     76:        <td width="350"><input type="text" name="youros" size="40"></td>
1.2       andreas    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">
1.9       andreas    86:                <textarea cols="50" rows="7" name="yourinfo"></textarea>
1.2       andreas    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">
1.9       andreas    97:                <textarea cols="50" rows="4" name="youraddinfo"></textarea>
1.2       andreas    98:        </td>
1.1       andreas    99: </tr>
1.4       andreas   100: <tr>
1.12      andreas   101:        <td colspan="2" align="right"><input type="button" onclick="checkForm(this.form);" value="Send mail!"></td>
1.4       andreas   102: </tr>
1.1       andreas   103: </table>
1.2       andreas   104: </form>
                    105: <?php
                    106:        }
1.17    ! cdn       107: ?>

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