View file games/bottle/my_game.php

File size: 2.88Kb
<?php

/*
------------------------------------------------
AlphaCMS - универсальный движок для вашего сайта
E-mail администрации проекта: adm@alpha-cms.ru
Официальный сайт поддержки: alpha-cms.ru
Руководитель проекта: adm (ID 1)
------------------------------------------------
*/
  
require_once ($_SERVER['DOCUMENT_ROOT'].'/system/connections/core.php');
acms_header('Бутылочка', 'users');
require (ROOT.'/games/bottle/plugins/config.php');

?>  
<div class='bt-phone'>

<?php require (ROOT.'/games/bottle/plugins/header.php'); ?>
<center>
<a href='/games/bottle/index.php' class='bt-btn'><?=lg('Все столы')?></a>
<a href='/games/bottle/my.php' class='bt-btn'><?=lg('Мои столы')?></a>
<a href='/games/bottle/my_game.php' class='bt-btn bt-btn-h'><?=lg('Где я')?></a>
<a href='/games/bottle/top.php' class='bt-btn'><?=lg('ТОП')?></a>
</center> 
  
<div class='bt-list'>
<a href='/games/bottle/add.php' class='bt-btn2'><?=lg('Создать стол')?></a>
<?php if (MANAGEMENT == 1) : ?>
<a href='/games/bottle/settings.php' class='bt-btn2'><?=lg('Настройки')?></a>                              
<?php endif ?>                              
</div> 
  
<div class='bt-list'>
<b><?=lg('У вас')?>:</b><br />
<small>
<font color='#F321B1'><?=icons('heart', 15, 'fa-fw')?></font> <?=lg('сердец')?> - <?=user('BOTTLE_HEART')?><br />
<font color='#2196F3'><?=icons('database', 15, 'fa-fw')?></font> <?=lg('заработанных баллов')?> - <?=user('BOTTLE_BALLS')?><br />
</small>
</div>  
<?                             
                              
$column = db::get_column("SELECT COUNT(*) FROM `BOTTLE` WHERE (`US1` = ? OR `US2` = ? OR `US3` = ? OR `US4` = ? OR `US5` = ? OR `US6` = ? OR `US7` = ? OR `US8` = ?)", [user('ID'), user('ID'), user('ID'), user('ID'), user('ID'), user('ID'), user('ID'), user('ID')]);
$spage = spage($column, PAGE_SETTINGS);
$page = page($spage);
$limit = PAGE_SETTINGS * $page - PAGE_SETTINGS;

if ($column == 0){ 
  
  ?>
  <div class='bt-list'><?=lg('Пока нет столов')?></div>
  <?
  
}

$data = db::get_string_all("SELECT * FROM `BOTTLE` WHERE (`US1` = ? OR `US2` = ? OR `US3` = ? OR `US4` = ? OR `US5` = ? OR `US6` = ? OR `US7` = ? OR `US8` = ?) ORDER BY `TIME` DESC LIMIT ".$limit.", ".PAGE_SETTINGS, [user('ID'), user('ID'), user('ID'), user('ID'), user('ID'), user('ID'), user('ID'), user('ID')]);
while ($list = $data->fetch()) {
  
  require (ROOT.'/games/bottle/plugins/list.php');
  
} 
                              
get_page('/games/bottle/my_game.php?', $spage, $page, 'bt-list');                               
                              
?>
<?php require (ROOT.'/games/bottle/plugins/footer.php'); ?>                          
</div>
<?                             
                              
back('/m/games/');
acms_footer();