本文整理汇总了PHP中DB_Functions::userDeviceVerify方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_Functions::userDeviceVerify方法的具体用法?PHP DB_Functions::userDeviceVerify怎么用?PHP DB_Functions::userDeviceVerify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::userDeviceVerify方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
<?php
if (!isset($_SESSION)) {
session_start();
}
if (!isset($_SESSION['email']) || !isset($_POST['rowid']) || !isset($_POST['registration']) || !isset($_POST['reqtime']) || !isset($_SESSION['loggedIn'])) {
header("location:index.php");
exit;
}
$email = $_SESSION['email'];
$reg = $_POST["registration"];
$rowId = $_POST["rowid"];
$reqTime = intval($_POST["reqtime"]);
include_once './db_functions.php';
$db = new DB_Functions();
if (!$db->userDeviceVerify($rowId, $email)) {
header($_SERVER["SERVER_PROTOCOL"] . " 507 User Not Authorized for Device");
exit;
}
$updTime = 1;
$updTime = $db->getPictureDIRUpdateTime($reg);
if ($reqTime > $updTime) {
header($_SERVER["SERVER_PROTOCOL"] . " 204 No Content");
exit;
}
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
$picture_dirs = $db->getPictureDir($reg);
$fxr = explode("}", $picture_dirs);
$paragraphs = $fxr[0];
for ($i = 1; $i < count($fxr) - 1; $i += 1) {
$paragraphs .= '},' . $fxr[$i];
示例2: header
<?php
if (!isset($_SESSION)) {
session_start();
}
if (!isset($_SESSION["email"]) || !isset($_SESSION["loggedIn"])) {
header("location:index.php");
exit;
}
include_once '../db_functions.php';
$db = new DB_Functions();
if (!$db->userDeviceVerify($_POST["rowid"], $_SESSION["email"])) {
header($_SERVER["SERVER_PROTOCOL"] . " 507 User Not Authorized for Device");
exit;
}
$_SESSION["rowid"] = $_POST["rowid"];
$_SESSION["registration"] = $_POST["registration"];
$_SESSION["name"] = $_POST["name"];