Файл: core/cuctema/function/location_bar.php
Строк: 278
<?
function location_bar()
{
global $user;
?>
<style>
.location_bar {
background: #E8EEF2;
border-bottom: 1px solid rgb(206, 206, 206);
padding: 10px;
}
.location_bar a:hover{
text-decoration: none;
}
.location_bar a {
color: #006699;
}
.menu123 {
border-bottom: 1px solid rgb(206, 206, 206);
}
</style>
<?
if (!isset($user) && !isset($_GET['id']));
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
elseif (isset($_GET['name'])){
$arr['nick']=$_GET['name'];
$nick=mysql_real_escape_string($arr['nick']);
$res=mysql_query("SELECT `id` FROM `user` WHERE `nick`='$nick';");
if(mysql_num_rows($res)>0){
$row=mysql_fetch_assoc($res);
$ank['id']=$row['id'];
}else{
$ank['id'] = 0;
}
}
$ank=get_user($ank['id']);
if ($_SERVER['PHP_SELF']=='/users/mail/index.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a> / <a href='/users/mail'>Почта</a></div>";
}
if ($_SERVER['PHP_SELF']=='/users/jurnal/index.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a> / <a href='/users/jurnal'>Журнал</a></div>";
}
if ($_SERVER['PHP_SELF']=='/users/lenta/index.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a> / <a href='/users/lenta'>Лента</a></div>";
}
if ($_SERVER['PHP_SELF']=='/users/search/index.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a> / <a href='/users/search/'>Поиск</a></div>";
}
if ($_SERVER['PHP_SELF']=='/users/search/adm.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a> / <a href='/users/search/'> Поиск</a> / Админка</div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/index.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a></div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/anketa/index.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a> / <a href='/mysite/anketa/?name=".$ank['nick']."'>Анкета</a></div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/guestbook/index.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a> / <a href='/mysite/guestbook/?id=".$ank['id']."'>Гостевая</a>";
echo "</div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/readers/index.php') {
echo "<div class='location_bar line_175'><a href='/mysite/?name=".$ank['nick']."'>".$user['nick']."</a> / <a href='/mysite/readers/?id=".$ank['id']."'>Подписчики</a></div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/frends/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$ank['id']."'>".$ank['nick']."</a> > <a href='/mysite/frends/?id=".$ank['id']."'>Друзья</a></div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/services/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$user['id']."'>".$user['nick']."</a> > <a href='/mysite/services/'>Сервисы</a></div>";
}
if ($_SERVER['PHP_SELF']=='/pages/oper.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$user['id']."'>".$user['nick']."</a> > <a href='/mysite/services/'>Сервисы</a> > Журнал операций</div>";
}
if ($_SERVER['PHP_SELF']=='/settings/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$user['id']."'>".$user['nick']."</a> > Настройки</div>";
}
if ($_SERVER['PHP_SELF']=='/gifts/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$ank['id']."'>".$ank['nick']."</a> > Подарки</div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/my_games/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$ank['id']."'>".$ank['nick']."</a> > <a href='/mysite/my_games/'>Мои Игры</a></div>";
}
if ($_SERVER['PHP_SELF']=='/users/index.php') {
echo "<div class='location_bar line_175'><a href='/users/'>Обитатели</a></div>";
}
if ($_SERVER['PHP_SELF']=='/users/online.php') {
echo "<div class='location_bar line_175'><a href='/users/'>Обитатели</a> > Онлайн</div>";
}
if ($_SERVER['PHP_SELF']=='/users/online_g.php') {
echo "<div class='location_bar line_175'><a href='/users/'>Обитатели</a> > Гости</div>";
}
if ($_SERVER['PHP_SELF']=='/comm/index.php') {
echo "<div class='location_bar line_175'>";
if($_GET['act']!='forum') {
echo "<a href='/comm/'>Сообщества</a>";
}
if($_GET['act']=='forum' && $_GET['id']) {
$comm=mysql_query("SELECT * FROM `comm` WHERE `id` = '".intval($_GET['id'])."'");
$comm=mysql_fetch_array($comm);
echo "<a href='?act=comm&id=$comm[id]'>".htmlspecialchars($comm['name'])."</a> > <a href='?act=forum&id=$comm[id]'>Форум</a>";
}
if($_GET['act']=='cat' && $_GET['id']) {
$cat=mysql_query("SELECT * FROM `comm_cat` WHERE `id` = '".intval($_GET['id'])."'");
$cat=mysql_fetch_array($cat);
echo " > ".htmlspecialchars($cat['name']);
}else{
//echo " > Категории";
}
/*
if($_GET['act']=='comm' && $_GET['id']) {
$comm=mysql_query("SELECT * FROM `comm` WHERE `id` = '".intval($_GET['id'])."'");
$comm=mysql_fetch_array($comm);
echo " > ".htmlspecialchars($comm['name']);
}
*/
if($_GET['act'] && $_GET['act']!='cat' && $_GET['act']!='forum' && $_GET['act']!='user' && $_GET['id']) {
$comm=mysql_query("SELECT * FROM `comm` WHERE `id` = '".intval($_GET['id'])."'");
$comm=mysql_fetch_array($comm);
echo " > <a href='?act=comm&id=$comm[id]'>".htmlspecialchars($comm['name'])."</a>";
}
if($_GET['act']=='user' && $_GET['id']) {
$ank=get_user(intval($_GET['id']));
echo " > <a href='?act=user&id=$ank[id]'>".htmlspecialchars($ank['nick'])."</a>";
}
echo "</div>";
}
if ($_SERVER['PHP_SELF']=='/foto/index.php') {
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id_user']))$ank['id']=intval($_GET['id_user']);
$ank=get_user($ank['id']);
echo "<div class='location_bar line_175'><a href='/info.php?id=".$ank['id']."'>".$ank['nick']."</a> > <a href='/foto/$ank[id]/'>Фотоальбомы</a></div>";
}
if ($_SERVER['PHP_SELF']=='/pages/rules/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php'>".$user['nick']."</a> > Правила</div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/give_money/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$ank['id']."'>".$ank['nick']."</a> > Передача Монет</div>";
}
if ($_SERVER['PHP_SELF']=='/pages/ban/index.php') {
$ank=get_user($_GET['id_user']);
echo "<div class='location_bar line_175'><a href='/info.php?id=".$ank['id']."'>".$ank['nick']."</a> > <a href='/mysite/anketa/?name=".$ank['nick']."'>Анкета</a> > Бан</div>";
}
if ($_SERVER['PHP_SELF']=='/pages/online_help/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php'>".$user['nick']."</a></div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/anketa/avatar.php') {
echo "<div class='location_bar line_175'><a href='/info.php'>".$user['nick']."</a> > <a href='/mysite/anketa/?name=".$ank['nick']."'>Анкета</a></div>";
}
if ($_SERVER['PHP_SELF']=='/chat/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php'>".$user['nick']."</a> > <a href='/chat/?link_id=".$user['id']."'>Чат</a></div>";
}
if ($_SERVER['PHP_SELF']=='/mysite/files/index.php') {
/*
$ank=get_user(intval($_GET['user']));
*/
if(isset($_GET['user']) && $_GET['user']!=NULL)$ank=get_user(intval($_GET['user']));
else $ank=get_user($user['id']);
echo "<div class='location_bar line_175'><a href='/info.php?id=".$ank['id']."'>".$ank['nick']."</a> > <a href='/mysite/files/?user=".$ank['id']."'>Файлы</a></div>";
}
if ($_SERVER['PHP_SELF']=='/shared_zone/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php'>".$user['nick']."</a> > <a href='/shared_zone'>Зона Обмена</a></div>";
}
if ($_SERVER['PHP_SELF']=='/admin_chat/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$user['id']."'>".$user['nick']."</a> > <a href='/admin_chat/'>Админ Чат</a></div>";
}
if ($_SERVER['PHP_SELF']=='/startpage/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$user['id']."'>".$user['nick']."</a> > <a href='/startpage/'>Старт</a></div>";
}
if ($_SERVER['PHP_SELF']=='/pages/news/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$user['id']."'>".$user['nick']."</a> > <a href='/pages/news/'>Новости</a></div>";
}
if ($_SERVER['PHP_SELF']=='/obj/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$user['id']."'>".$user['nick']."</a> > <a href='/obj/'>Обьявления</a></div>";
}
if ($_SERVER['PHP_SELF']=='/diary/index.php') {
echo "<div class='location_bar line_175'><a href='/info.php?id=".$user['id']."'>".$user['nick']."</a> > <a href='/diary/'>Дневники</a></div>";
}
}
?>