Файл: home.php
Строк: 13
<?php
/**
* home
*
* @package Sngine
* @author Zamblek
*/
// fetch kernal
require('kernal.php');
// check access level
AccessLevel('restricted');
// page header
PageHeader($translate->__("Главная"));
// get today birthdays
$getBirthdays = $db->query(sprintf("SELECT * FROM users WHERE UserBirthMonth = %s AND UserBirthDay = %s", Secure(date(m), 'int'), Secure(date(d), 'int') )) or SQLError();
if($getBirthdays->num_rows > 0 ){
$todayBirthday = true;
while($birthday = $getBirthdays->fetch_array(MYSQLI_ASSOC)) {
$birthday['UserURL'] = SITE_URL."/".$birthday['UserName'];
$birthdays[] = $birthday;
}
}else {
$todayBirthday = false;
}
$smarty->assign('todayBirthday', $todayBirthday);
$smarty->assign('birthdays', $birthdays);
// page footer
PageFooter("home");
?>