Вход Регистрация
Файл: html/clan/create.php
Строк: 27
<?php

require_once('../system/func.php');

if (isset(
$_GET['create']) && isset($_GET['name']) && $user['id_clan']== 0) {
    if (
$user['platinum'] >= 100) {
        if (
$user['id_clan'] == 0) {
            
$plata = $user['platinum'] - 100;
            
$mc->query("INSERT INTO `clan`("
                    
. "`id`,"
                    
. "`name`,"
                    
. "`max_user`,"
                    
. "`gold`"
                    
. ") VALUES ("
                    
. "'NULL',"
                    
. "'" . addslashes($_GET['name']). "',"
                    
. "'10',"
                    
. "'0'"
                    
. ")");
            
$mc->query("UPDATE `users` SET `platinum`='" . $plata . "',`id_clan`='" . $mc->insert_id . "',`des` = '3',`reit`='0' WHERE `id`='" . $user['id'] . "'");
            
?>
            <script>console.log("<?=$mc->error;?>");showContent('main.php?msg='+encodeURIComponent('клан успешно создан'));</script>
            <?php

            
exit(0);
        }
    }
}
?>
            <script>showContent('main.php?msg='+encodeURIComponent('необходимо покинуть предыдущий клан для создания нового'));</script>
<?php

exit(0);
Онлайн: 0
Реклама