Exemple #1
0
-----------------------------------------------------------------
*/
if (!$user_id && !$set['active']) {
    require '../incfiles/head.php';
    echo functions::display_error($lng['access_guest_forbidden']);
    require '../incfiles/end.php';
    exit;
}
/*
-----------------------------------------------------------------
Переключаем режимы работы
-----------------------------------------------------------------
*/
$array = array('admlist' => 'includes', 'birth' => 'includes', 'online' => 'includes', 'search' => 'includes', 'top' => 'includes', 'userlist' => 'includes');
$path = !empty($array[$act]) ? $array[$act] . '/' : '';
if (array_key_exists($act, $array) && file_exists($path . $act . '.php')) {
    require_once $path . $act . '.php';
} else {
    /*
    -----------------------------------------------------------------
    Актив сайта
    -----------------------------------------------------------------
    */
    $textl = $lng['community'];
    require '../incfiles/head.php';
    $shift = (core::$system_set['timeshift'] + core::$user_set['timeshift']) * 3600;
    $brth = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `dayb` = '" . date('j', time() + $shift) . "' AND `monthb` = '" . date('n', time() + $shift) . "' AND `preg` = '1'"), 0);
    $count_adm = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `rights` > 0"), 0);
    echo '<div class="phdr"><b>' . $lng['community'] . '</b></div>' . '<div class="gmenu"><form action="search.php" method="post">' . '<p><h3><img src="../images/search.png" width="16" height="16" class="left" />&#160;' . $lng['search'] . '</h3>' . '<input type="text" name="search"/>' . '<input type="submit" value="' . $lng['search'] . '" name="submit" /><br />' . '<small>' . $lng['search_nick_help'] . '</small></p></form></div>' . '<div class="menu"><p>' . '<img src="../images/contacts.png" width="16" height="16" />&#160;<a href="index.php?act=userlist">' . $lng['users'] . '</a> (' . counters::users() . ')<br />' . '<img src="../images/users.png" width="16" height="16" />&#160;<a href="index.php?act=admlist">' . $lng['administration'] . '</a> (' . $count_adm . ')' . ($brth ? '<br /><img src="../images/award.png" width="16" height="16" />&#160;<a href="index.php?act=birth">' . $lng['birthday_men'] . '</a> (' . $brth . ')' : '') . '</p><p><img src="../images/photo.gif" width="16" height="16" />&#160;<a href="album.php">' . $lng['photo_albums'] . '</a> (' . counters::album() . ')</p>' . '<p><img src="../images/rate.gif" width="16" height="16" />&#160;<a href="index.php?act=top">' . $lng['users_top'] . '</a></p>' . '</div>' . '<div class="phdr"><a href="index.php">' . $lng['back'] . '</a></div>';
}
require_once '../incfiles/end.php';
Exemple #2
0
    echo functions::display_error($lng['access_forbidden']);
    require '../incfiles/end.php';
    exit;
}
/*
-----------------------------------------------------------------
Личный кабинет пользователя
-----------------------------------------------------------------
*/
$total_photo = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_album_files` WHERE `user_id` = '{$user_id}'"), 0);
$total_friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `user_id`='{$user_id}' AND `type`='2' AND `friends`='1'"), 0);
$new_friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `from_id`='{$user_id}' AND `type`='2' AND `friends`='0';"), 0);
$online_friends = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` LEFT JOIN `users` ON `cms_contact`.`from_id`=`users`.`id` WHERE `cms_contact`.`user_id`='{$user_id}' AND `cms_contact`.`type`='2' AND `cms_contact`.`friends`='1' AND `lastdate` > " . (time() - 300) . ""), 0);
echo '<div class="phdr"><b>' . $lng_profile['my_office'] . '</b></div>' . '<div class="list2"><p>' . '<div><img src="../images/contacts.png" width="16" height="16"/>&#160;<a href="profile.php">' . $lng_profile['my_profile'] . '</a></div>' . '<div><img src="../images/rate.gif" width="16" height="16"/>&#160;<a href="profile.php?act=stat">' . $lng['statistics'] . '</a></div>' . '</p><p>' . '<div><img src="../images/photo.gif" width="16" height="16"/>&#160;<a href="album.php?act=list">' . $lng['photo_album'] . '</a>&#160;(' . $total_photo . ')</div>' . '<div><img src="../images/guestbook.gif" width="16" height="16"/>&#160;<a href="profile.php?act=guestbook">' . $lng['guestbook'] . '</a>&#160;(' . $user['comm_count'] . ')</div>' . '<div><img src="../images/users.png" width="16" height="16"/>&#160;<a href="profile.php?act=friends">' . $lng_profile['friends'] . '</a>&#160;(' . $total_friends . ($new_friends ? '/<span class="red">+' . $new_friends . '</span>' : '') . ')&#160;<a href="profile.php?act=friends&amp;do=online">' . $lng['online'] . '</a> (' . $online_friends . ')</div>';
if ($rights >= 1) {
    $guest = counters::guestbook(2);
    echo '</p><p>' . '<div><img src="../images/admin.png" width="16" height="16"/>&#160;<a href="../guestbook/index.php?act=ga&amp;do=set">' . $lng['admin_club'] . '</a> (<span class="red">' . $guest . '</span>)</div>';
}
echo '</p></div>';
/*
-----------------------------------------------------------------
Блок почты
-----------------------------------------------------------------
*/
echo '<div class="menu"><p><h3><img src="../images/mail.png" width="16" height="16" class="left" />&nbsp;' . $lng_profile['my_mail'] . '</h3><ul>';
//Входящие сообщения
$count_input = mysql_result(mysql_query("\n\tSELECT COUNT(*) \n\tFROM `cms_mail` \n\tLEFT JOIN `cms_contact` \n\tON `cms_mail`.`user_id`=`cms_contact`.`from_id` \n\tAND `cms_contact`.`user_id`='{$user_id}' \n\tWHERE `cms_mail`.`from_id`='{$user_id}' \n\tAND `cms_mail`.`sys`='0' AND `cms_mail`.`delete`!='{$user_id}' \n\tAND `cms_contact`.`ban`!='1' AND `spam`='0'"), 0);
echo '<li><a href="../mail/index.php?act=input">' . $lng_profile['received'] . '</a>&nbsp;(' . $count_input . ($new_mail ? '/<span class="red">+' . $new_mail . '</span>' : '') . ')</li>';
//Исходящие сообщения
$count_output = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` LEFT JOIN `cms_contact` ON `cms_mail`.`from_id`=`cms_contact`.`from_id` AND `cms_contact`.`user_id`='{$user_id}' \nWHERE `cms_mail`.`user_id`='{$user_id}' AND `cms_mail`.`delete`!='{$user_id}' AND `cms_mail`.`sys`='0' AND `cms_contact`.`ban`!='1'"), 0);
//Исходящие непрочитанные сообщения
Exemple #3
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) {
Exemple #4
0
<span id="basket_count"><?php 
echo basket::get_Count_Goods();
?>
</span>
<span id="basket_total"><?php 
echo basket::get_Total_Goods();
?>
</span>
<a href="/basket">Оформить заказ</a>
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
show conter from adminpanel -> counters

<?php 
echo counters::get_counter();
?>
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
voting

<a href="/voting">Голосование</a>
<a href="/voting/arhiv">Архив голосований</a>

----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
get image of splash (slider)

<?php 
Exemple #5
0
// Ссылка на гостевую
echo '<div class="menu"><table width="100%"><tr><td width="40px"><img src="images/forum.png" width="30" height="30"/></td><td>';
if ($set['mod_guest'] || $rights >= 7) {
    echo '&rsaquo;&nbsp;<a href="guestbook/index.php">' . $lng['guestbook'] . '</a> (' . counters::guestbook() . ')';
}
// Mod forum
if ($set['mod_forum'] || $rights >= 7) {
    if ($user_id || $set['active']) {
        echo '<p>&rsaquo;&nbsp;<a href="forum/">' . $lng['forum'] . '</a> (' . counters::forum() . ')</p>';
    } else {
        echo '<p>&rsaquo;&nbsp;' . $lng['forum'] . ' (' . counters::forum() . ')</p>';
    }
}
echo '</td></tr></table></div>';
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//menampilkan last post
if ($user_id || $set['active']) {
    require 'last_aktif.php';
} else {
    require 'las_pasif.php';
}
require_once $rootpath . 'pages/blogs.php';
/*
-----------------------------------------------------------------
Блок полезного
-----------------------------------------------------------------
*/
// Ссылка на библиотеку
if ($user_id || $set['active']) {
    echo '<div class="phdr"><b>' . $lng['community'] . '</b></div>' . '<div class="menu"><a href="users/index.php">' . $lng['users'] . '</a> (' . counters::users() . ')</div>' . '<div class="menu"><a href="users/album.php">' . $lng['photo_albums'] . '</a> (' . counters::album() . ')</div>';
}
Exemple #6
0
if ($act && ($key = array_search($act, $array)) !== false && file_exists('includes/' . $array[$key] . '.php')) {
    require 'includes/' . $array[$key] . '.php';
} else {
    $regtotal = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `preg`='0'"), 0);
    $bantotal = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_ban_users` WHERE `ban_time` > '" . time() . "'"), 0);
    echo '<div class="phdr"><b>' . $lng['admin_panel'] . '</b></div>';
    /*
    -----------------------------------------------------------------
    Блок пользователей
    -----------------------------------------------------------------
    */
    echo '<div class="user"><p><h3><img src="../images/users.png" width="16" height="16" class="left" />&#160;' . $lng['users'] . '</h3><ul>';
    if ($regtotal && core::$user_rights >= 6) {
        echo '<li><span class="red"><b><a href="index.php?act=reg">' . $lng['users_reg'] . '</a>&#160;(' . $regtotal . ')</b></span></li>';
    }
    echo '<li><a href="index.php?act=usr">' . $lng['users'] . '</a>&#160;(' . counters::users() . ')</li>' . '<li><a href="index.php?act=usr_adm">' . $lng['users_administration'] . '</a>&#160;(' . mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `rights` >= '1'"), 0) . ')</li>' . ($rights >= 7 ? '<li><a href="index.php?act=usr_clean">' . $lng['users_clean'] . '</a></li>' : '') . '<li><a href="index.php?act=ban_panel">' . $lng['ban_panel'] . '</a>&#160;(' . $bantotal . ')</li>' . (core::$user_rights >= 7 ? '<li><a href="index.php?act=antiflood">' . $lng['antiflood'] . '</a></li>' : '') . (core::$user_rights >= 7 ? '<li><a href="index.php?act=karma">' . $lng['karma'] . '</a></li>' : '') . '<br />' . '<li><a href="../users/search.php">' . $lng['search_nick'] . '</a></li>' . '<li><a href="index.php?act=search_ip">' . $lng['ip_search'] . '</a></li>' . '</ul></p></div>';
    if ($rights >= 7) {
        /*
        -----------------------------------------------------------------
        Блок модулей
        -----------------------------------------------------------------
        */
        $spam = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_mail` WHERE `spam`='1';"), 0);
        echo '<div class="gmenu"><p>';
        echo '<h3><img src="../images/modules.png" width="16" height="16" class="left" />&#160;' . $lng['modules'] . '</h3><ul>' . '<li><a href="index.php?act=forum">' . $lng['forum'] . '</a></li>' . '<li><a href="index.php?act=news">' . $lng['news'] . '</a></li><br/>' . '<li><a href="index.php?act=ads">' . $lng['advertisement'] . '</a></li>' . (core::$user_rights == 9 ? '<li><a href="index.php?act=sitemap">' . $lng['site_map'] . '</a></li>' : '') . (core::$user_rights == 9 ? '<li><a href="index.php?act=counters">' . $lng['counters'] . '</a></li>' : '') . (core::$user_rights == 9 ? '<li><a href="index.php?act=info">Informasi</a></li>' : '') . (core::$user_rights == 9 ? '<li><a href="index.php?act=style">Css Editor</a></li>' : '') . '<li><a href="index.php?act=mail">' . $lng['mail'] . '</a></li>' . '</ul></p></div>';
        /*
        -----------------------------------------------------------------
        Блок системных настроек
        -----------------------------------------------------------------
        */
        echo '<div class="menu"><p>' . '<h3><img src="../images/settings.png" width="16" height="16" class="left" />&#160;' . $lng['system'] . '</h3>' . '<ul>' . (core::$user_rights == 9 ? '<li><a href="index.php?act=settings"><b>' . $lng['site_settings'] . '</b></a></li>' : '') . '<li><a href="index.php?act=smileys">' . $lng['refresh_smileys'] . '</a></li>' . (core::$user_rights == 9 ? '<li><a href="index.php?act=languages">' . $lng['language_settings'] . '</a></li>' : '') . '<li><a href="index.php?act=access">' . $lng['access_rights'] . '</a></li>' . '</ul>' . '</p></div>';
Exemple #7
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>";
Exemple #8
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 #9
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);
Exemple #10
0
if ($set_user['quick_go']) {
    echo '<form action="' . $set['homeurl'] . '/go.php" method="post">';
    echo '<div class="head_line"><select name="adres" style="font-size:x-small">
    <option selected="selected">' . $lng['quick_jump'] . '</option>
    <option value="guest">' . $lng['guestbook'] . '</option>
    <option value="forum">' . $lng['forum'] . '</option>
    <option value="news">' . $lng['news'] . '</option>
    <option value="gallery">' . $lng['gallery'] . '</option>
    <option value="down">' . $lng['downloads'] . '</option>
    <option value="lib">' . $lng['library'] . '</option>
    <option value="gazen">Gazenwagen :)</option>
    </select><input type="submit" value="Go!" style="font-size:x-small"/>';
    echo '</div></form>';
}
// Счетчик посетителей онлайн
echo '</div></div><div class="footer"><div class="head_line">' . counters::online() . '</div></div>';
if ($user_id) {
    echo '<br /><div class="news"><div class="head_line">';
    echo '<div style="text-align:left">';
    include_once 'member.php';
    echo "</div>";
    echo '</div></div>';
}
echo '<div style="text-align:center">';
echo '<p><b>' . $set['copyright'] . '</b></p>';
// Счетчики каталогов
functions::display_counters();
// Рекламный блок сайта
if (!empty($cms_ads[3])) {
    echo '<br />' . $cms_ads[3];
}