<?
include_once("mysql.php");
include_once("inclydings/antixak.php");
include_once("inclydings/zag.php");
include_once("inclydings/ini.php");
include 'inclydings/sesi.php';
if (isset($user)) {

switch($go) {

default:
echo"<b>Trader Arodin</b><br/>";
echo"Приветствую. Добро пожаловать в нашу лавку, которой уже более ста лет.
У нас есть любое оружие и все необходимое для зашиты искателя приключений. Прошу Вас? прежде чем купить что-нибудь, присмотритесь к товару. Знаете, говорят, что восставшие мертвецы часто выходят из руин, оставленных после войны с Грацией. Вам может годиться хорошее оружие и против них.<br/><br/>";
echo"<u>Снаряжения:</u><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=body\">Торговец доспехами</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=boots\">Торговец Сапогами</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=gloves\">Торговец Перчатками</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=4it\">Торговец Щитами</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=helmet\">Торговец Шлемами</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=weapon\">Торговец оружием</a><br/>";
echo"- - -<br/>";
echo"<u>Бижутерия:</u><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=sheya\">Ожерелье</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=ring\">Кольцо</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=ring1\">Кольцо</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=serga\">Серьга</a><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops.php?$sd&go=serga1\">Серьга</a><br/>";
echo"- - -<br/>";
echo"<u>Магазин:</u><br/>";
echo"<img src='pik4erspic/mini/mag.png'><a href=\"shops80-85.php?$sd\">Магазин S80-S84</a><br/>";
echo"<a href=\"luxsor.php?$sd\">Luxsor Shop Manager</a>";
echo"<br/><a href=\"vesh.php?$sd\">Магазин вещей</a>";
//echo"<br/><a href=\"shops_skroll.php?$sd\">Магазин заточек</a>";
echo"<br/><a href=\"shopsribak.php?$sd\">Магазин рыбака</a><br/>";
echo"- - -<br/>";
echo"<u>Ринок:</u><br/>";
echo"<a href=\"sellruk.php?$sd&\">Продать вещи </a><br/>";
echo"<a href=\"runok.php?$sd&\">Купить вещи</a><br/>";
echo"- - -<br/><img src='pik4erspic/mini/mag.png'><a href=\"listsell.php?$sd\">Продать вещи</a><br/>";
break;
case 'serga1':
echo"<u>Выберите У меня многи изделий:</u><br/>";
echo"[<a href=\"shops.php?$sd&go=serga1ng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=serga1d\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=serga1c\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=serga1b\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=serga1a\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=serga1s\">S</a>] (от 76 ур)<br/>";
break;
case 'serga11s':
$dir = opendir ("L2dbnam/esql2db/shop/weapon");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/weapon/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga1"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka6.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=serg1as">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=serg1as">Далее</a>';}
break;
case 'serga1s':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga1"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=serg1as">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=serg1as">Далее</a>';}
break;
case 'serga1a':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga1"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=serga1a">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=serga1a">Далее</a>';}
break;
case 'serga1b':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga1"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=serga1b">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=serga1b">Далее</a>';}
break;
case 'serga1c':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga1"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=serga1c">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=serga1c">Далее</a>';}
break;
case 'serga1d':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga1"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=serga1d">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=serga1d">Далее</a>';}
break;
case 'serga1ng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga1"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=serga1ng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=serga1ng">Далее</a>';}
break;
case 'serga':
echo"<u>Выберите У меня многи изделий:</u><br/>";
echo"[<a href=\"shops.php?$sd&go=sergang\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sergad\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sergac\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sergab\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sergaa\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sergas\">S</a>] (от 76 ур)<br/>";
break;
case 'sergas':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=sergas">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=sergas">Далее</a>';}
break;
case 'sergaa':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=sergaa">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=sergaa">Далее</a>';}
break;
case 'sergab':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=sergab">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=sergab">Далее</a>';}
break;
case 'sergac':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=sergac">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=sergac">Далее</a>';}
break;
case 'sergad':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=sergad">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=sergad">Далее</a>';}
break;
case 'sergang':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="serga"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/serga/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=sergang">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=sergang">Далее</a>';}
break;
case 'ring1':
echo"<u>Выберите У меня многи изделий:</u><br/>";
echo"[<a href=\"shops.php?$sd&go=ring1ng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ring1d\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ring1c\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ring1b\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ring1a\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ring1s\">S</a>] (от 76 ур)<br/>";
break;
case 'ring1s':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring1"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco2/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ring1s">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ring1s">Далее</a>';}
break;
case 'ring1a':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring1"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco2/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ring1a">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ring1a">Далее</a>';}
break;
case 'ring1b':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring1"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco2/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ring1b">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ring1b">Далее</a>';}
break;
case 'ring1ng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring1"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco2/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ring1ng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ring1ng">Далее</a>';}
break;
case 'ring1d':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring1"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco2/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ring1d">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ring1d">Далее</a>';}
break;
case 'ring1c':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring1"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco2/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ring1c">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ring1c">Далее</a>';}break;
break;
case 'ring':
echo"<u>Выберите У меня многи изделий:</u><br/>";
echo"[<a href=\"shops.php?$sd&go=ringng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ringd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ringc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ringb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=ringa\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=rings\">S</a>] (от 76 ур)<br/>";
break;
case 'ringng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ringng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ringng">Далее</a>';}
break;
case 'ringd':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ringd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ringd">Далее</a>';}
break;
case 'ringc':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ringc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ringc">Далее</a>';}
break;
case 'ringb':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ringb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ringb">Далее</a>';}
break;
case 'ringa':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=ringa">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=ringa">Далее</a>';}
break;
case 'rings':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ring"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/kolco/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=rings">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=rings">Далее</a>';}
break;
case 'sheya':
echo"<u>Выберите У меня многи изделий:</u><br/>";
echo"[<a href=\"shops.php?$sd&go=sheyang\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sheyad\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sheyac\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sheyab\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sheyaa\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=sheyas\">S</a>] (от 76 ур)<br/>";
break;
case 'sheyang':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="sheya"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/sheya/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=sheyang">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=sheyang">Далее</a>';}
break;



