Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQASaveQuizChanges.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	 */
/*****************************************************************/
if(isset($emailadmin)) $emailadmin=1; else $emailadmin=0;
if(isset($emailuser)) $emailuser=1; else $emailuser=0;
if(isset($limit)) $limit=1; else $limit=0;
if(isset($active)) $act=1; else $act=0;
if(isset($view)) $view=1; else $view=0;
if(isset($iscq)) $iscq=1; else $iscq=0;
$expire = $newyear."-".$newmonth."-".$newday." ".$newhour.":".$newmin.":00";
if ($expire == "0000-00-00 00:00:00") { $edate = "0"; } else { $edate = strtotime($expire); }
$title = stripslashes(FixQuotes($title));
$tpoints = $db->sql_query("SELECT sum(points) as total FROM ".$prefix."_nquiz_questions WHERE qid='$qid'");
list($points) = $db->sql_fetchrow($tpoints);
$count = $db->sql_query("SELECT count(*) as max FROM ".$prefix."_nquiz_questions WHERE qid='$qid'");
list($max) = $db->sql_fetchrow($count);
if(!$db->sql_query("UPDATE ".$prefix."_nquiz_quiz SET sid='$sid',active='$act', iscq='$iscq', prize_desc='$prize', sponsor='$sponsor', title='$title', emailadmin='$emailadmin', random='$randomise', emailuser='$emailuser',limit_attempts='$limit', view_answers='$view', expire='$edate',  maxqnum='$max', points_total='$points', admin_email='$adminemail' WHERE qid='$qid'")) {
die (""._NQ_DBERRORTABLE."_nquiz_quiz");
}
Header("Location: ".$admin_file.".php?op=nqviewquizlist");
?>
Return current item: Nukequiz