"; $root_element ="homepage"; $xml .= "<$root_element>"; error_reporting(0); require '../include/asset.php'; require '../include/Conn.php'; require '../include/config.php'; $main_img_path="393x213"; //$thumb_img_path="155x81"; $thumb_img_path="393x213"; $xml.=""; $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, ncategories2.Name as subcat FROM news LEFT JOIN ncategories ncategories2 ON news.sCat = ncategories2.ID WHERE mLocation > 0 AND mLocation < 14 LIMIT 13"; $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=STORAGE."{$row['picPath']}/{$main_img_path}/{$row['picture']}"; $thumb=STORAGE."{$row['picPath']}/{$thumb_img_path}/{$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= str_replace('&', '&',$row['mobilevideo']); }else{ $v="no"; } $xml .="
{$row['ID']} {$row['title']} {$row['smalltitle']} {$row['sData']} {$image} {$thumb} {$goto} {$target} {$row['mLocation']} {$txt} {$row['ID']} {$row['subcat']} /{$row['mCat']}/ {$row['ID']} /Archive/{$row['sCat']}/1 {$row['subcat']} {$row['articleviews']} {$row['erea']}
"; $i++; } $xml.="
"; $main_cats=array(3,4349,1,211,14,6,172,4,3564); //$main_cats=array(3,1); $xml.=""; for($i=0;$i"; } $query="SELECT ID,smalltitle,sData,picture,picPath,links,mobilevideo FROM news where mStatus=1 AND ({$sqqql}) AND sCat!=2235 AND (mLocation>13 OR mLocation < 1) ORDER BY udate DESC limit 5"; $result=mysql_query($query) or die(mysql_error()); while($row=mysql_fetch_assoc($result)){ //$row['smalltitle']=htmlentities($row['smalltitle']); //$row['title']=htmlentities($row['title']); //$row['sData']=htmlentities($row['sData']); $sdata=$row['sData']; if($row['links']){ $goto=htmlspecialchars($row['links']); $target="target=\"_blank\""; } else{ $goto="/Article/".$row['ID']; $target="target=\"_self\""; } $image=STORAGE."{$row['picPath']}/{$main_img_path}/{$row['picture']}"; $thumb=STORAGE."{$row['picPath']}/{$thumb_img_path}/{$row['picture']}"; if($row['mobilevideo']!=''){ $v= str_replace('&', '&',$row['mobilevideo']); }else{ $v="no"; } $xml .="
{$row['ID']} {$row['smalltitle']} {$row['sData']} {$image} {$goto} {$target}
"; } } $xml.=""; } $xml.="
"; $main_cats=array(7,138,11); //$main_cats=array(3,1); $xml.=""; for($i=0;$i"; } $query="SELECT ID,smalltitle,sData,picture,picPath,links,mobilevideo FROM news where mStatus=1 AND ({$sqqql}) AND sCat!=2235 AND (mLocation>13 OR mLocation < 1) ORDER BY udate DESC limit 5"; $result=mysql_query($query) or die(mysql_error()); while($row=mysql_fetch_assoc($result)){ //$row['smalltitle']=htmlentities($row['smalltitle']); //$row['title']=htmlentities($row['title']); //$row['sData']=htmlentities($row['sData']); $sdata=$row['sData']; if($row['links']){ $goto=htmlspecialchars($row['links']); $target="target=\"_blank\""; } else{ $goto="/Article/".$row['ID']; $target="target=\"_self\""; } $image=STORAGE."{$row['picPath']}/{$main_img_path}/{$row['picture']}"; $thumb=STORAGE."{$row['picPath']}/{$thumb_img_path}/{$row['picture']}"; if($row['mobilevideo']!=''){ $v= str_replace('&', '&',$row['mobilevideo']); }else{ $v="no"; } $xml .="
{$row['ID']} {$row['smalltitle']} {$row['sData']} {$image} {$goto} {$target}
"; } } $xml.=""; } $xml.="
"; $xml.=""; $q = "SELECT id,video FROM arabtv ORDER BY video DESC limit 5"; $res = mysql_query($q) or die(mysql_error()); while($ids = mysql_fetch_array($res, MYSQL_ASSOC)){ $artid=$ids['video']; $query="SELECT ID,title,smalltitle,picPath,picture,stnews,sData,mobilevideo FROM news WHERE ID=$artid AND mStatus=1 ORDER by id desc"; $result=mysql_query($query) or die(mysql_error()); $row=mysql_fetch_assoc($result); $image=STORAGE."{$row['picPath']}/{$main_img_path}/{$row['picture']}"; $thumb=STORAGE."{$row['picPath']}/{$thumb_img_path}/{$row['picture']}";$sdata=text_summarise($row['sData'],3); $title=text_summarise($row['smalltitle'],6); $aLink=GenerateLinks("Article",$row['title'],$row['ID'],true); if($row['mobilevideo']!=''){ $v= str_replace('&', '&',$row['mobilevideo']); }else{ $v="no"; } $xml .="
{$row['ID']} {$row['smalltitle']} {$row['sData']} {$image} {$goto} {$target}
"; } $xml.="
"; $xml.=""; $theUploadFolder="http://images.alarab.com/data/cubes/"; $i=1; $result = mysql_query("SELECT link,cube,ID FROM cubes WHERE corder !=0 ORDER BY corder ASC LIMIT 22"); while($row = mysql_fetch_array($result)){ if($row['link']!=""){ $link="http://www.alarab.com/redirect.php?url=".$row['link']; }else{ $link="http://www.alarab.com/redirect.php?url=http://kul.alarab.com/loadads.php?adid={$row['ID']}"; } $row[cube]=htmlspecialchars($row[cube]); $link=htmlspecialchars($link); $xml.=" {$theUploadFolder}{$row['cube']} {$link} "; $i++; } $xml.=""; $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(); ?>