Old school Swatch Watches
0, 'upfp' => 0, 'preview' => 1, 'postclip' => 1, 'postcut' => 2 ); /* ----------------------------------------------------------------- Список расширений файлов, разрешенных к выгрузке ----------------------------------------------------------------- */ // Файлы архивов $ext_arch = array( 'zip', 'rar', '7z', 'tar', 'gz' ); // Звуковые файлы $ext_audio = array( 'mp3', 'amr' ); // Файлы документов и тексты $ext_doc = array( 'txt', 'pdf', 'doc', 'rtf', 'djvu', 'xls' ); // Файлы Java $ext_java = array( 'jar', 'jad' ); // Файлы картинок $ext_pic = array( 'jpg', 'jpeg', 'gif', 'png', 'bmp' ); // Файлы SIS $ext_sis = array( 'sis', 'sisx' ); // Файлы видео $ext_video = array( '3gp', 'avi', 'flv', 'mpeg', 'mp4' ); // Файлы Windows $ext_win = array( 'exe', 'msi' ); // Другие типы файлов (что не перечислены выше) $ext_other = array('wmf'); /* ----------------------------------------------------------------- Ограничиваем доступ к Форуму ----------------------------------------------------------------- */ $error = ''; if (!$set['mod_forum'] && $rights < 7) $error = $lng_forum['forum_closed']; elseif ($set['mod_forum'] == 1 && !$user_id) $error = $lng['access_guest_forbidden']; if ($error) { require('../incfiles/head.php'); echo '

' . $error . '

