コード例 #1
0
function us_checkUser()
{
    // if the session id is not set, redirect to login page
    if (!isset($_SESSION['normal_user_id'])) {
        header('Location: ' . WEB_ROOT . 'user_login.php');
        exit;
    }
    // the user want to logout
    if (isset($_GET['logout'])) {
        us_doLogout();
    }
}
コード例 #2
0
ファイル: index.php プロジェクト: findcomrade/facebookchalobe
<?php

require_once 'library/config.php';
$_SESSION['shop_return_url'] = $_SERVER['REQUEST_URI'];
if (isset($_GET['logout'])) {
    us_doLogout();
}
//also change the name of the page title in header.php
$course = isset($_GET['c']) && $_GET['c'] != '' ? decrypt($_GET['c']) : 0;
/*corresponds to the category id shown by the current page link */
//$university  = (isset($_GET['u']) && $_GET['u'] != '') ? $_GET['u'] : 0;
$subuniversity = isset($_GET['su']) && $_GET['su'] != '' ? decrypt($_GET['su']) : 0;
$subtopicid = isset($_GET['st']) && $_GET['st'] != '' ? decrypt($_GET['st']) : 0;
if ($course != 0 || $subuniversity != 0) {
    $nothome = 1;
}
require_once 'include/header.php';
$_SESSION['normal_login_return_url'] = $_SERVER['REQUEST_URI'];
if (isset($_SESSION['normal_uid'])) {
    $uidphp = $_SESSION['normal_uid'];
} else {
    $uidphp = 'notknown';
}
?>
<body>
	
    <?php 
require_once 'include/top.php';
if ($nothome != 1) {
    ?>
        <div style="background: url('/images/2020485686.jpg');width: 100%;margin-top: -23%;