doignoreuser.php

来自「flashget43的源代码 一个比较常用的下载程序」· PHP 代码 · 共 18 行

PHP
18
字号
<?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 + =
减小字号Ctrl + -
显示快捷键?