'; require('../incfiles/end.php'); exit; } $headmod = $id ? 'forum,' . $id : 'forum'; /* ----------------------------------------------------------------- Заголовки страниц форума ----------------------------------------------------------------- */ if (empty($id)) { $textl = '' . $lng['forum'] . ''; } else { $req = mysql_query("SELECT `text` FROM `forum` WHERE `id`= '" . $id . "'"); $res = mysql_fetch_assoc($req); $textl = notags($res['text']); } /* ----------------------------------------------------------------- Переключаем режимы работы ----------------------------------------------------------------- */ $mods = array( 'addfile', 'addvote', 'close', 'deltema', 'delvote', 'editpost', 'editvote', 'file', 'files', 'filter', 'loadtem', 'massdel', 'moders', 'new', 'nt', 'per', 'post', 'ren', 'restore', 'say', 'tema', 'users', 'vip', 'vote', 'who', 'curators', 'home', 'img' ); if ($act && ($key = array_search($act, $mods)) !== false && file_exists('includes/' . $mods[$key] . '.php')) { require('includes/' . $mods[$key] . '.php'); } else { require('../incfiles/head.php'); /* ----------------------------------------------------------------- Если форум закрыт, то для Админов выводим напоминание ----------------------------------------------------------------- */ if (!$set['mod_forum']) echo '
' . $lng_forum['forum_closed'] . '
'; elseif ($set['mod_forum'] == 3) echo '
' . $lng['read_only'] . '
'; if (!$user_id) { if (isset($_GET['newup'])) $_SESSION['uppost'] = 1; if (isset($_GET['newdown'])) $_SESSION['uppost'] = 0; } if ($id) { /* ----------------------------------------------------------------- Определяем тип запроса (каталог, или тема) ----------------------------------------------------------------- */ $type = mysql_query("SELECT * FROM `forum` WHERE `id`= '$id'"); if (!mysql_num_rows($type)) { // Если темы не существует, показываем ошибку echo functions::display_error($lng_forum['error_topic_deleted'], '' . $lng['to_forum'] . ''); require('../incfiles/end.php'); exit; } $type1 = mysql_fetch_assoc($type); /* ----------------------------------------------------------------- Фиксация факта прочтения Топика ----------------------------------------------------------------- */ if ($user_id && $type1['type'] == 't') { $req_r = mysql_query("SELECT * FROM `cms_forum_rdm` WHERE `topic_id` = '$id' AND `user_id` = '$user_id' LIMIT 1"); if (mysql_num_rows($req_r)) { $res_r = mysql_fetch_assoc($req_r); if ($type1['time'] > $res_r['time']) mysql_query("UPDATE `cms_forum_rdm` SET `time` = '" . time() . "' WHERE `topic_id` = '$id' AND `user_id` = '$user_id' LIMIT 1"); } else { mysql_query("INSERT INTO `cms_forum_rdm` SET `topic_id` = '$id', `user_id` = '$user_id', `time` = '" . time() . "'"); } } /* ----------------------------------------------------------------- Получаем структуру форума ----------------------------------------------------------------- */ $res = true; $parent = $type1['refid']; while ($parent != '0' && $res != false) { $req = mysql_query("SELECT * FROM `forum` WHERE `id` = '$parent' LIMIT 1"); $res = mysql_fetch_assoc($req); if ($res['type'] == 'f' || $res['type'] == 'r') $tree[] = ''; $parent = $res['refid']; } $tree[] = ' » '; krsort($tree); if ($type1['type'] != 't' && $type1['type'] != 'm') $tree[] = '' . $type1['text'] . ''; echo ' '; /* ----------------------------------------------------------------- Счетчик файлов и ссылка на них ----------------------------------------------------------------- */ $sql = ($rights == 9) ? "" : " AND `del` != '1'"; if ($type1['type'] == 'f') { $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_forum_files` WHERE `cat` = '$id'" . $sql), 0); if ($count > 0) $filelink = '' . $lng_forum['files_category'] . ''; } elseif ($type1['type'] == 'r') { $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_forum_files` WHERE `subcat` = '$id'" . $sql), 0); if ($count > 0) $filelink = '' . $lng_forum['files_section'] . ''; } elseif ($type1['type'] == 't') { $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_forum_files` WHERE `topic` = '$id'" . $sql), 0); if ($count > 0) $filelink = '' . $lng_forum['files_topic'] . ''; } $filelink = isset($filelink) ? $filelink . ' (' . $count . ')' : false; /* ----------------------------------------------------------------- Счетчик "Кто в теме?" ----------------------------------------------------------------- */ $wholink = false; if ($user_id && $type1['type'] == 't') { $online_u = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > " . (time() - 300) . " AND `place` = 'forum,$id'"), 0); $online_g = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_sessions` WHERE `lastdate` > " . (time() - 300) . " AND `place` = 'forum,$id'"), 0); $wholink = '' . $lng_forum['who_here'] . '? (' . $online_u . ' / ' . $online_g . ')
'; } /* ----------------------------------------------------------------- Выводим верхнюю панель навигации ----------------------------------------------------------------- */ //Đếm lượt mysql_query("UPDATE forum SET view = view + 1 WHERE id = $id"); echo '
' . functions::display_menu($tree) . '
'; /* ----------------------------------------------------------------- Отрбражаем содержимое форума ----------------------------------------------------------------- */ switch ($type1['type']) { case 'f': /* ----------------------------------------------------------------- Список разделов форума ----------------------------------------------------------------- */ $res = mysql_query("SELECT `id`, `text`, `soft` FROM `forum` WHERE `type`='r' AND `refid`='$id' ORDER BY `realid`"); $total = mysql_num_rows($res); if ($total) { $i = 0; while (($res = mysql_fetch_assoc($res)) !== false) { echo $i % 2 ? '
' : '
'; $coltem = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type` = 't' AND `refid` = '" . $res['id'] . "'"), 0); echo '' . tags($res['text']) . ''; if ($coltem) echo " [$coltem]"; if (!empty($res['soft'])) echo '
' . $res['soft'] . '
'; echo '
'; ++$i; } unset($_SESSION['fsort_id']); unset($_SESSION['fsort_users']); } else { echo ''; } echo '
' . $lng['total'] . ': ' . $total . '
'; break; case 'r': /* ----------------------------------------------------------------- Список топиков ----------------------------------------------------------------- */ $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type`='t' AND `refid`='$id'" . ($rights >= 7 ? '' : " AND `close`!='1'")), 0); if (($user_id && !isset($ban['1']) && !isset($ban['11']) && $set['mod_forum'] != 3) || core::$user_rights) { // Кнопка создания новой темы echo '
'; } echo'
'; if ($total) { $req = mysql_query("SELECT * FROM `forum` WHERE `type`='t'" . ($rights >= 7 ? '' : " AND `close`!='1'") . " AND `refid`='$id' ORDER BY `vip` DESC, `time` DESC LIMIT $start, $kmess"); $i = 0; while (($res = mysql_fetch_assoc($req)) !== false) { if ($res['close']) echo '
'; else echo $i % 2 ? '
' : '
'; $nikuser = mysql_query("SELECT `from` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $res['id'] . "' ORDER BY `time` DESC LIMIT 1"); $nam = mysql_fetch_assoc($nikuser); $colmes = mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type`='m' AND `refid`='" . $res['id'] . "'" . ($rights >= 7 ? '' : " AND `close` != '1'")); $colmes1 = mysql_result($colmes, 0); $cpg = ceil($colmes1 / $kmess); $rq=mysql_query("SELECT `text` FROM `forum` WHERE `type`='m' AND `refid`='".$res['id']."' ORDER BY `id` ASC LIMIT 1"); $rs=mysql_fetch_array($rq); echo '
'; $text=substr($rs['text'],0,200,'UTF-8'); $text=bbcode::tags($text); $text=strip_tags($text,'
'); if(preg_match('#\[img\](https?://.+?)\[\/img\]#i', $rs['text'], $Img)) { $img=$Img[1]; } else { $img=''.$home.'/images/no.png'; } echo ''; echo '
'; echo ' 1 && $set_forum['upfp'] && $set_forum['postclip'] ? '_clip_' : '') . ($set_forum['upfp'] && $cpg > 1 ? '_p' . $cpg : '.html') . '" title="'.notags($res['text']).'">' . bbcode::tags($res['text']) . '['.$res['view'].']
'; echo'
'; echo $res['from']; if (!empty($nam['from'])) { echo ' / ' . $nam['from']; } echo ' (' . functions::display_date($res['time']) . ')
'; echo '
'; ++$i; } unset($_SESSION['fsort_id']); unset($_SESSION['fsort_users']); } else { echo ''; } echo '
' . $lng['total'] . ': ' . $total . '
'; if ($total > $kmess) { echo '
' . functions::display_pagination('index.php?id=' . $id . '&', $start, $total, $kmess) . '
' . '

