} else { $sql = ''; $nav = ''; } //Получаем список контактов $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact`\n\t\t\t LEFT JOIN `users` ON `cms_contact`.`from_id`=`users`.`id`\n\t\t\t WHERE `cms_contact`.`user_id`='" . $user_id . "'\n\t\t\t AND `cms_contact`.`type`='2'\n\t\t\t AND `cms_contact`.`friends`='1'\n\t\t\t AND `cms_contact`.`ban`!='1'{$sql}\n\t\t\t "), 0); if ($total) { $req = mysql_query("SELECT `users`.* FROM `cms_contact`\n\t\t\t\t LEFT JOIN `users` ON `cms_contact`.`from_id`=`users`.`id`\n\t\t\t\t WHERE `cms_contact`.`user_id`='" . $user_id . "'\n\t\t\t\t AND `cms_contact`.`type`='2'\n\t\t\t\t AND `cms_contact`.`friends`='1'\n\t\t\t\t AND `cms_contact`.`ban`!='1'{$sql}\n\t\t\t\t ORDER BY `cms_contact`.`time` DESC\n\t\t\t\t LIMIT " . $start . "," . $kmess); for ($i = 0; ($row = mysql_fetch_assoc($req)) !== FALSE; ++$i) { echo $i % 2 ? '<div class="list1">' : '<div class="list2">'; $subtext = '<a href="../mail/index.php?act=write&id=' . $row['id'] . '">' . $lng['write'] . '</a> | <a href="profile.php?act=friends&do=delete&id=' . $row['id'] . '">' . $lng['delete'] . '</a> | <a href="../mail/index.php?act=ignor&id=' . $row['id'] . '&add">' . $lng_profile['add_ignor'] . '</a>'; $count_message = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE ((`user_id`='{$row['id']}' AND `from_id`='{$user_id}') OR (`user_id`='{$user_id}' AND `from_id`='{$row['id']}')) AND `sys`!='1' AND `spam`!='1' AND `delete`!='{$user_id}';"), 0); $new_count_message = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE `cms_mail`.`user_id`='{$row['id']}' AND `cms_mail`.`from_id`='{$user_id}' AND `read`='0' AND `sys`!='1' AND `spam`!='1' AND `delete`!='{$user_id}';"), 0); $arg = array('header' => '(' . $count_message . ($new_count_message ? '/<span class="red">+' . $new_count_message . '</span>' : '') . ')', 'sub' => $subtext); echo functions::display_user($row, $arg); echo '</div>'; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('profile.php?act=friends' . $nav . '&', $start, $total, $kmess) . '</p>' . '<p><form action="profile.php" method="get">' . '<input type="hidden" name="act" value="friends"/>' . ($nav ? '<input type="hidden" name="sort" value="' . $sort . '"/>' : '') . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } if ($set_mail['cat_friends']) { echo '<div class="menu"><form action="profile.php?act=friends" method="post"><div>' . '<select name="sort">' . '<option value="0">Все</option>' . '<option value="1"' . ($sort == 1 ? ' selected="selected"' : '') . '>' . $lng_profile['friend'] . '</option>' . '<option value="2"' . ($sort == 2 ? ' selected="selected"' : '') . '>' . $lng_profile['classfriend'] . '</option>' . '<option value="3"' . ($sort == 3 ? ' selected="selected"' : '') . '>' . $lng_profile['colleague'] . '</option>' . '<option value="4"' . ($sort == 4 ? ' selected="selected"' : '') . '>' . $lng_profile['best_friend'] . '</option>' . '<option value="5"' . ($sort == 5 ? ' selected="selected"' : '') . '>' . $lng_profile['classmate'] . '</option>' . '<option value="6"' . ($sort == 6 ? ' selected="selected"' : '') . '>' . $lng_profile['relative'] . '</option>' . '</select>' . '<input type="submit" value="' . $lng_profile['sea_friends'] . ' >>"/></div></form></div>'; } } echo '<p><a href="profile.php?act=office">' . $lng['personal'] . '</a></p>'; } }
$tx = mb_substr(strip_tags($tx), 0, 90); $tx = "<br/>{$tx}..."; } else { $tx = "<br/>{$tx}"; } } else { $tx = ""; } echo '<img src="' . $filesroot . '/img/' . $imt . '" alt=""/><a href="?act=view&file=' . $newf['id'] . '">' . htmlentities($newf['name'], ENT_QUOTES, 'UTF-8') . '</a> (' . $fsz . ' кб)' . $tx . '<br/>'; $nadir = $newf['refid']; $pat = ""; while ($nadir != "") { $dnew = mysql_query("select * from `download` where type = 'cat' and id = '" . $nadir . "'"); $dnew1 = mysql_fetch_array($dnew); $pat = "{$dnew1['text']}/{$pat}"; $nadir = $dnew1['refid']; } $l = mb_strlen($pat); $pat1 = mb_substr($pat, 0, $l - 1); echo "[{$pat1}]</div>"; ++$i; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > 10) { echo '<p>' . functions::display_pagination('index.php?act=new&', $start, $total, $kmess) . '</p>'; echo '<p><form action="index.php" method="get"><input type="hidden" value="new" name="act" /><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } } else { echo '<p>' . $lng['list_empty'] . '</p>'; } echo "<p><a href='index.php?'>" . $lng['back'] . "</a></p>";
$i = 1; while (($row = mysql_fetch_assoc($req)) !== false) { echo $i % 2 ? '<div class="list1">' : '<div class="list2">'; if (file_exists('../files/blogs/ico_cat_' . $row['id'] . '.jpg') !== false) { echo '<a href="index.php?act=animes&mod=ico&id=' . $row['id'] . '"><img style="margin: 0 0 -3px 0;border: 0px;" src="../files/blogs/ico_cat_' . $row['id'] . '.jpg" alt="" width="16" height="16"/></a> '; } echo htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . ' <a href="../blogs/index.php?id=' . $row['id'] . '">»</a>'; echo '<div class="sub"> <a href="manage.php?act=up&id=' . $row['id'] . '">Keatas</a> | <a href="manage.php?act=down&id=' . $row['id'] . '">Kebawah</a> | <a href="manage.php?act=edit&id=' . $row['id'] . '">Edit</a> | <a href="manage.php?act=delete&id=' . $row['id'] . '">Hapus</a> </div>'; echo '</div>'; ++$i; } echo '<div class="phdr">Total Kategori: ' . $total . '</div>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('manage.php?', $start, $total, $kmess) . '</p>'; echo '<p><form action="index.php" method="get"> <input type="hidden" name="act" value="mod_news"/> <input type="text" name="page" size="2"/> <input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } } else { echo '<div class="rmenu">Tidak ada kategori</div>'; } echo '<div class="gmenu"><form action="manage.php?act=add" method="post"><input type="submit" value="Tambah kategori" /></form></div>'; if ($total) { echo '<div class="gmenu"><form action="nulis.php" method="post"><input type="submit" value="Tambah Blogs" /></form></div>'; echo '<div class="bmenu"><a href="manage.php?act=list">List Anime</a></div>'; echo '<div class="bmenu"><a href="manage.php?act=clear">Hapus Blog</a></div>'; } }
* @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ defined('_IN_JOHNCMS') or die('Error: restricted access'); $textl = $lng['users_list']; $headmod = 'userlist'; require '../incfiles/head.php'; /* ----------------------------------------------------------------- Выводим список пользователей ----------------------------------------------------------------- */ $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0); echo '<div class="phdr"><a href="index.php"><b>' . $lng['community'] . '</b></a> | ' . $lng['users_list'] . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('index.php?act=userlist&', $start, $total, $kmess) . '</div>'; } $req = mysql_query("SELECT `id`, `name`, `sex`, `lastdate`, `datereg`, `status`, `rights`, `ip`, `browser`, `rights` FROM `users` WHERE `preg` = 1 ORDER BY `datereg` DESC LIMIT {$start}, {$kmess}"); for ($i = 0; ($res = mysql_fetch_assoc($req)) !== false; $i++) { echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo functions::display_user($res) . '</div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('index.php?act=userlist&', $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=userlist" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } echo '<p><a href="search.php">' . $lng['search_user'] . '</a><br />' . '<a href="index.php">' . $lng['back'] . '</a></p>';
if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('index.php?act=online&' . ($mod ? 'mod=' . $mod . '&' : ''), $start, $total, $kmess) . '</div>'; } if ($total) { $req = mysql_query($sql_list . "{$start}, {$kmess}"); $i = 0; while (($res = mysql_fetch_assoc($req)) !== false) { if ($res['id'] == core::$user_id) { echo '<div class="gmenu">'; } else { echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; } $arg['stshide'] = 1; $arg['header'] = ' <span class="gray">('; if ($mod == 'history') { $arg['header'] .= functions::display_date($res['sestime']); } else { $arg['header'] .= $res['movings'] . ' - ' . functions::timecount(time() - $res['sestime']); } $arg['header'] .= ')</span><br /><img src="../images/info.png" width="16" height="16" align="middle" /> ' . functions::display_place($res['id'], $res['place']); echo functions::display_user($res, $arg); echo '</div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('index.php?act=online&' . ($mod ? 'mod=' . $mod . '&' : ''), $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=online' . ($mod ? '&mod=' . $mod : '') . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; }
case 1: echo ' Kil '; break; } $ontime = $mass1['lastdate']; $ontime2 = $ontime + 300; if (time() > $ontime2) { echo '<font color="#FF0000"> [Off]</font>'; } else { echo '<font color="#00AA00"> [ON]</font>'; } echo '(' . functions::display_date($mass['time']) . ')<br/>'; if ($set_user['smileys']) { $tekst = functions::smileys($mass['text'], $mass1['rights'] >= 1 ? 1 : 0); } else { $tekst = $mass['text']; } echo "{$tekst}<br/>"; if ($rights == 5 || $rights >= 6) { echo long2ip($mass['ip']) . " - {$mass['soft']}<br/><a href='index.php?act=del&id=" . $mass['id'] . "'>" . $lng['delete'] . "</a>"; } echo '</div>'; ++$i; } echo '<div class="phdr">' . $lng['total'] . ': ' . $countm . '</div>'; // Навигация по страницам if ($countm > $kmess) { echo '<p>' . functions::display_pagination('index.php?act=komm&id=' . $id . '&', $start, $countm, $kmess) . '</p>'; echo '<p><form action="index.php" method="get"><input type="hidden" name="act" value="komm"/><input type="hidden" name="id" value="' . $id . '"/><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } echo '<p><a href="?id=' . $id . '">' . $lng['back'] . '</a></p>';
//print_r($outmass); $out .= $post; $out .= '<div class="sub"><a href="index.php?act=delete&id=' . $row['id'] . '">' . $lng['delete'] . '</a></div>'; $out .= '</div>'; } //Ставим метку о прочтении if ($mass_read) { $result = implode(',', $mass_read); mysql_query("UPDATE `cms_mail` SET `read`='1' WHERE `from_id`='{$user_id}' AND `sys`='1' AND `id` IN (" . $result . ")"); } } else { $out .= '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } $out .= '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { $out .= '<div class="topmenu">' . functions::display_pagination('index.php?act=systems&', $start, $total, $kmess) . '</div>'; $out .= '<p><form action="index.php" method="get"> <input type="hidden" name="act" value="systems"/> <input type="text" name="page" size="2"/> <input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } } $textl = $lng['mail']; require_once '../incfiles/head.php'; echo '<div class="phdr"><b>' . $lng_mail['systems_messages'] . '</b></div>'; echo $out; echo '<p>'; if ($total) { echo '<a href="index.php?act=systems&mod=clear">' . $lng_mail['clear_messages'] . '</a><br/>'; } echo '<a href="../users/profile.php?act=office">' . $lng['personal'] . '</a></p>';
echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo '<img src="../images/' . ($remain > 0 ? 'red' : 'green') . '.gif" width="16" height="16" align="left" /> ' . '<b>' . $lng_ban['ban_' . $res['ban_type']] . '</b>' . ' <span class="gray">(' . date("d.m.Y / H:i", $res['ban_while']) . ')</span>' . '<br />' . functions::checkout($res['ban_reason']) . '<div class="sub">'; if ($rights > 0) { echo '<span class="gray">' . $lng_ban['ban_who'] . ':</span> ' . $res['ban_who'] . '<br />'; } echo '<span class="gray">' . $lng['term'] . ':</span> ' . ($period < 86400000 ? functions::timecount($period) : $lng_ban['ban_time_before_cancel']); if ($remain > 0) { echo '<br /><span class="gray">' . $lng['remains'] . ':</span> ' . functions::timecount($remain); } // Меню отдельного бана $menu = array(); if ($rights >= 7 && $remain > 0) { $menu[] = '<a href="profile.php?act=ban&mod=cancel&user='******'id'] . '&ban=' . $res['id'] . '">' . $lng_ban['ban_cancel_do'] . '</a>'; } if ($rights == 9) { $menu[] = '<a href="profile.php?act=ban&mod=delete&user='******'id'] . '&ban=' . $res['id'] . '">' . $lng_ban['ban_delete_do'] . '</a>'; } if (!empty($menu)) { echo '<div>' . functions::display_menu($menu) . '</div>'; } echo '</div></div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('profile.php?act=ban&user='******'id'] . '&', $start, $total, $kmess) . '</p>' . '<p><form action="profile.php?act=ban&user='******'id'] . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } }
function __construct($arg = array()) { global $mod, $start, $kmess; $this->comments_table = $arg['comments_table']; $this->object_table = !empty($arg['object_table']) ? $arg['object_table'] : false; if (!empty($arg['sub_id_name']) && !empty($arg['sub_id'])) { $this->sub_id = $arg['sub_id']; $this->url = $arg['script'] . '&' . $arg['sub_id_name'] . '=' . $arg['sub_id']; } else { //TODO: Доработать на режим без sub_id $this->url = $arg['script']; } $this->item = isset($_GET['item']) ? abs(intval($_GET['item'])) : false; // Получаем данные пользователя if (core::$user_id) { $this->user_id = core::$user_id; $this->rights = core::$user_rights; $this->ban = core::$user_ban; } // Назначение пользовательских прав if (isset($arg['owner'])) { $this->owner = $arg['owner']; if (core::$user_id && $arg['owner'] == core::$user_id && !$this->ban) { $this->access_delete = isset($arg['owner_delete']) ? $arg['owner_delete'] : false; $this->access_reply = isset($arg['owner_reply']) ? $arg['owner_reply'] : false; $this->access_edit = isset($arg['owner_edit']) ? $arg['owner_edit'] : false; } } // Открываем доступ для Администрации if ($this->rights >= $this->access_level) { $this->access_reply = true; $this->access_edit = true; $this->access_delete = true; } switch ($mod) { case 'reply': /* ----------------------------------------------------------------- Отвечаем на комментарий ----------------------------------------------------------------- */ if ($this->item && $this->access_reply && !$this->ban) { echo '<div class="phdr"><a href="' . $this->url . '"><b>' . $arg['title'] . '</b></a> | ' . core::$lng['reply'] . '</div>'; $req = mysql_query("SELECT * FROM `" . $this->comments_table . "` WHERE `id` = '" . $this->item . "' AND `sub_id` = '" . $this->sub_id . "' LIMIT 1"); if (mysql_num_rows($req)) { $res = mysql_fetch_assoc($req); $attributes = unserialize($res['attributes']); if (!empty($res['reply']) && $attributes['reply_rights'] > $this->rights) { echo functions::display_error(core::$lng['error_reply_rights'], '<a href="' . $this->url . '">' . core::$lng['back'] . '</a>'); } elseif (isset($_POST['submit'])) { $message = $this->msg_check(); if (empty($message['error'])) { $attributes['reply_id'] = $this->user_id; $attributes['reply_rights'] = $this->rights; $attributes['reply_name'] = core::$user_data['name']; $attributes['reply_time'] = time(); mysql_query("UPDATE `" . $this->comments_table . "` SET\n `reply` = '" . mysql_real_escape_string($message['text']) . "',\n `attributes` = '" . mysql_real_escape_string(serialize($attributes)) . "'\n WHERE `id` = '" . $this->item . "'\n "); header('Location: ' . str_replace('&', '&', $this->url)); } else { echo functions::display_error($message['error'], '<a href="' . $this->url . '&mod=reply&item=' . $this->item . '">' . core::$lng['back'] . '</a>'); } } else { $text = '<a href="' . core::$system_set['homeurl'] . '/users/profile.php?user='******'user_id'] . '"><b>' . $attributes['author_name'] . '</b></a>' . ' (' . functions::display_date($res['time']) . ')<br />' . functions::checkout($res['text']); $reply = functions::checkout($res['reply']); echo $this->msg_form('&mod=reply&item=' . $this->item, $text, $reply) . '<div class="phdr"><a href="' . $this->url . '">' . core::$lng['back'] . '</a></div>'; } } else { echo functions::display_error(core::$lng['error_wrong_data'], '<a href="' . $this->url . '">' . core::$lng['back'] . '</a>'); } } break; case 'edit': /* ----------------------------------------------------------------- Редактируем комментарий ----------------------------------------------------------------- */ if ($this->item && $this->access_edit && !$this->ban) { echo '<div class="phdr"><a href="' . $this->url . '"><b>' . $arg['title'] . '</b></a> | ' . core::$lng['edit'] . '</div>'; $req = mysql_query("SELECT * FROM `" . $this->comments_table . "` WHERE `id` = '" . $this->item . "' AND `sub_id` = '" . $this->sub_id . "' LIMIT 1"); if (mysql_num_rows($req)) { $res = mysql_fetch_assoc($req); $attributes = unserialize($res['attributes']); $user = functions::get_user($res['user_id']); if ($user['rights'] > core::$user_rights) { echo functions::display_error(core::$lng['error_edit_rights'], '<a href="' . $this->url . '">' . core::$lng['back'] . '</a>'); } elseif (isset($_POST['submit'])) { $message = $this->msg_check(); if (empty($message['error'])) { $attributes['edit_id'] = $this->user_id; $attributes['edit_name'] = core::$user_data['name']; $attributes['edit_time'] = time(); if (isset($attributes['edit_count'])) { ++$attributes['edit_count']; } else { $attributes['edit_count'] = 1; } mysql_query("UPDATE `" . $this->comments_table . "` SET\n `text` = '" . mysql_real_escape_string($message['text']) . "',\n `attributes` = '" . mysql_real_escape_string(serialize($attributes)) . "'\n WHERE `id` = '" . $this->item . "'\n "); header('Location: ' . str_replace('&', '&', $this->url)); } else { echo functions::display_error($message['error'], '<a href="' . $this->url . '&mod=edit&item=' . $this->item . '">' . core::$lng['back'] . '</a>'); } } else { $author = '<a href="' . core::$system_set['homeurl'] . '/users/profile.php?user='******'user_id'] . '"><b>' . $attributes['author_name'] . '</b></a>'; $author .= ' (' . functions::display_date($res['time']) . ')<br />'; $text = functions::checkout($res['text']); echo $this->msg_form('&mod=edit&item=' . $this->item, $author, $text); } } else { echo functions::display_error(core::$lng['error_wrong_data'], '<a href="' . $this->url . '">' . core::$lng['back'] . '</a>'); } echo '<div class="phdr"><a href="' . $this->url . '">' . core::$lng['back'] . '</a></div>'; } break; case 'del': /* ----------------------------------------------------------------- Удаляем комментарий ----------------------------------------------------------------- */ if ($this->item && $this->access_delete && !$this->ban) { if (isset($_GET['yes'])) { //TODO: Продумать проверку на удаление постов администрации $req = mysql_query("SELECT * FROM `" . $this->comments_table . "` WHERE `id` = '" . $this->item . "' AND `sub_id` = '" . $this->sub_id . "' LIMIT 1"); if (mysql_num_rows($req)) { $res = mysql_fetch_assoc($req); if (isset($_GET['all'])) { // Удаляем все комментарии выбранного пользователя $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}"); $i = 0; while (($res = mysql_fetch_assoc($req)) !== false) { $attributes = unserialize($res['attributes']); $res['name'] = $attributes['author_name']; $res['ip'] = $attributes['author_ip']; $res['ip_via_proxy'] = isset($attributes['author_ip_via_proxy']) ? $attributes['author_ip_via_proxy'] : 0; $res['browser'] = $attributes['author_browser']; echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; $menu = array($this->access_reply ? '<a href="' . $this->url . '&mod=reply&item=' . $res['subid'] . '">' . core::$lng['reply'] . '</a>' : '', $this->access_edit ? '<a href="' . $this->url . '&mod=edit&item=' . $res['subid'] . '">' . core::$lng['edit'] . '</a>' : '', $this->access_delete ? '<a href="' . $this->url . '&mod=del&item=' . $res['subid'] . '">' . core::$lng['delete'] . '</a>' : ''); $text = functions::checkout($res['text'], 1, 1); if (core::$user_set['smileys']) { $text = functions::smileys($text, $res['rights'] >= 1 ? 1 : 0); } if (isset($attributes['edit_count'])) { $text .= '<br /><span class="gray"><small>' . core::$lng['edited'] . ': <b>' . $attributes['edit_name'] . '</b>' . ' (' . functions::display_date($attributes['edit_time']) . ') <b>' . '[' . $attributes['edit_count'] . ']</b></small></span>'; } if (!empty($res['reply'])) { $reply = functions::checkout($res['reply'], 1, 1); if (core::$user_set['smileys']) { $reply = functions::smileys($reply, $attributes['reply_rights'] >= 1 ? 1 : 0); } $text .= '<div class="' . ($attributes['reply_rights'] ? '' : 'g') . 'reply"><small>' . '<a href="' . core::$system_set['homeurl'] . '/users/profile.php?user='******'reply_id'] . '"><b>' . $attributes['reply_name'] . '</b></a>' . ' (' . functions::display_date($attributes['reply_time']) . ')</small><br/>' . $reply . '</div>'; } $user_arg = array('header' => ' <span class="gray">(' . functions::display_date($res['time']) . ')</span>', 'body' => $text, 'sub' => functions::display_menu($menu), 'iphide' => core::$user_rights ? false : true); echo functions::display_user($res, $user_arg); echo '</div>'; ++$i; } } else { echo '<div class="menu"><p>' . core::$lng['list_empty'] . '</p></div>'; } echo '<div class="phdr">' . core::$lng['total'] . ': ' . $this->total . '</div>'; if ($this->total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination($this->url . '&', $start, $this->total, $kmess) . '</div>' . '<p><form action="' . $this->url . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . core::$lng['to_page'] . ' >>"/>' . '</form></p>'; } if (!empty($arg['context_bottom'])) { echo $arg['context_bottom']; } } }
$pos = 100; } $name = $res['name']; $text = functions::checkout(mb_substr($res['text'], $pos - 100, 400), 1); if ($search_t) { foreach ($array as $val) { $name = ReplaceKeywords($val, $name); } } else { foreach ($array as $val) { $text = ReplaceKeywords($val, $text); } } echo '<b><a href="index.php?id=' . $res['id'] . '">' . $name . '</a></b><br />' . $text . ' <div class="sub"><span class="gray">' . $lng_lib['added'] . ':</span> ' . $res['avtor'] . ' <span class="gray">(' . functions::display_date($res['time']) . ')</span><br />' . '<span class="gray">' . $lng_lib['reads'] . ':</span> ' . $res['count'] . '</div></div>'; ++$i; } } else { echo '<div class="rmenu"><p>' . $lng['search_results_empty'] . '</p></div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('search.php?' . ($search_t ? 't=1&' : '') . 'search=' . urlencode($search) . '&', $start, $total, $kmess) . '</div>' . '<p><form action="search.php?' . ($search_t ? 't=1&' : '') . 'search=' . urlencode($search) . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } } else { if ($error) { echo functions::display_error($error); } echo '<div class="phdr"><small>' . $lng['search_help'] . '</small></div>'; } echo '<p>' . ($search ? '<a href="search.php">' . $lng['search_new'] . '</a><br />' : '') . '<a href="index.php">' . $lng['library'] . '</a></p>'; require '../incfiles/end.php';
case 'ip': $sort = 'ip'; echo '<a href="index.php?act=usr&sort=id">ID</a> | <a href="index.php?act=usr&sort=nick">' . $lng['nick'] . '</a> | IP</div>'; $order = '`ip` ASC'; break; default: $sort = 'id'; echo 'ID | <a href="index.php?act=usr&sort=nick">' . $lng['nick'] . '</a> | <a href="index.php?act=usr&sort=ip">IP</a></div>'; $order = '`id` ASC'; } $req = mysql_query("SELECT COUNT(*) FROM `users`"); $total = mysql_result($req, 0); $req = mysql_query("SELECT * FROM `users` WHERE `preg` = 1 ORDER BY {$order} LIMIT " . $start . ", " . $kmess); $i = 0; while (($res = mysql_fetch_assoc($req)) !== false) { $link = ''; if ($rights >= 7) { $link .= '<a href="../users/profile.php?act=edit&user='******'id'] . '">' . $lng['edit'] . '</a> | <a href="index.php?act=usr_del&id=' . $res['id'] . '">' . $lng['delete'] . '</a> | '; } $link .= '<a href="../users/profile.php?act=ban&mod=do&user='******'id'] . '">' . $lng['ban_do'] . '</a>'; echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo functions::display_user($res, array('header' => '<b>ID:' . $res['id'] . '</b>', 'sub' => $link)); echo '</div>'; ++$i; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('index.php?act=usr&sort=' . $sort . '&', $start, $total, $kmess) . '</div>'; echo '<p><form action="index.php?act=usr&sort=' . $sort . '" method="post"><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } echo '<p><a href="index.php?act=search_user">' . $lng['search_user'] . '</a><br /><a href="index.php">' . $lng['admin_panel'] . '</a></p>';
if ($total) { if ($mod == 'history') { $req = mysql_query("SELECT `cms_users_iphistory`.*, `users`.`name`, `users`.`rights`, `users`.`lastdate`, `users`.`sex`, `users`.`status`, `users`.`datereg`, `users`.`id`, `users`.`browser`\n FROM `cms_users_iphistory` LEFT JOIN `users` ON `cms_users_iphistory`.`user_id` = `users`.`id`\n WHERE `cms_users_iphistory`.`ip` BETWEEN {$ip1} AND {$ip2} OR `cms_users_iphistory`.`ip_via_proxy` BETWEEN {$ip1} AND {$ip2}\n GROUP BY `users`.`id`\n ORDER BY `ip` ASC, `name` ASC LIMIT {$start}, {$kmess}\n "); } else { $req = mysql_query("SELECT * FROM `users`\n WHERE `ip` BETWEEN {$ip1} AND {$ip2} OR `ip_via_proxy` BETWEEN {$ip1} AND {$ip2}\n ORDER BY `ip` ASC, `name` ASC LIMIT {$start}, {$kmess}"); } $i = 0; while (($res = mysql_fetch_assoc($req)) !== false) { echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo functions::display_user($res, array('iphist' => 1)); echo '</div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['not_found'] . '</p></div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { // Навигация по страницам echo '<div class="topmenu">' . functions::display_pagination('index.php?act=search_ip' . ($mod == 'history' ? '&mod=history' : '') . '&search=' . urlencode($search) . '&', $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=search_ip' . ($mod == 'history' ? '&mod=history' : '') . '&search=' . urlencode($search) . '" method="post">' . '<input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } echo '<p><a href="index.php?act=search_ip">' . $lng['search_new'] . '</a><br /><a href="index.php">' . $lng['admin_panel'] . '</a></p>'; } else { // Выводим сообщение об ошибке if ($error) { echo functions::display_error($error); } // Инструкции для поиска echo '<div class="phdr">' . $lng['search_ip_help'] . '</div>'; echo '<p><a href="index.php">' . $lng['admin_panel'] . '</a></p>'; }
} } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr">'; if ($totalcat > 0) { echo $lng_dl['folders'] . ': ' . $totalcat; } echo '  '; if ($totalfile > 0) { echo $lng_dl['files'] . ': ' . $totalfile; } echo '</div>'; // Постраничная навигация if ($total > $kmess) { echo '<p>' . functions::display_pagination('index.php?cat=' . $cat . '&', $start, $total, $kmess) . '</p>'; } if ($rights == 4 || $rights >= 6) { //////////////////////////////////////////////////////////// // Выводим ссылки на модерские функции // //////////////////////////////////////////////////////////// echo '<p><div class="func">'; echo '<a href="?act=makdir&cat=' . $cat . '">' . $lng_dl['make_folder'] . '</a><br/>'; if (!empty($_GET['cat'])) { $delcat = mysql_query("select * from `download` where type = 'cat' and refid = '" . $cat . "';"); $delcat1 = mysql_num_rows($delcat); if ($delcat1 == 0) { echo '<a href="index.php?act=delcat&cat=' . $cat . '">' . $lng_dl['delete_folder'] . '</a><br />'; } echo '<a href="index.php?act=ren&cat=' . $cat . '">' . $lng_dl['rename_folder'] . '</a><br />'; echo '<a href="index.php?act=select&cat=' . $cat . '">' . $lng_dl['upload_file'] . '</a><br />';
/* ----------------------------------------------------------------- Список постов Форума ----------------------------------------------------------------- */ $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `user_id` = '" . $user['id'] . "' AND `type` = 'm'" . ($rights >= 7 ? '' : " AND `close`!='1'")), 0); echo '<div class="phdr"><b>' . $lng['forum'] . '</b>: ' . $lng['messages'] . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('profile.php?act=activity&user='******'id'] . '&', $start, $total, $kmess) . '</div>'; } $req = mysql_query("SELECT * FROM `forum` WHERE `user_id` = '" . $user['id'] . "' AND `type` = 'm' " . ($rights >= 7 ? '' : " AND `close`!='1'") . " ORDER BY `id` DESC LIMIT {$start}, {$kmess}"); if (mysql_num_rows($req)) { $i = 0; while ($res = mysql_fetch_assoc($req)) { $topic = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $res['refid'] . "'")); $section = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $topic['refid'] . "'")); $category = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `id` = '" . $section['refid'] . "'")); $text = mb_substr($res['text'], 0, 300); $text = functions::checkout($text, 2, 1); $text = preg_replace('#\\[c\\](.*?)\\[/c\\]#si', '<div class="quote">\\1</div>', $text); echo ($i % 2 ? '<div class="list2">' : '<div class="list1">') . '<a href="' . $set['homeurl'] . '/forum/index.php?id=' . $topic['id'] . '">' . $topic['text'] . '</a>' . '<br />' . $text . '...<a href="' . $set['homeurl'] . '/forum/index.php?act=post&id=' . $res['id'] . '"> >></a>' . '<div class="sub">' . '<a href="' . $set['homeurl'] . '/forum/index.php?id=' . $category['id'] . '">' . $category['text'] . '</a> | ' . '<a href="' . $set['homeurl'] . '/forum/index.php?id=' . $section['id'] . '">' . $section['text'] . '</a>' . '<br /><span class="gray">(' . functions::display_date($res['time']) . ')</span>' . '</div></div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('profile.php?act=activity' . ($mod ? '&mod=' . $mod : '') . '&user='******'id'] . '&', $start, $total, $kmess) . '</div>' . '<p><form action="profile.php?act=activity&user='******'id'] . ($mod ? '&mod=' . $mod : '') . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; }
$total = count($dir); for ($i = $start; $i < $page * $kmess && $i < $total; $i++) { $smiley = explode('/', $dir[$i]); $smiley = array_pop($smiley); $format = functions::format($smiley); $smiley_code = str_replace('.' . $format, '', strtolower($smiley)); echo $i % 2 ? '<div class="menu">' : '<div class="menu">'; echo functions::smileys(':' . $smiley_code . '') . ' :' . $smiley_code . '<br /> <a href="?act=smileys&mod=unlink&do=' . $do . '&smiley=' . $smiley . '">' . $lng['delete'] . '</a> | <a href="?act=smileys&mod=rename&do=' . $do . '&smiley=' . $smiley . '">' . $lng['edit'] . '</a>'; echo '</div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div></div>'; if ($total > $kmess) { echo '<div class="topmenu"><form action="?act=smileys&do=' . $do . '&mod=show_cat" method="post"> ' . functions::display_pagination('?act=smileys&do=' . $do . '&mod=show_cat&', $start, $total, $kmess) . ' <input type="text" name="page" size="2"/><input type="submit" value="Go!"/></form></div>'; } break; case 'upload': $c = '../images/smileys/user/' . $do . '/'; if (!is_dir($c)) { echo functions::display_error($lng['error_wrong_data']); echo '<p><a href="index.php">' . $lng['admin_panel'] . '</a></p>'; require_once '../incfiles/end.php'; exit; } $name_cat = $lng_smileys[$do] ? $lng_smileys[$do] : $do; echo '<div class="mainblok"><div class="phdr"><a href="?act=smileys&do=' . $do . '&mod=show_cat"><b>' . htmlspecialchars($name_cat) . '</b></a> | Upload</div>'; if (isset($_POST['submit'])) {
$file = '<div><a href="index.php?act=file&id=' . $res['id'] . '">'; $file .= '<img src="thumbinal.php?file=' . urlencode($res['filename']) . '" alt="' . $lng_forum['click_to_view'] . '" /></a></div>'; } else { // Если обычный файл, выводим значок и ссылку $file = ($res['del'] ? '<img src="../images/del.png" width="16" height="16" />' : '') . '<img src="../images/system/' . $res['filetype'] . '.png" width="16" height="16" /> '; } $file .= '<a href="index.php?act=file&id=' . $res['id'] . '">' . htmlspecialchars($res['filename']) . '</a><br />'; $file .= '<small><span class="gray">' . $lng_forum['size'] . ': ' . $fls . ' kb.<br />' . $lng_forum['downloaded'] . ': ' . $res['dlcount'] . ' ' . $lng_forum['time'] . '</span></small>'; $arg = array('iphide' => 1, 'sub' => $file, 'body' => $text); echo functions::display_user($res_u, $arg); echo '</div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { // Постраничная навигация echo '<p>' . functions::display_pagination('index.php?act=files&' . (isset($_GET['new']) ? 'new' : 'do=' . $do) . $lnk . '&', $start, $total, $kmess) . '</p>' . '<p><form action="index.php" method="get">' . '<input type="hidden" name="act" value="files"/>' . '<input type="hidden" name="do" value="' . $do . '"/>' . $input . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } } else { echo '<div class="list1">' . $lng['list_empty'] . '</div>'; } } else { /* ----------------------------------------------------------------- Выводим список разделов, в которых есть файлы ----------------------------------------------------------------- */ $countnew = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_forum_files` WHERE `time` > '{$new}'" . ($rights >= 7 ? '' : " AND `del` != '1'") . $sql), 0); echo '<p>' . ($countnew > 0 ? '<a href="index.php?act=files&new' . $lnk . '">' . $lng['new_files'] . ' (' . $countnew . ')</a>' : $lng_forum['new_files_empty']) . '</p>'; echo '<div class="phdr">' . $caption . '</div>'; $link = array(); $total = 0;
$text .= ' <span style="color:green;">...</span>'; } if ($res['kedit']) { $text .= '<br /><span class="gray"><small>' . $lng_forum['edited'] . ' <b>' . $res['edit'] . '</b> (' . date("d.m /H:i", $res['tedit'] + $set_user['sdvig'] * 3600) . ') <b>[' . $res['kedit'] . ']</b></small></span>'; } echo $text; $file_req = mysql_query("SELECT * FROM `cms_forum_files` WHERE `post` = '" . $res['id'] . "'"); if (mysql_num_rows($file_req) > 0) { $file_res = mysql_fetch_assoc($file_req); $file_ile_size = round(@filesize('../files/forum/attach/' . $file_res['filename']) / 1024, 2); echo '<br /><span class="gray">' . $lng_forum['attached_file'] . ':'; $att_ext = strtolower(functions::format('./files/forum/attach/' . $file_res['filename'])); $pic_ext = array('gif', 'jpg', 'jpeg', 'png'); if (in_array($att_ext, $pic_ext)) { echo '<div><a href="../forum/index.php?act=file&id=' . $file_res['id'] . '"><img src="../forum/thumbinal.php?file=' . urlencode($file_res['filename']) . '" alt="' . $lng_forum['click_to_view'] . '" /></a></div>'; } else { echo '<br /><a href="../forum/index.php?act=file&id=' . $file_res['id'] . '">' . $file_res['filename'] . '</a>'; } echo ' (' . $file_ile_size . ' кб.)<br/>' . $lng_forum['downloads'] . ': ' . $file_res['dlcount'] . ' ' . $lng_forum['time'] . '</span>'; } echo '</small></div></div>'; ++$i; } } else { echo '<div class="menu"><p>Masih kosong brot :D</p></div>'; } echo '<div class="phdr">Всего: ' . $total . '</div>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('journal.php?', $start, $total, $kmess) . '</p>' . '<p><form action="journal.php?" method="post"><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } require '../incfiles/end.php';
require '../incfiles/end.php'; exit; } /* ----------------------------------------------------------------- История IP адресов ----------------------------------------------------------------- */ echo '<div class="phdr"><a href="profile.php?user='******'id'] . '"><b>' . $lng['profile'] . '</b></a> | ' . $lng['ip_history'] . '</div>'; echo '<div class="user"><p>'; $arg = array('lastvisit' => 1, 'header' => '<b>ID:' . $user['id'] . '</b>'); echo functions::display_user($user, $arg); echo '</p></div>'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_users_iphistory` WHERE `user_id` = '" . $user['id'] . "'"), 0); if ($total) { $req = mysql_query("SELECT * FROM `cms_users_iphistory` WHERE `user_id` = '" . $user['id'] . "' ORDER BY `time` DESC LIMIT {$start}, {$kmess}"); $i = 0; while (($res = mysql_fetch_assoc($req)) !== false) { echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; $link = $rights ? '<a href="' . $set['homeurl'] . '/' . $set['admp'] . '/index.php?act=search_ip&mod=history&ip=' . long2ip($res['ip']) . '">' . long2ip($res['ip']) . '</a>' : long2ip($res['ip']); echo $link . ' <span class="gray">(' . date("d.m.Y / H:i", $res['time']) . ')</span></div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('profile.php?act=ip&user='******'id'] . '&', $start, $total, $kmess) . '</p>'; echo '<p><form action="profile.php?act=ip&user='******'id'] . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; }
$post .= '<div class="reply">' . functions::checkout($row['reply'], 1, 1) . '</div>'; } if ($rights >= 7) { $subtext = '<a href="index.php?act=comments&mod=replay&id=' . $id . '&com=' . $row['mid'] . '">Jawab</a> | <a href="index.php?act=comments&mod=delete&id=' . $id . '&com=' . $row['mid'] . '">Hapus</a>'; } else { $subtext = ''; } $text = ' <span class="gray">(' . functions::display_date($row['mtime']) . ')</span>'; $arg = array('header' => $text, 'body' => $post, 'sub' => $subtext); echo functions::display_user($row, $arg); echo '</div>'; ++$i; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('index.php?act=comments&id=' . $id . '&', $start, $total, $kmess) . '</div>'; echo '<p><form action="index.php" method="get"> <input type="hidden" name="act" value="comments"/> <input type="hidden" name="id" value="' . $id . '"/> <input type="text" name="page" size="2"/> <input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } } else { echo '<div class="rmenu">Belum ada komentar,jadilah yg pertamax !</div>'; } } echo '<div class="bmenu"><a href="index.php?act=view&id=' . $id . '">Kembali</a></div>'; } else { $textl = 'Blogs'; require_once '../incfiles/head.php'; echo functions::display_error('Blogs tidak ada');
$text = functions::checkout(mb_substr($req['text'], $int_start, $int_lenght), 1, 1); if ($set_user['smileys']) { $text = functions::smileys($text, $rights ? 1 : 0); } echo '<div class="list2">' . $text . '</div>'; // Ссылка на комментарии if ($set['mod_lib_comm'] || $rights >= 7) { $km = mysql_query("select `id` from `lib` where type = 'komm' and refid = '" . $id . "'"); $km1 = mysql_num_rows($km); $comm_link = "<a href='index.php?act=komm&id=" . $id . "'>" . $lng['comments'] . "</a> ({$km1})"; } else { $comm_link = ' '; } echo '<div class="phdr">' . $comm_link . '</div>'; if ($count_pages > 1) { echo '<div class="topmenu">' . functions::display_pagination('index.php?id=' . $id . '&', $start, $count_pages, 1) . '</div><div class="topmenu">' . '<form action="index.php?id=' . $id . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></div>'; } if ($rights == 5 || $rights >= 6) { echo '<p><a href="index.php?act=edit&id=' . $id . '">' . $lng['edit'] . '</a><br/>'; echo '<a href="index.php?act=del&id=' . $id . '">' . $lng['delete'] . '</a></p>'; } echo '<a href="index.php?act=java&id=' . $id . '">' . $lng_lib['download_java'] . '</a><br /><br />'; $dnam = mysql_query("select `id`, `refid`, `text` from `lib` where type = 'cat' and id = '" . $zag['refid'] . "'"); $dnam1 = mysql_fetch_array($dnam); $catname = "{$dnam1['text']}"; $dirid = "{$dnam1['id']}"; $nadir = $zag['refid']; while ($nadir != "0") { echo "»<a href='index.php?id=" . $nadir . "'>{$catname}</a><br/>"; $dnamm = mysql_query("select `id`, `refid`, `text` from `lib` where type = 'cat' and id = '" . $nadir . "'"); $dnamm1 = mysql_fetch_array($dnamm);
echo '<div class="phdr"> <a href="faq.php?act=tags">ВВcode</a> | <b>Upload Gambar</b></div>' . '<form enctype="multipart/form-data" method="post" action="upload_img.php?img"><div class="list1">' . 'Pilih gambar:<br /><input type="file" name="imagefile" value="" />' . '<input type="hidden" name="MAX_FILE_SIZE" value="' . 1024 * $upload_file_size . '" />' . '<br />' . '<p><input type="submit" name="submit" value="Upload" /></p></div></form>' . '<div class="list2"><small>Type file yang diperbolehkan adalah JPG, JPEG, PNG, dan GIF<br />' . 'Ukuran file tidak boleh melebihi ' . $upload_file_size . 'kb.</small></div>' . '<div class="phdr"><b>Gambar</b></div>'; $array = glob($rootpath . 'files/images/*preview.jpg'); $total = count($array); $end = $start + $kmess; if ($end > $total) { $end = $total; } if ($start >= $total) { $start = 0; $end = $total > $kmess ? $kmess : $total; } if ($total > 0) { for ($i = $start; $i < $end; $i++) { $code = preg_replace('#../files/images/(.+?)_preview.jpg#is', '\\1', $array[$i]); echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo '<table width="100%" cellspacing="0" cellpadding="0"><tr valign="top"><td>' . '<a href="' . str_replace('_preview', '', $array[$i]) . '"><img src="' . $array[$i] . '" alt="+" /></a></td>' . '<td align="right"><input type="text" value="[img=' . $code . ']" /></td></tr></table></div>'; } } else { echo '<div class="menu">Daftar Kosong!</div>'; } echo '<div class="phdr">Total' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('upload_img.php?', $start, $total, $kmess) . '</div>'; echo '<p><form action="upload_img.php" method="post"><input type="submit" value="pergi ke halaman >>"/></form></p>'; } echo '<p><a href="faq.php?act=tags">ВВcode</a></p>'; } } else { header('location: /login.php'); } require '../incfiles/end.php';
mysql_query("UPDATE `cms_album_files` SET `views` = '{$views}' WHERE `id` = '" . $res['id'] . "'"); } } else { /* ----------------------------------------------------------------- Предпросмотр изображения в списке ----------------------------------------------------------------- */ echo '<a href="album.php?act=show&al=' . $al . '&img=' . $res['id'] . '&user='******'id'] . '&view"><img src="../files/users/album/' . $user['id'] . '/' . $res['tmb_name'] . '" /></a>'; } if (!empty($res['description'])) { echo '<div class="gray">' . functions::smileys(functions::checkout($res['description'], 1)) . '</div>'; } echo '<div class="sub">'; if ($user['id'] == $user_id || core::$user_rights >= 6) { echo functions::display_menu(array('<a href="album.php?act=image_edit&img=' . $res['id'] . '&user='******'id'] . '">' . $lng['edit'] . '</a>', '<a href="album.php?act=image_move&img=' . $res['id'] . '&user='******'id'] . '">' . $lng['move'] . '</a>', '<a href="album.php?act=image_delete&img=' . $res['id'] . '&user='******'id'] . '">' . $lng['delete'] . '</a>')); if ($user['id'] == $user_id && $view) { echo ' | <a href="album.php?act=show&al=' . $al . '&user='******'id'] . '&view&img=' . $res['id'] . '&profile">' . $lng_profile['photo_profile'] . '</a>'; } } echo vote_photo($res) . '<div class="gray">' . $lng['count_views'] . ': ' . $res['views'] . ', ' . $lng['count_downloads'] . ': ' . $res['downloads'] . '</div>' . '<div class="gray">' . $lng['date'] . ': ' . functions::display_date($res['time']) . '</div>' . '<a href="album.php?act=comments&img=' . $res['id'] . '">' . $lng['comments'] . '</a> (' . $res['comm_count'] . ')<br />' . '<a href="album.php?act=image_download&img=' . $res['id'] . '">' . $lng['download'] . '</a>' . '</div></div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('album.php?act=show&al=' . $al . '&user='******'id'] . '&' . ($view ? 'view&' : ''), $start, $total, $kmess) . '</div>' . '<p><form action="album.php?act=show&al=' . $al . '&user='******'id'] . ($view ? '&view' : '') . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } echo '<p><a href="album.php?act=list&user='******'id'] . '">' . $lng_profile['album_list'] . '</a></p>';
if ($total > 0) { for ($i = $start; $i < $end; $i++) { $ava = preg_replace('#^' . $rootpath . 'images/avatars/' . $id . '/(.*?).png$#isU', '$1', $array[$i], 1); echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo '<img src="' . $array[$i] . '" alt="" />'; if ($user_id) { echo ' - <a href="faq.php?act=avatars&id=' . $id . '&avatar=' . $ava . '">' . $lng['select'] . '</a>'; } echo '</div>'; } } else { echo '<div class="menu">' . $lng['list_empty'] . '</div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('faq.php?act=avatars&id=' . $id . '&', $start, $total, $kmess) . '</p>' . '<p><form action="faq.php?act=avatars&id=' . $id . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } echo '<p><a href="faq.php?act=avatars">' . $lng['catalogue'] . '</a><br />' . '<a href="' . $_SESSION['ref'] . '">' . $lng['back'] . '</a></p>'; } } else { // Показываем каталоги с Аватарами echo '<div class="phdr"><a href="faq.php"><b>F.A.Q.</b></a> | ' . $lng['avatars'] . '</div>'; $dir = glob($rootpath . 'images/avatars/*', GLOB_ONLYDIR); $total = 0; $total_dir = count($dir); for ($i = 0; $i < $total_dir; $i++) { $count = (int) count(glob($dir[$i] . '/*.png')); $total = $total + $count; echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo '<a href="faq.php?act=avatars&id=' . preg_replace('#^' . $rootpath . 'images/avatars/#isU', '', $dir[$i], 1) . '">' . htmlentities(file_get_contents($dir[$i] . '/name.dat'), ENT_QUOTES, 'utf-8') . '</a> (' . $count . ')</div>'; }
echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; $get_ip = $res['ip1'] == $res['ip2'] ? long2ip($res['ip1']) : long2ip($res['ip1']) . ' - ' . long2ip($res['ip2']); echo '<a href="index.php?act=ipban&mod=detail&id=' . $res['id'] . '">' . $get_ip . '</a> '; switch ($res['ban_type']) { case 2: echo $lng['redirect']; break; case 3: echo $lng['registration']; break; default: echo '<b>' . $lng['blocking'] . '</b>'; } echo '</div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="rmenu"><form action="index.php?act=ipban&mod=new" method="post"><input type="submit" name="" value="' . $lng['ip_ban_new'] . '" /></form></div>'; echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('index.php?act=ipban&', $start, $total, $kmess) . '</div>'; echo '<p><form action="index.php?act=ipban" method="post"><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } echo '<p>'; if ($total > 0) { echo '<a href="index.php?act=ipban&mod=search">' . $lng['search'] . '</a><br /><a href="index.php?act=ipban&mod=clear">' . $lng['ip_ban_clean'] . '</a><br />'; } echo '<a href="index.php">' . $lng['admin_panel'] . '</a></p>'; }
echo '<input type="checkbox" name="delch[]" value="' . $key . '"/> '; } echo '<a href="?act=languages&mod=edit_phrase&language=' . $language . '&module=' . $name_module . '&key=' . $key . '&symbol=' . $symbol . '&start=' . $start . '">' . $lng['edit'] . '</a>'; if (isset($lng_edit[$name_module]) && in_array($key, array_keys($lng_edit[$name_module]))) { $reset = true; echo ' | <a href="?act=languages&mod=delete_phrase&language=' . $language . '&module=' . $name_module . '&key=' . $key . '&symbol=' . $symbol . '&start=' . $start . '">' . $panel_lng['default'] . '</a>'; } echo '</div></div>'; ++$i; } if ($reset) { echo '<div class="rmenu"><input type="submit" value="' . $panel_lng['default'] . '"/></div>'; } echo '</form><div class="phdr">' . $lng['total'] . ': <b>' . $total . '</b></div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('?act=languages&mod=search&language=' . $language . '&module=' . $name_module . '&search=' . urlencode($search) . '&', $start, $total, $kmess) . '</div>' . '<p><form action="?act=languages&mod=search&language=' . $language . '&module=' . $name_module . '&search=' . urlencode($search) . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } } else { echo '<div class="rmenu"><p>' . $lng['list_empty'] . '!</p></div>' . '<div class="phdr"><a href="?act=languages&mod=phrases&language=' . $language . '&module=' . $name_module . '"><b>' . $lng['back'] . '</b></a></div>'; } echo '<p><a href="index.php">' . $lng['admin_panel'] . '</a></p>'; break; case 'edit_phrase': /* ----------------------------------------------------------------- Редактируем отдельную фразу языкового модуля ----------------------------------------------------------------- */ $name_module = isset($_GET['module']) ? ini_file::key_filter($_GET['module']) : false; $symbol = isset($_GET['symbol']) ? trim(mb_substr($_GET['symbol'], 0, 1)) : 0; $key = isset($_GET['key']) ? ini_file::key_filter($_GET['key']) : 0;
$text = functions::smileys($text, $res['rights'] ? 1 : 0); } $text = bbcode::notags($text); $text .= '...<a href="index.php?act=write&id=' . $row['id'] . '">' . $lng['continue'] . ' >></a>'; } else { // Или, обрабатываем тэги и выводим весь текст $text = functions::checkout($last_msg['text'], 1, 1); if ($set_user['smileys']) { $text = functions::smileys($text, $res['rights'] ? 1 : 0); } } $arg = array('header' => '<span class="gray">(' . functions::display_date($last_msg['time']) . ')</span>', 'body' => '<div style="font-size: small">' . $text . '</div>', 'sub' => '<p><a href="index.php?act=write&id=' . $row['id'] . '"><b>' . $lng_mail['correspondence'] . '</b></a> (' . $count_message . ') | <a href="index.php?act=ignor&id=' . $row['id'] . '&add">Игнор</a> | <a href="index.php?act=deluser&id=' . $row['id'] . '">' . $lng['delete'] . '</a></p>', 'iphide' => 1); if (!$last_msg['read']) { echo '<div class="gmenu">'; } else { echo $i % 2 ? '<div class="list1">' : '<div class="list2">'; } echo functions::display_user($row, $arg); echo '</div>'; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>'; if ($total > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('index.php?act=input&', $start, $total, $kmess) . '</div>' . '<p><form action="index.php" method="get"> <input type="hidden" name="act" value="input"/> <input type="text" name="page" size="2"/> <input type="submit" value="' . $lng['to_page'] . ' >>"/></form></p>'; } echo '<p><a href="../users/profile.php?act=office">' . $lng['personal'] . '</a></p>';
// A?Ac??o@a@??e???????ye?cc?? $res['name'] = functions::checkout($res['name']); $text = functions::antilink(functions::checkout($res['text'], 0, 2)); } // Tampilkan text posting echo '<div class="textx">' . $text . '</div>'; echo '<font color="lime">'; //echo functions::update_time($res['time']); echo '</font>'; // link ke pungsi moderskie if ($rights >= 7) { echo '<div class="maintxt"><a href="qchat.php?act=del&id=' . $res['id'] . '">' . $lng['delete'] . '</a></div>'; } echo "</div>"; ++$i; } echo "<div class='phdr'><a name='down' id='down'></a><a href='#up'><img src='../theme/default/images/up.png' alt='up' /></a> Total : {$colmes}</div>"; if ($colmes > $kmess) { echo '<div class="topmenu">' . functions::display_pagination('qchat.php?', $start, $colmes, $kmess) . '</div>'; echo '<form action="qchat.php" method="get"><input type="text" name="page" size="2"/><input type="submit" value="' . $lng['to_page'] . '"/><br /></form>'; } // untuk admin menyediakan link untuk pembersihan if ($rights >= 8) { echo '<a href="qchat.php?act=clean">' . $lng['clear_all'] . '</a><br />'; } } else { echo '<div class="gmenu">' . $lng['guestbook_empty'] . ' </div>'; } break; } require_once "../incfiles/end.php";