View file libs/lib.php

File size: 2.12Kb
<?
/*
=============================================
 Движок:  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'];

//META информацию (description, keywords)
$shcmsengine['keywords'] = $lib['name'];
$shcmsengine['description'] = $lib['text'];

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="maintitle mainrazd"><center style="color:red;">'.$lib['name'].'</center></div>';

$libs_comm = mysql_result(mysql_query("SELECT COUNT(*) FROM `libs_comm` WHERE `id_stat` = '$id'"),0);

echo '<div class="maintext">'. processing($lib['text']).'</div>';
echo '<div style="text-align:right;font-size:11px;">
<div class="maintext"><a href="comments.php?id='.$id.'">'.Lang::get('Комментарии').':&nbsp;'.$libs_comm.'</a> 
                        | '.Lang::get('Категория:').' <a href="list.php?id='.$lib_cat['id'].'">'.$lib_cat['name'].'</a> 
                        | '.Lang::get('Просмотров:').$lib['prosm'].' 
						| '.Lang::get('Автор:').' <a href="'.DIR_SHCMS.'change_view.php?id='.$users['id'].'">'.$users['login'].'</a> 
						| <a href="#" onclick="window.print()" title="'.Lang::get('Напечатать страничку').'">'.Lang::get('Печать').'</a></div></div>';




include_once'../template/foot.php';
?>