<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/adm_check.php';
include_once '../sys/inc/user.php';
adm_check();
$set['title']='Рассылка монет';
include_once '../sys/inc/thead.php';
title();
aut();
err();


$action = (isset($_GET['action'])) ? htmlspecialchars($_GET['action']) : null;



switch ($action){

default:

if ($user['level']==10){
echo "<div class='vipsss'>\n";
echo "<form action='user_balls.php?action=change' method='post'>";
echo "<input name='num' type='text' value=''/>Сколько монет хотите добавить<br/>";
echo "<input type='submit' value='Отправить'/>";
echo "</form>";
echo "</div>\n";
break;}


case 'change':
$num=(int)$_POST['num'];
mysql_query("UPDATE `user` SET `balls` = `balls` + '$num'");
if ($user['level']==10){
echo "<div class='aut'>\n";
echo "Вы успешно отправили пользователям по $num монет!</br>";
echo "</div>\n";
if (user_access('adm_panel_show')){
echo "<div class='foot1'>\n";
echo "<a href='/adm_panel/'>Панель управления</a><br />\n";
echo "</div>\n";
}
}
break;

};


include_once '../sys/inc/tfoot.php';
?>