' . '' . '' . '

'; } $req_hot = mysql_query("SELECT `id`, `refid`, `text`, `view` FROM `forum` WHERE `type`='t' AND `refid`='$id' AND `close` != '1' ORDER BY `view` DESC LIMIT 6"); if(mysql_num_rows($req_hot)) { echo '
Xem Nhiều Nhất
'; } break; case 't': /* ----------------------------------------------------------------- Читаем топик ----------------------------------------------------------------- */ $filter = isset($_SESSION['fsort_id']) && $_SESSION['fsort_id'] == $id ? 1 : 0; $sql = ''; if ($filter && !empty($_SESSION['fsort_users'])) { // Подготавливаем запрос на фильтрацию юзеров $sw = 0; $sql = ' AND ('; $fsort_users = unserialize($_SESSION['fsort_users']); foreach ($fsort_users as $val) { if ($sw) $sql .= ' OR '; $sortid = intval($val); $sql .= "`forum`.`user_id` = '$sortid'"; $sw = 1; } $sql .= ')'; } if ($user_id && !$filter) { // Фиксация факта прочтения топика } if ($rights < 7 && $type1['close'] == 1) { echo '

' . $lng_forum['topic_deleted'] . '
' . $lng_forum['to_section'] . '

'; require('../incfiles/end.php'); exit; } // Счетчик постов темы $colmes = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type`='m'$sql AND `refid`='$id'" . ($rights >= 7 ? '' : " AND `close` != '1'")), 0); if ($start > $colmes) $start = $colmes - $kmess; // Выводим название топика echo ''; echo '
Down  ' . tags($type1['text']) . '
'; if ($colmes > $kmess) echo '
' . functions::display_pagination2(''.$home.'/forum/'.functions::thai($type1["text"]).'_' . $id, $start, $colmes, $kmess) . ''; echo '
'; // Метки удаления темы if ($type1['close']) echo '
' . $lng_forum['topic_delete_who'] . ': ' . $type1['close_who'] . '
'; elseif (!empty($type1['close_who']) && $rights >= 7) echo '
' . $lng_forum['topic_delete_whocancel'] . ': ' . $type1['close_who'] . '
'; // Метки закрытия темы if ($type1['edit']) echo '
' . $lng_forum['topic_closed'] . '
'; /* ----------------------------------------------------------------- Блок голосований ----------------------------------------------------------------- */ if ($type1['realid']) { $clip_forum = isset($_GET['clip']) ? '&clip' : ''; $vote_user = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_forum_vote_users` WHERE `user`='$user_id' AND `topic`='$id'"), 0); $topic_vote = mysql_fetch_assoc(mysql_query("SELECT `name`, `time`, `count` FROM `cms_forum_vote` WHERE `type`='1' AND `topic`='$id' LIMIT 1")); echo '
' . functions::checkout($topic_vote['name']) . '
'; $vote_result = mysql_query("SELECT `id`, `name`, `count` FROM `cms_forum_vote` WHERE `type`='2' AND `topic`='" . $id . "' ORDER BY `id` ASC"); if (!$type1['edit'] && !isset($_GET['vote_result']) && $user_id && $vote_user == 0) { // Выводим форму с опросами echo '
'; while (($vote = mysql_fetch_assoc($vote_result)) !== false) { echo ' ' . functions::checkout($vote['name'], 0, 1) . '
'; } echo '


