load_file($template_filename, "main");
show_article_body($aid);
show_search();
show_languages();
main_menu_show();
quote_show("quote_block");
translate("Audio Lectures",$lang);
translate("more", $lang);
translate("basmalah", $lang);
$tpl->pparse('main', true);
function show_article_body($aid)
{
global $tpl;
global $db;
global $lang;
if (isset($_GET["article_id"]) && (is_numeric($_GET["article_id"])))
$aid=$_GET["article_id"];
else
header("Location: bindex.php?section=articles");
$sql = "select * from articles where id=".$aid;
$result = $db->query($sql);
$row = mysql_fetch_array($result);
$article_title = $row['article_title'];
$article_header = $row['article_header'];
$article_header_photo = $row['header_photo'];
//----------------
$article_author_id = $row['author_id'];
if ($article_author_id=="")
$article_author_id="0";
$auth_res = $db->query("SELECT name,id FROM authors WHERE id=$article_author_id");
$auth_row=mysql_fetch_array($auth_res);
$article_author_name=" $auth_row[name] ";
//----------------
if (!$article_header_photo)
{
$tpl->set_var('HeaderPhoto',"");
}
else
$tpl->set_var('header_photo', $article_header_photo);
$article_language = $row['lang_id'];
$article_body = $row['article'];
$tpl->set_var('article_title', $article_title);
$tpl->set_var('article_header',$article_header);
$tpl->set_var('article_body',$article_body);
$tpl->set_var('article_author_name',$article_author_name);
$lang = $article_language;
}
Counter();
$count=GetCounter();
mysql_close ();
?>