function index() { session_start(); // $login = file_get_contents('http://localhost/laravel-login/app/models/check_login.php'); // $login = json_decode($login, true); $login = check_login(); $gco = check_gco(); $hvol = check_hvol(); if ($login['check_session'] != "" || $gco['check_gco'] != "" || isset($hvol["check_login"])) { // $username = $login['check_user']; $username = "******"; // $password = base64_encode($login['check_pass']); $password = base64_encode("huyhoangk57"); $result = $this->login_model->login($username, $password); if (!empty($result)) { $_SESSION["name"] = $result->name; $_SESSION["user_name"] = $result->username; $_SESSION["category"] = $result->level; $_SESSION["id"] = $result->userid; $_SESSION["logged_in"] = TRUE; $logged_in = TRUE; } } else { $this->load->view('login/login_signup'); } if ($logged_in) { redirect('/appointment/index', 'refresh'); } }
* */ session_start(); include "../lib/config.inc.php"; include "../lib/func.inc.php"; include "../lib/classes.inc.php"; include "E:/Study/workspace/laravel-login/app/models/check_login.php"; include "E:/Study/workspace/Chikitsa/application/modules/login/controllers/check_session.php"; include "E:/Study/workspace/hvol/application/controllers/check_session.php"; require_once '../lang/' . $idioma . '.php'; header("Content-type: text/html; charset=ISO-8859-1", true); // $login = file_get_contents('http://localhost/laravel-login/app/models/check_login.php'); // $login = json_decode($login, true); $login = check_login(); $chikitsa = check_chikitsa(); $hvol = check_hvol(); if (checklog()) { // $_SESSION["session_user"] = $_POST['usuario']; // $_SESSION["session_password"] = $_POST['senha']; $handle = opendir('../imagens/wallpapers'); while ($file = readdir($handle)) { if (strpos($file, ".") !== 0 && $file != 'Thumbs.db') { $papel[] = $file; } } closedir($handle); $rand = rand(0, count($papel) - 1); $prim_nome = explode(' ', $_SESSION[nome_user]); $prim_nome = $prim_nome[0] . ' ' . $prim_nome[count($prim_nome) - 1]; $titulo = $_SESSION[titulo]; if ($_SESSION[nome_user] == 'Administrador') {