Файл: my/date.php
Строк: 78
<?
define('ROOT','../');
require_once (ROOT.'system/power.php');
$fuser->aut();
switch ($do) {
case 'birdday':
$diz -> head('Дни рождения');
$diz -> title('Дни рождения');
$count = $db -> dbcount('COUNT(`id`)','users',"`month`= '".date('m',ustime($ya['gmt']))."' and `day`= '".date('d',ustime($ya['gmt']))."'");
if($count>0){
$num = isset($ya['num']) ? $ya['num'] : 10;
$total = intval(($count - 1) / $num) + 1;
if (!isset($_GET['page']) || !is_numeric($_GET['page']) || $_GET['page'] < 1 )
{
$page = 1;
} elseif($_GET['page'] > $total)
{ $page = $total;
} else $page = (int)$_GET['page'];
$start = $page * $num - $num;
$sql = $db -> query("SELECT `id`,`day`,`month`,`year` FROM `users` where `month`= '".date('m',ustime($ya['gmt']))."' and `day`= '".date('d',ustime($ya['gmt']))."' ORDER BY `id` LIMIT ".$start.",".$num);
while ($user = $sql -> fetch_assoc()) {
echo '<a href="'.ROOT.'id'.$user['id'].'" class="mail">
<table border="0" width="100%"><tr valign="top">
<td height="0" width="26">'.$func->avatar($user['id']).'</td>
<td>'. $func -> famname($user['id'],0).'<br/>
'. $func -> online($user['id']).'<br/>
'.language('Возраст').' '.$func->vozrast($user['day'],$user['month'],$user['year']).'
</td></tr></table></a>';
}
$act = '?do=birdday';
echo $func -> pagenav($act,$page,$total);
}else echo '<div class="fon">'.language('Список пуст').'.</div>';
echo '<div class="levo"><a href="?" class="levo_tuch">'.$diz -> icon('back.png').' '.language('Назад').'</a></div>';
break;
default:
$diz -> head($func -> times(date('d m Y',ustime($ya['gmt']))));
$diz -> title($func -> times(date('d m Y',ustime($ya['gmt']))));
?>
<script>
var tm=new Date();
var h=tm.getHours();
var m=tm.getMinutes();
var s=tm.getSeconds();
$(document).ready(function()
{
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTime()',500);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
<?
echo '<div class="fon">
'.$func -> times(date('H:i',ustime($ya['gmt']))).','.$func -> times(date('d m Y',ustime($ya['gmt']))).','.$func->date_day(ustime($ya['gmt'])).'
</div>';
echo '<div class="new">'.language('События').':</div>';
$birdday = $db -> dbcount('COUNT(`id`)','users',"`month`= '".date('m',ustime($ya['gmt']))."' and `day`= '".date('d',ustime($ya['gmt']))."'");
echo '<div class="menu"><a href="?do=birdday" class="menutuch">'.$diz -> icon('r.png').' '.language('Дни рождения').' <span class="count">'.$birdday.'</span></a></div>';
}
echo '<div class="levo"><a href="./" class="levo_tuch">'.$diz -> icon('back.png').' '.language('Мой кабинет').'</a></div>';
echo '<div class="levo"><a href="/index.php" class="levo_tuch">'.$diz -> icon('home.png').' '.language('На главную').'</a></div>';
#####Копирайт#######
$diz -> out($msg);
?>