本文整理汇总了PHP中GCM::checkblockuser方法的典型用法代码示例。如果您正苦于以下问题:PHP GCM::checkblockuser方法的具体用法?PHP GCM::checkblockuser怎么用?PHP GCM::checkblockuser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GCM
的用法示例。
在下文中一共展示了GCM::checkblockuser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GCM
<?php
if (isset($_POST["message"])) {
$messagetype = $_POST["messagetype"];
$message = $_POST["message"];
$fromid = $_POST["fromid"];
$toid = $_POST["toid"];
$deviceid = $_POST["deviceid"];
require 'db.php';
include_once './GCM.php';
$cklogin = new GCM();
$result = $cklogin->checkuserlogin($fromid, $deviceid);
if ($result == 'loggedin') {
$blockcheck = new GCM();
$checkblock = $blockcheck->checkblockuser($fromid, $toid);
if ($checkblock == 'true') {
$sender_name = '';
$sender_lname = '';
$logintype = '';
$chattype = 'individual';
$query_exist = "select * from user_relation_map where user_id='{$fromid}' and friend_id='{$toid}'";
$result_exist = mysqli_query($conn, $query_exist);
if (mysqli_num_rows($result_exist) > 0) {
} else {
$query = "INSERT INTO `user_relation_map`(user_id,friend_id) VALUES ({$fromid},{$toid})";
$result = mysqli_query($conn, $query);
}
$result_sendername = mysqli_query($conn, "SELECT * FROM usertable where userid='{$fromid}'") or die(mysql_error());
if (mysqli_num_rows($result_sendername) > 0) {
while ($row = $result_sendername->fetch_assoc()) {
$sender_name = $row['firstname'];