Файл: core/cuctema/function/from.php
Строк: 46
<?
function from()
{
global $user;
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']);
?>
<style>
.from_bar{
background: url("http://i.spaces.ru/gradient_block2.png") 0% 100% repeat-x #EBFEEE;
padding: 7px;
line-height: 175%;
border-bottom: 1px solid #A7C7AB;
border-left: 1px solid #B3B3B3;
border-right: 1px solid #B3B3B3;
}
</style>
<?
if ($_SERVER['PHP_SELF']=='/mysite/guestbook/index.php') {
if(isset($_GET['from']) and $_GET['from']=='jurnal'){
echo "<div class='from_bar'><a href='/jurnal/?link_id=".$user['id']."&jsort=1&filter=0'>← Вернуться в журнал</a></div>";
}
}
if ($_SERVER['PHP_SELF']=='/mysite/files/index.php') {
if($_GET['from']=='jurnal' && $_GET['file']) {
echo "<div class='from_bar'><a href='/jurnal/?link_id=".$user['id']."&jsort=1&filter=0'>← Журнал</a></div>";
}
}
if ($_SERVER['PHP_SELF']=='/forumm/index.php') {
if($_GET['from']=='jurnal' && $_GET['id']) {
echo "<div class='from_bar'><a href='/jurnal/?link_id=".$user['id']."&jsort=1&filter=0'>← Вернуться журнал</a></div>";
}
}
if ($_SERVER['PHP_SELF']=='/foto/index.php') {
if(isset($_GET['from']) and $_GET['from']=='jurnal' && $_GET['acth']=='show_foto') {
echo "<div class='from_bar'><a href='/jurnal/?link_id=".$user['id']."&jsort=1&filter=0'>← Журнал</a></div>";
}
}
if ($_SERVER['PHP_SELF']=='/diary/index.php') {
if($_GET['from']=='jurnal' && $_GET['diary'] && $_GET['id']) {
echo "<div class='from_bar'><a href='/jurnal/?link_id=".$user['id']."&jsort=1&filter=0'>← Вернуться в журнал</a></div>";
}
}
}
?>