"; $root_element ="homepage"; $xml .= "<$root_element>"; error_reporting(0); require '../include/asset.php'; require '../include/Conn.php'; require '../include/config.php'; $i=0; $query=" SELECT news.ID,news.fb_country,news.fb_cont,news.fb_comp,news.fb_teams,news.pdate,news.title,news.sData,news.nWriter,news.mStatus,news.mCat,news.picture,news.userInserted,news.sCat,news.smalltitle,news.picPath,news.scroll,news.udate,news.stnews,news.links,news.mLocation,news.erea,news.searchtags,news.mobilevideo,news.articleviews, ncategories.Name, ncategories2.Name as subcat FROM news INNER JOIN `ncategories` ON news.mCat = ncategories.ID LEFT JOIN ncategories ncategories2 ON news.sCat = ncategories2.ID WHERE mCat=6 AND mStatus=1 ORDER BY ID DESC LIMIT 3"; $result=mysql_query($query) or die(mysql_error()); while($row=mysql_fetch_assoc($result)){ $sdata=$row['sData']; if($row['link']==1){ $goto=htmlspecialchars($row['links']); $target="target=\"_blank\""; } if($row['link']==0){ $goto="/Article/".$row['ID']; $goto=GenerateLinks ("Article",$row['title'],$row['ID'],true); $target="target=\"_self\""; } $txt="no"; //$row['smalltitle']=htmlentities($row['smalltitle']); //$row['title']=htmlentities($row['title']); //$row['sData']=htmlentities($row['sData']); $image="https://images.alarab.com/cdn-cgi/image/fit=cover,width=302,height=149,quality=85/data/news/{$row['picPath']}{$row['picture']}"; $thumb="https://images.alarab.com/cdn-cgi/image/fit=cover,width=155,height=81,quality=85/data/news/{$row['picPath']}{$row['picture']}"; if($row['stnews']==3) {$txt="خبر عاجل"; } if($row['stnews']==2) {$txt="خبر حصري";} if($row['stnews']==1) {$txt="نشر اول";} if($row['stnews']==4) {$txt="بث مباشر";} if($row['mobilevideo']!=''){ $v= $row['mobilevideo']; }else{ $v="no"; } /* //testing video tag on main articles // //if($i==0 OR $i==5 OR $i==10) { $v="http://flv2.alarab.com:8080/new/iphone/117651.mp4"; /*}else{ $v="no"; } */ $xml .="
{$row['ID']} {$row['title']} {$row['nWriter']} {$row['smalltitle']} {$row['sData']} {$image} {$thumb} {$goto} {$target} {$row['ID']} {$txt} {$row['ID']} {$row['Name']} /{$row['mCat']}/ {$row['ID']} /Archive/{$row['subcat']}/1 {$row['subcat']} {$row['articleviews']} {$row['erea']}
"; $i++; } $xml .= ""; header('Content-type: application/xml'); echo $xml; mysql_close($conn); $fp = fopen($cachefile, 'w'); // save the contents of output buffer to the file fwrite($fp, ob_get_contents()); // close the file fclose($fp); // Send the output to the browser ob_end_flush(); ?>