<?
include_once 'sys/inc/start.php';
include_once 'sys/inc/compress.php';
include_once 'sys/inc/sess.php';
include_once 'sys/inc/home.php';
include_once 'sys/inc/settings.php';
include_once 'sys/inc/db_connect.php';
include_once 'sys/inc/ipua.php';
include_once 'sys/inc/fnc.php';
include_once 'sys/inc/user.php';


if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);


if ($ank['id']==0)
{
$ank=get_user($ank['id']);
$set['title']=$ank['nick'].' - Profile '; // &#1079;&#1072;&#1075;&#1086;&#1083;&#1086;&#1074;&#1086;&#1082; &#1089;&#1090;&#1088;&#1072;&#1085;&#1080;&#1094;&#1099;
include_once 'sys/inc/thead.php';
title();
aut();

echo "<span class=\"status\">$ank[group_name]</span><br />\n";

if ($ank['ank_o_sebe']!=NULL)echo "<span class=\"ank_n\">Site (http://):</span> <span class=\"ank_d\">< a href=\"http://$ank[ank_o_sebe]\">$ank[ank_o_sebe]</a></span><br />\n";




if(isset($_SESSION['refer']) && $_SESSION['refer']!=NULL && otkuda($_SESSION['refer']))
echo "<div class='foot'>&laquo;<a href='$_SESSION[refer]'>".otkuda($_SESSION['refer'])."</a><br />\n</div>\n";

include_once 'sys/inc/tfoot.php';
exit;
}

$ank=get_user($ank['id']);
if(!$ank){header("Location: /index.php?".SID);exit;}








$ank['rating']=intval(@mysql_result(mysql_query("SELECT SUM(`rating`) FROM `user_voice2` WHERE `id_kont` = '$ank[id]'"),0));
$set['title']=$ank['nick'].' - Profile '; // &#1079;&#1072;&#1075;&#1086;&#1083;&#1086;&#1074;&#1086;&#1082; &#1089;&#1090;&#1088;&#1072;&#1085;&#1080;&#1094;&#1099;
include_once 'sys/inc/thead.php';
title();


if ((!isset($_SESSION['refer']) || $_SESSION['refer']==NULL)
&& isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']!=NULL &&
!ereg('info\.php',$_SERVER['HTTP_REFERER']))
$_SESSION['refer']=str_replace('&','&amp;',ereg_replace('^http://[^/]*/','/', $_SERVER['HTTP_REFERER']));