' . $lng_forum['results'] . '

'; } else { // Выводим результаты голосования echo ''; while (($vote = mysql_fetch_assoc($vote_result)) !== false) { $count_vote = $topic_vote['count'] ? round(100 / $topic_vote['count'] * $vote['count']) : 0; echo functions::checkout($vote['name'], 0, 1) . ' [' . $vote['count'] . ']
'; echo '' . $lng_forum['rating'] . ': ' . $count_vote . '%
'; } echo '
' . $lng_forum['total_votes'] . ': '; if ($datauser['rights'] > 6) echo '' . $topic_vote['count'] . ''; else echo $topic_vote['count']; echo '
'; if ($user_id && $vote_user == 0) echo ''; } } $curators = !empty($type1['curators']) ? unserialize($type1['curators']) : array(); $curator = false; if ($rights < 6 && $rights != 3 && $user_id) { if (array_key_exists($user_id, $curators)) $curator = true; } /* ----------------------------------------------------------------- Фиксация первого поста в теме ----------------------------------------------------------------- */ if (($set_forum['postclip'] == 2 && ($set_forum['upfp'] ? $start < (ceil($colmes - $kmess)) : $start > 0)) || isset($_GET['clip'])) { $postreq = mysql_query("SELECT `forum`.*, `users`.`sex`, `users`.`rights`, `users`.`lastdate`, `users`.`status`, `users`.`datereg` FROM `forum` LEFT JOIN `users` ON `forum`.`user_id` = `users`.`id` WHERE `forum`.`type` = 'm' AND `forum`.`refid` = '$id'" . ($rights >= 7 ? "" : " AND `forum`.`close` != '1'") . " ORDER BY `forum`.`id` LIMIT 1"); $postres = mysql_fetch_assoc($postreq); echo '

'; if ($postres['sex']) echo ' '; else echo ' '; if ($user_id && $user_id != $postres['user_id']) { echo '' . $postres['from'] . ' ' . ' ' . $lng_forum['reply_btn'] . ' ' . ' ' . $lng_forum['cytate_btn'] . ' '; } else { echo '' . $postres['from'] . ' '; } $user_rights = array( 1 => 'Kil', 3 => 'Mod', 6 => 'Smd', 7 => 'Adm', 8 => 'SV' ); echo @$user_rights[$postres['rights']]; echo (time() > $postres['lastdate'] + 300 ? ' [Off]' : ' [ON]'); echo ' (' . functions::display_date($postres['time']) . ')
'; if ($postres['close']) { echo '' . $lng_forum['post_deleted'] . '
'; } echo functions::checkout(mb_substr($postres['text'], 0, 500), 0, 2); if (mb_strlen($postres['text']) > 500) echo '...' . $lng_forum['read_all'] . ''; echo '

