Вход Регистрация
Файл: html/clan/totem.php
Строк: 65
<?php
require_once '../system/func.php';
if (
$clan = $mc->query("SELECT * FROM `clan` WHERE `id`='" . $user['id_clan'] . "'")->fetch_array(MYSQLI_ASSOC)) {
    
$arrTotemStat = [
        [
"I", "", "1", "", "", "", "", "10", "0"],
        [
"II", "", "1", "", "", "", "1", "15", "500"],
        [
"III", "1", "2", "", "", "", "2", "25", "1000"],
        [
"IV", "1", "2", "", "", "1", "3", "35", "1500"],
        [
"V", "2", "3", "2", "", "2", "4", "50", "2000"],
        [
"VI", "2", "4", "5", "", "2", "4", "70", "2500"],
        [
"VII", "3", "5", "5", "", "3", "5", "95", "3000"],
        [
"VIII", "3", "6", "5", "1", "3", "5", "125", "4000"],
        [
"IX", "4", "7", "5", "2", "4", "6", "165", "5000"],
        [
"X", "5", "8", "5", "3", "4", "6", "210", "6000"],
        [
"XI", "6", "9", "5", "4", "4", "7", "260", "7000"],
        [
"XII", "7", "10", "10", "5", "5", "10", "315", "8000"],
    ];
    if(isset(
$_GET['kupit'])){
        if(
$user['des'] == 3 && $clan['totem'] != 11){
            if(
$clan['gold'] >= $arrTotemStat[$clan['totem']+1][8]){
                if(
$mc->query("UPDATE `clan` SET `totem` = `totem`+ '1',`totemtec` = `totemtec` + '1',`gold` = `gold` - '".$arrTotemStat[$clan['totem']+1][8]."' WHERE `id` = '".$user['id_clan']."'")){
                    
?><script>showContent("../main.php?msg=Успешно куплен тотем")</script><?php
              
}
        }else{
          
message("Недостаточно средств в казне");
        }
      }else{
          
message("недостаточно прав для покупки или тотем равен 11");
      }
    }
    
?>
    <center>-Тотем-</center>
    <hr>
    <table style="margin: auto;width: 100%;">
        <tr>
            <td style="width: 10%;text-align: center;">
                Ур.
            </td>
            <td style="width: 10%;text-align: center;">
                <img src="/images/icons/toch.png" width="16" alt="*">
            </td>
            <td style="width: 10%;text-align: center;">
                <img src="/images/icons/power.jpg" width="16" alt="*">
            </td>
            <td style="width: 10%;text-align: center;">
                <img src="/images/icons/shit.png" width="16" alt="*">
            </td>
            <td style="width: 10%;text-align: center;">
                <img src="/images/icons/kd.png" width="16" alt="*">
            </td>
            <td style="width: 10%;text-align: center;">
                <img src="/images/icons/img235.png" width="16" alt="*">
            </td>
            <td style="width: 10%;text-align: center;">
                <img src="/images/icons/bron.png" width="16" alt="*">
            </td>
            <td style="width: 10%;text-align: center;">
                <img src="/images/icons/hp.png" width="18" alt="*">
            </td>
            <td style="width: 20%;text-align: center;">
                Рейтинг
            </td>
        </tr>   
        <?php
        
for ($i = 0; $i < count($arrTotemStat); $i++) {
            
?>
            <?php if ($user['totem'] == $i) { ?>
                <tr style="font-weight: bold;">
                <?php } else if ($clan['totem'] >= $i) { ?>
                <tr>
                <?php } else { ?> 
                <tr style="color: #666666">
                <?php } ?> 
                <?php
                
for ($i1 = 0; $i1 < count($arrTotemStat[$i]); $i1++) {
                    
?>
                    <td style="text-align: center;">
                        <?= $arrTotemStat[$i][$i1]; ?>
                    </td>
                <?php } ?> 
            </tr>
        <?php } ?> 
    </table><?php
     
if($clan['totem'] < 11){ ?>
<br><center><a onclick="showContent('../clan/totem.php?kupit')">Купить Тотем <?= $clan['totem']+2;?> Уровня </a></center>
    <?php
   
}
}
$footval = "totem";
require_once 
'../system/foot/foot.php';
Онлайн: 1
Реклама