<?php
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';
$set['title']='Бармен онлайн';
include_once '../sys/inc/thead.php';
title();
aut();

if(!isset($user)){
  echo "Вы не зарегистрированы";
  include_once '../sys/inc/tfoot.php';
  break;
}

include_once 'inc/start.php';

			
echo "
<div class='".$diz['main']."'>

<img src='i/4.png' /> ".$bar_user['level']."
<img src='i/exp.png' /> ".$bar_user['exp']."
<img src='i/d.png' /> ".$bar_user['money']."
<br/><img src='i/bottle.png' />".$bar_user['alc']." ".nap($bar_user['alc'])."
<div class='".$diz['title2']."'>Подареные коктейли</div>
";
$id=abs(intval($_GET['id']));
$total=mysql_result(mysql_query("SELECT COUNT(*) FROM `bar_coctails` WHERE `sender`='".$user_id."'"),0);

if($total==0)
echo "Вы не дарили еще коктейлей!";
else
if($total>0){
$quert=mysql_query("SELECT * FROM `bar_coctails` WHERE `sender`='".$user_id."' ORDER BY `act` ASC LIMIT ".$start.",5");

$i=0;
while($array=mysql_fetch_array($quert)){
$post=($i%2 ? $diz['post_1'] : $diz['post_2']);
echo '<div class="'.$post.'">
<table cellpadding="0">
<tr>
<td>
<img src="i/r_'.$array['id_r'].'.png"/>
</td>
<td>
<b> '.$array['name'].'</b>
<br/>
Пользователю <a href="profile.php?id='.$array['id_u'].'">&quot;'.mysql_result(mysql_query("SELECT `login` FROM `bar_user` WHERE `id_u`='".$array['id_u']."'"),0).'&quot;</a>
</td></tr></table></div>';
$i++;
}




if ($total > 5){
    echo bar_pagenav('nmy_c.php?', $start, $total, 5);
   }
   }
echo "</div>";
ret($diz['ret'],'Кабинет','cab.php');
ret($diz['ret'],'Мой бар','index.php');
 include_once '../sys/inc/tfoot.php';
?>
