Вход Регистрация
Файл: wenr.online/app/town/index.php
Строк: 15
<?php

if(!$user->isAuth()){
    
redirect('/');
    exit;
}

    
$clan $db->prepare('select * from clan where id = ?');
    
$clan -> execute([$user->get()->clan]);
    
$clan $clan ->fetch(PDO :: FETCH_OBJ);
    
            if(!isset(
$clan->id)){
                
Notif :: error('Для участия в битве за трон вы должны состоять в клане','/game');
                exit;
            }

    
$all $db->prepare('select * from town  order by id');
    
$all -> execute();
    
$all $all->fetchAll();

        
$peger = new ArrayPaginator('/town'10); 
    
$items $peger->getItems($all);
    
    echo 
$template->render('town.index',
                                [
'all'  =>  $items,
                                 
'peger'    =>  $peger
                                                            
]    
                                    );
Онлайн: 2
Реклама