'; } if ($filter) echo '
' . $lng_forum['filter_on'] . '
'; // Задаем правила сортировки (новые внизу / вверху) if ($user_id) $order = $set_forum['upfp'] ? 'DESC' : 'ASC'; else $order = ((empty($_SESSION['uppost'])) || ($_SESSION['uppost'] == 0)) ? 'ASC' : 'DESC'; // Запрос в базу $req = mysql_query("SELECT `forum`.*, `users`.`sex`, `users`.`rights`, `users`.`lastdate`, `users`.`status`, `users`.`datereg`, `users`.`check` FROM `forum` LEFT JOIN `users` ON `forum`.`user_id` = `users`.`id` WHERE `forum`.`type` = 'm' AND `forum`.`refid` = '$id'" . ($rights >= 7 ? "" : " AND `forum`.`close` != '1'") . "$sql ORDER BY `forum`.`id` $order LIMIT $start, $kmess"); // Верхнее поле "Написать" if (($user_id && !$type1['edit'] && $set_forum['upfp'] && $set['mod_forum'] != 3) || ($rights >= 7 && $set_forum['upfp'])) { echo '
'; if ($set_forum['farea']) { echo '

' . (!$is_mobile ? bbcode::auto_bb('form1', 'msg') : '') . '

' . '

' . $lng_forum['add_file'] . ($set_user['translit'] ? '
' . $lng['translit'] : '') . '

' . ($set_forum['preview'] ? '' : '') . '

'; } else { echo '