case 'sheyad':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="sheya"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/sheya/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyd">Далее</a>';}
break;



case 'sheyaa':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="sheya"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/sheya/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyd">Далее</a>';}
break;



case 'sheyab':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="sheya"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/sheya/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyd">Далее</a>';}
break;



case 'sheyac':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="sheya"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/sheya/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyd">Далее</a>';}
break;



case 'sheyas':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="sheya"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/sheya/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyd">Далее</a>';}
break;



case 'body':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=bodyng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bodyd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bodyc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bodyb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bodya\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bodys\">S</a>] (от 76 ур)<br/>";
break;
case 'bodyng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="body"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/robe/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyng">Далее</a>';}
break;



case 'bodyd':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="body"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/robe/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyd">Далее</a>';}
break;

case 'bodyc':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="body"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/robe/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyc">Далее</a>';}
break;
case 'bodyb':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="body"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/robe/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodyb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodyb">Далее</a>';}
break;
case 'bodya':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="body"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/robe/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodya">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodya">Далее</a>';}
break;
case 'bodys':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="body"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/robe/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bodys">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bodys">Далее</a>';}
break;
case 'boots':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=bootsng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bootsd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bootsc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bootsb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bootsa\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bootss\">S</a>] (от 76 ур)<br/>";
break;
case 'bootsng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="nogi"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/boots/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bootsng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bootsng">Далее</a>';}
break;
case 'bootsd':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="nogi"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/boots/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bootsd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bootsd">Далее</a>';}
break;
case 'bootsc':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="nogi"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/boots/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bootsc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bootsc">Далее</a>';}
break;
case 'bootsb':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="nogi"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/boots/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bootsb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bootsb">Далее</a>';}
break;
case 'bootsa':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="nogi"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/boots/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bootsa">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bootsa">Далее</a>';}
break;
case 'bootss':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="nogi"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/boots/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bootss">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bootss">Далее</a>';}
break;
case 'gloves':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=glovesng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=glovesd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=glovesc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=glovesb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=glovesa\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=glovess\">S</a>] (от 76 ур)<br/>";
break;
case 'glovesng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ryki"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/gloves/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=glovesng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=glovesng">Далее</a>';}
break;
case 'glovesd':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ryki"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/gloves/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=glovesd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=glovesd">Далее</a>';}
break;
case 'glovesc':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ryki"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/gloves/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=glovesc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=glovesc">Далее</a>';}
break;
case 'glovesb':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ryki"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/gloves/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=glovesb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=glovesb">Далее</a>';}
break;
case 'glovesa':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ryki"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/gloves/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=glovesa">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=glovesa">Далее</a>';}
break;
case 'glovess':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="ryki"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/gloves/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=glovess">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=glovess">Далее</a>';}
break;
case '4it':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=4itng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=4itd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=4itc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=4itb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=4ita\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=4its\">S</a>] (от 76 ур)<br/>";
break;
case '4itng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="4it"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/4it/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=4itng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=4itng">Далее</a>';}
break;
case '4itd':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="4it"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/4it/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=4itd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=4itd">Далее</a>';}
break;
case '4itc':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="4it"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/4it/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=4itc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=4itc">Далее</a>';}
break;
case '4itb':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="4it"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/4it/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=4itb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=4itb">Далее</a>';}
break;
case '4ita':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="4it"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/4it/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=4ita">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=4ita">Далее</a>';}
break;
case '4its':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="4it"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/4it/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=4its">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=4its">Далее</a>';}
break;
case 'helmet':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=helmetng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=helmetd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=helmetc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=helmetb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=helmeta\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=helmets\">S</a>] (от 76 ур)<br/>";
break;
case 'helmetng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="golova"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/shlem/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=helmetng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=helmetng">Далее</a>';}
break;
case 'helmetd':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="golova"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/shlem/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=helmetd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=helmetd">Далее</a>';}
break;
case 'helmetc':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="golova"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/shlem/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=helmetc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=helmetc">Далее</a>';}
break;
case 'helmetb':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="golova"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/shlem/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: M+$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=helmetb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=helmetb">Далее</a>';}
break;
case 'helmeta':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="golova"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/shlem/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=helmeta">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=helmeta">Далее</a>';}
break;
case 'helmets':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="golova"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/shlem/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Защита: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=helmets">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=helmets">Далее</a>';}
break;
case 'weapon':
echo"<u>Выберите тип оружия</u><br/>";
echo"[<a href=\"shops.php?$sd&go=me4\">Мечи</a>]<br/>";
echo"[<a href=\"shops.php?$sd&go=kastet\">Кастеты</a>]<br/>";
echo"[<a href=\"shops.php?$sd&go=reaper\">Рапиры</a>]<br/>";
echo"[<a href=\"shops.php?$sd&go=luk\">Луки</a>]<br/>";
echo"[<a href=\"shops.php?$sd&go=kinj\">Кинжалы</a>]<br/>";

