Location: PHPKode > projects > Nukequiz > html/modules/Nukequiz/admin/NQADeleteQuiz.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	 */
/*****************************************************************/
$r=$db->sql_query("SELECT dir FROM ".$prefix."_nquiz_quiz WHERE qid='$qid'");
list($dir) = $db->sql_fetchrow($r);
$imagesdir = $nq_config['images_directory'];
//$title = str_replace(" ", "_", $title);
nqremoveDir("modules/$module_name/$imagesdir/$quizdir/");
$result = $db->sql_query("SELECT quesid FROM ".$prefix."_nquiz_questions WHERE qid='$qid'");
while(list($id) = $db->sql_fetchrow($result)){
$db->sql_query("DELETE FROM ".$prefix."_nquiz_questions WHERE quesid='$id'");
$db->sql_query("DELETE FROM ".$prefix."_nquiz_scoreboard WHERE qid='$id'");
}
$db->sql_query("DELETE FROM ".$prefix."_nquiz_quiz WHERE qid='$qid'");
$db->sql_query("OPTIMIZE TABLE ".$prefix."_nquiz_questions");
$db->sql_query("OPTIMIZE TABLE ".$prefix."_nquiz_scoreboard");
$db->sql_query("OPTIMIZE TABLE ".$prefix."_nquiz_quiz");
Header("Location: ".$admin_file.".php?op=nqviewquizlist");
?>
Return current item: Nukequiz