'; } } if ($rights == 3 || $rights >= 6) echo '
'; $i = 1; while (($res = mysql_fetch_assoc($req)) !== false) { if ($res['close']) echo '
'; else echo $i % 2 ? '
' : '
'; echo '
'; if ($set_user['avatar']) { if (file_exists(('../files/users/avatar/' . $res['user_id'] . '.png'))) echo '' . $res['from'] . ' '; else echo '' . $res['from'] . ' '; } echo ''; if ($res['rights'] == 9) echo ' '; else echo ' '; // Ник юзера и ссылка на его if ($res['check']) echo ''.nickname($res['user_id']).' '; else echo ''.$res['from'].' (Khách)'; // Метка должности $user_rights = array( 0 => '(Member)', 1 => '(Auto)', 3 => '(Mod)', 4 => '()', 6 => '(Smod)', 7 => '(Manager)', 9 => '(Admin)', 10 => '(Máy Chém Tự Động)' ); echo @$user_rights[$res['rights']]; if ($res['check']) echo (time() > $res['lastdate'] + 300 ? ' [Off] ' : ' [ON] '); else echo ($res['time'] > time() - 300 ? ' [ON] ' : ' [Off] '); echo '
' . functions::display_date($res['time']) . ''; // Метка Онлайн / Офлайн $user_u = $res['user_id'];$req_u = mysql_query("SELECT * FROM `users` WHERE `id` = '$user_u' LIMIT 1") ;$res_u = mysql_fetch_array($req_u); // Ссылки на ответ и цитирование // Время поста // Статус юзера if ($set_user['avatar']) echo '
'; /* ----------------------------------------------------------------- Вывод текста поста ----------------------------------------------------------------- */ echo '
'; $tx = $res['text']; $simvol = $set['simvols']; $strrpos = mb_strrpos($tx, " "); $pages = 1; // Вычисляем номер страницы if (isset($_GET['trang'])) { $page = abs(intval($_GET['trang'])); if ($page == 0) $page = 1; $start = $page - 1; } else { $page = $start + 1; } $t_si = 0; if ($strrpos) { while ($t_si < $strrpos) { $string = mb_substr($tx, $t_si, $simvol); $t_ki = mb_strrpos($string, " "); $m_sim = $t_ki; $strings[$pages] = $string; $t_si = $t_ki + $t_si; if ($page == $pages) { $page_text = $strings[$pages]; } if ($strings[$pages] == "") { $t_si = $strrpos++; } else { $pages++; } } if ($page >= $pages) { $page = $pages - 1; $page_text = $strings[$page]; } $pages = $pages - 1; if ($page != $pages) { $prb = mb_strrpos($page_text, " "); $page_text = mb_substr($page_text, 0, $prb); } } else { $page_text = $tx; } // Предварительна фильтрация статьи и вывод if ($set_forum['postcut'] && mb_strlen($page_text) < $cut) { $page_text = mb_substr($page_text, 0, $cut); $page_text = functions::checkout($page_text, 1, 1); $page_text = preg_replace('#\[c\](.*?)\[/c\]#si', '
\1
', $page_text); if ($set_user['smileys']) $page_text = functions::smileys($page_text, $res['rights'] ? 1 : 0); if($user_id) { $page_text = str_replace('[you]', $login, $page_text); } else { $page_text = str_replace('[you]', 'Khách', $page_text); } $checkthank = mysql_query('SELECT COUNT(*) FROM `forum_thank` WHERE `userthank` = "' . $user_id . '" and `topic` = "' . $res['id'] . '" and `user` = "' . $res['user_id'] . '"'); $thankcheck = mysql_result($checkthank, 0); if($thankcheck < 1 && $user_id != $res['user_id']) { $page_text = preg_replace('#\[thank\](.*?)\[/thank\]#si', '
Nội dung ẩn
Bạn vui lòng cảm ơn bài viết này để được xem nội dung ẩn
', $page_text); } else { $page_text = preg_replace('#\[thank\](.*?)\[/thank\]#si', '\1', $page_text); } echo bbcode::notags($page_text) . '...
' . $lng_forum['read_all'] . ' >>'; } else { // Или, обрабатываем тэги и выводим весь текст $page_text = functions::checkout($page_text, 1, 1); if ($set_user['smileys']) $page_text = functions::smileys($page_text, $res['rights'] ? 1 : 0); if($user_id) { $page_text = str_replace('[you]', $login, $page_text); } else { $page_text = str_replace('[you]', 'Khách', $page_text); } $checkthank = mysql_query('SELECT COUNT(*) FROM `forum_thank` WHERE `userthank` = "' . $user_id . '" and `topic` = "' . $res['id'] . '" and `user` = "' . $res['user_id'] . '"'); if($thankcheck < 1 && $user_id != $res['user_id']) { $page_text = preg_replace('#\[thank\](.*?)\[/thank\]#si', '
Nội dung ẩn
Bạn vui lòng cảm ơn bài viết này để được xem nội dung ẩn
', $page_text); } else { $page_text = preg_replace('#\[thank\](.*?)\[/thank\]#si', '\1', $page_text); } } echo '' . $page_text . ''; if ($pages > 1) { nav($pages,$page,$num,$home.'/forum/' . functions::thai(notags($type1['text'])) . '_' . $id . '.html?'); } // Или, обрабатываем тэги и выводим весь текст $text = functions::checkout($text, 1, 1); if ($set_user['smileys']) $text = functions::smileys($text, $res['rights'] ? 1 : 0); echo $text; if ($res['kedit']) { // Если пост редактировался, показываем кем и когда echo '
' . $lng_forum['edited'] . ' ' . $res['edit'] . ' (' . functions::display_date($res['tedit']) . ') [' . $res['kedit'] . ']'; } // Если есть прикрепленный файл, выводим его описание $freq = mysql_query("SELECT * FROM `cms_forum_files` WHERE `post` = '" . $res['id'] . "'"); if (mysql_num_rows($freq) > 0) { $fres = mysql_fetch_assoc($freq); $fls = round(@filesize('../files/forum/attach/' . $fres['filename']) / 1024, 2); echo '
' . $lng_forum['attached_file'] . ':'; // Предпросмотр изображений $att_ext = strtolower(functions::format('./files/forum/attach/' . $fres['filename'])); $pic_ext = array( 'gif', 'jpg', 'jpeg', 'png' ); $req43=mysql_query("SELECT `postforum`, `id` FROM `users` WHERE (id='$user_id') "); $arr56=mysql_fetch_array($req43); $total_spent = 2; $hammad= 3 - $arr56['postforum']; if (in_array($att_ext, $pic_ext)) { echo '
'; } else if (empty($user_id)){ echo 'Bạn cần đăng nhập mới tải được file đính kèm'; }else if($total_spent < $arr56['postforum']){ echo ' ' . $fres['filename'] . ''; } else echo 'Bạn vui lòng post đủ 3 bài viết để tải tập tin đính kèm'; echo ' (' . $fls . ' кб.)
'; echo $lng_forum['downloads'] . ': ' . $fres['dlcount'] . ' ' . $lng_forum['time'] . '
'; $file_id = $fres['id']; } if ((($rights == 3 || $rights >= 6 || $curator) && $rights >= $res['rights']) || ($res['user_id'] == $user_id && !$set_forum['upfp'] && ($start + $i) == $colmes && $res['time'] > time() - 300) || ($res['user_id'] == $user_id && $set_forum['upfp'] && $start == 0 && $i == 1 && $res['time'] > time() - 300)) { // Ссылки на редактирование / удаление постов $menu = array( '' . $lng['edit'] . '', ($rights >= 7 && $res['close'] == 1 ? '' . $lng_forum['restore'] . '' : ''), ($res['close'] == 1 ? '' : '' . $lng['delete'] . '') ); echo '
'; if ($rights == 3 || $rights >= 6) echo ' '; if ($user_id) echo functions::display_menu($menu); if ($res['close']) { echo '
' . $lng_forum['who_delete_post'] . ': ' . $res['close_who'] . '
'; } elseif (!empty($res['close_who'])) { echo '
' . $lng_forum['who_restore_post'] . ': ' . $res['close_who'] . '
'; } if ($rights == 3 || $rights >= 6) { if ($res['ip_via_proxy']) { echo '
' . long2ip($res['ip']) . ' - ' . '' . long2ip($res['']) . '' . ' - ' . $res['soft'] . '
'; } else { echo '
' . long2ip($res['ip']) . ' - ' . $res['soft'] . '
'; } } echo '
'; } echo '
'; if ($user_id && $user_id != $res['user_id']) { echo '
'; echo ' Trả lời ' . '| Trích 
'; } echo '
ads: Nhà Tài Trợ
'; require('../bookmark/wc.html'); echo'
Tải chọn bộ clip sex kinh điển soạn tin (chỉ 500đ): DL H9305 gửi 8009 hoặc ấn vào đây [Tải Vê]

