<?php include '../../../Conf/Include.php'; set_dependencies(array("AdminController")); //INICIA UNA NUEVA SESION...CLASE DEL CORE Tools/Session Session::InitSession(); Session::InsertSession("page_name", "Principal"); //EN EL INDEX DESTRUYE TODO TIPO DE SESION DENTRO DE LOS TITULOS... if (Session::ExistSession("title")) { Session::DestroySession("title"); if (Session::ExistSession("home")) { Session::DestroySession("home"); } } //CARGARA LOS SCRIPTS NECESARIOS EN EL HEADER $header = ""; //CARGARA EL BODY $body = "<?php include 'view_logout.php' ?>"; //CARGARA EL FOOTER O LOS SCRIPTS JS $footer = "<script src='session.js'></script>"; //CUIDADO SOLO CARGA LOS INITS DE JS ejemplo Load(); $end_footer = "exit_session();"; //PREPARANDO LA VISTA ... ViewClass::PrepareView("View.phtml", "Admin"); //LLAMANDO LA VISTA ViewClass::SetView(ViewClass::SetParamsString($body, $header, $end_footer, $footer));
<?php include '../../../Conf/Include.php'; set_dependencies(array("AdminController")); Session::InitSession(); //INICIA SESION $header = new Http\Header(); //INSTANCIA EL HEADER if (Session::ExistSession("login")) { //VERIFICA SI EXISTE LA SESION LOGIN $id_log = Session::GetSession("log"); //OBTIENE EL LOG DE LOGUEO $hora_salida = FunctionsController::get_time(); //OBTIENE LA HORA DE SALIDA $admin = new AdminController(); //INSTANCIA EL CONTROLADOR DEL ADMIN $admin->Update_log($id_log, $hora_salida); //ACTUALIZA EL LOG O BITACORA if (!Session::ExistSession("DUPLICATE_SESSION")) { //VERIFICA SI ES SESION DUPLICADA $admin->UpdateSession($_SESSION['login']["id_log"], 0); //EN DADO CASO NO SEA ENTONCES RESTABLECE LA ACTIVIDAD A CERO } Session::DestroySession("", true); //LIBERA TODAS LAS VARIABLES DE SESION ... $header->redirect(FunctionsController::GetUrl("login.php")); //REDIRECT } else { $header->redirect(FunctionsController::GetUrl("login.php")); //REDIRECT }
$SQL .= "password\t\t= '" . $GLOBALS['DATABASE']->sql_escape($md5Password) . "', "; $SQL .= "email\t\t\t= '" . $GLOBALS['DATABASE']->sql_escape($AdminMail) . "', "; $SQL .= "email_2\t\t= '" . $GLOBALS['DATABASE']->sql_escape($AdminMail) . "', "; $SQL .= "ip_at_reg\t\t= '" . $_SERVER['REMOTE_ADDR'] . "', "; $SQL .= "lang\t\t\t= '" . $LNG->getLanguage() . "', "; $SQL .= "authlevel\t\t= " . AUTH_ADM . ", "; $SQL .= "dpath \t\t\t= '" . DEFAULT_THEME . "', "; $SQL .= "rights\t\t\t= '', "; $SQL .= "id_planet\t\t= 1, "; $SQL .= "universe\t\t= 1, "; $SQL .= "galaxy\t\t\t= 1, "; $SQL .= "system\t\t\t= 1, "; $SQL .= "planet\t\t\t= 2, "; $SQL .= "register_time\t= " . TIMESTAMP . ";"; $GLOBALS['DATABASE']->query($SQL); require_once 'includes/functions/CreateOnePlanetRecord.php'; $PlanetID = CreateOnePlanetRecord(1, 1, 1, 1, 1, '', true, AUTH_ADM); $SESSION = new Session(); $SESSION->DestroySession(); $SESSION->CreateSession(1, $AdminUsername, $PlanetID, 1, 3, DEFAULT_THEME); $_SESSION['admin_login'] = $md5Password; @unlink($enableInstallToolFile); $template->show('ins_step8.tpl'); break; } break; default: $template->assign(array('intro_text' => $LNG['intro_text'], 'intro_welcome' => $LNG['intro_welcome'], 'intro_install' => $LNG['intro_install'])); $template->show('ins_intro.tpl'); break; }