<?
////////////////////////////////////////
///// Kyber ApiCMS 2013 apicms.ru //////
///// Запрещается продажа данной CMS ///
///// Автор Евгений Медянкин Kyber /////
///// ICQ 626-000-895 или 37-22-47 /////
////////////////////////////////////////
/////////////////////////////////////////
require_once '../api_core/apicms_system.php';
/////////////////////////////////////////
if (isset($_GET['id']))$lib_id = intval($_GET['id']);
$libs_name = mysql_fetch_assoc(mysql_query("SELECT * FROM `api_lib_article` WHERE `id` = '$lib_id' LIMIT 1"));
$title = ''.htmlspecialchars($libs_name['name']).' читать';
require_once '../design/styles/'.htmlspecialchars($api_design).'/head.php';
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `api_lib_article` WHERE `id` = '".$lib_id."'"),0)==1){
/////////////////////////////////////////
$qii=mysql_query("SELECT * FROM `api_lib_article` WHERE `id` = '$lib_id' LIMIT 1");
while ($post_post = mysql_fetch_assoc($qii)){
$who_post = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = $post_post[id_user] LIMIT 1"));
echo "<div class='apicms_subhead'><center><strong><h4> <img src='/design/styles/".htmlspecialchars($api_design)."/lib/bookmark.png' alt=''> ".htmlspecialchars($post_post['name'])."</h4></strong></center>";
echo " ".apicms_smiles(apicms_br(htmlspecialchars($post_post['text'])))."</br><hr />";
echo "<img src='/design/styles/".htmlspecialchars($api_design)."/lib/autors.png' alt=''> <small><a href='/profile.php?id=$who_post[id]'>".$who_post['login']."</a></small> <span style='float:right'> <img src='/design/styles/".htmlspecialchars($api_design)."/lib/vremia.png' alt=''> <small>".apicms_data($post_post['time'])."</small> </span></div>";
}
}else{
echo "<div class='erors'><center>Извините, статьи не существует</center></div>n";
}
/////////////////////////////////////////
require_once '../design/styles/'.htmlspecialchars($api_design).'/footer.php';
?>