File size: 3Kb
<?php
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Закладки
=============================================
Official website: http://shcms.ru
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/basic_settings.php';
$users_share = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '$user_id'"));
$shcmsengine['title'] = Lang::get('Закладки - %s',$users_share['login']);
include_once'../template/head.php';
$count_news = mysql_result(mysql_query("SELECT COUNT(*) FROM `share` WHERE `listing` = '1' and `user_id` = '$user_id'"),0);
$count_forum = mysql_result(mysql_query("SELECT COUNT(*) FROM `share` WHERE `listing` = '2' and `user_id` = '$user_id'"),0);
echo '<div class="maintitle mainrazd">'.Lang::get('Закладки Новостей').' ('.$count_news.')</div>';
echo '<div class="maintext">';
$share_new = mysql_query("SELECT * FROM `share` WHERE `listing` = '1' and `user_id` = '$user_id'");
if(mysql_num_rows($share_new) == 0) {
echo '<div class="posts">'.Lang::get('Закладок нет').'</div>';
}else {
while($share_news = mysql_fetch_array($share_new)) {
$news = mysql_fetch_array(mysql_query("SELECT * FROM `uncos` WHERE `id` = '$share_news[id_news]'"));
echo '<div class="maintitle mainrazd"><a href="../uncos/categories.php?act=more&id='.$news['id'].'">'.$news['title'].'</a></div>';
echo '<div class="maintext">';
echo processing($news['text2']);
echo '</div>';
}
}
echo '</div>';
echo '<div class="maintitle mainrazd">'.Lang::get('Закладки Тем с Форума').' ('.$count_forum.')</div>';
echo '<div class="maintext">';
$share_thems = mysql_query("SELECT * FROM `share` WHERE `listing` = '2' and `user_id` = '$user_id'");
if(mysql_num_rows($share_thems) != 0) {
while($share_them = mysql_fetch_array($share_thems)) {
$forum = mysql_fetch_array(mysql_query("SELECT * FROM `forum_them` WHERE `id` = '$share_them[id_forum]'"));
$forum_mess = mysql_fetch_array(mysql_query("SELECT * FROM `forum_mess` WHERE `id_them` = '$share_them[id_forum]'"));
echo '<div class="maintitle mainrazd"><a href="../forum/message.php?id='.$forum['id'].'">'.$forum['name'].'</a></div>';
echo '<div class="maintext">';
echo processing($forum_mess['message']);
echo '</div>';
}
}else {
echo '<div class="posts">'.Lang::get('Закладок нет').'</div>';
}
echo '</div>';
include_once'../template/foot.php';