Обучение/Помощь новичкам | Снарежение
Как вывести текущее одетое снарежение?вот сами картинки
<center><div style="width:36px;display:inline-block;vertical-align:top"><div style="padding-bottom:5px;"><img src="" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div></div><img style="width:120px;height:160px;border:1px solid #131313;border-radius:3px;background:#131313;" src="http://xaos.mobi/style2/profile.jpg"><div style="width:36px;display:inline-block;vertical-align:top"><div style="padding-bottom:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div></div>
Вот код где снарежение
echo only_reg();
echo ban();
$ank = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '".abs(intval($_GET['id']))."' LIMIT 1"));
$header = 'Экипировка '.$ank['nick'].'';
mysql_query("UPDATE `user` set `mesto` = 'Экипировка' where `id` = '".$user['id']."'");
require_once '../core/head.php';
$reqv = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `sunduk`!='1' and `act` != '1' ");
$rukzak= mysql_num_rows($reqv);
if(isset($_GET['remove'])){
$up = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `id` = '".intval($_GET['remove'])."' limit 1"));
if(empty($up['id'])){
header('location:/'); exit;
}
else{
$req = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act` = '1' and `type` = '".$up['type']."'");
$avto = mysql_num_rows($req);
if($up['id']<=0){
header('location: ?');
$_SESSION['err'] = 'Ошибка'; exit;}
if($user['battle']>0){
header('location: ?id='.$user['id'].'');
$_SESSION['err'] = 'Во время боя нельзя снимать вещи!';
exit;
}
if($avto==0){
header('location: ?id='.$user['id'].'');
$_SESSION['err'] = 'Вещь не надета';}else{
if($rukzak>=$user['rukzak']){header("location: ?id=".$user['id'].""); $_SESSION['err'] = 'Рюкзак заполнен!';}else{
$up2 = mysql_fetch_array(mysql_query("SELECT stats from `kompl` where `id` = '".$up['id_komp']."' limit 1"));
$stat2 = explode(';',$up2['stats']);
$req = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act` = '1' and `komplekt`='".$up['komplekt']."'");
$weap = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
$req1 = mysql_query("SELECT * from `komplekt` where `id`='".$up['komplekt']."'");
$bonus = mysql_fetch_array($req1);
if($avto==8 && $weap['komplekt']==$up['komplekt']){
mysql_query("DELETE FROM `bonus` WHERE `usr` = ".$user['id']." and `name` = 'Полный комплект' and `bonus`='+".$bonus['bon']." к параметрам'");
mysql_query("UPDATE `user` set `sila` = `sila` - '".$bonus['bon']."', `max_health` = `max_health` - ('".$bonus['bon']."'*'10'), `zashit` = `zashit` - '".$bonus['bon']."' where `id` = '".$user['id']."'");
}
$kompls = mysql_query("SELECT * from `kompl_us` where `id` = '".intval($_GET['remove'])."' and `id_us`='".$user['id']."'");
$komplls = mysql_query("SELECT * from `kompl_us` where `id` = '".intval($_GET['remove'])."' and `id_us`='".$user['id']."' and `fleece`>'0'");
$komp2 = mysql_fetch_array($kompls);
$komp4 = mysql_fetch_array($komplls);
mysql_query("UPDATE `user` set `sila` = `sila` - '".$komp2['sila']."', `max_health` = `max_health` - ('".$komp2['hp']."'*'10'), `zashit` = `zashit` - '".$komp2['prot']."' where `id` = '".$user['id']."'");
$avto=mysql_num_rows($komplls);
if($avto>0){
mysql_query("UPDATE `user` set `sila`=`sila`-".$komp4['fleece'].", `zashit`=`zashit`-".$komp4['fleece'].", `max_health`=`max_health`-('".$komp4['fleece']."'*'10') where `id` = '".$user['id']."' limit 1");
}
$_SESSION['message'] = 'Вы сняли вещь';$act=0;
mysql_query("UPDATE `kompl_us` set `act` = '".$act."' where `id` = '".abs(intval($_GET['remove']))."'");
header('location: ?id='.$user['id'].''); exit;
}}}
}
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'голова' limit 1");
$avto =
<center><div style="width:36px;display:inline-block;vertical-align:top"><div style="padding-bottom:5px;"><img src="" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div></div><img style="width:120px;height:160px;border:1px solid #131313;border-radius:3px;background:#131313;" src="http://xaos.mobi/style2/profile.jpg"><div style="width:36px;display:inline-block;vertical-align:top"><div style="padding-bottom:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div><div style="padding-bottom:5px;padding-top:5px"><img src="mob/533.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:32px;width:32px"></div></div>
Вот код где снарежение
echo only_reg();
echo ban();
$ank = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '".abs(intval($_GET['id']))."' LIMIT 1"));
$header = 'Экипировка '.$ank['nick'].'';
mysql_query("UPDATE `user` set `mesto` = 'Экипировка' where `id` = '".$user['id']."'");
require_once '../core/head.php';
$reqv = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `sunduk`!='1' and `act` != '1' ");
$rukzak= mysql_num_rows($reqv);
if(isset($_GET['remove'])){
$up = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `id` = '".intval($_GET['remove'])."' limit 1"));
if(empty($up['id'])){
header('location:/'); exit;
}
else{
$req = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act` = '1' and `type` = '".$up['type']."'");
$avto = mysql_num_rows($req);
if($up['id']<=0){
header('location: ?');
$_SESSION['err'] = 'Ошибка'; exit;}
if($user['battle']>0){
header('location: ?id='.$user['id'].'');
$_SESSION['err'] = 'Во время боя нельзя снимать вещи!';
exit;
}
if($avto==0){
header('location: ?id='.$user['id'].'');
$_SESSION['err'] = 'Вещь не надета';}else{
if($rukzak>=$user['rukzak']){header("location: ?id=".$user['id'].""); $_SESSION['err'] = 'Рюкзак заполнен!';}else{
$up2 = mysql_fetch_array(mysql_query("SELECT stats from `kompl` where `id` = '".$up['id_komp']."' limit 1"));
$stat2 = explode(';',$up2['stats']);
$req = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act` = '1' and `komplekt`='".$up['komplekt']."'");
$weap = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
$req1 = mysql_query("SELECT * from `komplekt` where `id`='".$up['komplekt']."'");
$bonus = mysql_fetch_array($req1);
if($avto==8 && $weap['komplekt']==$up['komplekt']){
mysql_query("DELETE FROM `bonus` WHERE `usr` = ".$user['id']." and `name` = 'Полный комплект' and `bonus`='+".$bonus['bon']." к параметрам'");
mysql_query("UPDATE `user` set `sila` = `sila` - '".$bonus['bon']."', `max_health` = `max_health` - ('".$bonus['bon']."'*'10'), `zashit` = `zashit` - '".$bonus['bon']."' where `id` = '".$user['id']."'");
}
$kompls = mysql_query("SELECT * from `kompl_us` where `id` = '".intval($_GET['remove'])."' and `id_us`='".$user['id']."'");
$komplls = mysql_query("SELECT * from `kompl_us` where `id` = '".intval($_GET['remove'])."' and `id_us`='".$user['id']."' and `fleece`>'0'");
$komp2 = mysql_fetch_array($kompls);
$komp4 = mysql_fetch_array($komplls);
mysql_query("UPDATE `user` set `sila` = `sila` - '".$komp2['sila']."', `max_health` = `max_health` - ('".$komp2['hp']."'*'10'), `zashit` = `zashit` - '".$komp2['prot']."' where `id` = '".$user['id']."'");
$avto=mysql_num_rows($komplls);
if($avto>0){
mysql_query("UPDATE `user` set `sila`=`sila`-".$komp4['fleece'].", `zashit`=`zashit`-".$komp4['fleece'].", `max_health`=`max_health`-('".$komp4['fleece']."'*'10') where `id` = '".$user['id']."' limit 1");
}
$_SESSION['message'] = 'Вы сняли вещь';$act=0;
mysql_query("UPDATE `kompl_us` set `act` = '".$act."' where `id` = '".abs(intval($_GET['remove']))."'");
header('location: ?id='.$user['id'].''); exit;
}}}
}
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'голова' limit 1");
$avto =
С бт возьми
OverDriver , да нафига?если есть тока надо чтоб он их показывал
а пути к картинкам проверял? они соответствуют реальному расположению картинок?
зделал они пустые,как теперь прописать чтоб он показывал что одето?
------
74181_Screenshot.png (47.9 Kb)
Скачиваний: 85
------
Скачиваний: 85

