$lastact = $databaseobject->set_lastaction(); if ($_POST['login'] || $_POST['login_x']) { $a = session_id(); $_SESSION[session_id() . 'useremail'] = $_POST['useremail']; $na = "'" . $_POST['useremail'] . "'"; $chk = "select * from " . $_POST['usertype'] . " where email=" . $na; $chk1 = @mysql_query($chk); if (@mysql_num_rows($chk1) > 0) { $tt = "test"; } else { $sql = "INSERT INTO temp_email(email,e_date) VALUES ('" . $_POST['email'] . "','" . time() . "')"; mysql_query($sql); } $sql = "INSERT INTO temp_session(svalue) VALUES ('" . $a . "')"; mysql_query($sql); } if ($databaseobject->get_login_id() && $_SERVER['QUERY_STRING'] == '=') { //2nd arg logout button event if ($databaseobject->unset_login_id()) { // print_r($_SESSION); $databaseobject->redirect(HREF_LINK); } } else { /* Controller classes */ require_once $class_path . 'controller.class.php'; //require_once($class_path.'views.class.php'); /* Initialize Controller */ $controller = new Controller($_SERVER['REQUEST_URI']); /* End Controller */ $controller->Execute(); }
<?php $dir_path = dirname(__FILE__) . '/'; $class_path = $dir_path . 'Controller/classes/'; $module_path = $dir_path . 'Modules/'; $view_path = $dir_path . 'Views/'; include $dir_path . 'includes/config.php'; $databaseobject = new DBclass(); $functionsobject = new GosuPokerFunctions(); $loginStatus = $databaseobject->set_login_id(); if ($databaseobject->get_login_id() && $_SERVER['QUERY_STRING'] == '=') { //2nd arg logout button event if ($databaseobject->unset_login_id()) { $databaseobject->redirect(HREF_LINK); } } if (!$databaseobject->get_login_id() && !$databaseobject->check_login_status()) { //Chk Login status include LOGIN_PAGE; } else { //echo '<pre>'; print_r($_SESSION); //echo 'SUCCESS'; /* Controller classes */ require_once $class_path . 'controller.class.php'; /* Initialize Controller */ if (isset($_SESSION['usr_type'])) { if ($_SESSION['usr_type'] == 'admin') { $redirect_to = $_SERVER['REQUEST_URI']; } if ($_SESSION['usr_type'] == 'employee') { //print_r($_POST);