本文整理汇总了PHP中sessionStatus函数的典型用法代码示例。如果您正苦于以下问题:PHP sessionStatus函数的具体用法?PHP sessionStatus怎么用?PHP sessionStatus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sessionStatus函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: websiteHeader
<!--
Index Page: Last edited 12.10.15
-->
<?php
include "config.php";
include "functions.php";
websiteHeader();
?>
<body>
<div id="background">
<?php
if (!sessionStatus()) {
?>
<div id="login">
<div class="logo"></div>
<p class="landing-message">Whether it's a book you're looking for or a book you're willing to share, Booklend is a powerful extension of your library.</p>
<div id="signin-error"></div>
<div class="login-form">
<form method="post" action="index.php" name="loginForm" id="loginForm" onsubmit="return checkLogin();"> <!-- Login Form -->
<input type="text" name="email" id="email" placeholder="UNIVERSITY EMAIL" />
<input type="password" name="password" id="password" placeholder="PASSWORD" />
<input type="password" name="confirmPassword" id="confirmPassword" placeholder="CONFIRM PASSWORD" class="hidden-register" />
<div class="submit-buttons">
<input type="submit" name="login" id="Login" value="LOGIN" class="close-login" id="button"/>
<p class="signup-button close-login">or <span class="signup"><u>Signup</u></span></p>
<input type="submit" name="signup" id="Signup" value="SIGN UP" class="hidden-register" id="button" />
<p class="login-button hidden-register">or <span class="login"><u>Login</u></span></p>
示例2: chdir
<?php
// Cambiar de directorio.
chdir('..');
require_once 'base.php';
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (sessionStatus()) {
$json = array('result' => false);
$d_docume = filter_var($_GET['d_docume'], FILTER_SANITIZE_NUMBER_INT);
$query = $db->query("select * from docente where d_docume='{$d_docume}';");
$json = $query->fetch(PDO::FETCH_OBJ);
echo json_encode($json, JSON_FORCE_OBJECT);
} else {
error404();
}
} else {
error404();
}
示例3: header
header('Content-type: application/json');
session_start();
include 'cred.php';
$mysqli = new mysqli("oniddb.cws.oregonstate.edu", "johnsjo3-db", $ecret, "johnsjo3-db");
if ($mysqli->connect_errno) {
sendError("Failed to connect to database (" . $mysqli->connect_errno . ") " . $mysqli->connect_error);
exit;
}
$requestMethod = $_SERVER["REQUEST_METHOD"];
if (!($requestMethod == 'GET')) {
exit;
}
if (isset($_GET['action'])) {
if ($_GET['action'] == 'sessionStatus') {
sessionStatus();
}
if ($_GET['action'] == 'login') {
login($mysqli);
}
if ($_GET['action'] == 'logout') {
logout();
}
if ($_GET['action'] == 'signUp') {
signUp($mysqli);
}
}
/*******************************
Functions
*********************************/
function connectDatabase()