Файл: api_lib/article.php
Строк: 26
<?
////////////////////////////////////////
///// Основа ApiCMS //////
///// Автор биллинга - IvanDanilov /////
///// ICQ 936545, mail: KyberID@ya.ru //
////////////////////////////////////////
/////////////////////////////////////////
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 = 'APICMS.ru - '.htmlspecialchars($libs_name['name']).' читать';
require_once '../api_core/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='subhead'><center><strong><h4> <img src='../design/lib/bookmark.png' alt=''> ".htmlspecialchars($post_post['name'])."</h4></strong></center>";
echo " ".apicms_smiles(apicms_bb_code(apicms_br(htmlspecialchars($post_post['text']))))."</br><hr />";
echo "<img src='../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/lib/vremia.png' alt=''> <small>".apicms_data($post_post['time'])."</small> </span></div>";
}
}else{
echo "<div class='erors'><center>Извините, статьи не существует</center></div>n";
}
/////////////////////////////////////////
apicms_foot();
?>