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