Чистка устаревшего.
This commit is contained in:
parent
a5ca490d92
commit
fdcc2eed4e
95
main.php
95
main.php
@ -91,8 +91,8 @@ function unstack($it_id, $it_count)
|
||||
}
|
||||
mysql_query("INSERT INTO `inventory` (`name`, `upgrade`, `modif`, `podgon`, `duration`, `maxdur`, `cost`, `bcost`, `point`, `nlevel`, `nsila`, `nlovk`, `ninta`, `nvinos`, `nintel`, `nmudra`, `nnoj`, `ntopor`, `ndubina`, `nmech`, `nalign`, `minu`, `maxu`, `gsila`, `glovk`, `ginta`, `gintel`, `ghp`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot`, `gnoj`, `gtopor`, `gdubina`, `gmech`, `img`, `text`, `owner`, `dressed`, `bron1`, `bron2`, `bron3`, `bron4`, `dategoden`, `magic`, `type`, `present`, `sharped`, `massa`, `goden`, `needident`, `nfire`, `nwater`, `nair`, `nearth`, `nlight`, `ngray`, `ndark`, `gfire`, `gwater`, `gair`, `gearth`, `glight`, `ggray`, `gdark`, `free_bron`, `free_stat`, `free_mf`, `letter`, `isrep`, `update`, `setsale`, `prototype`, `otdel`, `bs`, `gmp`, `includemagic`, `includemagicdex`, `includemagicmax`, `includemagicname`, `includemagicuses`, `includemagiccost`, `gmeshok`, `tradesale`, `podzem`, `x_mis`, `artefact`, `destinyinv`, `encicl`, `foronetrip`, `koll`) VALUES ('" . $dress['name'] . "', '" . $dress['upgrade'] . "', '" . $dress['modif'] . "', '" . $dress['podgon'] . "', '" . $dress['duration'] . "', '" . $dress['maxdur'] . "', '" . ($dress['cost'] / $dress['koll'] * $it_count) . "', '" . ($dress['bcost'] / $dress['koll'] * $it_count) . "', '" . ($dress['point'] / $dress['koll'] * $it_count) . "', '" . $dress['nlevel'] . "', '" . $dress['nsila'] . "', '" . $dress['nlovk'] . "', '" . $dress['ninta'] . "', '" . $dress['nvinos'] . "', '" . $dress['nintel'] . "', '" . $dress['nmudra'] . "', '" . $dress['nnoj'] . "', '" . $dress['ntopor'] . "', '" . $dress['ndubina'] . "', '" . $dress['nmech'] . "', '" . $dress['nalign'] . "', '" . $dress['minu'] . "', '" . $dress['maxu'] . "', '" . $dress['gsila'] . "', '" . $dress['glovk'] . "', '" . $dress['ginta'] . "', '" . $dress['gintel'] . "', '" . $dress['ghp'] . "', '" . $dress['mfkrit'] . "', '" . $dress['mfakrit'] . "', '" . $dress['mfuvorot'] . "', '" . $dress['mfauvorot'] . "', '" . $dress['gnoj'] . "', '" . $dress['gtopor'] . "', '" . $dress['gdubina'] . "', '" . $dress['gmech'] . "', '" . $dress['img'] . "', '" . $dress['text'] . "', '" . $dress['owner'] . "', '" . $dress['dressed'] . "', '" . $dress['bron1'] . "', '" . $dress['bron2'] . "', '" . $dress['bron3'] . "', '" . $dress['bron4'] . "', '" . $dress['dategoden'] . "', '" . $dress['magic'] . "', '" . $dress['type'] . "', '" . $dress['present'] . "', '" . $dress['sharped'] . "', '" . ($dress['massa'] / $dress['koll'] * $it_count) . "', '" . $dress['goden'] . "', '" . $dress['needident'] . "', '" . $dress['nfire'] . "', '" . $dress['nwater'] . "', '" . $dress['nair'] . "', '" . $dress['nearth'] . "', '" . $dress['nlight'] . "', '" . $dress['ngray'] . "', '" . $dress['ndark'] . "', '" . $dress['gfire'] . "', '" . $dress['gwater'] . "', '" . $dress['gair'] . "', '" . $dress['gearth'] . "', '" . $dress['glight'] . "', '" . $dress['ggray'] . "', '" . $dress['gdark'] . "', '" . $dress['free_bron'] . "', '" . $dress['free_bron'] . "', '" . $dress['free_mf'] . "', '" . $dress['letter'] . "', '" . $dress['isrep'] . "', '" . $dress['update'] . "', '" . $dress['setsale'] . "', '" . $dress['prototype'] . "', '" . $dress['otdel'] . "', '" . $dress['bs'] . "', '" . $dress['gmp'] . "', '" . $dress['includemagic'] . "', '" . $dress['includemagicdex'] . "', '" . $dress['includemagicmax'] . "', '" . $dress['includemagicname'] . "', '" . $dress['ggrincludemagicusesay'] . "', '" . $dress['includemagiccost'] . "', '" . ($dress['gmeshok'] / $dress['koll'] * $it_count) . "', '" . $dress['tradesale'] . "', '" . $dress['podzem'] . "', '" . $dress['x_mis'] . "', '" . $dress['artefact'] . "', '" . $dress['destinyinv'] . "', '" . $dress['encicl'] . "', '" . $dress['foronetrip'] . "', '" . $it_count . "')");
|
||||
return mysql_insert_id();
|
||||
}
|
||||
}
|
||||
} else return false;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
function del_efs($uid, $id, $type)
|
||||
@ -140,19 +140,13 @@ function countmf()
|
||||
}
|
||||
}
|
||||
|
||||
$zo = db::c()->query('SELECT `id` FROM `effects` WHERE `type` = 201 AND `owner` = ?i', $user['id'])->fetch_row();
|
||||
$sokr = db::c()->query('SELECT `id` FROM `effects` WHERE `type` = 202 AND `owner` = ?i', $user['id'])->fetch_row();
|
||||
$zo = db::c()->query('SELECT 1 FROM `effects` WHERE `type` = 201 AND `owner` = ?i', $user['id'])->getNumRows();
|
||||
$sokr = db::c()->query('SELECT 1 FROM `effects` WHERE `type` = 202 AND `owner` = ?i', $user['id'])->getNumRows();
|
||||
|
||||
if (isset($sokr[0])) {
|
||||
$bmfud += 5;
|
||||
} else {
|
||||
$bmfud = 0;
|
||||
}
|
||||
if (isset($zo[0]) > 0) {
|
||||
$bmfbron += 25;
|
||||
} else {
|
||||
$bmfbron = 0;
|
||||
}
|
||||
$bmfud = $bmfbron = 0;
|
||||
|
||||
if (!empty($sokr)) $bmfud += 5;
|
||||
if (!empty($zo)) $bmfbron += 25;
|
||||
|
||||
$mf = [];
|
||||
|
||||
@ -277,7 +271,7 @@ function dressitem($id)
|
||||
if (db::c()->query('UPDATE `users` AS `u`, `inventory` AS `i` SET `u`.?f = ?i, `i`.`dressed` = 1, `u`.`sila` = `u`.`sila` + `i`.`gsila`, `u`.`lovk` = `u`.`lovk` + `i`.`glovk`, `u`.`inta` = `u`.`inta` + `i`.`ginta`, `u`.`intel` = `u`.`intel` + `i`.`gintel`, `u`.`maxhp` = `u`.`maxhp` + `i`.`ghp`, `u`.`noj` = `u`.`noj` + `i`.`gnoj`, `u`.`topor` = `u`.`topor` + `i`.`gtopor`, `u`.`dubina` = `u`.`dubina` + `i`.`gdubina`, `u`.`mec` = `u`.`mec` + `i`.`gmech`, `u`.`mfire` = `u`.`mfire` + `i`.`gfire`, `u`.`mwater` = `u`.`mwater` + `i`.`gwater`, `u`.`mair` = `u`.`mair` + `i`.`gair`, `u`.`mearth` = `u`.`mearth` + `i`.`gearth`, `u`.`mlight` = `u`.`mlight` + `i`.`glight`, `u`.`mgray` = `u`.`mgray` + `i`.`ggray`, `u`.`mdark` = `u`.`mdark` + `i`.`gdark`, `u`.`ubron1` = `u`.`ubron1` + `i`.`bron1`, `u`.`ubron2` = `u`.`ubron2` + `i`.`bron2`, `u`.`ubron3` = `u`.`ubron3` + `i`.`bron3`, `u`.`ubron4` = `u`.`ubron4` + `i`.`bron4`, `u`.`fkrit` = `u`.`fkrit` + `i`.`mfkrit`, `u`.`fakrit` = `u`.`fakrit` + `i`.`mfakrit`, `u`.`fuvorot` = `u`.`fuvorot` + `i`.`mfuvorot`, `u`.`fauvorot` = `u`.`fauvorot` + `i`.`mfauvorot`, `u`.`uminu` = `u`.`uminu` + `i`.`minu`, `u`.`umaxu` = `u`.`umaxu` + `i`.`maxu` WHERE `i`.`needident` = 0 AND `i`.`id` = ?i AND `i`.`dressed` = 0 AND `i`.owner = ?i AND (20 + `u`.`sila`) >= `i`.`nsila` AND (20 + `u`.`lovk`) >= `i`.`nlovk` AND (20 + `u`.`inta`) >= `i`.`ninta` AND `u`.`vinos` >= `i`.`nvinos` AND (20 + `u`.`intel`) >= `i`.`nintel` AND `u`.`mudra` >= `i`.`nmudra` AND `u`.`level` >= `i`.`nlevel` AND (("?s" OR (?i = `i`.`nalign`)) OR (`i`.`nalign` = 0)) AND `u`.`noj` >= `i`.`nnoj` AND `u`.`topor` >= `i`.`ntopor` AND `u`.`dubina` >= `i`.`ndubina` AND `u`.`mec` >= `i`.`nmech` AND `u`.`mfire` >= `i`.`nfire` AND `u`.`mwater` >= `i`.`nwater` AND `u`.`mair` >= `i`.`nair` AND `u`.`mearth` >= `i`.`nearth` AND `u`.`mlight` >= `i`.`nlight` AND `u`.`mgray` >= `i`.`ngray` AND `u`.`mdark` >= `i`.`ndark` AND `i`.`setsale` = 0 AND `u`.`id` = ?i', $slot1, $id, $id, $user['id'], $al, $user['align'], $user['id']))
|
||||
$user[$slot1] = $item['id'];
|
||||
return true;
|
||||
}
|
||||
} else return false;
|
||||
}
|
||||
|
||||
// Входим и выходим если можем.
|
||||
@ -314,6 +308,7 @@ if (isset($_GET['use'])) {
|
||||
* Отображение персонажа в main.php
|
||||
*
|
||||
* @param $id
|
||||
* @throws \Krugozor\Database\Mysql\Exception
|
||||
*/
|
||||
function showpersinv($id)
|
||||
{
|
||||
@ -470,6 +465,7 @@ function showpersinv($id)
|
||||
<TR>
|
||||
<TD><?php
|
||||
if ($user['bron'] > 0 || $user['rybax'] > 0 || $user['plaw'] > 0) {
|
||||
$d = $n = [];
|
||||
if ($user['plaw']) {
|
||||
$d = $user['plaw'];
|
||||
$n = 23;
|
||||
@ -701,28 +697,28 @@ if (input::post('setshadow')) {
|
||||
<table style="padding:5px; margin:auto;">
|
||||
<caption><b>Общие образы</b></caption>
|
||||
<tr>
|
||||
<td><a href="?edit=1&obraz=m1"><img src="i/shadow/m1.gif"></a></a></td>
|
||||
<td><a href="?edit=1&obraz=m2"><img src="i/shadow/m2.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m3"><img src="i/shadow/m3.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m4"><img src="i/shadow/m4.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m5"><img src="i/shadow/m5.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m6"><img src="i/shadow/m6.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m7"><img src="i/shadow/m7.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m8"><img src="i/shadow/m8.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m9"><img src="i/shadow/m9.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m10"><img src="i/shadow/m10.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m1"><img alt="m01" src="i/shadow/m1.gif"></a></a></td>
|
||||
<td><a href="?edit=1&obraz=m2"><img alt="m02" src="i/shadow/m2.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m3"><img alt="m03" src="i/shadow/m3.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m4"><img alt="m04" src="i/shadow/m4.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m5"><img alt="m05" src="i/shadow/m5.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m6"><img alt="m06" src="i/shadow/m6.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m7"><img alt="m07" src="i/shadow/m7.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m8"><img alt="m08" src="i/shadow/m8.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m9"><img alt="m09" src="i/shadow/m9.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=m10"><img alt="m10" src="i/shadow/m10.gif"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="?edit=1&obraz=f1"><img src="i/shadow/f1.gif"></a></a></td>
|
||||
<td><a href="?edit=1&obraz=f2"><img src="i/shadow/f2.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f3"><img src="i/shadow/f3.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f4"><img src="i/shadow/f4.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f5"><img src="i/shadow/f5.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f6"><img src="i/shadow/f6.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f7"><img src="i/shadow/f7.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f8"><img src="i/shadow/f8.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f9"><img src="i/shadow/f9.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f10"><img src="i/shadow/f10.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f1"><img alt="f01" src="i/shadow/f1.gif"></a></a></td>
|
||||
<td><a href="?edit=1&obraz=f2"><img alt="f02" src="i/shadow/f2.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f3"><img alt="f03" src="i/shadow/f3.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f4"><img alt="f04" src="i/shadow/f4.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f5"><img alt="f05" src="i/shadow/f5.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f6"><img alt="f06" src="i/shadow/f6.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f7"><img alt="f07" src="i/shadow/f7.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f8"><img alt="f08" src="i/shadow/f8.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f9"><img alt="f09" src="i/shadow/f9.gif"></a></td>
|
||||
<td><a href="?edit=1&obraz=f10"><img alt="f10" src="i/shadow/f10.gif"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
@ -730,35 +726,6 @@ if (input::post('setshadow')) {
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
//
|
||||
if (input::post('setshadowclan')) {
|
||||
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<meta charset="utf-8">
|
||||
</HEAD>
|
||||
<body>
|
||||
<table width=100%>
|
||||
<tr>
|
||||
<td><h3>Выбрать образ персонажа</h3></td>
|
||||
<td align=right><INPUT TYPE=button value="Вернуться"
|
||||
onClick="location.href='main.php?edit=<?= mt_rand() ?>';"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<TABLE style="padding:5px; margin: auto;">
|
||||
<caption><b>Клановые образы</b></caption>
|
||||
<tr>
|
||||
<td><a href="?edit=1&obraz=40"><img src="i/shadow/<?= $shadow['mshadow'] ?>"></a></td>
|
||||
<td><a href="?edit=1&obraz=41"><img src="i/shadow/<?= $shadow['wshadow'] ?>"></a></td>
|
||||
</tr>
|
||||
</TABLE>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
if (input::get('edit')) {
|
||||
|
Loading…
Reference in New Issue
Block a user