Exemple #1
0
     }
     echo '<div class="phdr">' . $lng['total'] . ': ' . $count . '</div>';
     if ($count > $kmess) {
         echo '<div class="topmenu">' . functions::display_pagination('index.php?act=new&amp;do=period&amp;vr=' . $vr . '&amp;', $start, $count, $kmess) . '</div>' . '<p><form action="index.php?act=new&amp;do=period&amp;vr=' . $vr . '" method="post">
             <input type="text" name="page" size="2"/>
             <input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
     }
     echo '<p><a href="index.php?act=new">' . $lng['back'] . '</a></p>';
     break;
 default:
     /*
     -----------------------------------------------------------------
     Вывод непрочитанных тем (для зарегистрированных)
     -----------------------------------------------------------------
     */
     $total = counters::forum_new();
     echo '<div class="phdr"><a href="index.php"><b>' . $lng['forum'] . '</b></a> | ' . $lng['unread'] . '</div>';
     if ($total > $kmess) {
         echo '<div class="topmenu">' . functions::display_pagination('index.php?act=new&amp;', $start, $total, $kmess) . '</div>';
     }
     if ($total > 0) {
         $req = mysql_query("SELECT * FROM `forum`\n                LEFT JOIN `cms_forum_rdm` ON `forum`.`id` = `cms_forum_rdm`.`topic_id` AND `cms_forum_rdm`.`user_id` = '{$user_id}'\n                WHERE `forum`.`type`='t'" . ($rights >= 7 ? "" : " AND `forum`.`close` != '1'") . "\n                AND (`cms_forum_rdm`.`topic_id` Is Null\n                OR `forum`.`time` > `cms_forum_rdm`.`time`)\n                ORDER BY `forum`.`time` DESC\n                LIMIT {$start}, {$kmess}");
         for ($i = 0; $res = mysql_fetch_assoc($req); ++$i) {
             if ($res['close']) {
                 echo '<div class="rmenu">';
             } else {
                 echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
             }
             $q3 = mysql_query("SELECT `id`, `refid`, `text` FROM `forum` WHERE `type` = 'r' AND `id` = '" . $res['refid'] . "' LIMIT 1");
             $razd = mysql_fetch_assoc($q3);
             $q4 = mysql_query("SELECT `id`, `text` FROM `forum` WHERE `type`='f' AND `id` = '" . $razd['refid'] . "' LIMIT 1");
Exemple #2
0
     $total_admin = counters::guestbook(2);
     if ($total_admin > 0) {
         echo '<li><a href="guestbook/index.php?act=ga&amp;do=set">' . $lng['admin_club'] . '</a> (' . $total_admin . ')</li>';
     }
     if (!$new_users_total && !$reg_total && !$ban_total && !$total_libmod && !$total_admin) {
         echo '<li>' . $lng['events_no_new'] . '</li>';
     }
     echo '</ul></p></div>';
 }
 // Дайджест юзеров
 echo '<div class="menu"><p><h3>' . $lng['site_new'] . '</h3><ul>';
 $total_news = mysql_result(mysql_query("SELECT COUNT(*) FROM `news` WHERE `time` > " . (time() - 86400)), 0);
 if ($total_news > 0) {
     echo '<li><a href="news/index.php">' . $lng['news'] . '</a> (' . $total_news . ')</li>';
 }
 $total_forum = counters::forum_new();
 if ($total_forum > 0) {
     echo '<li><a href="forum/index.php?act=new">' . $lng['forum'] . '</a> (' . $total_forum . ')</li>';
 }
 $total_guest = counters::guestbook(1);
 if ($total_guest > 0) {
     echo '<li><a href="guestbook/index.php?act=ga">' . $lng['guestbook'] . '</a> (' . $total_guest . ')</li>';
 }
 $total_gal = counters::gallery(1);
 if ($total_gal > 0) {
     echo '<li><a href="gallery/index.php?act=new">' . $lng['gallery'] . '</a> (' . $total_gal . ')</li>';
 }
 if ($set_karma['on']) {
     $total_karma = mysql_result(mysql_query("SELECT COUNT(*) FROM `karma_users` WHERE `karma_user` = '{$user_id}' AND `time` > " . (time() - 86400)), 0);
     if ($total_karma > 0) {
         echo '<li><a href="users/profile.php?act=karma&amp;mod=new">' . $lng['new_responses'] . '</a> (' . $total_karma . ')</li>';
Exemple #3
0
             /*
             -----------------------------------------------------------------
             Если неверные данные, показываем ошибку
             -----------------------------------------------------------------
             */
             echo functions::display_error($lng['error_wrong_data']);
             break;
     }
 } else {
     /*
     -----------------------------------------------------------------
     Список Категорий форума
     -----------------------------------------------------------------
     */
     $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_forum_files`" . ($rights >= 7 ? '' : " WHERE `del` != '1'")), 0);
     echo '<p>' . counters::forum_new(1) . '</p>' . '<div class="phdr"><b>' . $lng['forum'] . '</b></div>' . '<div class="topmenu"><a href="search.php">' . $lng['search'] . '</a> | <a href="index.php?act=files">' . $lng_forum['files_forum'] . '</a> <span class="red">(' . $count . ')</span></div>';
     $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 $i % 2 ? '<div class="list2">' : '<div class="list1">';
         $count = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type`='r' and `refid`='" . $res['id'] . "'"), 0);
         //seo
         //echo '<a href="index.php?id=' . $res['id'] . '">' . $res['text'] . '</a> [' . $count . ']';
         echo '<b><a href="' . $home . '/forum/' . functions::seo($res['text']) . '_' . $res['id'] . '.html">' . $res['text'] . '</a> [' . $count . ']</b>';
         if (!empty($res['soft'])) {
             echo '<div class="sub"><span class="gray">' . $res['soft'] . '</span></div>';
         }
         echo '</div>';
         ++$i;
     }
     $online_u = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `lastdate` > " . (time() - 300) . " AND `place` LIKE 'forum%'"), 0);