<?
if (isset($_SESSION['refer']) && $_SESSION['refer']!=NULL && !preg_match('#(rules)|(smiles)|(secure)|(aut)|(reg)|(umenu)|(zakl)|(mail)|(anketa)|(settings)|(avatar)|(info)\.php#',$_SERVER['SCRIPT_NAME']))
$_SESSION['refer']=NULL;
function otkuda($ref)
{
if (preg_match('#^/forum/#',$ref))
$mesto='В Форуме';
elseif (preg_match('#^/chat/#',$ref))
$mesto='Чат';
elseif (preg_match('#^/lib/#',$ref))
$mesto='Библиотека';
elseif (preg_match('#^/news/#',$ref))
$mesto='Новости';
elseif (preg_match('#^/adm_panel/#',$ref))
$mesto='Админка';
elseif (preg_match('#^/votes/#',$ref))
$mesto='Голосования';
elseif (preg_match('#^/guest/#',$ref))
$mesto='Беседка';
elseif (preg_match('#^/users\.php#',$ref))
$mesto='Список обитателей';
elseif (preg_match('#^/online\.php#',$ref))
$mesto='Список онлайн';
elseif (preg_match('#^/online_g\.php#',$ref))
$mesto='Гости';
elseif (preg_match('#^/reg\.php#',$ref))
$mesto='Регистрация';
elseif (preg_match('#^/obmen/#',$ref))
$mesto='Зона Обмена';
elseif (preg_match('#^/dnev/#',$ref))
$mesto='В блогах';
elseif (preg_match('#^/present/#',$ref))
$mesto='Смотрит подарки';
elseif (preg_match('#^/foto_konkurs/#',$ref))
$mesto='Фотоконкурс';
elseif (preg_match('#^/us_guest/#',$ref))
$mesto='Личные гостевые';
elseif (preg_match('#^/top/#',$ref))
$mesto='Топы обитателей';
elseif (preg_match('#^/info/#',$ref))
$mesto='Читает информацию';
elseif (preg_match('#^/kr/#',$ref))
$mesto='В салоне красоты';
elseif (preg_match('#^/smiles/#',$ref))
$mesto='Список смайлов';
elseif (preg_match('#^/comm/#',$ref))
$mesto='В сообществах';
elseif (preg_match('#^/gorod/#',$ref))
$mesto='В городе';
elseif (preg_match('#^/foto/#',$ref))
$mesto='В альбомах';
elseif (preg_match('#^/love/#',$ref))
$mesto='В знакомствах';
elseif (preg_match('#^/aut\.php#',$ref))
$mesto='Авторизация';
elseif (preg_match('#^/info\.php#',$ref))
$mesto='Смотрит странички';
elseif (preg_match('#^/prof\.php#',$ref))
$mesto='Смотрит анкеты';
elseif (preg_match('#^/mail\.php#',$ref))
$mesto='В почте';
elseif (preg_match('#^/new_mess\.php#',$ref))
$mesto='Читает почту';
elseif (preg_match('#^/ocenka\.php#',$ref))
$mesto='Смотрит Оценки';
elseif (preg_match('#^/lenta\.php#',$ref))
$mesto='В ленте активности';
elseif (preg_match('#^/obsuzh\.php#',$ref))
$mesto='Обсуждения друзей';
elseif (preg_match('#^/who_rating\.php#',$ref))
$mesto='История рейтинга';
elseif (preg_match('#^/umenu\.php#',$ref))
$mesto='В кабинете';
elseif (preg_match('#^/exit\.php#',$ref))
$mesto='Выход';
elseif (preg_match('#^/zakl\.php#',$ref))
$mesto='Смотрит закладки';
elseif (preg_match('#^/frend\.php#',$ref))
$mesto='Список друзей';
elseif (preg_match('#^/konts\.php#',$ref))
$mesto='Список контактов';
elseif (preg_match('#^/dost\.php#',$ref))
$mesto='Поднимает рейтинг обитателю';
elseif (preg_match('#^/statusx\.php#',$ref))
$mesto='Меняет онлайн статус';
elseif (preg_match('#^/anketa\.php#',$ref))
$mesto='Редактирует анкету';
elseif (preg_match('#^/anketa1\.php#',$ref))
$mesto='Ред. анкету знакомств';
elseif (preg_match('#^/hello\.php#',$ref))
$mesto='Микроблог';
elseif (preg_match('#^/jurnal\.php#',$ref))
$mesto='В уведомлениях';
elseif (preg_match('#^/ban\.php#',$ref))
$mesto='Сидит в тюрьме';
elseif (preg_match('#^/avtoportret\.php#',$ref))
$mesto='Смотрит автопортреты';
elseif (preg_match('#^/list_bday\.php#',$ref))
$mesto='Список именниников';
elseif (preg_match('#^/mailbest\.php#',$ref))
$mesto='Архив сообщений';
elseif (preg_match('#^/index\.php#',$ref))
$mesto='Главная';
elseif (preg_match('#^/\??$#',$ref))
$mesto='Главная';
else
$mesto=false;
return $mesto;
}
?>