Access denied'); } define('ADMIN_IP_LOCK',true); } /*****[END]******************************************** [ Mod: Admin IP Lock v2.1.0 ] ******************************************************/ global $admin_file; list($the_first )= $db->sql_ufetchrow("SELECT COUNT(*) FROM ".$prefix."_authors", SQL_NUM); if ($the_first == 0) { if (!$name) { /*****[BEGIN]****************************************** [ Other: Need To Delete v1.0.0 ] ******************************************************/ need_delete('install.php'); need_delete('upgrade.php'); need_delete('install', true); /*****[END]******************************************** [ Other: Need To Delete v1.0.0 ] ******************************************************/ include_once(NUKE_BASE_DIR.'header.php'); title($sitename.': '._ADMINISTRATION); OpenTable(); echo "
"._NOADMINYET."


" ."
" ."" ."" ."" ."" .""; /*****[BEGIN]****************************************** [ Other: Admin Password Confirm v1.0.0 ] ******************************************************/ echo ""; /*****[END]******************************************** [ Other: Admin Password Confirm v1.0.0 ] ******************************************************/ /*****[BEGIN]****************************************** [ Mod: Password Strength Meter v1.0.0 ] ******************************************************/ echo "
"._NICKNAME.":
"._HOMEPAGE.":
"._EMAIL.":
"._PASSWORD.":
"._PASS_CONFIRM.":
" ."" ."" ."" ."" ."" ."
"._PSM_NOTRATED."
"; echo ""._PSM_CLICK." "._PSM_HERE." "._PSM_HELP.""; /*****[END]******************************************** [ Mod: Password Strength Meter v1.0.0 ] ******************************************************/ echo ""; echo "
"._CREATEUSERDATA." "._YES."  "._NO."
" ."" ."
"; CloseTable(); include_once(NUKE_BASE_DIR.'footer.php'); } switch($fop) { case "create_first": create_first($name, $url, $email, $pwd, $user_new, $cpwd); break; } exit; } if (isset($aid) && (ereg("[^a-zA-Z0-9_-]",trim($aid)))) { die('Begone'); } if (isset($aid)) { $aid = substr($aid, 0,25);} if (isset($pwd)) { $pwd = substr($pwd, 0,40);} if ((isset($aid)) && (isset($pwd)) && (isset($op)) && ($op == "login")) { /*****[BEGIN]****************************************** [ Mod: Advanced Security Code Control v1.0.0 ] ******************************************************/ $gfxchk = array(1,5,6,7); if (!security_code_check($_POST['gfx_check'], $gfxchk)) { /*****[END]******************************************** [ Mod: Advanced Security Code Control v1.0.0 ] ******************************************************/ redirect($admin_file.".php"); } if(!empty($aid) AND !empty($pwd)) { $txt_pwd = $pwd; /*****[BEGIN]****************************************** [ Base: Evolution Functions v1.5.0 ] ******************************************************/ $evo_crypt = EvoCrypt($pwd); $pwd = md5($pwd); /*****[END]******************************************** [ Base: Evolution Functions v1.5.0 ] ******************************************************/ $admlanguage = addslashes(get_admin_field('admlanguage', $aid)); $rpwd = get_admin_field('pwd', $aid); //Un-evocrypt if ($evo_crypt == $rpwd) { $db->sql_query("UPDATE `".$prefix."_authors` SET `pwd`='".$pwd."' WHERE `aid`='".$aid."'"); $rpwd = get_admin_field('pwd', $aid); } if($rpwd == $pwd && !empty($rpwd)) { /*****[BEGIN]****************************************** [ Mod: Persistent Admin Login v2.0.0 ] ******************************************************/ $persistent = intval($persistent); $admin = base64_encode("$aid:$pwd:$admlanguage:$persistent"); $time = (intval($admin1[3])) ? 43200 : 60; setcookie('admin',$admin,time()+($time*60)); /*****[END]******************************************** [ Mod: Persistent Admin Login v2.0.0 ] ******************************************************/ unset($op); /*****[BEGIN]****************************************** [ Mod: Admin Tracker v1.0.1 ] ******************************************************/ unset($txt_pwd); redirect($_SERVER['REQUEST_URI']); } else { log_write('admin', 'Attempted to login with "' . $aid . '"/"' . $txt_pwd . '" but failed', 'Security Breach'); unset($txt_pwd); } } else { if(empty($aid) AND empty($pwd)) { log_write('admin', 'Attempted to login to the admin area with no username and password', 'Security Breach'); } else if(empty($aid)) { log_write('admin', 'Attempted to login to the admin area with no username', 'Security Breach'); } else if(empty($pwd)) { log_write('admin', 'Attempted to login to the admin area with no password', 'Security Breach'); } } /*****[END]******************************************** [ Mod: Admin Tracker v1.0.1 ] ******************************************************/ } $admintest = 0; if(isset($admin) && !empty($admin) && (!isset($admin1) || !is_array($admin1))) { $admin1 = base64_decode($admin); $admin1 = explode(":", $admin1); $aid = addslashes($admin1[0]); $pwd = $admin1[1]; $admlanguage = (isset($admin1[2])) ? $admin1[2] : 'english'; if (empty($aid) OR empty($pwd)) { $admintest=0; /*****[BEGIN]****************************************** [ Mod: Admin Tracker v1.0.1 ] ******************************************************/ log_write('admin', 'Caused an Intruder Alert', 'Security Breach'); /*****[END]******************************************** [ Mod: Admin Tracker v1.0.1 ] ******************************************************/ die('Illegal Operation'); } $aid = substr($aid, 0,25); if (!($admdata = get_admin_field('*', $aid))) { die('Selection from database failed!'); } else { if ($admdata['pwd'] == $pwd && !empty($admdata['pwd'])) { $admintest = 1; /*****[BEGIN]****************************************** [ Mod: Persistent Admin Login v2.0.0 ] ******************************************************/ $time = (intval($admin1[3])) ? 43200 : 60; if (!isset($op) || $op != 'logout') { setcookie('admin',$admin,time()+($time*60)); } /*****[END]******************************************** [ Mod: Persistent Admin Login v2.0.0 ] ******************************************************/ } else { $admdata = array(); /*****[BEGIN]****************************************** [ Mod: Admin Tracker v1.0.1 ] ******************************************************/ log_write('admin', 'Attempted to login with "' . $aid . '" but failed', 'Security Breach'); /*****[END]******************************************** [ Mod: Admin Tracker v1.0.1 ] ******************************************************/ } } unset($admin1); } if(!isset($op)) { $op = 'adminMain'; } elseif(($op=='mod_authors' OR $op=='modifyadmin' OR $op=='UpdateAuthor' OR $op=='AddAuthor' OR $op=='deladmin2' OR $op=='deladmin' OR $op=='assignstories' OR $op=='deladminconf') AND ($admdata['name'] != 'God')) { die('Illegal Operation'); } if($admintest) { if(!$admin) exit('Illegal Operation'); switch($op) { case "do_gfx": do_gfx(); break; case "deleteNotice": deleteNotice($id); break; case "GraphicAdmin": GraphicAdmin(); break; case "adminMain": /*****[BEGIN]****************************************** [ Mod: External Admin Index v1.0.0 ] ******************************************************/ include_once(NUKE_ADMIN_MODULE_DIR.'index.php'); /*****[END]******************************************** [ Mod: External Admin Index v1.0.0 ] ******************************************************/ adminMain(); break; case "logout": setcookie("admin", false); unset($admin); header("Refresh: 3; url=".$admin_file.".php"); DisplayError(""._YOUARELOGGEDOUT."", 1); break; case "login"; unset($op); default: if (!is_admin()) { login(); } /*****[BEGIN]****************************************** [ Mod: Admin Icon/Link Pos v1.0.0 ] ******************************************************/ define('ADMIN_POS', true); /*****[END]******************************************** [ Mod: Admin Icon/Link Pos v1.0.0 ] ******************************************************/ define('ADMIN_PROTECTION', true); $casedir = opendir(NUKE_ADMIN_DIR.'case'); while(false !== ($func = readdir($casedir))) { if(substr($func, 0, 5) == "case.") { include(NUKE_ADMIN_DIR.'case/'.$func); } } closedir($casedir); $result = $db->sql_query("SELECT title FROM ".$prefix."_modules ORDER BY title ASC"); while (list($mod_title) = $db->sql_fetchrow($result,SQL_BOTH)) { if (is_mod_admin($mod_title) && file_exists(NUKE_MODULES_DIR.$mod_title.'/admin/index.php') AND file_exists(NUKE_MODULES_DIR.$mod_title.'/admin/links.php') AND file_exists(NUKE_MODULES_DIR.$mod_title.'/admin/case.php')) { include(NUKE_MODULES_DIR.$mod_title.'/admin/case.php'); } } $db->sql_freeresult($result); break; } } else { switch($op) { default: if (!stristr($_SERVER['HTTP_USER_AGENT'], 'WebTV')) { header('HTTP/1.0 403 Forbidden'); } login(); break; } } ?>