break;
case 'me4':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=me4ng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=me4d\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=me4c\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=me4b\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=me4a\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=me4s\">S</a>] (от 76 ур)<br/>";
break;
case 'me4ng':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=me4ng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=me4ng">Далее</a>';}
break;
case 'me4d':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=me4d">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=me4d">Далее</a>';}
break;
case 'me4c':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=me4c">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=me4c">Далее</a>';}
break;
case 'me4b':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=me4b">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=me4b">Далее</a>';}
break;
case 'me4a':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=me4a">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=me4a">Далее</a>';}
break;
case 'me4s':
$dir = opendir ("L2dbnam/esql2db/shop");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka2.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=me4s">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=me4s">Далее</a>';}
break;
case 'bow':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=bowng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bowd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bowc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bowb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bowa\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=bows\">S</a>] (от 76 ур)<br/>";
break;
case 'bowng':
$dir = opendir ("L2dbnam/esql2db/shop/bow");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/bow/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka3.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bowng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bowng">Далее</a>';}
break;
case 'bowd':
$dir = opendir ("L2dbnam/esql2db/shop/bow");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/bow/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka3.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bowd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bowd">Далее</a>';}
break;
case 'bowc':
$dir = opendir ("L2dbnam/esql2db/shop/bow");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/bow/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka3.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bowc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bowc">Далее</a>';}
break;
case 'bowb':
$dir = opendir ("L2dbnam/esql2db/shop/bow");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/bow/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka3.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bowb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bowb">Далее</a>';}
break;
case 'bowa':
$dir = opendir ("L2dbnam/esql2db/shop/bow");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/bow/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);
if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka3.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bowa">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bowa">Далее</a>';}
break;
case 'bows':
$dir = opendir ("L2dbnam/esql2db/shop/bow");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/bow/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka3.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=bows">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=bows">Далее</a>';}
break;
case 'kastet':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=kastetng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kastetd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kastetc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kastetb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kasteta\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kastets\">S</a>] (от 76 ур)<br/>";
break;
case 'kastetng':
$dir = opendir ("L2dbnam/esql2db/shop/kastet");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kastet/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka4.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kastetng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kastetng">Далее</a>';}
break;
case 'kastetd':
$dir = opendir ("L2dbnam/esql2db/shop/kastet");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kastet/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka4.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kastetd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kastetd">Далее</a>';}
break;
case 'kastetc':
$dir = opendir ("L2dbnam/esql2db/shop/kastet");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kastet/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka4.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kastetc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kastetc">Далее</a>';}
break;
case 'kastetng':
$dir = opendir ("L2dbnam/esql2db/shop/kastet");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kastet/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka4.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kastetb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kastetb">Далее</a>';}
break;
case 'kasteta':
$dir = opendir ("L2dbnam/esql2db/shop/kastet");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kastet/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka4.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kasteta">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kasteta">Далее</a>';}
break;
case 'kastets':
$dir = opendir ("L2dbnam/esql2db/shop/kastet");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kastet/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka4.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kastets">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kastets">Далее</a>';}
break;
case 'kastetb':
$dir = opendir ("L2dbnam/esql2db/shop/kastet");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kastet/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka4.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kastetb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kastetb">Далее</a>';}

