else if (!$Panel->b_checkAdmin($_SESSION['admin_login'], $_SESSION['admin_password']) && (($path !== "/admin/auth") && ($path !== "/admin/auth/"))) {
<form method=post action="index.php">
<input type=hidden name=action value='add'>
<input type=hidden name=code value='<?php echo $row["code"]; ?>'>
<input type=text name="price">
<input type=text name="name">
</form>
if ($_GET['action'] == "add")
сделайте if ($_POST['action'] == "add")
. SELECT (SELECT color FROM pin WHERE id='$pin1') AS pin1, (SELECT color FROM pin WHERE id='$pin2') AS pin2, (SELECT color FROM pin WHERE id='$pin3') AS pin3, (SELECT color FROM pin WHERE id='$pin4') AS pin4
global $conn;
. Конечно возможен и третий способ, include("db_connection.php");
внутрий функции, но это уже махровый быдлокодеризм и тупая растрата свободных подключений к MySQL. get_stock()
, через var_dump($ss);
.function get_stock($id) {
return "<div class='{$id}'></div>";
}
foreach ($config['servers'] as &$server) {
if (!isset($response[$server['host']. ':' .$server['port']])) continue;
$rData = $response[$server['host']. ':' .$server['port']];
if (isset($rData['status']) AND $rData['status'] === true) {
$server['onlinePlayers'] = $rData['players']['online'];
$server['totalPlayers'] = $rData['players']['max'];
} else {
$server['onlinePlayers'] = 0;
$server['totalPlayers'] = 0;
}
}