input class for auto checks

This commit is contained in:
lopar 2018-03-30 22:28:22 +03:00
parent c5b4a369c3
commit b12d9702a9
3 changed files with 20 additions and 1 deletions

17
classes/input.php Normal file
View 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;
}
}

View File

@ -2581,6 +2581,7 @@ function showpersout($pas = 0)
<?
if ($user['klan']) {
echo "Клан: " . ClanImage($user['klan']) . "<BR></small>";
}
} else {
?>

View File

@ -2137,7 +2137,8 @@ if (isset($_GET['edit'])) {
<div id="mZeInventory">
<?php endif; ?>
<?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">
<tr>