'; ++$i; } if ($rights == 3 || $rights >= 6) { echo '
'; echo ''; } // Нижнее поле "Написат echo ''; if($user_id){ echo '
Bình luận [Smile]
'; if (!$is_mobile) echo bbcode::auto_bb('form2', 'msg'); echo '

'; echo '

'; } echo '
' . '' . $lng['up'] . '' . '  ' . $lng['total'] . ': ' . $colmes . 'Xem: '.$type1['view'].' lượt
'; if ($colmes > $kmess) { echo '
' . functions::display_pagination2(''.$home.'/forum/'.functions::thai($type1["text"]).'_' . $id, $start, $colmes, $kmess) . '
' . '

' . '' . '' . '

'; } else { } // Chia se echo '
Chia sẻ bài viết
BB Code:

Link:
'; /* ----------------------------------------------------------------- Ссылки на модераторские функции ----------------------------------------------------------------- */ if ($curators) { $array = array(); foreach ($curators as $key => $value) $array[] = '' . $value . ''; echo '

' . $lng_forum['curators'] . ': ' . implode(', ', $array) . '

'; } $req = mysql_query("SELECT * FROM `forum` WHERE `type`='t' AND `refid`='$type1[refid]' AND `id`!='$id' ORDER BY `vip` DESC, `time` DESC LIMIT 10"); $total = mysql_num_rows($req); if($total!=0) { echo '
Bạn Xem Chưa?
'; while ($res = mysql_fetch_assoc($req)) { echo ''; ++$i; } echo'
'; } if ($rights == 3 || $rights >= 6) { echo '

'; if ($rights >= 7) echo '' . $lng_forum['curators_of_the_topic'] . '
'; echo isset($topic_vote) && $topic_vote > 0 ? '' . $lng_forum['edit_vote'] . '
' . $lng_forum['delete_vote'] . '
' : '' . $lng_forum['add_vote'] . '
'; echo '' . $lng_forum['topic_rename'] . '
'; // Закрыть - открыть тему if ($type1['edit'] == 1) echo '' . $lng_forum['topic_open'] . '
'; else echo '' . $lng_forum['topic_close'] . '
'; // Удалить - восстановить тему if ($type1['close'] == 1) echo '' . $lng_forum['topic_restore'] . '
'; echo '' . $lng_forum['topic_delete'] . '
'; if ($type1['vip'] == 1) echo '' . $lng_forum['topic_unfix'] . ''; else echo '' . $lng_forum['topic_fix'] . ''; echo '
' . $lng_forum['topic_move'] . ''; echo '
Sửa link hình minh họa

'; } //Admin if ($rights == 9){ if(empty($type1['home'])) echo "Cho ra home

