assignInclude( "header", "$skindir/header.tpl" );
$tpl->assignInclude( "footer", "$skindir/footer.tpl" );
include(_BASEDIR."includes/pagesetup.php");
include_once(_BASEDIR."languages/".$language."_admin.php");
if(!isADMIN) accessDenied( );
$confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false;
if($confirm == "yes") {
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ( 'include(_BASEDIR.\"modules/storyend/storyend.php\");', 'storyend', 'storyend');");
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels` (`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_order`, `panel_hidden`, `panel_type`) VALUES ('alsolike', 'Also Like', 'modules/storyend/alsolike.php', 0, 0, 1, 'B');");
include("version.php");
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_modules`(`version`, `name`) VALUES('$moduleVersion', '$moduleName')");
$output = write_message(_ACTIONSUCCESSFUL);
}
else if($confirm == "no") {
$output = write_message(_ACTIONCANCELLED);
}
else {
$output = write_message(_CONFIRMINSTALL."
"._YES." "._OR." "._NO."");
}
$tpl->assign("output", $output);
$tpl->printToScreen( );
?>