本文整理汇总了PHP中functions::is_ignor方法的典型用法代码示例。如果您正苦于以下问题:PHP functions::is_ignor方法的具体用法?PHP functions::is_ignor怎么用?PHP functions::is_ignor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类functions
的用法示例。
在下文中一共展示了functions::is_ignor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
//.........这里部分代码省略.........
// Удаляем все комментарии выбранного пользователя
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `" . $this->comments_table . "` WHERE `sub_id` = '" . $this->sub_id . "' AND `user_id` = '" . $res['user_id'] . "'"), 0);
mysql_query("DELETE FROM `" . $this->comments_table . "` WHERE `sub_id` = '" . $this->sub_id . "' AND `user_id` = '" . $res['user_id'] . "'");
} else {
// Удаляем отдельный комментарий
$count = 1;
mysql_query("DELETE FROM `" . $this->comments_table . "` WHERE `id` = '" . $this->item . "'");
}
// Вычитаем баллы из статистики пользователя
$req_u = mysql_query("SELECT * FROM `users` WHERE `id` = '" . $res['user_id'] . "'");
if (mysql_num_rows($req_u)) {
$res_u = mysql_fetch_assoc($req_u);
$count = $res_u['komm'] > $count ? $res_u['komm'] - $count : 0;
mysql_query("UPDATE `users` SET `komm` = '{$count}' WHERE `id` = '" . $res['user_id'] . "'");
}
// Обновляем счетчик комментариев
$this->msg_total(1);
}
header('Location: ' . str_replace('&', '&', $this->url));
} else {
echo '<div class="phdr"><a href="' . $this->url . '"><b>' . $arg['title'] . '</b></a> | ' . core::$lng['delete'] . '</div>' . '<div class="rmenu"><p>' . core::$lng['delete_confirmation'] . '<br />' . '<a href="' . $this->url . '&mod=del&item=' . $this->item . '&yes">' . core::$lng['delete'] . '</a> | ' . '<a href="' . $this->url . '">' . core::$lng['cancel'] . '</a><br />' . '<div class="sub">' . core::$lng['clear_user_msg'] . '<br />' . '<span class="red"><a href="' . $this->url . '&mod=del&item=' . $this->item . '&yes&all">' . core::$lng['clear'] . '</a></span>' . '</div></p></div>' . '<div class="phdr"><a href="' . $this->url . '">' . core::$lng['back'] . '</a></div>';
}
}
break;
default:
if (!empty($arg['context_top'])) {
echo $arg['context_top'];
}
/*
-----------------------------------------------------------------
Добавляем новый комментарий
-----------------------------------------------------------------
*/
if (!$this->ban && !functions::is_ignor($this->owner) && isset($_POST['submit']) && ($message = $this->msg_check(1)) !== false) {
if (empty($message['error'])) {
// Записываем комментарий в базу
$this->add_comment($message['text']);
$this->total = $this->msg_total(1);
$_SESSION['code'] = $message['code'];
} else {
// Показываем ошибки, если есть
echo functions::display_error($message['error']);
$this->total = $this->msg_total();
}
} else {
$this->total = $this->msg_total();
}
/*
-----------------------------------------------------------------
Показываем форму ввода
-----------------------------------------------------------------
*/
if (!$this->ban && !functions::is_ignor($this->owner)) {
echo $this->msg_form();
}
/*
-----------------------------------------------------------------
Показываем список комментариев
-----------------------------------------------------------------
*/
echo '<div class="phdr"><b>' . $arg['title'] . '</b></div>';
if ($this->total > $kmess) {
echo '<div class="topmenu">' . functions::display_pagination($this->url . '&', $start, $this->total, $kmess) . '</div>';
}
if ($this->total) {
$req = mysql_query("SELECT `" . $this->comments_table . "`.*, `" . $this->comments_table . "`.`id` AS `subid`, `users`.`rights`, `users`.`lastdate`, `users`.`sex`, `users`.`status`, `users`.`datereg`, `users`.`id`\n FROM `" . $this->comments_table . "` LEFT JOIN `users` ON `" . $this->comments_table . "`.`user_id` = `users`.`id`\n WHERE `sub_id` = '" . $this->sub_id . "' ORDER BY `subid` DESC LIMIT {$start}, {$kmess}");
示例2:
$friend = '<a class="underline" href="profile.php?act=friends&do=cancel&id=' . $user['id'] . '">' . $lng_profile['canceled_demand_friend'] . '</a>';
} else {
$friend = '<a href="profile.php?act=friends&do=add&id=' . $user['id'] . '">' . $lng_profile['in_friend'] . '</a>';
}
}
} else {
$friend = '<a href="profile.php?act=friends&do=delete&id=' . $user['id'] . '">' . $lng_profile['remov_friend'] . '</a>';
}
echo '<div><img src="../images/add.gif" width="16" height="16"/> ' . $friend . '</div>';
}
if (functions::is_contact($user['id']) != 2) {
if (!functions::is_contact($user['id'])) {
echo '<div><img src="../images/users.png" width="16" height="16"/> <a href="../mail/index.php?id=' . $user['id'] . '">' . $lng_profile['add_contacts'] . '</a></div>';
} else {
echo '<div><img src="../images/users.png" width="16" height="16"/> <a href="../mail/index.php?act=deluser&id=' . $user['id'] . '">' . $lng_profile['delete_contacts'] . '</a></div>';
}
}
if (functions::is_contact($user['id']) != 2) {
echo '<div><img src="../images/del.png" width="16" height="16"/> <a href="../mail/index.php?act=ignor&id=' . $user['id'] . '&add">' . $lng_profile['add_ignor'] . '</a></div>';
} else {
echo '<div><img src="../images/del.png" width="16" height="16"/> <a href="../mail/index.php?act=ignor&id=' . $user['id'] . '&del">' . $lng_profile['delete_ignor'] . '</a></div>';
}
echo '</p>';
if (!functions::is_ignor($user['id']) && functions::is_contact($user['id']) != 2 && empty($ban['1']) && empty($ban['3'])) {
echo '<p><form action="../mail/index.php?act=write&id=' . $user['id'] . '" method="post"><input type="submit" value="' . $lng['write'] . '" style="margin-left: 18px"/></form></p>';
}
echo '</div>';
}
echo '<div class="phdr"><a href="index.php">' . $lng['users'] . '</a></div>';
}
require_once '../incfiles/end.php';
示例3: mysql_query
}
}
if (empty($error)) {
mysql_query("INSERT INTO `cms_mail` SET\n\t\t`user_id` = '" . $user_id . "',\n\t\t`from_id` = '" . $id . "',\n\t\t`text` = '" . mysql_real_escape_string($text) . "',\n\t\t`time` = '" . time() . "',\n\t\t`file_name` = '" . mysql_real_escape_string($newfile) . "',\n\t\t`size` = '" . $sizefile . "'") or die(mysql_error());
mysql_query("UPDATE `users` SET `lastpost` = '" . time() . "' WHERE `id` = '{$user_id}';");
if ($ch == 0) {
mysql_query("UPDATE `cms_contact` SET `time` = '" . time() . "' WHERE `user_id` = '" . $user_id . "' AND\n\t\t\t`from_id` = '" . $id . "';");
mysql_query("UPDATE `cms_contact` SET `time` = '" . time() . "' WHERE `user_id` = '" . $id . "' AND\n\t\t\t`from_id` = '" . $user_id . "';");
}
Header('Location: index.php?act=write' . ($id ? '&id=' . $id : ''));
exit;
} else {
$out .= '<div class="rmenu">' . implode('<br />', $error) . '</div>';
}
}
if (!functions::is_ignor($id) && empty($ban['1']) && empty($ban['3'])) {
$out .= isset($_SESSION['error']) ? $_SESSION['error'] : '';
$out .= '<div class="gmenu">' . '<form name="form" action="index.php?act=write' . ($id ? '&id=' . $id : '') . '" method="post" enctype="multipart/form-data">' . ($id ? '' : '<p><input type="text" name="nick" maxlength="15" value="' . (!empty($_POST['nick']) ? functions::check($_POST['nick']) : '') . '" placeholder="' . $lng_mail['to_whom'] . '?"/></p>') . '<p>';
if (!$is_mobile) {
$out .= bbcode::auto_bb('form', 'text');
}
$out .= '<textarea rows="' . $set_user['field_h'] . '" name="text"></textarea></p>';
if ($set_user['translit']) {
$out .= '<input type="checkbox" name="msgtrans" value="1" ' . (isset($_POST['msgtrans']) ? 'checked="checked" ' : '') . '/> ' . $lng['translit'] . '<br />';
}
$out .= '<p><input type="file" name="fail" style="width: 100%; max-width: 160px"/></p>';
$out .= '<p><input type="submit" name="submit" value="' . $lng['sent'] . '"/></p>' . '</form></div>' . '<div class="phdr"><b>' . ($id && isset($qs) ? $lng_mail['personal_correspondence'] . ' ' . $qs['name'] : $lng_mail['sending_the_message']) . '</b></div>';
}
if ($id) {
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE ((`user_id`='{$id}' AND `from_id`='{$user_id}') OR (`user_id`='{$user_id}' AND `from_id`='{$id}')) AND `sys`!='1' AND `delete`!='{$user_id}' AND `spam`='0'"), 0);
if ($total) {