Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/public/NQPRateQuizSave.php
<?php
/*****************************************************************/
/* Nukequiz (tm)    v 3.1.0                                		 */
/* By: Kissoftware (hide@address.com)      		     */
/* http://www.kissoftware.org.uk                           		 */
/* http://www.kissoftware.co.uk                       		     */
/* Copyright © 2003-2008 by Kissoftware         				 */
/* See Docs For Information & Credits                 			 */
/* For More information Visit Forums Or The Online Help Manual	 */
/*****************************************************************/
$ratequiz = $db->sql_query("SELECT rate, votes FROM ".$prefix."_nquiz_quiz WHERE qid='$qid'");
while(list($rate, $votes) = $db->sql_fetchrow($ratequiz)){
$rating=$ratevalue+$rate;
$votestotal=$votes+1;
$db->sql_query("UPDATE ".$prefix."_nquiz_quiz SET  rate='$rating', votes='$votestotal' WHERE qid='$qid'");
}
$date = time();
$ip = $_SERVER['REMOTE_ADDR'];
$db->sql_query("INSERT INTO ".$prefix."_nquiz_rate (ip, date, qid) VALUES ('$ip', '$date', '$qid')");
update_points(22);//Needs Adding To The Group Points System
Header("Location: modules.php?name=$module_name");
?>
Return current item: Nukequiz