<?php //加载auth类 include_once "class/auth_Class.php"; header("Content-Type: text/html; charset=utf-8"); if (checkLoginStatus($U, $P, $textKey) == false) { return false; } ?> <html> <head> <title> Anehta! </title> <script src="../library/anehta.js" ></script> <script src="../library/jQuery.js" ></script> <script src="../server/js/effects.core.js"></script> <script src="../server/js/ui.core.js"></script> <script src="../server/js/effects.bounce.js"></script> <script src="../server/js/effects.slide.js"></script> <script src="../server/js/effects.shake.js"></script> <!-- script src="../server/js/effects.explode.js"></script --> <script src="../server/js/effects.clip.js"></script> <script src="../server/js/ui.accordion.js"></script> <script src="../server/js/ui.draggable.js"></script> <script src="../server/js/ui.dialog.js"></script> <script src="../server/js/ui.resizable.js"></script> <!-- 加载 JSONER --> <script src="../server/js/_compressed_jsoner.commons.js"></script> <script src="../server/js/_compressed_jsoner.js"></script>
<?php //加载auth类 include_once "class/auth_Class.php"; header("Content-Type: text/html; charset=utf-8"); checkLoginStatus($U, $P, $textKey); createCookie("anehtaDoor", null, -1, '/', '', 0, 1); unlink("../temp/session_token"); header("Location: login.php"); ?>
// <!-- Stuff we need to output?--> ?> </ul> </div> </div> </div> </div> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="materialize/js/jquery1.js"></script> <!-- Compiled and minified JavaScript --> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script> <script type="text/javascript" src="./main.js"></script> <script> $(document).ready(function () { $(".button-collapse").sideNav(); }); </script> <?php //LOCATED IN ./core/functions/users.php checkLoginStatus(); ?> </body> </html>
function getPage($getPage_connection, $getPage_connection2, $getPage_connection3) { // use GET page variable to define incoming page if (isset($_GET["page"])) { $currentPage = cleanString($_GET["page"], true); // otherwise default to home } else { $currentPage = "home"; } // else $_SESSION["pageTypeInfo"] = getPageTypeInfo($getPage_connection2, $currentPage); // layout and login // get login status $loggedInArray = checkLoginStatus($getPage_connection2); // if just logging in and successful logged in, if ($loggedInArray["loggingIn"] === true && $loggedInArray["status"] === true) { require "map.php"; // if not just logging in but succesfully logged in already, } else { if ($loggedInArray["loggingIn"] === false && $loggedInArray["status"] === true) { // check for admin privilege if ($_SESSION["pageTypeInfo"]["admin"] == 1) { if ($_SESSION["admin"] == 1) { require $_SESSION["pageTypeInfo"]["layout"]; } else { require "map.php"; } // else // otherwise if admin privilege is not required, } else { // if home page, if ($_SESSION["pageTypeInfo"]["layout"] == "home.php") { // unless logging out, default to map page $clean_action = cleanString($_GET["action"], true); if ($clean_action == "logout") { require "home.php"; } else { require "map.php"; } // else } else { if (strlen($_SESSION["pageTypeInfo"]["layout"]) >= 1) { require $_SESSION["pageTypeInfo"]["layout"]; } else { require "map.php"; } // else } // else } // else // default } else { // if page requires login access or admin send to default if ($_SESSION["pageTypeInfo"]["login"] == 1 || $_SESSION["pageTypeInfo"]["admin"] == 1) { require "home.php"; } else { if (strlen($_SESSION["pageTypeInfo"]["layout"]) >= 1) { require $_SESSION["pageTypeInfo"]["layout"]; } else { require "home.php"; } // else } // else } } // else }
<?php //login_delegate.php session_start(); //require "/home/amcisaor/secure/login_rpc.php"; require $_SERVER['DOCUMENT_ROOT'] . "/secure/login_rpc.php"; //print_r(session_id()); if ($_POST["action"] == "LOGIN") { print_r(checkUserExists($_POST["Matric_NO"], $_POST["Password"])); } elseif ($_POST["action"] == "CHECKLOGINSTATUS") { print_r(checkLoginStatus()); } elseif ($_POST["action"] == "LOGOUT") { print_r(signOutFromSession()); } elseif ($_POST["action"] == "UPDATEINFO") { //REMINDER TO SUBMIT TO DB TO UPDATE //REMINDER TO ESCAPE ALL CHARACTERS print_r(updateUserInfo(dissoc($_POST, "action"))); } //elseif($_POST["action"]=="READUSERNAME_EN"){ //print_r(returnUserNameEnglish()); //}elseif($_POST["action"]=="READUSERNAME_CH"){ //print_r(returnUserNameChinese()); //}
require_once 'update_title.php'; require_once 'user_login.php'; require_once 'user_logout.php'; require_once 'ip_to_country.php'; session_start(); if ($_REQUEST['command'] == "verify_user") { header("Content-type: text/html"); } else { header("Content-type: text/xml"); } $connection = connectDb(); $response = ""; logUserAction(); switch ($_REQUEST['command']) { case "check_login_status": $response = checkLoginStatus(); break; case "user_login": $response = userLogin($_REQUEST['user_name'], $_REQUEST['password']); break; case "user_logout": $response = userLogout(); break; case "get_comments": $response = getComments($_REQUEST['url']); break; case "new_comment": $response = newComment($_REQUEST['url'], $_REQUEST['content'], $_REQUEST['parent_id']); break; case "rate_comment": $response = rateComment($_REQUEST['comment_id'], $_REQUEST['up']);
if (file_exists("install.php")) { // Send user to Install header("Location: install.php"); // Makes sure that other code dont get executed exit; } } else { // Config file/files require "config/config.php"; require "functions.php"; $loginStatus = ""; // Get Login Status if (isset($_POST) && !empty($_POST)) { $post_username = filter_input(INPUT_POST, "username", FILTER_SANITIZE_FULL_SPECIAL_CHARS); $post_password = $_POST["password"]; $loginStatus = checkLoginStatus($username, $password, $post_username, $post_password); } else { $loginStatus = login_validation($username, $password); } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,100,400italic,500,700' rel='stylesheet' type='text/css'> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/css/uploadfile.css" rel="stylesheet"> <title>CleanUpload</title> </head> <body>