input class for auto checks
This commit is contained in:
parent
c5b4a369c3
commit
b12d9702a9
17
classes/input.php
Normal file
17
classes/input.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2018.
|
||||||
|
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||||||
|
* Project name: Battles-Game
|
||||||
|
*/
|
||||||
|
|
||||||
|
class input
|
||||||
|
{
|
||||||
|
public static function get($name) {
|
||||||
|
return isset($_GET[$name]) ? $_GET[$name] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function post($name) {
|
||||||
|
return isset($_POST[$name]) ? $_POST[$name] : null;
|
||||||
|
}
|
||||||
|
}
|
@ -2581,6 +2581,7 @@ function showpersout($pas = 0)
|
|||||||
<?
|
<?
|
||||||
if ($user['klan']) {
|
if ($user['klan']) {
|
||||||
echo "Клан: " . ClanImage($user['klan']) . "<BR></small>";
|
echo "Клан: " . ClanImage($user['klan']) . "<BR></small>";
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
|
3
main.php
3
main.php
@ -2137,7 +2137,8 @@ if (isset($_GET['edit'])) {
|
|||||||
<div id="mZeInventory">
|
<div id="mZeInventory">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
<?php
|
||||||
if (in_array($_GET['razdel'], [0,1,2,3,4,5])) $_SESSION['razdel'] = $_GET['razdel'];
|
|
||||||
|
if (in_array(input::get('razdel'), [0,1,2,3,4,5])) $_SESSION['razdel'] = input::get('razdel');
|
||||||
?>
|
?>
|
||||||
<table border=0 width=100% cellspacing="0" cellpadding="0" bgcolor="#A5A5A5">
|
<table border=0 width=100% cellspacing="0" cellpadding="0" bgcolor="#A5A5A5">
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user