"; } break; default: /* ----------------------------------------------------------------- Если неверные данные, показываем ошибку ----------------------------------------------------------------- */ break; } } else { /* ----------------------------------------------------------------- Список Категорий форума ----------------------------------------------------------------- */ $tong = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1'"), 0); $req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' and `close`!='1' ORDER BY `danhgia` DESC LIMIT $start, $kmess"); echo '
NEW UPDATE
'; $req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1' ORDER BY `id` DESC LIMIT $start, $kmess"); if ($tong > 0) { $i = 0; while ($arr = mysql_fetch_array($req)) { $q3 = mysql_query("select `id`, `refid`, `text` from `forum` where type='r' and id='" . $arr['refid'] . "'"); $razd = mysql_fetch_array($q3); $q4 = mysql_query("select `id`, `refid`, `text` from `forum` where type='f' and id='" . $razd['refid'] . "'"); $frm = mysql_fetch_array($q4); $nikuser = mysql_query("SELECT `from`,`id`, `time`, `user_id` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $arr['id'] . "'ORDER BY time DESC"); $colmes1 = mysql_num_rows($nikuser); $cpg = ceil($colmes1 / $kmess); $nam = mysql_fetch_array($nikuser); echo '
'; echo '
'; $rq=mysql_query("SELECT `text` FROM `forum` WHERE `type`='m' AND `refid`='".$arr['id']."' ORDER BY `id` ASC LIMIT 1"); $rs=mysql_fetch_array($rq); $text=substr($rs['text'],0,200,'UTF-8'); $text=bbcode::tags($text); $text=strip_tags($text,'
'); if(preg_match('#\[img\](https?://.+?)\[\/img\]#i', $rs['text'], $Img)) { $img=$Img[1]; } else { $img=''.$home.'/images/no.png'; } echo ''; echo '
'; echo ' 1 && $set_forum['upfp'] && $set_forum['postclip'] ? '_clip_' : '') . ($set_forum['upfp'] && $cpg > 1 ? '_p' . $cpg : '.html') . '" title="'.notags($arr['text']).'">' . bbcode::tags($arr['text']) . '['.$arr['view'].']
'; echo'
'; echo '

LDK / LDK

'; echo ' (' . functions::display_date($res['time']) . ')
'; echo '
'; $i++; } unset($_SESSION['fsort_id']); unset($_SESSION['fsort_users']); } else { echo ''; } echo '
' . $lng['total'] . ': '.$tong . '
'; if ($tong > $kmess) { echo '
' . functions::display_pagination('index.php?id=' . $id . '&', $start, $tong, $kmess) . '

' .'' . '' . '

'; } $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_forum_files`" . ($rights >= 7 ? '' : " WHERE `del` != '1'")), 0); echo '
' . $lng['forum'] . '
' . ''; $req = mysql_query("SELECT `id`, `text`, `soft` FROM `forum` WHERE `type`='f' ORDER BY `realid`"); $i = 0; while (($res = mysql_fetch_array($req)) !== false) { echo '
'.$res['text'].'
'; // $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type`='r' and `refid`='" . $res['id'] . "'"), 0); $reqf = mysql_query("SELECT `id`, `text`, `soft` FROM `forum` WHERE `type`='r' AND `refid`='".$res['id']."' ORDER BY `realid`"); while (($resf = mysql_fetch_array($reqf)) !== false) { $subcount = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type`='t' and `refid`='" . $resf['id'] . "'"), 0); echo '
'; echo 'image' . $resf['text'] . ' (' . $subcount . ')'; echo '
'; } } $online_u = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > " . (time() - 300) . " AND `place` LIKE 'forum%'"), 0); $online_g = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_sessions` WHERE `lastdate` > " . (time() - 300) . " AND `place` LIKE 'forum%'"), 0); echo '
' . ($user_id ? '' . $lng_forum['who_in_forum'] . '' : $lng_forum['who_in_forum']) . ' (' . $online_u . ' / ' . $online_g . ')
'; unset($_SESSION['fsort_id']); unset($_SESSION['fsort_users']); } // Навигация внизу страницы echo '

' . ($id ? '

' : ''); if (!$id) { echo '' . $lng_forum['forum_rules'] . ''; echo '' . $lng['moders'] . '
'; } echo '

'; } require_once('../incfiles/end.php'); ?>
Copyright © 2013 by [zikun]
Thank to : Xtgem.com