if (isset($_POST['rating']) && isset($user)  && $user['id']!=$ank['id'] && $user['balls']>=50 && mysql_result(mysql_query("SELECT SUM(`rating`) FROM `user_voice2` WHERE `id_kont` = '$user[id]'"),0)>=0)
{
$new_r=min(max(@intval($_POST['rating']),-2),2);
mysql_query("DELETE FROM `user_voice2` WHERE `id_user` = '$user[id]' AND `id_kont` = '$ank[id]' LIMIT 1");

if ($new_r)
mysql_query("INSERT INTO `user_voice2` (`rating`, `id_user`, `id_kont`) VALUES ('$new_r','$user[id]','$ank[id]')");
$ank['rating']=intval(mysql_result(mysql_query("SELECT SUM(`rating`) FROM `user_voice2` WHERE `id_kont` = '$ank[id]'"),0));
mysql_query("UPDATE `user` SET `rating` = '$ank[rating]' WHERE `id` = '$ank[id]' LIMIT 1");

if ($new_r>0)
mysql_query("INSERT INTO `mail` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$user[nick] Left a postive feedback in [url=/who_rating.php]Yor application form[/url]', '$time')");
if ($new_r<0)
mysql_query("INSERT INTO `mail` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$user[nick] Left a negative feedback in [url=/who_rating.php]Yor application form[/url]', '$time')");
if ($new_r==0)
mysql_query("INSERT INTO `mail` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$user[nick] Left a neutral feedback in [url=/who_rating.php]Yor application form[/url]', '$time')");
msg('Your opinion about the user succcessfully changed');
}
aut();
/*
if ($user['balls'] <50) { 
echo "<img src='rekl.png'> <b>You are not Eligible To See Any Of Our User Profile Now!!</b><br />"; 
echo "<img src='rekl.png'> <b>You Must Get 50 Points To See The User Profile !!</b><br />"; 
echo "<img src='rekl.png'> <b>Chat and get the 50 points and Enjoy Our Features !!</b>";
include_once 'sys/inc/tfoot.php';
exit;
}
*/
if($ank['balls']>=0 && $ank['balls']<=24)echo "<b><span style='color:red'>Beginner</span></b></a><br />";
if($ank['balls']>=25 && $ank['balls']<=50)echo "<b><span style='color:black'>Soldier</span></b></a><br />";
if($ank['balls']>=51 && $ank['balls']<=100)echo "<b><span style='color:blue'>Lance-Corporal</span></b><img src='/rank/100.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=101 && $ank['balls']<=250)echo "<b><span style='color:orange'>Lance Sergeant</span></b><img src='/rank/250.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=251 && $ank['balls']<=400)echo "<b><span style='color:red'>Sergeant</span></b><img src='/rank/400.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=401 && $ank['balls']<=600)echo "<b><span style='color:brown'>Staff Sergeant</span></b><img src='/rank/600.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=601 && $ank['balls']<=750)echo "<b><span style='color:black'>Petty Officer</span></b><img src='/rank/750.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=751 && $ank['balls']<=900)echo "<b><span style='color:green'>Ensign</span></b><img src='/rank/900.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=901 && $ank['balls']<=1000)echo "Senior Warrant Officer<img src='/rank/1000.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=1001 && $ank['balls']<=1249)echo "Junior Lt<img src='/rank/1249.png' alt='' class='icon'</a><br />";
if($ank['balls']>=1250 && $ank['balls']<=1499)echo "Lt.<img src='/rank/1449.png' alt='' class='icon'</a><br />";
if($ank['balls']>=1500 && $ank['balls']<=1749)echo "Lieutenant<img src='/rank/1749.png' alt='' class='icon'</a><br />";
if($ank['balls']>=1750 && $ank['balls']<=1999)echo "Captain<img src='/rank/1999.png' alt='' class='icon'</a><br/>";
if($ank['balls']>=2000 && $ank['balls']<=2249)echo "Major<img src='/rank/2249.png' alt='' class='icon'</a><br />";
if($ank['balls']>=2250 && $ank['balls']<=2499)echo "XEP-Mayor<img src='/rank/2499.png' alt='' class='icon'</a><br />";
if($ank['balls']>=2500 && $ank['balls']<=2749)echo "Lieutenant Colonel<img src='/rank/2749.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=2750 && $ank['balls']<=2999)echo "Col<img src='/rank/2999.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=3000 && $ank['balls']<=3249)echo "Senior Col<img src='/rank/3249.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=3250 && $ank['balls']<=3499)echo "Lieutenant General<img src='/rank/3499.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=3500 && $ank['balls']<=4999)echo "Colonel-General<img src='/rank/4999.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=5000 && $ank['balls']<=7499)echo "Commander in Chief<img src='/rank/7499.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=7500 && $ank['balls']<=9999)echo "Marshal<img src='/rank/9999.gif' alt='' class='icon'</a><br />";
if($ank['balls']>=10000)echo "Chat Lover<img src='/rank/10000.png' alt='' class='icon'</a><br />";




if ($ank['group_access']>1)echo "<span class='ank_n'>Status:</span> <span class='status'>$ank[group_name]</span><br />\n";



avatar($ank['id']);

echo "<span class='ank_n'>User ID:</span> <span class='ank_d'>$ank[id]</span><br />\n";

