tests
This commit is contained in:
parent
b3df90372a
commit
eb6a28cedf
@ -18,9 +18,13 @@ if ($user['battle'] != 0) {
|
||||
|
||||
$get = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
|
||||
|
||||
if (isset($_GET['kredit'])) $itemCost = checkIntInRange($_GET['kredit']);
|
||||
if (isset($_GET['n'])) $itemId = checkIntInRange($_GET['n']);
|
||||
if (isset($_GET['back'])) $returningItemId = checkIntInRange($_GET['back']);
|
||||
$itemCost = (int)filter_input(INPUT_GET, 'kredit', FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
|
||||
$itemId = (int)filter_input(INPUT_GET, 'n', FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
|
||||
$returningItemId = (int)filter_input(INPUT_GET, 'back', FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
|
||||
$puttingItemPrice = (int)filter_input(INPUT_POST, 'cost', FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
|
||||
//if (isset($_GET['kredit'])) $itemCost = checkIntInRange($_GET['kredit']);
|
||||
//if (isset($_GET['n'])) $itemId = checkIntInRange($_GET['n']);
|
||||
//if (isset($_GET['back'])) $returningItemId = checkIntInRange($_GET['back']);
|
||||
|
||||
if ($itemCost && $itemId) {
|
||||
$commission = ceil($itemCost / 10); # 10% от суммы с округлением вверх.
|
||||
@ -46,7 +50,7 @@ if ($returningItemId) {
|
||||
} else $status = "Предмет не найден на полках магазина!";
|
||||
}
|
||||
|
||||
if (isset($_POST['puttomarket'])) echo "<h1>WHOA!</h1>";
|
||||
if (isset($_POST['puttomarket']) AND $puttingItemPrice) echo "<h1>WHOA!</h1>";
|
||||
|
||||
if ($_GET['set']) {
|
||||
|
||||
@ -254,7 +258,6 @@ switch ($shopCategoryTypeNumber) {
|
||||
<input placeholder="Цена" name="cost">
|
||||
<br><input type="submit" name="puttomarket" value="Cдать в магазин">
|
||||
</form>
|
||||
<!-- <button onclick="sale(1, '--><?//= $iteminfo['name'] ?>//', '<?//= $iteminfo['id'] ?>//', '<?//= $iteminfo['cost'] ?>//')">Cдать в магазин</button>
|
||||
<?php
|
||||
echo "</td>";
|
||||
echo "<td style='vertical-align: top;'>";
|
||||
|
Loading…
Reference in New Issue
Block a user