session_start();
include_once"config.php";
//grenral file
$result=mysql_query("select id,name,brief,photo from occasions_cat where status=1 order by id desc ")or die('Error, query failed');
$row=mysql_fetch_array($result);
//artical Mohtel
$hapend_result=mysql_query("select id,title,brief,details,photo from occasions_article where type='mohtal' and cat_id =$row[id] order by id desc ")or die('Error, query failed');
$hapend_row=mysql_fetch_array($hapend_result);
//fatwa
$fatwa_result=mysql_query("select id,title,details from occasions_article where type='fatwa' and cat_id =$row[id] order by id desc ")or die('Error, query failed');
$fatwa_row=mysql_fetch_array($fatwa_result);
//seyasy
$variety_result=mysql_query("select id,title,brief,details,photo from occasions_article where type='seyasy' and cat_id =$row[id] order by id desc ")or die('Error, query failed');
$variety_row=mysql_fetch_array($variety_result);
//facts
$article_result=mysql_query("select id,title,brief,details,photo from occasions_article where type='facts' and cat_id =$row[id] order by id desc ")or die('Error, query failed');
$article_row=mysql_fetch_array($article_result);
//links
$links_result=mysql_query("select id,name,link from occasions_links where cat_id =$row[id]")or die('Error, query failed');
//audio
$audio_result=mysql_query("select id,name,file from occasions_files where type='audio' and cat_id =$row[id]")or die('Error, query failed');
//video
$video_result=mysql_query("select id,name,file from occasions_files where type='video' and cat_id =$row[id]")or die('Error, query failed');
?>