Файл: modules/users/birthday.php
Строк: 39
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013-2014, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$locate = 'in_users';
$title = _t('users');
include_header($title);
$tpl->div('title', _t('births'));
$users_a = $db->query("SELECT * FROM `users` WHERE `day` = '".date('d')."' AND `month` = '".date('m')."' AND `year` != '0'")->rowCount();
$pages = new Paginator($users_a, $ames);
if($users_a == 0)
{
$tpl->div('menu', _t('not_users_birthday'));
}
else
{
$tpl->div('menu', _t('births_info'));
$users_q = $db->query("SELECT * FROM `users` WHERE `day` = '".date('d')."' AND `month` = '".date('m')."' ORDER BY id ASC LIMIT $start, $ames");
while($users = $users_q->fetch())
{
$tpl->div('post', nick($users['id'], _t('was_birthday') .' <b>'.birthday($users['year'].'-'.$users['month'].'-'.$users['day']).'</b> '._t('years')));
}
$pages->view();
}
$tpl->div('block',
NAV .' <a href="/users">'._t('back').'</a><br/>'.
HICO .'<a href="/">'. _t('home').'</a>');
include_footer();
?>