File size: 1.9Kb
<?
////////////////////////////////////////
///// 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';
if ($user['id']){
/////////////////////////////////////////
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `contact_list`"),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 `contact_list` WHERE `my_id` = '$user[id]' ORDER BY id DESC LIMIT $start, $api_settings[on_page]");
while ($post_cont = mysql_fetch_assoc($qii)){
$ank2=mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = $post_cont[id_user] 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%'><a href='/profile.php?id=$ank2[id]'>".$ank2['login']."</a> ( ".$ank2['name'].") </br>Добавлен: ".apicms_data($post_cont['time'])."</span>";
echo "</br><a href='/modules/user_mail.php?id=".$ank2['id']."'>Написать приватно</a></b></td></tr></table></div>";
}
if ($k_page > 1){
echo '<div class="subhead"><center>';
str('&',$k_page,$page); // генерируем постраничную навигацию
echo '</center></div>';
}
}else{
echo "<div class='content'>Функция только для пользователей</div>\n";
}
apicms_foot();
?>