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") {
list($installed) = dbrow(dbquery("SELECT COUNT(code_module) FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_module = 'betareader'"));
if(!$installed) {
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ( 'include(_BASEDIR.\"modules/betareader/members.php\");', 'membersList', 'betareader');");
include("version.php");
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_modules`(`version`, `name`) VALUES('$moduleVersion', '$moduleName')");
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ( 'include(_BASEDIR.\"modules/betareader/stats.php\");', 'sitestats', 'betareader');");
}
$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( );
?>