mirror of
https://gitlab.com/JKANetwork/CheckServer.git
synced 2026-02-27 23:43:46 +01:00
Change connect to load and fix code
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
<?php
|
||||
require "functions.php";
|
||||
require "load.php";
|
||||
|
||||
if (isset($_GET['do'])){
|
||||
if ($_GET['do'] == 'logout'){
|
||||
require_once "connect.php";
|
||||
//dbw_query($db_conn, "UPDATE USERS SET SessionID = NULL WHERE SessionID='$_COOKIE[SessionID]'");
|
||||
session_destroy();
|
||||
header('Location: index.php');
|
||||
}
|
||||
@@ -15,7 +13,7 @@ if (isset($_SESSION['UserID'])){ //Ya está logueado
|
||||
}
|
||||
|
||||
if (!isset($_POST['nick'])){
|
||||
echo $twig->render('login.twig');
|
||||
renderPage('login.twig');
|
||||
}
|
||||
if (isset($_POST['nick'])){
|
||||
$nick=$_POST['nick'];
|
||||
@@ -27,7 +25,7 @@ if (isset($_POST['nick'])){
|
||||
$_SESSION['UserID'] = $resql['ID_U'];
|
||||
header('Location: panel.php');
|
||||
}else{
|
||||
echo $twig->render('login.twig', array('status' => 'error'));
|
||||
renderPage('login.twig', array('status' => 'error'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user