Просмотр файла modules/new_mail.php

Размер файла: 1.92Kb
<?

////////////////////////////////////////
///// Kyber ApiCMS 2013 apicms.ru //////
///// Запрещается продажа данной CMS ///
///// Автор Евгений Медянкин Kyber /////
///// ICQ 626-000-895 или 37-22-47 /////
////////////////////////////////////////

/////////////////////////////////////////
$title = 'Приватная почта';
require_once '../api_core/apicms_system.php';
require_once '../api_core/head.php';
/////////////////////////////////////////

/////////////////////////////////////////
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user_mail` WHERE `id_recipient` = '$user[id]' AND `views` = '0'"),0);
$k_page=k_page($k_post,$api_settings['on_page']);
$page=page($k_page);
$start=$api_settings['on_page']*$page-$api_settings['on_page'];
if ($k_post==0)echo "<div class='erors'><center>Для вас нет сообщений</center></div>";
/////////////////////////////////////////
$qii=mysql_query("SELECT * FROM `user_mail` WHERE `id_recipient` = '$user[id]' AND `views` = '0' ORDER BY time DESC LIMIT $start, $api_settings[on_page]");
while ($post_mail = mysql_fetch_assoc($qii)){
$ank2=mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = $post_mail[id_sender] LIMIT 1"));
echo '<div class="subhead"><table width="100%" ><tr><td width="20%"><center>';
echo apicms_ava32($ank2['id']);
echo "</center></td><td width='80%'>Отправитель: ".$ank2['login']." ";
echo "<span style='float:right'> ".apicms_data($post_mail['time'])." ";
echo " </span>";
echo " </br></br><a class = 'headbut' href='/modules/user_mail.php?id=".$ank2['id']."'>Перейти к диалогам</a> </td></tr></table></div>";
}
if ($k_page > 1){
echo '<div class="subhead"><center>';
str('/modules/new_mail.php?id='.$ank['id'].'&',$k_page,$page); // генерируем постраничную навигацию
echo '</center></div>';
}
apicms_foot();
?>