Example #1
0
 }
 // Дайджест юзеров
 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>';
     }
 }
 $total_lib = mysql_result(mysql_query("SELECT COUNT(*) FROM `lib` WHERE `type` = 'bk' AND `moder` = 1 AND `time` > " . (time() - 259200)), 0);
 if ($total_lib > 0) {
     echo '<li><a href="library/index.php?act=new">' . $lng['library'] . '</a> (' . $total_lib . ')</li>';
 }
 $total_album = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_files` WHERE `time` > '" . (time() - 259200) . "' AND `access` > '1'"), 0);
 if ($total_album > 0) {
Example #2
0
             echo $lng_gal['posted_by'] . ": {$ms['avtor']}<br/>";
             echo "<a href='foto/{$ms['name']}'>" . $lng['download'] . "</a><br /><br />";
             echo "<a href='index.php?id=" . $ms['refid'] . "'>" . $lng['back'] . "</a><br/>";
             echo "<a href='index.php'>" . $lng_gal['to_gallery'] . "</a></p>";
             break;
         default:
             header("location: index.php");
             break;
     }
 } else {
     /*
     -----------------------------------------------------------------
     Главная страница Галлереи
     -----------------------------------------------------------------
     */
     echo '<p><a href="index.php?act=new">' . $lng_gal['new_photo'] . '</a> (' . counters::gallery(1) . ')</p>';
     echo '<div class="phdr"><b>' . $lng['gallery'] . '</b></div>';
     $req = mysql_query("SELECT * FROM `gallery` WHERE `type` = 'rz'");
     $total = mysql_num_rows($req);
     while ($res = mysql_fetch_assoc($req)) {
         echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
         $al = mysql_query("select * from `gallery` where type='al' and  refid='" . $res['id'] . "'");
         $countal = mysql_num_rows($al);
         echo '<a href="index.php?id=' . $res['id'] . '">' . $res['text'] . '</a> (' . $countal . ')</div>';
         ++$i;
     }
     echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div><p>';
     if ($rights >= 6) {
         echo "<a href='index.php?act=razd'>" . $lng_gal['create_section'] . "</a><br/>";
     }
     echo "</p>";