break;
case 'reaper':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=reaperng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=reaperd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=reaperc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=reaperb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=reapera\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=reapers\">S</a>] (от 76 ур)<br/>";
break;
case 'reaperng':
$dir = opendir ("L2dbnam/esql2db/shop/reaper");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/reaper/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka23.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=reaperng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=reaperng">Далее</a>';}
break;
case 'reaperd':
$dir = opendir ("L2dbnam/esql2db/shop/reaper");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/reaper/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka23.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=reaperd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=reaperd">Далее</a>';}
break;
case 'reaperc':
$dir = opendir ("L2dbnam/esql2db/shop/reaper");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/reaper/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka23.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=reaperc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=reaperc">Далее</a>';}
break;
case 'reaperb':
$dir = opendir ("L2dbnam/esql2db/shop/reaper");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/reaper/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka23.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=reaperb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=reaperb">Далее</a>';}
break;
case 'reapera':
$dir = opendir ("L2dbnam/esql2db/shop/reaper");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/reaper/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka23.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=reapera">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=reapera">Далее</a>';}
break;
case 'reapers':
$dir = opendir ("L2dbnam/esql2db/shop/reaper");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/reaper/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka23.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=reapers">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=reapers">Далее</a>';}

break;
case 'luk':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=lukng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=lukd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=lukc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=lukb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=luka\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=luks\">S</a>] (от 76 ур)<br/>";
break;
case 'lukng':
$dir = opendir ("L2dbnam/esql2db/shop/luk");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/luk/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka24.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=lukng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=lukng">Далее</a>';}
break;
case 'lukd':
$dir = opendir ("L2dbnam/esql2db/shop/luk");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/luk/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka24.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=lukd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=lukd">Далее</a>';}
break;
case 'lukc':
$dir = opendir ("L2dbnam/esql2db/shop/luk");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/luk/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka24.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=lukc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=lukc">Далее</a>';}
break;
case 'lukb':
$dir = opendir ("L2dbnam/esql2db/shop/luk");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/luk/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka24.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=lukb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=lukb">Далее</a>';}
break;
case 'luka':
$dir = opendir ("L2dbnam/esql2db/shop/luk");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/luk/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka24.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=luka">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=luka">Далее</a>';}
break;
case 'luks':
$dir = opendir ("L2dbnam/esql2db/shop/luk");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/luk/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka24.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=luks">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=luks">Далее</a>';}
break;
case 'kinj':
echo"<u>Выберите Graid</u><br/>";
echo"[<a href=\"shops.php?$sd&go=kinjng\">NG</a>] (до 20 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kinjd\">D</a>] (до 40 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kinjc\">C</a>] (до 52 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kinjb\">B</a>] (до 62 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kinja\">A</a>] (до 76 ур)<br/>";
echo"[<a href=\"shops.php?$sd&go=kinjs\">S</a>] (от 76 ур)<br/>";
break;
case 'kinjng':
$dir = opendir ("L2dbnam/esql2db/shop/kinj");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kinj/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="0"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="NG";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka25.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kinjng">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kinjng">Далее</a>';}
break;
case 'kinjd':
$dir = opendir ("L2dbnam/esql2db/shop/kinj");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kinj/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="D"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="D";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka25.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kinjd">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kinjd">Далее</a>';}
break;
case 'kinjc':
$dir = opendir ("L2dbnam/esql2db/shop/kinj");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kinj/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="C"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="C";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka25.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kinjc">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kinjc">Далее</a>';}
break;
case 'kinjb':
$dir = opendir ("L2dbnam/esql2db/shop/kinj");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kinj/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="B"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="B";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka25.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kinjb">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kinjb">Далее</a>';}
break;
case 'kinja':
$dir = opendir ("L2dbnam/esql2db/shop/kinj");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kinj/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="A"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="A";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka25.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kinja">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kinja">Далее</a>';}
break;
case 'kinjs':
$dir = opendir ("L2dbnam/esql2db/shop/kinj");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/shop/kinj/$a[$i]");
$data = explode(":||:",$tex[0]);

