Просмотр файла darkworld/itemlek.php

Размер файла: 1.54Kb
<?
include_once("files/zag.php");
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {
 
$file = file("data/item/$log.dat");
$file = array_reverse($file);
$total = count($file);

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

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

$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"files/down.php"; exit;}

foreach($data_0 as $k=>$v)
{
$dat_screen[]="<small><b><a href=\"tovesh.php?log=$log&amp;pas=$pas&amp;tip=$data_2[$k]&amp;name=$data_4[$k]&amp;id=$data_id[$k]\">$data_4[$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="itemlek.php?start='.($start - 10).'&amp;log='.$log.'&amp;pas='.$pas.'">&#x41D;&#x430;&#x437;&#x430;&#x434;</a> </small>';}
if ($total > $start + 10) {echo '<small> <a href="itemlek.php?start='.($start + 10).'&amp;log='.$log.'&amp;pas='.$pas.'">&#x414;&#x430;&#x43B;&#x435;&#x435;</a></small>';}





}else{echo"<small>&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C; &#x438;&#x43B;&#x438; &#x43B;&#x43E;&#x433;&#x438;&#x43D; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x435;&#x43D;!</small>";}

include_once"files/down.php";
?>