<?
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/user.php';
user_access('adm_panel_show',null,'/index.php?'.SID);





if (isset($_SESSION['adm_auth']) && $_SESSION['adm_auth']>$time || isset($_SESSION['captcha']) && isset($_POST['chislo']) && $_SESSION['captcha']==$_POST['chislo'])
{
$_SESSION['adm_auth']=$time+600;

if (isset($_GET['go']) && $_GET['go']!=null)
{
header('Location: '.base64_decode($_GET['go']));exit;
}
$set['title'] = 'Танки -  Админка';
include_once '../sys/inc/thead.php';
title();
err();
aut();
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
include_once 'function.php';


echo '<div class="bot">
  <a class="simple-but border" href="new.tank.php">
    <span>
      <span>Добавить танк</span>
    </span>
  </a>
  <a class="simple-but border" href="new.shop.php">
    <span>
      <span>Добавить товар в магазин</span>
    </span>
  </a>
  <a class="simple-but border"  href="edit.rules.php">
    <span>
      <span>Редактировать правила общения</span>
    </span>
  </a>
</div>';
}
else
{
$set['title']='Защита от автоматических изменений';
include_once '../sys/inc/thead.php';
title();
err();
aut();
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
include_once 'function.php';
echo '
<div class="trnt-block mb6">
  <div class="wrap1">
    <div class="wrap2">
      <div class="wrap3">
        <div class="wrap4">
          <div class="wrap5">
            <div class="wrap6">
              <div class="wrap7">
                <div class="wrap8">
                  <div class="wrap-content-mini">';
				 echo "<form method='post' action='?gen=$passgen&amp;".(isset($_GET['go'])?"go=$_GET[go]":null)."'>\n";
                  echo "<img src='/captcha.php?$passgen&amp;SESS=$sess' width='100' height='30' alt='Проверочное число' /><br />\nВведите число с картинки:<br />\n<input name='chislo' size='5' maxlength='5' value='' type='text' /><br/>\n";
                  echo "<input type='submit' value='Далее' />\n";
                  echo "</form>\n";
                  echo '</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>';
}
include_once '../sys/inc/tfoot.php';
?>