📄 doignoreuser.php
字号:
<?php
//Admins cannot be ignored
if(ChatServer::userInRole($ignoredUserID, ROLE_ADMIN)) return;
//User cannot ignore him self
if($this->userid == $ignoredUserID) return;
$this->sendToUser($ignoredUserID, new Message('ignu', $this->userid, null, $txt));
$stmt = new Statement("SELECT * FROM {$GLOBALS['fc_config']['db']['pref']}ignors WHERE userid=? AND ignoreduserid=?");
if(($rs = $stmt->process($this->userid, $ignoredUserID)) && $rs->hasNext()) {
$stmt = new Statement("UPDATE {$GLOBALS['fc_config']['db']['pref']}ignors SET created=NOW() WHERE userid=? AND ignoreduserid=?");
$stmt->process($this->userid, $ignoredUserID);
} else {
$stmt = new Statement("INSERT INTO {$GLOBALS['fc_config']['db']['pref']}ignors (created, userid, ignoreduserid) VALUES (NOW(), ?, ?)");
$stmt->process($this->userid, $ignoredUserID);
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -