Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+<?php
2
+$current = "challenges";
3
+include ("../../header.php");
4
+
5
+//make a new TemplatePower object
6
+if(file_exists( "$skindir/default.tpl")) $tpl = new TemplatePower("$skindir/default.tpl" );
7
+else $tpl = new TemplatePower(_BASEDIR."default_tpls/default.tpl");
8
+$tpl->assignInclude( "header", "$skindir/header.tpl" );
9
+$tpl->assignInclude( "footer", "$skindir/footer.tpl" );
10
+include(_BASEDIR."includes/pagesetup.php");
11
+include_once(_BASEDIR."languages/".$language."_admin.php");
12
+if(!isADMIN) accessDenied( );
13
+$confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false;
14
+if($confirm == "yes") {
15
+	dbquery("DELETE FROM `".TABLEPREFIX."fanfiction_codeblocks` WHERE code_module = 'challenges'");
16
+	dbquery("DELETE FROM `".TABLEPREFIX."fanfiction_panels` WHERE panel_name LIKE 'challenges%'");
17
+	dbquery("DELETE FROM `".TABLEPREFIX."fanfiction_pagelinks` WHERE link_name LIKE 'challenges%'");
18
+	dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` DROP `anonchallenges`");
19
+	dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_stories` DROP `challenges`");
20
+	dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_series` DROP `challenges`");
21
+	dbquery("DROP TABLE `".TABLEPREFIX."fanfiction_challenges`");
22
+	include("version.php");
23
+	dbquery("DELETE FROM `".TABLEPREFIX."fanfiction_modules` WHERE name = '$moduleName'");	
24
+	$output = write_message(_ACTIONSUCCESSFUL);
25
+}
26
+else if($confirm == "no") {
27
+	$output = write_message(_ACTIONCANCELLED);
28
+}
29
+else {
30
+	$chalquery = dbquery("SHOW COLUMNS FROM ".$settingsprefix."fanfiction_settings LIKE 'anonchallenges'");
31
+	if(dbnumrows($chalquery)) $output = write_message(_CONFIRMUNINSTALL." "._UNINSTALLWARNING."<br /><a href='uninstall.php?confirm=yes'>"._YES."</a> "._OR." <a href='uninstall.php?confirm=no'>"._NO."</a>");
32
+	else $output .= write_message(_MODNOTINSTALLED);
33
+}
34
+$tpl->assign("output", $output);
35
+$tpl->printToScreen( );
36
+?>
0 37
\ No newline at end of file