Location: PHPKode > projects > Nukequiz > html/root/nq_installer/remove.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	 */
/*****************************************************************/
//Language Definitions You May Want To Edit
define("_NQ_FAILED","<b><font color='#CC0000'>&nbsp;Failed</font></b>");
define("_NQ_OK","<b><font color='#00CC00'>&nbsp;Completed</font></b>");
define("_NQ_UNINSTALL","<b>&loz;&nbsp;Uninstalled Table&nbsp;</b>");
define("_NQ_SITEADMIN","Main Administration");
define("_NQ_REMOVEDNUKEQUIZ","Nukequiz Has Been Removed From Your Site!!");
define("_NQ_REMOVEINSTALLERFILES","Please Remove The Installer Dir & nqinst.php File From Your Server!!");
//////////////////////////////////////////////////////Do Not Edit Below
$pagetitle = "&copy;&nbsp;Nukequiz Installer";
@include("header.php");
include_once("includes/functions_nukequiz.php");
$r=$db->sql_query("SELECT dir FROM ".$prefix."_nquiz_quiz WHERE qid='$qid'");
list($title) = $db->sql_fetchrow($r);
$imagesdir = $config['images_directory'];
$title = str_replace(" ", "_", $title);
removeDir("modules/$module_name/$imagesdir/$dir/");

$db->sql_query("DELETE FROM ".$prefix."_nquiz_temp");
$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'");
OpenTable();
echo "<center><table cellpadding='2' cellspacing='2' border='0'><tr><td align='center' colspan='2'>";
echo "<b>$pagetitle</b></td></tr><tr>";
$result = $db->sql_query("DROP TABLE ".$prefix."_nquiz_temp");
if (!$result) { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_temp</td><td>"._NQ_FAILED."</td></tr><tr>"; } 
else { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_temp</td><td>"._NQ_OK."</td></tr><tr>"; }
$result = $db->sql_query("DROP TABLE ".$prefix."_nquiz_config");
if (!$result) { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_config</td><td>"._NQ_FAILED."</td></tr><tr>"; } 
else { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_config</td><td>"._NQ_OK."</td></tr><tr>"; }
$result = $db->sql_query("DROP TABLE ".$prefix."_nquiz_quiz");
$drop = $db->sql_query("DROP TABLE ".$prefix."_nquiz_compresults");
if (!$result) { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_quiz</td><td>"._NQ_FAILED."</td></tr><tr>"; } 
else { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_quiz</td><td>"._NQ_OK."</td></tr><tr>"; }
$result = $db->sql_query("DROP TABLE ".$prefix."_nquiz_questions");
if (!$result) { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_questions</td><td>"._NQ_FAILED."</td></tr><tr>"; } 
else { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_questions</td><td>"._NQ_OK."</td></tr><tr>"; }
$result = $db->sql_query("DROP TABLE ".$prefix."_nquiz_scoreboard");
$drop = $db->sql_query("DROP TABLE ".$prefix."_nquiz_compquestion");
if (!$result) { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_scoreboard</td><td>"._NQ_FAILED."</td></tr><tr>"; } 
else { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_scoreboard</td><td>"._NQ_OK."</td></tr><tr>"; }
$result = $db->sql_query("DROP TABLE ".$prefix."_nquiz_sections");
$drop = $db->sql_query("DROP TABLE ".$prefix."_nquiz_scoreboard");
if (!$result) { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_sections</td><td>"._NQ_FAILED."</td></tr><tr>"; } 
else { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_sections</td><td>"._NQ_OK."</td></tr><tr>"; }
$result = $db->sql_query("DROP TABLE ".$prefix."_nquiz_league");
if (!$result) { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_league</td><td>"._NQ_FAILED."</td></tr><tr>"; } 
else { echo "<td>"._NQ_UNINSTALL."".$prefix."_nquiz_league</td><td>"._NQ_OK."</td></tr><tr>"; }
echo "<td colspan='2' align='center'><br><b>"._NQ_REMOVEDNUKEQUIZ."</b></td></tr><tr>";
echo "<td colspan='2' align='center'><br><b>"._NQ_REMOVEINSTALLERFILES."</b><br></td></tr><tr>";
echo "<td colspan='2' align='center'><a href=\"".$admin_file.".php\">"._NQ_SITEADMIN."</a></td></tr><tr>";
echo "<td colspan='2' align='center'>"._GOBACK."";
echo "</td></tr></table></center>";
nqremoveDir("modules/Nukequiz/");
unlink("includes/functions_nukequiz.php");
CloseTable();
@include("footer.php");
?>
Return current item: Nukequiz