422 lines
16 KiB
PHP
422 lines
16 KiB
PHP
<?php
|
|
if(!defined('GAME'))
|
|
{
|
|
die();
|
|
}
|
|
|
|
if($u->room['file']=='fe/shop_')
|
|
{
|
|
$shopProcent = 0;
|
|
|
|
if(isset($_POST['itemgift']))
|
|
{
|
|
$to = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string('Ðóò').'" LIMIT 1'));
|
|
if(isset($to['id']))
|
|
{
|
|
if($u->info['align'] == 2 || $u->info['haos'] > time()) {
|
|
$re = '<div align="left">Õàîñíèêàì çàïðåùàåòñÿ äåëàòü ïîäàðêè äðóãèì èãðîêàì</div>';
|
|
}elseif($to['id']==$u->info['id'])
|
|
{
|
|
$re = '<div align="left">Î÷åíü ùåäðî äàðèòü ÷òî-òî ñàìîìó ñåáå ;)</div>';
|
|
}elseif($u->info['level']<1)
|
|
{
|
|
$re = '<div align="left">Äàðèòü ïîäàðêè ìîæíî íà÷èíàÿ ñ 1-ãî óðîâíÿ</div>';
|
|
}else{
|
|
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`im`.`type` = "28" OR `im`.`type` = "38" OR `im`.`type` = "63" OR `im`.`type` = "64") AND `iu`.`id` = "'.mysql_real_escape_string($_POST['itemgift']).'" AND `iu`.`uid` = "'.$u->info['id'].'" AND `iu`.`gift` = "" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `iu`.`inShop` = "0" LIMIT 1'));
|
|
if(isset($itm['id']))
|
|
{
|
|
//$itm['data'] = '';
|
|
|
|
$itm['gtxt1'] = $_POST['podarok2'];
|
|
$itm['gtxt2'] = $_POST['txt'];
|
|
|
|
$itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']);
|
|
$itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']);
|
|
$itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL,'cp1251');
|
|
$itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']);
|
|
$itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']);
|
|
$itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL,'cp1251');
|
|
|
|
$upd = mysql_query('UPDATE `items_users` SET `data` = "'.$itm['data'].'",`gtxt1` = "'.mysql_real_escape_string($itm['gtxt1']).'",`gtxt2` = "'.mysql_real_escape_string($itm['gtxt2']).'",`uid` = "'.$to['id'].'",`gift` = "'.$u->info['login'].'",`time_create` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$re = '<div align="left">Ïîäàðîê íå áûë óñïåøíî îòïðàâëåí ê "'.$_POST['to_login'].'", ìû åãî îòïðàâèëè àäìèíèñòðàòîðó.</div>';
|
|
}else{
|
|
$re = '<div align="left">Íå óäàëîñü ñäåëàòü ïîäàðîê</div>';
|
|
}
|
|
}else{
|
|
$re = '<div align="left">Ïðåäìåò íå íàéäåí</div>';
|
|
}
|
|
}
|
|
}else{
|
|
$re = '<div align="left">Ïåðñîíàæ ñ òàêèì ëîãèíîì íå íàéäåí</div>';
|
|
}
|
|
}
|
|
|
|
if(isset($u->stats['shopSale'],$_GET['sale']))
|
|
{
|
|
$bns = 0+$u->stats['shopSale'];
|
|
if($bns!=0)
|
|
{
|
|
if($bns>0)
|
|
{
|
|
$bns = '+'.$bns;
|
|
}
|
|
$shopProcent -= $bns;
|
|
if($shopProcent>99){ $shopProcent = 99; }
|
|
if($shopProcent<1){ $shopProcent = 1; }
|
|
echo '<div style="color:grey;"><b>Ó Âàñ äåéñòâóåò áîíóñ ïðè ïðîäàæå: '.$bns.'%</b><br><small>Âû ñìîæåòå ïðîäàâàòü ïðåäìåòû çà '.(100-$shopProcent).'% îò èõ ñòîèìîñòè</small></div>';
|
|
}
|
|
}
|
|
|
|
if(!isset($_GET['otdel']))
|
|
{
|
|
$_GET['otdel'] = 1;
|
|
}
|
|
|
|
$sid = 300;
|
|
/*
|
|
if($u->info['id'] = 10001) {
|
|
$sp = mysql_query('SELECT * FROM `items_shop` WHERE `sid` = 1 AND `kolvo` > 0');
|
|
while($pl = mysql_fetch_array($sp)) {
|
|
$test = mysql_fetch_array(mysql_query('SELECT `iid` FROM `items_shop` WHERE `sid` = 300 AND `item_id` = "'.$pl['item_id'].'" LIMIT 1'));
|
|
if(!isset($test['iid'])) {
|
|
//äîáàâëÿåì ïðåäìåò
|
|
mysql_query('INSERT INTO `items_shop` (`sid`,`item_id`,`kolvo`,
|
|
`data2`,`magic_inc`,`timeOver`,`overType`,`secret_id`,`r`,`price_1`,`price_2`,`level`,`tr_items`,`max_buy`) VALUES (
|
|
"300","'.$pl['item_id'].'","10000",
|
|
"'.$pl['data2'].'","'.$pl['magic_inc'].'","'.$pl['timeOver'].'","'.$pl['overType'].'","'.$pl['secret_id'].'","'.$pl['r'].'","'.$pl['price_1'].'","'.$pl['price_2'].'","'.$pl['level'].'","'.$pl['tr_items'].'","'.$pl['max_buy'].'"
|
|
)');
|
|
}
|
|
}
|
|
}
|
|
*/
|
|
$error = '';
|
|
|
|
if(isset($_GET['buy']))
|
|
{
|
|
if($u->newAct($_GET['sd4'])==true)
|
|
{
|
|
$re = $u->buyItem($sid,(int)$_GET['buy'],(int)$_GET['x']);
|
|
}else{
|
|
$re = 'Âû óâåðåíû ÷òî õîòèòå êóïèòü ýòîò ïðåäìåò?';
|
|
}
|
|
}elseif(isset($_GET['sale']) && isset($_GET['item']) && $u->newAct($_GET['sd4']))
|
|
{
|
|
$id = (int)$_GET['item'];
|
|
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`id` = "'.mysql_real_escape_string($id).'" LIMIT 1'));
|
|
$po = $u->lookStats($itm['data']);
|
|
if(isset($po['nosale']))
|
|
{
|
|
$error = 'Íå óäàëîñü ïðîäàòü ïðåäìåò ...';
|
|
}elseif($pl['type']<29 && ($po['srok'] > 0 || $pl['srok'] > 0))
|
|
{
|
|
$error = 'Íå óäàëîñü ïðîäàòü ïðåäìåò ...';
|
|
}elseif(isset($po['frompisher']))
|
|
{
|
|
$error = 'Íå óäàëîñü ïðîäàòü ïðåäìåò ...';
|
|
}elseif(isset($itm['id']))
|
|
{
|
|
if($itm['1price']>0)
|
|
{
|
|
$itm['price1'] = $itm['1price'];
|
|
}
|
|
$shpCena = $itm['price1'];
|
|
|
|
$plmx = 0;
|
|
if($itm['iznosMAXi']!=$itm['iznosMAX'] && $itm['iznosMAX']!=0)
|
|
{
|
|
$plmx = $itm['iznosMAX'];
|
|
}else{
|
|
$plmx = $itm['iznosMAXi'];
|
|
}
|
|
|
|
if($itm['iznosNOW']>0)
|
|
{
|
|
$prc1 = $itm['iznosNOW']/$plmx*100;
|
|
}else{
|
|
$prc1 = 0;
|
|
}
|
|
$shpCena = $shpCena/100*(100-$prc1);
|
|
if($itm['iznosMAX']>0 && $itm['iznosMAXi']>0 && $itm['iznosMAXi']>$itm['iznosMAX'])
|
|
{
|
|
$shpCena = $shpCena/100*($itm['iznosMAX']/$itm['iznosMAXi']*100);
|
|
}
|
|
$shpCena = $u->round2($shpCena/100*(100-$shopProcent));
|
|
if($shpCena<0)
|
|
{
|
|
$shpCena = 0;
|
|
}
|
|
$col = $u->itemsX($itm['id']);
|
|
if($col>0)
|
|
{
|
|
$shpCena = $shpCena*$col;
|
|
}
|
|
if($shpCena<0)
|
|
{
|
|
$shpCena = 0;
|
|
}
|
|
$upd2 = mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
|
if($upd2)
|
|
{
|
|
$u->info['money'] += $shpCena;
|
|
$upd = mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$error = 'Âû óñïåøíî ïðîäàëè ïðåäìåò "'.$itm['name'].' [x'.$col.']" çà '.$shpCena.' êð.';
|
|
mysql_query('UPDATE `items_users` SET `inGroup` = "0",`delete` = "'.time().'" WHERE `inGroup` = "'.$itm['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT '.$itm['group_max'].'');
|
|
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Ïðåäìåò "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] áûë ïðîäàí â ìàãàçèí çà <B>'.$shpCena.' êð.</B>.',time(),$u->info['city'],'System.shop',0,0);
|
|
}else{
|
|
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Ïðåäìåò "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] áûë ïðîäàí â ìàãàçèí çà <B>'.$shpCena.' êð.</B> (êðåäèòû íå ïåðåâåäåíû).',time(),$u->info['city'],'System.shop',0,0);
|
|
$error = 'Íå óäàëîñü ïðîäàòü ïðåäìåò...';
|
|
}
|
|
}else{
|
|
$error = 'Íå óäàëîñü ïðîäàòü ïðåäìåò...';
|
|
}
|
|
}else{
|
|
$error = 'Ïðåäìåò íå íàéäåí â èíâåíòàðå.';
|
|
}
|
|
}
|
|
|
|
if($re!=''){ echo '<div align="right"><font color="red"><b>'.$re.'</b></font></div>'; } ?>
|
|
<script type="text/javascript">
|
|
function AddCount(name, txt)
|
|
{
|
|
document.getElementById("hint4").innerHTML = '<table border=0 width=100% cellspacing=1 cellpadding=0 bgcolor="#CCC3AA"><tr><td align=center><B>Êóïèòü íåñê. øòóê</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</TD></tr><tr><td colspan=2>'+
|
|
'<form method=post><table border=0 width=100% cellspacing=0 cellpadding=0 bgcolor="#FFF6DD"><tr><INPUT TYPE="hidden" name="set" value="'+name+'"><td colspan=2 align=center><B><I>'+txt+'</td></tr><tr><td width=80% align=right>'+
|
|
'Êîëè÷åñòâî (øò.) <INPUT TYPE="text" NAME="count" id=count size=4></td><td width=20%> <INPUT TYPE="submit" value=" »» ">'+
|
|
'</TD></TR></form></TABLE></td></tr></table>';
|
|
document.getElementById("hint4").style.visibility = 'visible';
|
|
document.getElementById("hint4").style.left = '100px';
|
|
document.getElementById("hint4").style.top = '100px';
|
|
document.getElementById("count").focus();
|
|
}
|
|
function closehint3() {
|
|
document.getElementById('hint4').style.visibility='hidden';
|
|
Hint3Name='';
|
|
}
|
|
</script>
|
|
<style type="text/css">
|
|
|
|
.pH3 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; }
|
|
.class_ {
|
|
font-weight: bold;
|
|
color: #C5C5C5;
|
|
cursor:pointer;
|
|
}
|
|
.class_st {
|
|
font-weight: bold;
|
|
color: #659BA3;
|
|
cursor:pointer;
|
|
}
|
|
.class__ {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #659BA3;
|
|
}
|
|
.class__st {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #659BA3;
|
|
font-size: 10px;
|
|
}
|
|
.class_old {
|
|
font-weight: bold;
|
|
color: #919191;
|
|
cursor:pointer;
|
|
}
|
|
.class__old {
|
|
font-weight: bold;
|
|
color: #FFFFFF;
|
|
cursor:pointer;
|
|
background-color: #838383;
|
|
font-size: 10px;
|
|
}
|
|
</style>
|
|
<TABLE width="100%" cellspacing="0" cellpadding="0">
|
|
<tr><td valign="top"><?php
|
|
echo '<b style="color:red">'.$error.'</b>';
|
|
?>
|
|
<br />
|
|
<TABLE width="100%" cellspacing="0" cellpadding="4">
|
|
<TR>
|
|
<form name="F1" method="post">
|
|
<TD valign="top" align="left">
|
|
<!--Ìàãàçèí-->
|
|
<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#a5a5a5">
|
|
<div id="hint3" style="visibility:hidden"></div>
|
|
<tr>
|
|
<td align="center" height="21">
|
|
<?php
|
|
/*íàçâàíèÿ ðàçäåëîâ (ñâåðõó)*/
|
|
if(!isset($_GET['sale']) && !isset($_GET['gifts']) && isset($_GET['otdel']))
|
|
{
|
|
$otdels_small_array = array (1=>'<b>Îòäåë "Îðóæèå: êàñòåòû,íîæè"</b>',2=>'<b>Îòäåë "Îðóæèå: òîïîðû"</b>',3=>'<b>Îòäåë "Îðóæèå: äóáèíû,áóëàâû"</b>',4=>'<b>Îòäåë "Îðóæèå: ìå÷è"</b>',5=>'<b>Îòäåë "Îðóæèå: ìàãè÷åñêèå ïîñîõè"</b>',6=>'<b>Îòäåë "Îäåæäà: ñàïîãè"</b>',7=>'<b>Îòäåë "Îäåæäà: ïåð÷àòêè"</b>',8=>'<b>Îòäåë "Îäåæäà: ðóáàõè"</b>',9=>'<b>Îòäåë "Îäåæäà: ëåãêàÿ áðîíÿ"</b>',10=>'<b>Îòäåë "Îäåæäà: òÿæåëàÿ áðîíÿ"</b>',11=>'<b>Îòäåë "Îäåæäà: øëåìû"</b>',12=>'<b>Îòäåë "Îäåæäà: íàðó÷è"</b>',13=>'<b>Îòäåë "Îäåæäà: ïîÿñà"</b>',14=>'<b>Îòäåë "Îäåæäà: ïîíîæè"</b>',15=>'<b>Îòäåë "Ùèòû"</b>',16=>'<b>Îòäåë "Þâåëèðíûå òîâàðû: ñåðüãè"</b>',17=>'<b>Îòäåë "Þâåëèðíûå òîâàðû: îæåðåëüÿ"</b>',18=>'<b>Îòäåë "Þâåëèðíûå òîâàðû: êîëüöà"</b>',19=>'<b>Îòäåë "Çàêëèíàíèÿ: íåéòðàëüíûå"</b>',20=>'<b>Îòäåë "Çàêëèíàíèÿ: áîåâûå è çàùèòíûå"</b>',21=>'<b>Îòäåë "Àìóíèöèÿ"</b>',22=>'<b>Îòäåë "Ýëèêñèðû"</b>',23=>'<b>Îòäåë "Ïîäàðêè"</b>',24=>'<b>Îòäåë "Ïîäàðêè: íåäîáðûå"</b>',25=>'<b>Îòäåë "Ïîäàðêè: óïàêîâêà"</b>',26=>'<b>Îòäåë "Ïîäàðêè: îòêðûòêè"</b>',27=>'<b>Îòäåë "Ïîäàðêè: ôåéåðâåðêè"</b>');
|
|
if(isset($otdels_small_array[$_GET['otdel']]))
|
|
{
|
|
echo $otdels_small_array[$_GET['otdel']];
|
|
}
|
|
|
|
} elseif (isset($_GET['sale']) && $_GET['sale'])
|
|
{
|
|
echo '
|
|
<B>Îòäåë "Ñêóïêà"</B><br>
|
|
Çäåñü âû ìîæåòå ïðîäàòü ñâîè âåùè, çà æàëêèå ãðîøè...<br>
|
|
Ó âàñ â íàëè÷èè:
|
|
';
|
|
} elseif (isset($_GET['gifts']))
|
|
{
|
|
echo '
|
|
<B>Îòäåë "Ñäåëàòü ïîäàðêè"</B>';
|
|
}
|
|
?>
|
|
</tr>
|
|
<tr><td>
|
|
<!--Ðþêçàê / Ïðèëàâîê-->
|
|
<table width="100%" CELLSPACING="1" CELLPADDING="1" bgcolor="#a5a5a5">
|
|
<?php
|
|
if(isset($_GET['gifts']))
|
|
{
|
|
?>
|
|
|
|
<tr><td bgcolor="#D5D5D5">
|
|
Âû ìîæåòå ñäåëàòü ïîäàðîê äîðîãîìó ÷åëîâåêó. Âàø ïîäàðîê áóäåò îòîáðàæàòüñÿ â èíôîðìàöèè î ïåðñîíàæå.
|
|
<OL>
|
|
<LI>Óêàæèòå ëîãèí ïåðñîíàæà, êîòîðîìó õîòèòå ñäåëàòü ïîäàðîê<BR>
|
|
Ëîãèí
|
|
<INPUT TYPE=text NAME=to_login value="">
|
|
<LI>Öåëü ïîäàðêà. Áóäåò îòîáðàæàòüñÿ â èíôîðìàöèè î ïåðñîíàæå (íå áîëåå 60 ñèìâîëîâ)<BR>
|
|
<INPUT TYPE=text NAME=podarok2 value="" maxlength=60 size=50>
|
|
<LI>Íàïèøèòå òåêñò ñîïðîâîäèòåëüíîé çàïèñêè (â èíôîðìàöèè î ïåðñîíàæå íå îòîáðàæàåòñÿ)<BR>
|
|
<TEXTAREA NAME=txt ROWS=6 COLS=80></TEXTAREA>
|
|
<LI>Âûáåðèòå, îò ÷üåãî èìåíè ïîäàðîê:<BR>
|
|
<INPUT TYPE=radio NAME=from value=0 checked> <B><?=$u->info['login']?></B> [<?=$u->info['level']?>]<BR>
|
|
<INPUT TYPE=radio NAME=from value=1 > àíîíèìíî<BR>
|
|
<? if($u->info['clan']>0){ ?><INPUT TYPE=radio NAME=from value=2 > îò èìåíè êëàíà<BR><? } ?>
|
|
<LI>Íàæìèòå êíîïêó <B>Ïîäàðèòü</B> ïîä ïðåäìåòîì, êîòîðûé õîòèòå ïðåïîäíåñòè â ïîäàðîê:<BR>
|
|
</OL>
|
|
<input name="itemgift" id="itemgift" type="hidden" value="0" />
|
|
</td></tr>
|
|
<?php
|
|
}
|
|
if(isset($_GET['gifts']))
|
|
{
|
|
$itmAll = $u->genInv(3,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND (`im`.`type` = "28" OR `im`.`type` = "38" OR `im`.`type` = "63" OR `im`.`type` = "64") AND `iu`.`gift` = "" ORDER BY `iu`.`lastUPD` DESC');
|
|
if($itmAll[0]==0)
|
|
{
|
|
$itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">Ó âàñ íåò ïîäõîäÿùèõ ïðåäìåòîâ</td></tr>';
|
|
}else{
|
|
$itmAllSee = $itmAll[2];
|
|
}
|
|
echo $itmAllSee;
|
|
}elseif(!isset($_GET['sale']))
|
|
{
|
|
//Âûâîäèì âåùè â ìàãàçèíå äëÿ ïîêóïêè
|
|
$u->shopItems($sid);
|
|
}else{
|
|
//Âûâîäèì âåùè â èíâåíòàðå äëÿ ïðîäàæè
|
|
$itmAll = $u->genInv(2,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" ORDER BY `iu`.`lastUPD` DESC');
|
|
if($itmAll[0]==0)
|
|
{
|
|
$itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ÏÓÑÒÎ</td></tr>';
|
|
}else{
|
|
$itmAllSee = $itmAll[2];
|
|
}
|
|
echo $itmAllSee;
|
|
}
|
|
?>
|
|
</TABLE>
|
|
</TD></TR>
|
|
</TABLE>
|
|
</TD>
|
|
</FORM>
|
|
</TR>
|
|
</TABLE>
|
|
<td width="280" valign="top">
|
|
<TABLE cellspacing="0" cellpadding="0"><TD width="100%"> </TD><TD>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr align="right" valign="top">
|
|
<td>
|
|
<!-- -->
|
|
<? echo $goLis; ?>
|
|
<!-- -->
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td nowrap="nowrap">
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
|
<tr>
|
|
<td bgcolor="#D3D3D3"><img src="https://img.new-combats.com/i/move/links.gif" width="9" height="7" /></td>
|
|
<td bgcolor="#D3D3D3" nowrap><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=6.180.0.100&rnd=<? echo $code; ?>';" title="<? thisInfRm('6.180.0.100',1); ?>">Öåíòðàëüíàÿ Ïëîùàäü</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td></table>
|
|
</td></table>
|
|
<div><br />
|
|
<div align="right">
|
|
<small>
|
|
Ìàññà: <?=$u->aves['now']?>/<?=$u->aves['max']?> <br />
|
|
Ó âàñ â íàëè÷èè: <b style="color:#339900;"><?php echo round($u->info['money'],2); ?> êð.</b>
|
|
</small>
|
|
</div>
|
|
<br />
|
|
<?php
|
|
/*êíîïî÷êè*/
|
|
if(!isset($_GET['sale']))
|
|
{
|
|
echo '
|
|
<INPUT TYPE="button" value="Ïðîäàòü âåùè" onclick="location=\'?otdel='.$_GET['otdel'].'&sale=1\'">
|
|
';
|
|
} else {
|
|
echo '
|
|
<INPUT TYPE="button" value="Êóïèòü âåùè" onclick="location=\'?otdel='.$_GET['otdel'].'\'">
|
|
';
|
|
}
|
|
?>
|
|
<INPUT TYPE="button" value="Îáíîâèòü" onclick="location = '<? echo $_SERVER['REQUEST_URI']; ?>';"><BR>
|
|
</div>
|
|
<div style="background-color:#A5A5A5;padding:1"><center><B>Îòäåëû ìàãàçèíà</B></center></div>
|
|
<div style="line-height:17px;">
|
|
<?php
|
|
/*íàçâàíèÿ ðàçäåëîâ (ñïðàâà)*/
|
|
$otdels_array = array (1=>'Îðóæèå: êàñòåòû,íîæè',2=>' òîïîðû',3=>' äóáèíû,áóëàâû',4=>' ìå÷è',5=>' ìàãè÷åñêèå ïîñîõè',6=>'Îäåæäà: ñàïîãè',7=>' ïåð÷àòêè',8=>' ðóáàõè',9=>' ëåãêàÿ áðîíÿ',10=>' òÿæåëàÿ áðîíÿ',11=>' øëåìû',12=>' íàðó÷è',13=>' ïîÿñà',14=>' ïîíîæè',15=>'Ùèòû',16=>'Þâåëèðíûå òîâàðû: ñåðüãè',17=>' îæåðåëüÿ',18=>' êîëüöà',19=>'Çàêëèíàíèÿ: íåéòðàëüíûå',20=>' áîåâûå è çàùèòíûå',21=>'Àìóíèöèÿ',22=>' Ýëèêñèðû',23=>'Ïîäàðêè',24=>' íåäîáðûå',25=>' óïàêîâêà',26=>' îòêðûòêè',27=>' ôåéåðâåðêè');
|
|
$i=1;
|
|
while ($i!=-1)
|
|
{
|
|
if(isset($otdels_array[$i]))
|
|
{
|
|
if(isset($_GET['otdel']) && $_GET['otdel']==$i)
|
|
{
|
|
$color = 'C7C7C7';
|
|
} else {
|
|
$color = 'e2e0e0';
|
|
}
|
|
echo '
|
|
<A HREF="?otdel='.$i.'"><DIV style="background-color: #'.$color.'">
|
|
'.$otdels_array[$i].'
|
|
</A></DIV>
|
|
';
|
|
} else {
|
|
$i = -2;
|
|
}
|
|
$i++;
|
|
}
|
|
|
|
if(isset($_GET['gifts']))
|
|
{
|
|
$color = 'C7C7C7';
|
|
}
|
|
echo '<A HREF="?otdel=32&gifts=1"><DIV style="background-color: #'.$color.'">Ñäåëàòü ïîäàðêè</A></DIV>';
|
|
?>
|
|
</div>
|
|
</td>
|
|
</table>
|
|
<br>
|
|
<div id="textgo" style="visibility:hidden;"></div>
|
|
<?
|
|
}
|
|
?>
|