<?
include 'mysql.php';
include_once("include/zag.php");
include 'include/ini.php';
include 'include/sesi.php';
if (isset($user)) {
echo"<small>На Вас одето</small><br/>";
if($udata[11]!=="Пусто"){
echo"<img src=\"pic/robe/$udata[11].gif\" alt=\"pic\"/><br/>";
echo"<small>Роба: <u>$udata[11]</u><br/>- - -</small><br/>";}else{echo"<img src=\"pic/pusto/up.gif\" alt=\"pic\"/><br/><small>Роба: Не одето<br/>- - -</small><br/>";}
$file = file("MySql/base123/item/$log.dat");
$file = array_reverse($file);
$total = count($file);

for ($i = 0; $i < $total; $i++){
$data = explode(":||:",$file[$i]);

if($data[2]=="body"){

$data_0[]=$data[0];
$data_1[]=$data[1];
$data_2[]=$data[2];
$data_3[]=$data[3];
$data_4[]=$data[4];
$data_id[]=$i;
}}

if(empty($data_4)){echo"<small>У вас нет доспех.</small>"; include_once"include/down.php"; exit;}

foreach($data_0 as $k=>$v)
{
$dat_screen[]="<small><b><a href=\"odet.php?$sd&tip=$data_2[$k]&id=$data_id[$k]\">$data_4[$k]</a> <a href=\"info.php?$sd&tip=$data_2[$k]&id=$data_id[$k]\">*</a></b><br/></small>";
}


$total = count($dat_screen);


if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + 10){ $end = $total; }
else {$end = $start + 10; }
for ($i = $start; $i < $end; $i++){

echo"$dat_screen[$i]";

}


if ($start !== 0) {echo '<small><a href="itemhelmets.php?start='.($start - 10).'&'.$sd.'">Назад</a> </small>';}
if ($total > $start + 10) {echo '<small> <a href="itemhelmets.php?start='.($start + 10).'&'.$sd.'">Далее</a></small>';}
}else{echo"<small>Пароль или логин неверен!</small>";}
include_once"include/down.php";
?>
