Файл: public_html/modules/library/article.php
Строк: 31
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.net *
* ------------------------------- *
* @package: PerfCMS Ultra *
* @year: 2013 *
* @author: wanya26ua & Tesla *
* @link: http://perfclub.ru *
**********************************/
$locate = 'in_library';
$id = abs(intval($_GET['id']));
$note_c = $db->query("SELECT * FROM `library` WHERE `id` = '". $id ."' LIMIT 1")->rowCount();
if($note_c == 0) { go('/library/'); exit;}
$note_q = $db->query("SELECT * FROM `library` WHERE `id` = '". $id ."' LIMIT 1")->fetch();
$cat_sql = $db->query("SELECT * FROM `library_cats` WHERE `id` = '". $note_q['id_cat'] ."' LIMIT 1")->fetch();
$title = ''.$lang->word('library').' | '.$cat_sql['title'].' | '.$note_q['title'].'';
require_once(SYS.'/view/header.php');
$tpl->div('title', $note_q['title']);
$note_sql= $db->query("SELECT * FROM `library` WHERE `id` = '". $id ."' LIMIT 1");
while($note = $note_sql->fetch()) {
$tpl->div('post', output($note['text']) .'<br/></div><div class="post">'.nick($note['id_user']) . ' ('.rtime($note['time']).')');
}
$tpl->div('block', NAV .'<a href="/library/'.$id.'/comments/">'. $lang->word('comments') .'</a> ['. $db->query("SELECT * FROM `library_comms` WHERE `id_note` = '". $id ."'")->rowCount() .']<br/>'.NAV.' <a href="/library/cat/'.$cat_sql['id'].'">'.$cat_sql['title'].'</a><br/>' .NAV.' <a href="/library/">'. $lang->word('library') .'</a><br/>' . HICO .' <a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
?>