'') "; $total_articles=mysql_num_rows(mysql_query($sql)); $num_of_pages=ceil($total_articles/$stories_per_page); if($language==""){ $summary="summaryen"; $art="article"; } $query_list_stories=mysql_query("SELECT distinct `artical`.`id`,$lang, `artical`.`date`,`artical`.`$art`,`artical`.`$summary` FROM `artical`,`show_artical` where (`artical`.`id` = `show_artical`.`id_artical`) AND (`show_artical`.`id_website_fk` = '$news_type1')and (`show_artical`.`id_website_group_fk` = '$news_type2' )and ($lang<>'') order by `artical`.`head_line_en` asc ,`artical`.`id` asc LIMIT $start_from_id, $stories_per_page"); $num_query_list_stories=mysql_num_rows($query_list_stories); if($num_query_list_stories<>false){ echo"
"; if($language=="a"){ $language="a"; } for($i=0;$i<$num_query_list_stories;$i++){ //list($id,$head_line,$date)=mysql_fetch_row($query_list_stories); list($id,$head_line,$date,$article,$summary)=mysql_fetch_row($query_list_stories); $query_first_picture_in_story=mysql_query("select `images`.`file_nameold`,`images`.`location` from `images` where `images`.`article_id` = '$id'"); $num_query_first_picture_in_story=mysql_num_rows($query_first_picture_in_story); if($num_query_first_picture_in_story<>false){ for($j=0;$j<$num_query_first_picture_in_story;$j++){ list($picture_name,$pos)=mysql_fetch_row($query_first_picture_in_story); { $vowels = array(".jpg", ".jpeg", ".JPG", ".JPEG"); $picture_name1 = str_replace($vowels, "", $picture_name); $article=str_replace("++$picture_name++","",$article); } } $img=""; }else{ $img=""; } if ($summary==""){ $article=substr($article,0,200); $words=explode (' ',$article);$article=""; for ($aaa=0;$aaafalse){ $attachments=""; for($j=0;$j<$num_query_list_attachments;$j++){ list($id_attachment,$description,$article_id,$attachment_name,$pos2)=mysql_fetch_row($query_list_attachments) ; if($description==""){$link=$attachment_name;}else{$link=$description;} $attachments=$attachments." $link
\n"; } } echo"
"; } echo"


$head_line

$summary
More Details  

"; } echo"

"; for($i=0;$i<$num_of_pages;$i++){ $j=$i+1; $k=$i*$stories_per_page; if($k<>$start_from_id){ $num="$j  "; }else{ $num="$j  "; } echo$num; } echo"

"; ?>