if (mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$ank[id]' AND `time` > '$time'"), 0)!=0)
{
$q=mysql_query("SELECT * FROM `ban` WHERE `id_user` = '$ank[id]' AND `time` > '$time' ORDER BY `time` DESC LIMIT 5");
while ($post = mysql_fetch_assoc($q))
{
echo "<span class='ank_n'>Banned until ".vremja($post['time']).":</span>\n";
echo "<span class='ank_d'>".output_text($post['prich'])."</span><br />\n";
}
}
else
{
$narush=mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$ank[id]'"), 0);
echo "<span class='ank_n'>Violations:</span>".(($narush==0)?" <span class='ank_d'>None</span><br />\n":" <span class=\"ank_d\">$narush</span><br />\n");
}




if ($ank['ank_name']!=NULL)echo "<span class=\"ank_n\">Name:</span> <span class=\"ank_d\">$ank[ank_name]</span><br />\n";

echo "<span class=\"ank_n\">Gender:</span> <span class=\"ank_d\">".(($ank['pol']==1)?'Male':'Female')."</span><br />\n";


if ($ank['ank_city']!=NULL)echo "<span class=\"ank_n\">City:</span> <span class=\"ank_d\">$ank[ank_city]</span><br />\n";

if ($ank['ank_d_r']!=NULL && $ank['ank_m_r']!=NULL && $ank['ank_g_r']!=NULL){
if ($ank['ank_m_r']==1)$ank['mes']='January';
elseif ($ank['ank_m_r']==2)$ank['mes']='February';
elseif ($ank['ank_m_r']==3)$ank['mes']='March';
elseif ($ank['ank_m_r']==4)$ank['mes']='April';
elseif ($ank['ank_m_r']==5)$ank['mes']='May';
elseif ($ank['ank_m_r']==6)$ank['mes']='June';
elseif ($ank['ank_m_r']==7)$ank['mes']='July';
elseif ($ank['ank_m_r']==8)$ank['mes']='August';
elseif ($ank['ank_m_r']==9)$ank['mes']='September';
elseif ($ank['ank_m_r']==10)$ank['mes']='October';
elseif ($ank['ank_m_r']==11)$ank['mes']='November';
else $ank['mes']='December';
echo "<span class=\"ank_n\">Date of Birth:</span> <span class=\"ank_d\">$ank[ank_d_r] $ank[mes] $ank[ank_g_r].</span><br />\n";
$ank['ank_age']=date("Y")-$ank['ank_g_r'];
if (date("n")<$ank['ank_m_r'])$ank['ank_age']=$ank['ank_age']-1;
elseif (date("n")==$ank['ank_m_r']&& date("j")<$ank['ank_d_r'])$ank['ank_age']=$ank['ank_age']-1;
echo "<span class=\"ank_n\">Age:</span> <span class=\"ank_d\">$ank[ank_age] Years</span><br />\n";
}
elseif($ank['ank_d_r']!=NULL && $ank['ank_m_r']!=NULL)
{
if ($ank['ank_m_r']==1)$ank['mes']='January';
elseif ($ank['ank_m_r']==2)$ank['mes']='February';
elseif ($ank['ank_m_r']==3)$ank['mes']='March';
elseif ($ank['ank_m_r']==4)$ank['mes']='April';
elseif ($ank['ank_m_r']==5)$ank['mes']='May';
elseif ($ank['ank_m_r']==6)$ank['mes']='June';
elseif ($ank['ank_m_r']==7)$ank['mes']='July';
elseif ($ank['ank_m_r']==8)$ank['mes']='August';
elseif ($ank['ank_m_r']==9)$ank['mes']='September';
elseif ($ank['ank_m_r']==10)$ank['mes']='October';
elseif ($ank['ank_m_r']==11)$ank['mes']='November';
else $ank['mes']='December';
echo "<span class=\"ank_n\">Birthday:</span> <span class=\"ank_d\">$ank[ank_d_r] $ank[mes]</span><br />\n";
}

if ($ank['ank_icq']!=NULL && $ank['ank_icq']!=0)
echo "<img src=\"http://web.icq.com/whitepages/online?icq=$ank[ank_icq]&amp;img=27\" alt=\"icq\" height=\"16\" width=\"16\" /> <span class=\"ank_d\">$ank[ank_icq]</span><br />\n";



if ($ank['ank_mail']!=NULL && ($ank['set_show_mail']==1 || isset($user) && ($user['level']>$ank['level'] || $user['level']==4))){

if ($ank['set_show_mail']==0)$hide_mail=' (hidden)';else $hide_mail=NULL;

if (ereg("(@mail\.ru$)|(@bk\.ru$)|(@inbox\.ru$)|(@list\.ru$)", $ank['ank_mail']))
echo "<img src=\"http://status.mail.ru/?$ank[ank_mail]\" width=\"13\" height=\"13\" alt=\"\" /> <a href=\"mailto:$ank[ank_mail]\" title=\"Send email\" class=\"ank_d\">$ank[ank_mail]</a>$hide_mail<br />\n";
else echo "<span class=\"ank_n\">E-mail:</span> <a href=\"mailto:$ank[ank_mail]\" title=\"Send email\" class=\"ank_d\">$ank[ank_mail]</a>$hide_mail<br />\n";
}

if ($ank['ank_n_tel']!=NULL)echo "<span class=\"ank_n\">Phone:</span> <span class=\"ank_d\">$ank[ank_n_tel]</span><br />\n";
if ($ank['ank_o_sebe']!=NULL)echo "<span class=\"ank_n\">About me:</span> <span class=\"ank_d\">$ank[ank_o_sebe]</span><br />\n";





$chat_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `chat_post` WHERE `id_user` = '$ank[id]'"),0);
echo "<span class=\"ank_n\">Posting in Chat:</span> <span class=\"ank_d\">$chat_post</span><br />\n";

if (user_access('user_show_add_info') && $user['level']>$ank['level']){
$zakl3=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_zakl` WHERE `id_user` = '$ank[id]'"),0);
if (isset($user) && ($user['level']>$ank['level'] || $user['level']==4))
echo "<span class=\"ank_n\">Bookmarks:</span> <span class=\"ank_d\">$zakl3</span><br />\n";


$mail3=mysql_result(mysql_query("SELECT COUNT(*) FROM `mail` WHERE `id_user` = '$ank[id]' OR `id_kont` = '$ank[id]'"),0);
if (isset($user) && ($user['level']>$ank['level'] || $user['level']==4))
echo "<span class=\"ank_n\">Private messages:</span> <span class=\"ank_d\">$mail3</span><br />\n";
}
$komm_loads=mysql_result(mysql_query("SELECT COUNT(*) FROM `loads_komm` WHERE `id_user` = '$ank[id]'"),0);
echo "<span class=\"ank_n\">Comments in Downloads:</span> <span class=\"ank_d\">$komm_loads</span><br />\n";

$news_komm=mysql_result(mysql_query("SELECT COUNT(*) FROM `news_komm` WHERE `id_user` = '$ank[id]'"),0);
echo "<span class=\"ank_n\">Comments in News:</span> <span class=\"ank_d\">$news_komm</span><br />\n";


if (isset($access['show_all_info'])){
$user_voice=mysql_result(mysql_query("SELECT COUNT(*) FROM `user_voice2` WHERE `id_user` = '$ank[id]' OR `id_kont` = '$ank[id]'"),0);
if (isset($user) && ($user['level']>$ank['level'] || $user['level']==4))
echo "<span class=\"ank_n\">Ratings:</span> <span class=\"ank_d\">$user_voice</span><br />\n";

$votes_user=mysql_result(mysql_query("SELECT COUNT(*) FROM `votes_user` WHERE `u_id` = '$ank[id]'"),0);
if (isset($user) && ($user['level']>$ank['level'] || $user['level']==4))
echo "<span class=\"ank_n\">Votings:</span> <span class=\"ank_d\">$votes_user</span><br />\n";

$obmennik3=mysql_result(mysql_query("SELECT COUNT(*) FROM `obmennik_files` WHERE `id_user` = '$ank[id]'"),0);
if (isset($user) && ($user['level']>$ank['level'] || $user['level']==4))
echo "<span class=\"ank_n\">Shared files in exchanger:</span> <span class=\"ank_d\">$obmennik3</span><br />\n";
}

echo "<span class=\"ank_n\">Points:</span> <span class=\"ank_d\">$ank[balls]</span><br />\n";

echo "<span class=\"ank_n\">Ratings:</span> <span class=\"ank_d\">$ank[rating]</span>".($ank['id']==$user['id']?" <a href='/who_rating.php'>[?]</a>":null)."<br />\n";

if (isset($user)  && $user['id']!=$ank['id'] && $user['balls']>=50 && mysql_result(mysql_query("SELECT SUM(`rating`) FROM `user_voice2` WHERE `id_kont` = '$user[id]'"),0)>=0)
{
echo "<b>Your Attitude:</b><br />\n";
// &#1084;&#1086;&#1077; &#1086;&#1090;&#1085;&#1086;&#1096;&#1077;&#1085;&#1080;&#1077; &#1082; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1102;
$my_r=intval(@mysql_result(mysql_query("SELECT `rating` FROM `user_voice2` WHERE `id_user` = '$user[id]' AND `id_kont` = '$ank[id]'"),0));
echo "<form method='post' action='?id=$ank[id]&amp;$passgen'>\n";
echo "<select name='rating'>\n";
echo "<option value='2' ".($my_r==2?'selected="selected"':null).">Whonderfull</option>\n";
echo "<option value='1' ".($my_r==1?'selected="selected"':null).">Positive</option>\n";
echo "<option value='0' ".($my_r==0?'selected="selected"':null).">Neutral</option>\n";
echo "<option value='-1' ".($my_r==-1?'selected="selected"':null).">Not very...</option>\n";
echo "<option value='-2' ".($my_r==-2?'selected="selected"':null).">Negative</option>\n";
echo "</select>\n";
echo "<input type='submit' value='GO' />\n";
echo "</form>\n";
//echo "<br />\n";
}


$opdirbase=@opendir(H.'sys/add/info');
while ($filebase=@readdir($opdirbase))
if (eregi('\.php$',$filebase))
include_once(H.'sys/add/info/'.$filebase);

echo "<span class=\"ank_n\">Registered:</span> <span class=\"ank_d\">".vremja($ank['date_reg'])."</span><br />\n";
echo "<span class=\"ank_n\">Last Login:</span> <span class=\"ank_d\">".vremja($ank['date_last'])."</span><br />\n";

if ($user['level']>$ank['level']){

if ($ank['ip']!=NULL){
if (user_access('user_show_ip') && $ank['ip']!=0){
echo "<span class=\"ank_n\">IP:</span> <span class=\"ank_d\">".long2ip($ank['ip'])."</span>";
if (user_access('adm_ban_ip'))
echo " [<a href='/adm_panel/ban_ip.php?min=$ank[ip]'>Ban</a>]";
echo "<br />\n";
}
}

if ($ank['ip_cl']!=NULL){
if (user_access('user_show_ip') && $ank['ip_cl']!=0){
echo "<span class=\"ank_n\">IP (CLIENT):</span> <span class=\"ank_d\">".long2ip($ank['ip_cl'])."</span>";
if (user_access('adm_ban_ip'))
echo " [<a href='/adm_panel/ban_ip.php?min=$ank[ip_cl]'>Ban</a>]";
echo "<br />\n";
}
}

if ($ank['ip_xff']!=NULL){
if (user_access('user_show_ip') && $ank['ip_xff']!=0){
echo "<span class=\"ank_n\">IP (XFF):</span> <span class=\"ank_d\">".long2ip($ank['ip_xff'])."</span>";
if (user_access('adm_ban_ip'))
echo " [<a href='/adm_panel/ban_ip.php?min=$ank[ip_xff]'>Ban</a>]";
echo "<br />\n";
}
}




if (user_access('user_show_ua') && $ank['ua']!=NULL)
echo "<span class=\"ank_n\">Browser:</span> <span class=\"ank_d\">$ank[ua]</span><br />\n";
if (user_access('user_show_ip') && opsos($ank['ip']))
echo "<span class=\"ank_n\">IP:</span> <span class=\"ank_d\">".opsos($ank['ip'])."</span><br />\n";
if (user_access('user_show_ip') && opsos($ank['ip_cl']))
echo "<span class=\"ank_n\">IP (CL):</span> <span class=\"ank_d\">".opsos($ank['ip_cl'])."</span><br />\n";
if (user_access('user_show_ip') && opsos($ank['ip_xff']))
echo "<span class=\"ank_n\">IP (XFF):</span> <span class=\"ank_d\">".opsos($ank['ip_xff'])."</span><br />\n";


}




if ($ank['show_url']==1)
{
if (otkuda($ank['url']))echo "<span class=\"ank_n\">Last view page:</span> <span class=\"ank_d\"><a href='$ank[url]'>".otkuda($ank['url'])."</a></span><br />\n";
}
if (user_access('user_collisions') && $user['level']>$ank['level'])
{
$mass[0]=$ank['id'];
$collisions=user_collision($mass);


if (count($collisions)>1)
{
echo "<span class=\"ank_n\">Possible nicknames (alias):</span><br />\n";
echo "<span class=\"ank_d\">\n";

for ($i=1;$i<count($collisions);$i++)
{
$ank_coll=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = '$collisions[$i]' LIMIT 1"));
echo "\"<a href='/info.php?id=$ank_coll[id]'>$ank_coll[nick]</a>\"<br />\n";
}

echo "</span>\n";
}
}
if (user_access('adm_ref') && ($ank['level']<$user['level'] || $user['id']==$ank['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `user_ref` WHERE `id_user` = '$ank[id]'"), 0))
{
$q=mysql_query("SELECT * FROM `user_ref` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC LIMIT $set[p_str]");
echo "Referral:<br />\n";
while ($url=mysql_fetch_assoc($q)) {
$site=htmlentities($url['url'], ENT_QUOTES, 'UTF-8');
echo "<a".($set['web']?" target='_blank'":null)." href='/go.php?go=".base64_encode("http://$site")."'>$site</a> (".vremja($url['time']).")<br />\n";
}
echo "<br />\n";
}


echo "<div class='foot'>\n";
if (isset($user) && $user['id']!=$ank['id'])echo "&raquo;<a href=\"/mail.php?id=$ank[id]\">Send Private Messages</a><br />\n";
if (isset($user) && $user['id']==$ank['id'])echo "&raquo;<a href=\"/anketa.php\">Edit Profile</a><br />\n";


if ($user['level']>$ank['level']){


if (user_access('user_prof_edit'))
echo "&raquo;<a href='/adm_panel/user.php?id=$ank[id]'>Edit Users Profile</a><br />\n";



if ($user['id']!=$ank['id']){



if (user_access('user_ban_set') || user_access('user_ban_set_h') || user_access('user_ban_unset'))
echo "&raquo;<a href='/adm_panel/ban.php?id=$ank[id]'>Violations (ban)</a><br />\n";





if (user_access('user_delete'))
{

echo "&raquo;<a href='/adm_panel/delete_user.php?id=$ank[id]'>Delete User</a>";
if (count(user_collision($mass,1))>1)
echo " (<a href='/adm_panel/delete_user.php?id=$ank[id]&amp;all'>Delete All Users</a>)";
echo "<br />\n";

}
}
}

if (user_access('adm_log_read') && $ank['level']!=0 && ($ank['id']==$user['id'] || $ank['level']<$user['level']))
echo "&raquo;<a href='/adm_panel/adm_log.php?id=$ank[id]'>Administration Reports</a><br />\n";

if(isset($_SESSION['refer']) && $_SESSION['refer']!=NULL && otkuda($_SESSION['refer']))
echo "&laquo;<a href='$_SESSION[refer]'>".otkuda($_SESSION['refer'])."</a><br />\n";

echo "</div>\n";
include_once 'sys/inc/tfoot.php';
?>