Размер файла: 1.67Kb
<?
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Библиотека
=============================================
Official website: http://shcms.ru
=============================================
Данный код защищен авторскими правами
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/basic_settings.php';
if($_GET['id']){$id=$_GET['id'];}
$lib = mysql_fetch_array(mysql_query("SELECT * FROM `libs_stat` WHERE `id` = '$id'"));
$shcmsengine['title'] = ''.$lib['name'].'';
include_once'../template/head.php';
$lib_cat = mysql_fetch_array(mysql_query("SELECT * FROM `libs` WHERE `id` = '$lib[dir]'"));
$users = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '$lib[user_id]'"));
mysql_query("UPDATE `libs_stat` SET `prosm` = '".($lib['prosm']+1)."' WHERE `id` = '$id'");
echo '<div class="posts">
<center><span style="font-weight:700;color:red;">'.$lib['name'].'</span></center>
</div>';
$libs_comm = mysql_result(mysql_query("SELECT COUNT(*) FROM `libs_comm` WHERE `id_stat` = '$id'"),0);
echo '<div class="posts">'. handling_smileys($lib['text']).'<div style="text-align:right;font-size:11px;">
<hr/><a href="comments.php?id='.$id.'">Комментарии '.$libs_comm.'</a> | Категория: <a href="list.php?id='.$lib_cat['id'].'">'.$lib_cat['name'].'</a>
| Просмотров: '.$lib['prosm'].' |
Автор: <a href="'.DIR_SHCMS.'change_view.php?id='.$users['id'].'">'.$users['login'].'</a>
</div></div>';
include_once'../template/foot.php';
?>