$a[$i]=str_replace(".dat","",$a[$i]);

if($data[2]=="weapon"){
if($udata[9]<="85"){if($data[3]=="S"){

$dat_id[]=$a[$i];
$dat_cena[]=$data[1];
$dat_sila[]=$data[0];
$dat_gr[]="S";
$dat_name[]=$data[4];}}
}
}
foreach($dat_name as $k=>$v)
{
$gr[]=$dat_gr[$k];
$dat_screen[]="<img src=\"pik4erspic/weapon/$dat_name[$k].gif\" alt=\"pic\"/><a href=\"pokupka25.php?$sd&vesh=$dat_id[$k]&gorod=$udata[20]\">$dat_name[$k]</a><br/>Атака: +$dat_sila[$k]<br/>Цена: <img src='pik4erspic/mini/aden.gif' alt='pic'/> ".number_format($dat_cena[$k])." <br/>";
}
$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 '<a href="shops.php?start='.($start - 10).'&'.$sd.'&go=kinjs">Назад</a>';}
if ($total > $start + 10) {echo '<a href="shops.php?start='.($start + 10).'&'.$sd.'&go=kinjs">Далее</a>';}
break;
}
}else{echo"Пароль или ник неверен. Возможно сессия устарела. Попробуйте авторизироваться заново.";}
include_once"inclydings/down.php";
?>
