science-ation/schoolfeedback.php
james ba793ac8e0 Fix rolestasks saving of the level for each item
Fix tableeditor css to only modify anything in the tableeditor/tableview classes
Fix saving language for volunteers
Fix error message for saving phone numbers on organization and personal
Fix schoolfeedback and schoolinfo pages
Update school select tab, better html and school options list
Fix css for tertiary menu to show difference between selected and non-selected
2010-10-14 19:42:20 +00:00

40 lines
1.6 KiB
PHP

<?php
require_once('common.inc.php');
require_once('user.inc.php');
user_auth_required("teacher");
$schoolid=user_field_required("schools_id","user_edit.php?tab=school");
send_header("Feedback / Questions");
// load the school info
$q=mysql_query("SELECT * FROM schools WHERE id='$schoolid'");
echo mysql_error();
$school=mysql_fetch_object($q);
// send the e-mail if we're receiving a post
if(array_key_exists('feedbacktext', $_POST)){
$body="";
$body.=date("r")."\n";
$body.=$_SERVER['REMOTE_ADDR']." (".$_SERVER['REMOTE_HOST'].")\n";
$body.="School ID: $school->id\n";
$body.="School Name: $school->school\n";
if($sh['name']) $body.="Science Teacher: {$sh['name']}\n";
if($sh['phonework']) $body.="Science Teacher Phone: {$sh['phonework']}\n";
if($sh_email) $body.="Science Teacher Email: $sh_email\n";
$body.="\nFeedback:\n".stripslashes($_POST['feedbacktext'])."\n";
$returnEmailAddress = $sh_email;
mail($config['fairmanageremail'],"School Feedback",$body,"From: ". $returnEmailAddress."\nReply-To: ".$returnEmailAddress."\nReturn-Path: ".$returnEmailAddress);
echo happy_("Your feedback has been sent");
}
// draw the feedback form
echo i18n("We are always welcome to any feedback (both positive and constructive criticism!), or any questions you may have. Please use the following form to communicate with the science fair committee!");
echo "<form method=\"post\" action=\"schoolfeedback.php\">";
echo "<br><textarea name=\"feedbacktext\" rows=\"8\" cols=\"60\"></textarea><br />";
echo "<input type=\"submit\" value=\"".i18n("Send Feedback")."\">";
echo "</form>";
send_footer();
?>