Уборка deprecated кода. Разделение логики и отображения.
This commit is contained in:
parent
fb97d70add
commit
ffa546dd24
334
shop.php
334
shop.php
@ -16,9 +16,10 @@ if ($user['battle'] != 0) {
|
||||
die();
|
||||
}
|
||||
|
||||
$sellItemId = empty($_GET['sellitem']) ?: $_GET['sellitem'];
|
||||
|
||||
if ($_GET['sed']) {
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT `id`, `name`, `cost`, `type`, `duration`, `maxdur`, `goden`, `dategoden`, `koll` FROM `inventory` WHERE `dressed` = 0 AND `id` = '" . (int)$_GET['sed'] . "' AND `owner` = '{$user['id']}' LIMIT 1"));
|
||||
if ($sellItemId) {
|
||||
$dress = db::c()->query('SELECT `id`, `name`, `cost`, `type`, `duration`, `maxdur`, `goden`, `dategoden`, `koll` FROM `inventory` WHERE `dressed` = 0 AND `id` = ?i AND `owner` = ?i', $sellItemId, $user['id'])->fetch_assoc();
|
||||
$price = $dress['cost'] * 1;
|
||||
$kols = '';
|
||||
if ($dress['koll']) {
|
||||
@ -39,73 +40,179 @@ if ($_GET['sed']) {
|
||||
$allcost = round(($allcost * $per), 2);
|
||||
}
|
||||
$user['money'] += $allcost;
|
||||
mysql_query("UPDATE `users` SET `money` = '" . $user['money'] . "' WHERE `id` = {$user['id']} LIMIT 1");
|
||||
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"" . $user['login'] . "\" продал в магазин товар : \"" . $dress['name'] . "\" $kols id:(cap" . $dress['id'] . ") [" . $dress['duration'] . "/" . $dress['maxdur'] . "] за " . $allcost . " кр. ', '1', '" . time() . "')");
|
||||
echo "<font color=red><b>Вы продали \"{$dress['name']}\" $kols за " . $allcost . " кр.</b></font>";
|
||||
$deloText = "\"" . $user['login'] . "\" продал в магазин товар : \"" . $dress['name'] . "\" $kols id:(cap" . $dress['id'] . ") [" . $dress['duration'] . "/" . $dress['maxdur'] . "] за " . $allcost . " кр. ";
|
||||
db::c()->query('UPDATE `users` SET `money` = ?i WHERE `id` = ?i', $user['money'], $user['id']);
|
||||
db::c()->query('INSERT INTO `delo` (`pers`, `text`, `type`, `date`) VALUES (?i, "?s", 1, ?i)', $user['id'], $deloText, time());
|
||||
echo "<b style='color: red;'>Вы продали \"{$dress['name']}\" $kols за " . $allcost . " кр.</b>";
|
||||
}
|
||||
|
||||
if (isset($_GET['set']) OR isset($_POST['set'])) {
|
||||
$set = empty($_GET['set']) ?: $_GET['set'];
|
||||
$set = empty($_POST['set']) ?: $_POST['set'];
|
||||
|
||||
if (($_GET['set'] || $_POST['set'])) {
|
||||
if ($_GET['set']) {
|
||||
$set = $_GET['set'];
|
||||
}
|
||||
if ($_POST['set']) {
|
||||
$set = $_POST['set'];
|
||||
}
|
||||
if (!$_GET['count']) {
|
||||
$_GET['count'] = 1;
|
||||
}
|
||||
if (!is_numeric($_GET['count']) || $_GET['count'] != ((int)$_GET['count'])) {
|
||||
$_GET['count'] = 0;
|
||||
$count = isset($_GET['count']) && is_numeric($_GET['count']) ? $_GET['count'] : 0;
|
||||
$count = isset($_POST['count']) && is_numeric($_POST['count']) ? $_POST['count'] : 0;
|
||||
|
||||
if ($count < 1) {
|
||||
$count = 0;
|
||||
$count_ok = 0;
|
||||
} elseif ($_GET['count'] < 1) {
|
||||
$_GET['count'] = 0;
|
||||
$count_ok = 0;
|
||||
} else {
|
||||
$count_ok = 1;
|
||||
}
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT * FROM `shop` WHERE `id` = '" . (int)$set . "' LIMIT 1"));
|
||||
} else $count_ok = 1;
|
||||
|
||||
$dress = db::c()->query('SELECT * FROM `ashop` WHERE `id`=?i', $set)->fetch_assoc();
|
||||
if ($count_ok == 0) {
|
||||
echo "<font color=red><b>Неправильно введено количество</b></font>";
|
||||
} elseif (($dress['massa'] * $_GET['count'] + $d[0]) > (get_meshok())) {
|
||||
echo "<font color=red><b>Недостаточно места в рюкзаке.</b></font>";
|
||||
} elseif ($count_ok == 1 && ($user['money'] >= ($dress['cost'] * $_GET['count'])) && ($dress['count'] >= $_GET['count'])) {
|
||||
err('Неправильно введено количество.');
|
||||
} elseif (($dress['massa'] * $count + $itemWeight['m']) > (get_meshok())) {
|
||||
err('Недостаточно места в рюкзаке.');
|
||||
} elseif ($count_ok == 1 && ($user['money'] >= ($dress['cost'] * $count)) && ($dress['count'] >= $count)) {
|
||||
|
||||
$newItem = [
|
||||
'prototype' => $dress['id'],
|
||||
'owner' => $user['id'],
|
||||
'name' => $dress['name'], //s
|
||||
'type' => $dress['type'],
|
||||
'massa' => $dress['massa'],
|
||||
'cost' => $dress['cost'],
|
||||
'img' => $dress['img'], //s
|
||||
'maxdur' => $dress['maxdur'],
|
||||
'isrep' => $dress['isrep'],
|
||||
'gsila' => $dress['gsila'],
|
||||
'glovk' => $dress['glovk'],
|
||||
'ginta' => $dress['ginta'],
|
||||
'gintel' => $dress['gintel'],
|
||||
'ghp' => $dress['ghp'],
|
||||
'gnoj' => $dress['gnoj'],
|
||||
'gtopor' => $dress['gtopor'],
|
||||
'gdubina' => $dress['gdubina'],
|
||||
'gmech' => $dress['gmech'],
|
||||
'gfire' => $dress['gfire'],
|
||||
'gwater' => $dress['gwater'],
|
||||
'gair' => $dress['gair'],
|
||||
'gearth' => $dress['gearth'],
|
||||
'glight' => $dress['glight'],
|
||||
'ggray' => $dress['ggray'],
|
||||
'gdark' => $dress['gdark'],
|
||||
'needident' => $dress['needident'],
|
||||
'nsila' => $dress['nsila'],
|
||||
'nlovk' => $dress['nlovk'],
|
||||
'ninta' => $dress['ninta'],
|
||||
'nintel' => $dress['nintel'],
|
||||
'nmudra' => $dress['nmudra'],
|
||||
'nvinos' => $dress['nvinos'],
|
||||
'nnoj' => $dress['nnoj'],
|
||||
'ntopor' => $dress['ntopor'],
|
||||
'ndubina' => $dress['ndubina'],
|
||||
'nmech' => $dress['nmech'],
|
||||
'bron1' => $dress['bron1'],
|
||||
'bron2' => $dress['bron2'],
|
||||
'bron3' => $dress['bron3'],
|
||||
'bron4' => $dress['bron4'],
|
||||
'minu' => $dress['minu'],
|
||||
'maxu' => $dress['maxu'],
|
||||
'magic' => $dress['magic'],
|
||||
'nlevel' => $dress['nlevel'],
|
||||
'nalign' => $dress['nalign'],
|
||||
'dategoden' => $dress['dategoden'],
|
||||
'goden' => $dress['goden'],
|
||||
'otdel' => $dress['otdel'],//s
|
||||
'gmp' => $dress['gmp'],
|
||||
'gmeshok' => $dress['gmeshok'],
|
||||
'encicl' => $dress['encicl'],//s
|
||||
'artefact' => $dress['artefact'],
|
||||
'koll' => $dress['koll']
|
||||
];
|
||||
|
||||
for ($k = 1; $k <= $_GET['count']; $k++) {
|
||||
if (mysql_query("INSERT INTO `inventory` (`prototype`,`owner`,`name`,`type`,`massa`,`cost`,`img`,`maxdur`,`isrep`,`gsila`,`glovk`,`ginta`,`gintel`,`ghp`,`gnoj`,`gtopor`,`gdubina`,`gmech`,`gfire`,`gwater`,`gair`,`gearth`,`glight`,`ggray`,`gdark`,`needident`,`nsila`,`nlovk`,`ninta`,`nintel`,`nmudra`,`nvinos`,`nnoj`,`ntopor`,`ndubina`,`nmech`,`nfire`,`nwater`,`nair`,`nearth`,`nlight`,`ngray`,`ndark`,`mfkrit`,`mfakrit`,`mfuvorot`,`mfauvorot`,`bron1`,`bron2`,`bron3`,`bron4`,`maxu`,`minu`,`magic`,`nlevel`,`nalign`,`dategoden`,`goden`,`otdel`,`gmp`,`gmeshok`,`encicl`,`artefact`,`koll`) VALUES ('{$dress['id']}','{$user['id']}','{$dress['name']}','{$dress['type']}',{$dress['massa']},{$dress['cost']},'{$dress['img']}',{$dress['maxdur']},{$dress['isrep']},'{$dress['gsila']}','{$dress['glovk']}','{$dress['ginta']}','{$dress['gintel']}','{$dress['ghp']}','{$dress['gnoj']}','{$dress['gtopor']}','{$dress['gdubina']}','{$dress['gmech']}','{$dress['gfire']}','{$dress['gwater']}','{$dress['gair']}','{$dress['gearth']}','{$dress['glight']}','{$dress['ggray']}','{$dress['gdark']}','{$dress['needident']}','{$dress['nsila']}','{$dress['nlovk']}','{$dress['ninta']}','{$dress['nintel']}','{$dress['nmudra']}','{$dress['nvinos']}','{$dress['nnoj']}','{$dress['ntopor']}','{$dress['ndubina']}','{$dress['nmech']}','{$dress['nfire']}','{$dress['nwater']}','{$dress['nair']}','{$dress['nearth']}','{$dress['nlight']}','{$dress['ngray']}','{$dress['ndark']}','{$dress['mfkrit']}','{$dress['mfakrit']}','{$dress['mfuvorot']}','{$dress['mfauvorot']}','{$dress['bron1']}','{$dress['bron2']}','{$dress['bron3']}','{$dress['bron4']}','{$dress['maxu']}','{$dress['minu']}','{$dress['magic']}','{$dress['nlevel']}','{$dress['nalign']}','" . (($dress['goden']) ? ($dress['goden'] * 24 * 60 * 60 + time()) : "") . "','{$dress['goden']}','{$dress['razdel']}','{$dress['gmp']}','{$dress['gmeshok']}','{$dress['encicl']}','{$dress['artefact']}','{$dress[koll]}')")) {
|
||||
$good = 1;
|
||||
} else {
|
||||
$good = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($good) {
|
||||
mysql_query("UPDATE `shop` SET `count` = (`count`-'" . (int)$_GET['count'] . "') WHERE `id` = '{$set}' LIMIT 1");
|
||||
echo "<font color=red><b>Вы купили {$_GET['count']} шт. \"{$dress['name']}\".</b></font>";
|
||||
$user['money'] -= (int)$_GET['count'] * $dress['cost'];
|
||||
mysql_query("UPDATE `users` set `money` = '" . $user['money'] . "' WHERE `id` = {$user['id']} LIMIT 1");
|
||||
$limit = (int)$_GET['count'];
|
||||
$invdb = mysql_query("SELECT `id` FROM `inventory` WHERE `name` = '" . $dress['name'] . "' ORDER BY `id` DESC LIMIT " . $limit . "");
|
||||
if ($limit == 1) {
|
||||
$dressinv = mysql_fetch_array($invdb);
|
||||
db::c()->query('INSERT INTO `inventory` SET ?A[?i,?i,"?s",?i,?i,?i,"?s",?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,"?s",?i,?i,"?s",?i,?i]', $newItem);
|
||||
db::c()->query('UPDATE `shop` SET `count` = `count` - ?i WHERE `id` =?i', $count, $set);
|
||||
echo "<b style='color: red'>Вы купили {$count} шт. \"{$dress['name']}\".</b>";
|
||||
$user['money'] -= $count * $dress['cost'];
|
||||
db::c()->query('UPDATE `users` set `money` = ?i WHERE `id` = ?i', $user['money'], $user['id']);
|
||||
$invdb = db::c()->query('SELECT `id` FROM `inventory` WHERE `name` = "?s" ORDER BY `id` DESC LIMIT ?i', $dress['name'], $count);
|
||||
if ($count == 1) {
|
||||
$dressinv = $invdb->fetch_assoc();
|
||||
$dressid = "cap" . $dressinv['id'];
|
||||
$dresscount = " ";
|
||||
} else {
|
||||
$dressid = "";
|
||||
while ($dressinv = mysql_fetch_array($invdb)) {
|
||||
while ($dressinv = $invdb->fetch_assoc()) {
|
||||
$dressid .= "cap" . $dressinv['id'] . ",";
|
||||
}
|
||||
$dresscount = "(x" . $_GET['count'] . ") ";
|
||||
$dresscount = "(x" . $count . ") ";
|
||||
}
|
||||
$allcost = (int)$_GET['count'] * $dress['cost'];
|
||||
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"" . $user['login'] . "\" купил товар : \"" . $dress['name'] . "\" " . $dresscount . " id:(" . $dressid . ") [0/" . $dress['maxdur'] . "] за " . $allcost . " кр.', '1', '" . time() . "')");
|
||||
$allcost = $count * $dress['cost'];
|
||||
$deloText = "\"" . $user['login'] . "\" купил товар : \"" . $dress['name'] . "\" " . $dresscount . " id:(" . $dressid . ") [0/" . $dress['maxdur'] . "] за " . $allcost . " кр.";
|
||||
db::c()->query('INSERT INTO `delo` (`pers`, `text`, `type`, `date`) VALUES (?i, "?s", 1, ?i', $user['id'], $deloText, time());
|
||||
}
|
||||
|
||||
} else {
|
||||
echo "<font color=red><b>Недостаточно денег или нет вещей в наличии.</b></font>";
|
||||
echo "<b style='color: red;'>Недостаточно денег или нет вещей в наличии.</b>";
|
||||
}
|
||||
}
|
||||
$itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0', $user['id'])->fetch_assoc();
|
||||
|
||||
$shopItemType = empty($_POST['sale']) ?: $_POST['sale'];
|
||||
$shopItemTypeNumber = empty($_GET['otdel']) ?: $_GET['otdel'];
|
||||
switch ($shopItemTypeNumber) {
|
||||
default:
|
||||
$shopItemType = "Оружие: кастеты,ножи";
|
||||
$_GET['otdel'] = 1;
|
||||
break;
|
||||
case 1:
|
||||
$shopItemType = "Оружие: кастеты,ножи";
|
||||
break;
|
||||
case 11:
|
||||
$shopItemType = "Оружие: топоры";
|
||||
break;
|
||||
case 12:
|
||||
$shopItemType = "Оружие: дубины,булавы";
|
||||
break;
|
||||
case 13:
|
||||
$shopItemType = "Оружие: мечи";
|
||||
break;
|
||||
case 14:
|
||||
$shopItemType = "Оружие: луки и арбалеты";
|
||||
break;
|
||||
case 2:
|
||||
$shopItemType = "Одежда: сапоги";
|
||||
break;
|
||||
case 21:
|
||||
$shopItemType = "Одежда: перчатки";
|
||||
break;
|
||||
case 22:
|
||||
$shopItemType = "Одежда: легкая броня";
|
||||
break;
|
||||
case 23:
|
||||
$shopItemType = "Одежда: тяжелая броня";
|
||||
break;
|
||||
case 24:
|
||||
$shopItemType = "Одежда: шлемы";
|
||||
break;
|
||||
case 3:
|
||||
$shopItemType = "Щиты";
|
||||
break;
|
||||
case 4:
|
||||
$shopItemType = "Ювелирные товары: серьги";
|
||||
break;
|
||||
case 41:
|
||||
$shopItemType = "Ювелирные товары: ожерелья";
|
||||
break;
|
||||
case 42:
|
||||
$shopItemType = "Ювелирные товары: кольца";
|
||||
break;
|
||||
case 5:
|
||||
$shopItemType = "Заклинания: нейтральные";
|
||||
break;
|
||||
case 51:
|
||||
$shopItemType = "Заклинания: боевые и защитные";
|
||||
break;
|
||||
case 6:
|
||||
$shopItemType = "Амуниция";
|
||||
break;
|
||||
case 52:
|
||||
$shopItemType = "Руны";
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@ -154,71 +261,8 @@ $itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE
|
||||
<!--Магазин-->
|
||||
<TABLE border=0 width=100% cellspacing="0" cellpadding="0" bgcolor="#A5A5A5">
|
||||
<TR>
|
||||
<TD align=center>Отдел "<?php
|
||||
if ($_POST['sale']) {
|
||||
echo "Скупка";
|
||||
} else
|
||||
switch ($_GET['otdel']) {
|
||||
default:
|
||||
echo "Оружие: кастеты,ножи";
|
||||
$_GET['otdel'] = 1;
|
||||
break;
|
||||
case 1:
|
||||
echo "Оружие: кастеты,ножи";
|
||||
break;
|
||||
case 11:
|
||||
echo "Оружие: топоры";
|
||||
break;
|
||||
case 12:
|
||||
echo "Оружие: дубины,булавы";
|
||||
break;
|
||||
case 13:
|
||||
echo "Оружие: мечи";
|
||||
break;
|
||||
case 14:
|
||||
echo "Оружие: луки и арбалеты";
|
||||
break;
|
||||
case 2:
|
||||
echo "Одежда: сапоги";
|
||||
break;
|
||||
case 21:
|
||||
echo "Одежда: перчатки";
|
||||
break;
|
||||
case 22:
|
||||
echo "Одежда: легкая броня";
|
||||
break;
|
||||
case 23:
|
||||
echo "Одежда: тяжелая броня";
|
||||
break;
|
||||
case 24:
|
||||
echo "Одежда: шлемы";
|
||||
break;
|
||||
case 3:
|
||||
echo "Щиты";
|
||||
break;
|
||||
case 4:
|
||||
echo "Ювелирные товары: серьги";
|
||||
break;
|
||||
case 41:
|
||||
echo "Ювелирные товары: ожерелья";
|
||||
break;
|
||||
case 42:
|
||||
echo "Ювелирные товары: кольца";
|
||||
break;
|
||||
case 5:
|
||||
echo "Заклинания: нейтральные";
|
||||
break;
|
||||
case 51:
|
||||
echo "Заклинания: боевые и защитные";
|
||||
break;
|
||||
case 6:
|
||||
echo "Амуниция";
|
||||
break;
|
||||
case 52:
|
||||
echo "Руны";
|
||||
break;
|
||||
}
|
||||
?>"
|
||||
<TD align=center>
|
||||
Отдел "<?= $shopItemType ?>"
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
@ -226,8 +270,9 @@ $itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE
|
||||
<TABLE BORDER=0 WIDTH=100% CELLSPACING="1" CELLPADDING="2" BGCOLOR="#A5A5A5">
|
||||
<?php
|
||||
if ($_REQUEST['sale']) {
|
||||
$data = mysql_query("SELECT * FROM `inventory` WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `setsale` = 0 AND `cost` > 0 AND `present` = '' AND `tradesale` = 0 AND `podzem` = 0 ORDER BY `update` DESC");
|
||||
while ($row = mysql_fetch_array($data)) {
|
||||
// Выбираем всё потому что эту выборку потом использует showitem();
|
||||
$data = db::c()->query('SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0 AND `cost` > 0 AND `present` = "?s" AND `tradesale` = 0 AND `podzem` = 0 ORDER BY `update` DESC', $user['id'], null);
|
||||
while ($row = $data->fetch_assoc()) {
|
||||
$row['count'] = 1;
|
||||
if ($i == 0) {
|
||||
$i = 1;
|
||||
@ -236,7 +281,7 @@ $itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE
|
||||
$i = 0;
|
||||
$color = '#D5D5D5';
|
||||
}
|
||||
echo "<tr bgcolor={$color}><td align=center style='width: 150px;'><img src=\"i/sh/{$row['img']}\" border=0 />";
|
||||
|
||||
$price = $row['cost'] * 1;
|
||||
if ($data['koll']) {
|
||||
$price *= $data['koll'];
|
||||
@ -253,28 +298,22 @@ $itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE
|
||||
$allcost = round(($allcost * $per), 2);
|
||||
}
|
||||
?>
|
||||
<br/><a href="shop.php?sed=<?= $row['id'] ?>&sid=&sale=1">продать
|
||||
за <?= $allcost ?></a>
|
||||
</td>
|
||||
<tr bgcolor="<?= $color ?>">
|
||||
<td align=center style='width: 150px;'>
|
||||
<img src="i/sh/<?= $row['img'] ?>" border=0>
|
||||
<br><a href="shop.php?sellitem=<?= $row['id'] ?>&sid=&sale=1">продать
|
||||
за <?= $allcost ?></a>
|
||||
</td>
|
||||
<td valign=top class="row">
|
||||
<?php showitem($row); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
echo "<td valign=top class=\"row\">";
|
||||
showitem($row);
|
||||
echo "</TD></TR>";
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!isset($_SESSION['type_sort'])) {
|
||||
$_SESSION['type_sort'] = 1;
|
||||
$where = '';
|
||||
} elseif ($_SESSION['type_sort'] == 1) {
|
||||
$where = '';
|
||||
} elseif ($_SESSION['type_sort'] == 2) {
|
||||
$where = ' AND `nlevel` = "' . $user['level'] . '"';
|
||||
}
|
||||
|
||||
$arr_sort = array(11, 13, 12); #$item
|
||||
$data = mysql_query("SELECT `id`, `img`, `name` FROM `shop` WHERE `count` > 0 AND `razdel` = '{$_GET['otdel']}' $where ORDER by `nlevel` ASC, `id` ASC");
|
||||
while ($row = mysql_fetch_array($data)) {
|
||||
$data = db::c()->query('SELECT `id`, `img`, `name` FROM `shop` WHERE `count` > 0 AND `razdel` = ?i ORDER by `nlevel` ASC, `id` ASC', $shopItemTypeNumber);
|
||||
while ($row = $data->fetch_assoc()) {
|
||||
if ($i == 0) {
|
||||
$i = 1;
|
||||
$color = '#C7C7C7';
|
||||
@ -282,18 +321,21 @@ $itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE
|
||||
$i = 0;
|
||||
$color = '#D5D5D5';
|
||||
}
|
||||
echo "<TR bgcolor={$color}><TD align=center style='width:150px'><IMG SRC=\"i/sh/{$row['img']}\" BORDER=0>";
|
||||
?>
|
||||
<BR>
|
||||
<A HREF="shop.php?otdel=<?= $_GET['otdel'] ?>&set=<?= $row['id'] ?>&sid=<? echo rand(10000, 1000000); ?>">купить</A>
|
||||
<IMG SRC="i/up.gif" WIDTH=11 HEIGHT=11 BORDER=0 ALT="Купить несколько штук"
|
||||
style="cursor:hand"
|
||||
onclick="addCountItems('<?= $row['id'] ?>', '<?= $row['name'] ?>')"></TD>
|
||||
<tr bgcolor="<?= $color ?>">
|
||||
<td align=center style='width: 150px;'>
|
||||
<img src="i/sh/<?= $row['img'] ?>" border=0>
|
||||
<br>
|
||||
<a href="shop.php?otdel=<?= $_GET['otdel'] ?>&set=<?= $row['id'] ?>&rnd=<?= mt_rand() ?>">купить</a>
|
||||
<IMG SRC="i/up.gif" WIDTH=11 HEIGHT=11 BORDER=0 ALT="Купить несколько штук"
|
||||
style="cursor:hand"
|
||||
onclick="addCountItems('<?= $row['id'] ?>', '<?= $row['name'] ?>')">
|
||||
</td>
|
||||
<td valign=top>
|
||||
<?= show_shop_items($row['id']) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
echo "<TD valign=top>";
|
||||
echo show_shop_items($row['id']);
|
||||
//showitem ($row);
|
||||
echo "</TD></TR>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user