' . "\n" . "\n" . '' . "\n" . '' . "\n" . '' . "\n" . '' . "\n" . ''; // ВНИМАНИЕ!!! Данный копирайт удалять нельзя if (!empty($set['meta_key'])) echo "\n" . ''; if (!empty($set['meta_desc'])) echo "\n" . ''; echo "\n" . '' . "\n" . '' . $textl . '' . "\n" . '' . "\n" . '
Polaroid
'; /* ----------------------------------------------------------------- Рекламный модуль ----------------------------------------------------------------- */ $cms_ads = array (); $view = $user_id ? 2 : 1; $layout = ($headmod == 'mainpage' && !$act) ? 1 : 2; $req = mysql_query("SELECT * FROM `cms_ads` WHERE `to` = '0' AND (`layout` = '$layout' or `layout` = '0') AND (`view` = '$view' or `view` = '0') ORDER BY `mesto` ASC"); if (mysql_num_rows($req) > 0 && $headmod != 'admin') { while ($res = mysql_fetch_array($req)) { $name = explode("|", $res['name']); $name = htmlentities($name[mt_rand(0, (count($name) - 1))], ENT_QUOTES, 'UTF-8'); if (!empty($res['color'])) $name = '' . $name . ''; // Если было задано начертание шрифта, то применяем $font = $res['bold'] ? 'font-weight: bold;' : false; $font .= $res['italic'] ? ' font-style:italic;' : false; $font .= $res['underline'] ? ' text-decoration:underline;' : false; if ($font) $name = '' . $name . ''; $cms_ads[$res['type']] .= '' . $name . '
'; if (($res['day'] != 0 && $realtime >= ($res['time'] + $res['day'] * 3600 * 24)) || ($res['count_link'] != 0 && $res['count'] >= $res['count_link'])) mysql_query("UPDATE `cms_ads` SET `to` = '1' WHERE `id` = '" . $res['id'] . "'"); } } /* ----------------------------------------------------------------- Рекламный блок сайта ----------------------------------------------------------------- */ if ($cms_ads[0]) echo $cms_ads[0]; /* ----------------------------------------------------------------- Выводим логотип ----------------------------------------------------------------- */ echo '
'; /* ----------------------------------------------------------------- Выводим верхний блок с приветствием ----------------------------------------------------------------- */ require_once ($rootpath . 'incfiles/func_warna.php'); echo '
'; echo '
'; include'sapa.php'; echo '' . ($user_id ? '' . warna($login) . '!' : warna($lng['guest']) . '!') . ''; echo '
'; echo '
'; include'tgl.php'; echo '
'; echo '
'; /* ----------------------------------------------------------------- Trikshare.Tk----------------------------------------------------------------- */ echo '
'; echo ($headmod != "mainpage" || ($headmod == 'mainpage' && $act)) ? '' . $lng['homepage'] . ' | ' : ''; echo ($user_id) ? '' . $lng['personal'] . ' | ' : ''; echo $user_id ? '' . $lng['exit'] . '' : '' . $lng['login'] . ' | ' . $lng['registration'] . ''; echo '
'; echo''; /* ----------------------------------------------------------------- Trikshare.Tk----------------------------------------------------------------- */ if (!empty($cms_ads[1])) echo '
' . $cms_ads[1] . '
'; /* ----------------------------------------------------------------- Trikshare.Tk ----------------------------------------------------------------- */ $sql = ''; $set_karma = unserialize($set['karma']); if ($user_id) { // Фиксируем местоположение авторизованных if (!$datauser['karma_off'] && $set_karma['on'] && $datauser['karma_time'] <= ($realtime - 86400)) { $sql = "`karma_time` = '$realtime', "; } $movings = $datauser['movings']; if ($datauser['lastdate'] < ($realtime - 300)) { $movings = 0; $sql .= "`sestime` = '$realtime',"; } if ($datauser['place'] != $headmod) { $movings = $movings + 1; $sql .= "`movings` = '$movings', `place` = '$headmod',"; } if ($datauser['browser'] != $agn) $sql .= "`browser` = '" . mysql_real_escape_string($agn) . "',"; $totalonsite = $datauser['total_on_site']; if ($datauser['lastdate'] > ($realtime - 300)) $totalonsite = $totalonsite + $realtime - $datauser['lastdate']; mysql_query("UPDATE `users` SET $sql `total_on_site` = '$totalonsite', `lastdate` = '$realtime' WHERE `id` = '$user_id' "); } else { // Фиксируем местоположение гостей $sid = md5($ip . $agn); $movings = 0; $req = mysql_query("SELECT * FROM `cms_guests` WHERE `session_id` = '$sid' LIMIT 1"); if (mysql_num_rows($req)) { // Если есть в базе, то обновляем данные $res = mysql_fetch_assoc($req); $movings = $res['movings']; if ($res['sestime'] < ($realtime - 300)) { $movings = 0; $sql .= "`sestime` = '$realtime',"; } if ($res['ip'] != $ip) $sql .= "`ip` = '$ip',"; if ($res['browser'] != $agn) $sql .= "`browser` = '" . mysql_real_escape_string($agn) . "',"; if ($res['place'] != $headmod) { $movings = $movings + 1; $sql .= "`movings` = '$movings', `place` = '$headmod',"; } mysql_query("UPDATE `cms_guests` SET $sql `lastdate` = '$realtime' WHERE `session_id` = '$sid'"); } else { // Если еще небыло в базе, то добавляем запись mysql_query("INSERT INTO `cms_guests` SET `session_id` = '$sid', `ip` = '$ip', `browser` = '" . mysql_real_escape_string($agn) . "', `lastdate` = '$realtime', `sestime` = '$realtime', `place` = '$headmod' "); } } /* ----------------------------------------------------------------- Выводим сообщение о Бане ----------------------------------------------------------------- */ if (!empty($ban)) echo '
' . $lng['ban'] . ' ' . $lng['in_detail'] . '
'; /* ----------------------------------------------------------------- Ссылки на непрочитанное ----------------------------------------------------------------- */ if ($user_id) { $list = array (); if ($headmod != "pradd") { $new_mail = mysql_result(mysql_query("SELECT COUNT(*) FROM `privat` WHERE `user` = '$login' AND `type` = 'in' AND `chit` = 'no'"), 0); if ($new_mail) $list[] = '' . $lng['mail'] . ' (' . $new_mail . ')'; } if ($datauser['comm_count'] > $datauser['comm_old']) { $list[] = '' . $lng['guestbook'] . ' (' . ($datauser['comm_count'] - $datauser['comm_old']) . ')'; } if(!empty($list)) echo '
' . $lng['unread'] . ': ' . functions::display_menu($list, ', ') . '
'; } if ($user_id){ $php_self=$_SERVER['PHP_SELF']; //if(!ereg('' . $set['homeurl'] . '/pages/qchat.php', $php_self) && !ereg('' . $set['homeurl'] . '/download/', $php_self) && !ereg('' . $set['homeurl'] . '/gallery/', $php_self) && !ereg('' . $set['homeurl'] . '/downloadam/', $php_self) ){ require_once ('rand_on.php'); echo rand_on(); echo '
Shoutbox:
'; echo '
'; require_once ('func_quick.php'); echo '
'; } ?>