Third pass at adding key files

This commit is contained in:
dsainty
2024-06-17 22:27:49 +10:00
parent b6fc94ff0f
commit 392aa512b3
633 changed files with 72489 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<?PHP include("config.php");
if (!$_POST) {
Header("Location: index.php");
die();
}
/**foreach($_POST as $key => $data) {
echo ($key.": ".$data ."<br />\n");
}**/
$answerSet = "(0";
foreach($_POST as $questionID => $answerID) {
if (is_numeric(ltrim($questionID,'qid'))) $answerSet .= ",".$answerID;
}
$answerSet .= ")";
//echo $answerSet;
$result = mysql_query("UPDATE gforum_SurveyAnswer SET Answer_Votes = Answer_Votes + 1 WHERE Answer_ID IN ".$answerSet) OR die(mysql_error());
$result = mysql_query("INSERT INTO gforum_SurveyVote (Survey_ID_FK, User_ID_FK, Vote_IP, Vote_Time) VALUES (1, ".$_POST['uid'].", '".$_POST['ip']."', UNIX_TIMESTAMP(NOW()) )") OR die(mysql_error());
$result = mysql_query("INSERT INTO gforum_SurveyRecord (Survey_ID_FK, Record_Set) VALUES (1, '".$answerSet."')") OR die(mysql_error());
Header("Location: index.php?thank_you=1");
?>