本文整理汇总了PHP中UserClass::LoggedIn方法的典型用法代码示例。如果您正苦于以下问题:PHP UserClass::LoggedIn方法的具体用法?PHP UserClass::LoggedIn怎么用?PHP UserClass::LoggedIn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserClass
的用法示例。
在下文中一共展示了UserClass::LoggedIn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UserClass
<?php
ob_start();
include "UserClass.php";
$USER = new UserClass();
if ($USER->LoggedIn()) {
// Tacos
} else {
header("Location: http://linux4hope.org/404");
}
require "dbclass.php";
$dbobj = new dbclass();
$cxn = $dbobj->cxn;
$appid = mysqli_real_escape_string($cxn, $_GET['id']);
$action = mysqli_real_escape_string($cxn, $_GET['action']);
if ($action === "approve") {
//Set approved, undelivered
$result = mysqli_query($cxn, "Select * from PENDING_APPS where APP_ID = {$appid}");
$row = mysqli_fetch_assoc($result);
if (!empty($row)) {
extract($row);
$remove = "Delete from PENDING_APPS where APP_ID = {$appid}";
$add = "Insert into ACCEPTED_APPS(APP_ID,APPLICANT_ID) values({$appid},{$APPLICANT_ID})";
mysqli_query($cxn, $remove) or die("Couldn't remove pending app");
mysqli_query($cxn, $add) or die("Couldn't add to approved");
header("Location: https://linux4hope.org/backend/viewapplication?appid={$appid}");
} else {
//If no results were found redirect to an error?
}
} else {
if ($action === "deny") {