<?


if(mysql_result(mysql_query("SELECT COUNT(*) FROM `tanks` WHERE `id_u`='".$user['id']."'"),0)==0) {
mysql_query("INSERT INTO `tanks`(`id_u`) VALUES('".$user['id']."')");
echo '<div class="trnt-block">
  <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">
                    <div class="mt5 mb5 small bold gray1 cntr">Добро пожаловать в игру World Of Tanks Mobile<br/>Вы успешно сохранены под ником '.$user['nick'].'</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>';
}
  $tanks_code = mysql_fetch_array(mysql_query("SELECT * FROM `tanks` WHERE `id_u`='".$user['id']."'"));
   $tank_lin = mysql_fetch_array(mysql_query("SELECT * FROM `tanks_magazin` WHERE `id`='".$tanks_code['tank']."'"));
   $all_tankist = mysql_result(mysql_query("SELECT COUNT(*) FROM `tanks` WHERE `id_u`!='".$user['id']."'"),0);

   if($user['id'] == false) {
   
   $err[] = 'Чтобы играть вам необходимо авторизоваться';
   err();
   include_once '../sys/inc/tfoot.php';
   exit;
   }


echo '  <div class="round-panel">
    <div class="wrp1">
      <div class="wrp2">
        <table class="count bold">
          <tbody>
            <tr>
              <td class="small lh1 bgn">              
			  <img title="Опыт" alt="Опыт" src="images/icons/exp.png">
                 '.$tanks_code['experience'].'

              </td>
              <td class="small lh1 pl12">
                <img title="Золото" alt="Золото" src="images/icons/gold.png">
                 '.$tanks_code['zolota'].'

              </td>
              <td class="small lh1 pl12">
                <img title="Серебро" alt="Серебро" src="images/icons/silver.png">
                '.$tanks_code['serebro'].'

              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div><table>
    <tbody>
      <tr>
        <td style="width:33%;padding-right:4px;">
          <div style="position:relative;">
            <a class="simple-but border gray mb1" href="angar.php">
              <span>
                <span>Ангар</span>
              </span>
            </a>
          </div>
        </td>
        <td style="width:33%;padding:0 4px;">
          <div style="position:relative;">
            <a class="simple-but border mb1 red" href="battle.php">
              <span>
                <span>В бой!</span>
              </span>
            </a>
          </div>
        </td>
        <td style="width:33%;padding-left:4px;">
          <div style="position:relative;">
            <a class="simple-but gray border mb1" href="buildings.php">
              <span>
                <span>База</span>
              </span>
            </a>
          </div>
        </td>
      </tr>
    </tbody>
  </table>';
  
?>