[Openfirst-cvscommit] feedback index.php,1.2,1.3
Brought to you by:
xtimg
From: <xt...@us...> - 2003-06-28 01:02:10
|
Update of /cvsroot/openfirst/feedback In directory sc8-pr-cvs1:/tmp/cvs-serv25190 Modified Files: index.php Log Message: Fix indenting issues etc. to comply with openFIRST standards. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/feedback/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 21 Jun 2003 12:21:36 -0000 1.2 --- index.php 28 Jun 2003 01:02:06 -0000 1.3 *************** *** 31,93 **** echo("<h1>Feedback</h1>"); ! mysql_select_db($sqldatabase,$sqlconnection); ! // Get a list of the users able to ! // be contacted via the feedback form. ! $query = mysql_query("SELECT * FROM ofirst_feedbackusers ORDER BY name;"); ! ! if (mysql_num_rows($query) != 0){ ! if(isset($_POST["to"]) == true) { ! $messageallowed = false; ! } else { ! // Display the feedback form. ! ?> ! <form method="post" action="feedback.php"> ! Message To: <select name="to"> ! <?php ! } ! while($feedback = mysql_fetch_object($query)){ ! if(! isset($_POST["to"])) { ! echo("<option value='$feedback->email'>$feedback->name</option>"); ! } else { ! if ($_POST["to"] == $feedback->email) { ! $messageallowed = true; ! } } } ! if(isset($_POST["to"]) == false) { ! // Display rest of feedback form. ! echo("</select>"); ! ?> ! ! <br />Your E-mail Address (used for ! replies): ! <input type="text" name="from" ! style="width: 150px;" value="<?php echo($user->email); ?>" /> <br />Type ! of feedback: <input type="radio" ! name="type" value="comment" />Comment ! <input type="radio" name="type" ! value="question" />Question <input ! type="radio" name="type" ! value="concern" />Concern ! <br /> ! Message: <br /><textarea ! name="message" cols="40" ! rows="20">Insert your feedback here. <?php echo($user->signature); ?></textarea> ! <br /> ! <input type="submit" value="Send Feedback" /> ! <input type="reset" value="Clear Feedback" /> ! </form> ! <?php ! } else { ! if ($messageallowed == true) { ! // Mail who they wish to contact. ! if (isset($user->user)) { $isuser = "registered user"; } else { $isuser = "unregistered user"; } ! mail($_POST["to"], ! "Feedback: $isuser " . $_POST["type"], $_POST["message"] ! . "\r\n\r\n--\r\nMessage generated by openfirst.feedback. For more information about openFIRST, see: http://openfirst.sourceforge.net" --- 31,82 ---- echo("<h1>Feedback</h1>"); ! mysql_select_db($sqldatabase,$sqlconnection); ! // Get a list of the users able to be contacted via the feedback form. ! $query = mysql_query("SELECT * FROM ofirst_feedbackusers ORDER BY name;"); ! if (mysql_num_rows($query) != 0){ ! if(isset($_POST["to"]) == true) { ! $messageallowed = false; ! } else { ! // Display the feedback form. ! ?> ! <form method="post" action="feedback.php"> ! Message To: <select name="to"> ! <?php ! } ! while($feedback = mysql_fetch_object($query)){ ! if(! isset($_POST["to"])) { ! echo("<option value='$feedback->email'>$feedback->name</option>"); ! } else { ! if ($_POST["to"] == $feedback->email) { ! $messageallowed = true; } } ! } ! if(isset($_POST["to"]) == false) { ! // Display rest of feedback form. ! echo("</select>"); ! ?> ! <br />Your E-mail Address (used for replies): ! <input type="text" name="from" style="width: 150px;" value="<?php echo($user->email); ?>" /> ! <br />Type of feedback: ! <input type="radio" name="type" value="comment" />Comment ! <input type="radio" name="type" value="question" />Question ! <input type="radio" name="type" value="concern" />Concern ! <br />Message: <br /><textarea name="message" cols="40" rows="20">Insert your feedback here. <?php echo($user->signature); ?></textarea> ! <br /> ! <input type="submit" value="Send Feedback" /> ! <input type="reset" value="Clear Feedback" /> ! </form> ! <?php ! } else { ! if ($messageallowed == true) { ! // Mail who they wish to contact. ! if (isset($user->user)) { $isuser = "registered user"; } else { $isuser = "unregistered user"; } ! mail($_POST["to"], "Feedback: $isuser " . $_POST["type"], $_POST["message"] ! . "\r\n\r\n--\r\nMessage generated by openfirst.feedback. For more information about openFIRST, see: http://openfirst.sourceforge.net" *************** *** 100,121 **** future."); ! } else { ! // Give an error. ! echo("You cannot use the ! feedback form to contact that person ! as the administrator of this web site ! has not allowed it. If you ! believe you should be able to ! contact this person, contact the ! administrator asking them to ! change their settings."); ! } } - } else { - echo("Before you can use - this, someone must first set up - users able to be e-mailed by - modifying the database."); } include($footer); ?> --- 89,100 ---- future."); ! } else { ! // Give an error. ! echo("You cannot use the feedback form to contact that person as the administrator of this web site has not allowed it. If you believe you should be able to contact this person, contact the administrator asking them to change their settings."); } } + } else { + echo("Before you can use this, someone must first set up users able to be e-mailed by modifying the database."); + } include($footer); ?> |