<html dir="rtl"> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1255" /> <title>עידכוני RSS</title> <style> a { text-decoration: none; } a:hover { text-decoration: underline; } </style> </head> <?php/** * @author Yochai * @copyright 2007 */ function load_ynet_rss($limit,$category,$sub_category) { /** * Start Default Design Values */ //Title Text $title = "עידכוני RSS"; //Box Background Color $box_background_color = "white"; //Links Color; $font_color = "black"; //Main Title Background Color $title_background_color = "black"; //Main Title Font Color $title_font_color = "white"; //Border Color $table_border_color = "gray"; //Start Categorys Array $categorys_array = array( 'חדשות' => array ( "כול ערוץ החדשות" => "http://www.ynet.co.il/Integration/StoryRss2.xml", "מבזקי החדשות" => "http://www.ynet.co.il/Integration/StoryRss1854.xml", "בלוגוס" => "http://www.ynet.co.il/Integration/StoryRss3764.xml", "ידיאו" => "http://www.ynet.co.il/Integration/StoryRssVideo2.xml" ), 'בריאות' => array ( "כול ערוץ הבריאות" => "http://www.ynet.co.il/Integration/StoryRss1208.xml" ), 'הורים' => array ( "כול ערוץ ההורים" => "http://www.ynet.co.il/Integration/StoryRss3052.xml" ), 'דעות' => array ( "כול ערוץ הדעות" => "http://www.ynet.co.il/Integration/StoryRss194.xml" ), 'ירוק' => array ( "כל הערוץ הירוק" => "http://www.ynet.co.il/Integration/StoryRss4872.xml", "סביבה" => "http://www.ynet.co.il/Integration/StoryRss4879.xml", "בעלי חיים" => "http://www.ynet.co.il/Integration/StoryRss4880.xml", "שאלות חיות" => "http://www.ynet.co.il/Integration/StoryRss4926.xml", "וידיאו" => "http://www.ynet.co.il/Integration/StoryRssVideo4872.xml" ), 'אוכל' => array ( "כל ערוץ האוכל" => "http://www.ynet.co.il/Integration/StoryRss975.xml", "וידיאו" => "http://www.ynet.co.il/Integration/StoryRss975.xml" ), 'יהדות' => array ( "כל ערוץ היהדות" => "http://www.ynet.co.il/Integration/StoryRss4403.xml" ), 'צרכנות' => array ( "כל ערוץ הצרכנות" => "http://www.ynet.co.il/Integration/StoryRss437.xml", "מבצעים" => "http://www.ynet.co.il/Integration/StoryRss444.xml", "וידיאו" => "http://www.ynet.co.il/Integration/StoryRssVideo437.xml" ), 'מחשבים' => array ( "כל ערוץ המחשבים" => "http://www.ynet.co.il/Integration/StoryRss544.xml", "סקירות" => "http://www.ynet.co.il/Integration/StoryRss2424.xml", "אינטרנט" => "http://www.ynet.co.il/Integration/StoryRss546.xml", "משחקים" => "http://www.ynet.co.il/Integration/StoryRss571.xml", "PC מגזין" => "http://www.ynet.co.il/Integration/StoryRss1694.xml", "טכנולוגיה" => "http://www.ynet.co.il/Integration/StoryRss545.xml", "קטעי קישור" => "http://www.ynet.co.il/Integration/StoryRss4540.xml", "מרושתים" => "http://www.ynet.co.il/Integration/StoryRss4541.xml", "מדריכים ותוכנה" => "http://www.ynet.co.il/Integration/StoryRss786.xml", "וידיאו" => "http://www.ynet.co.il/Integration/StoryRssVideo544.xml" ) ); //Loading XML File By User Choice $load_xml_file = simplexml_load_file($categorys_array[$category][$sub_category]); ?> <!--Start Box Desgin!--> <body> <table cellpadding="2" cellspacing="0" align="center" width="200px"> <tr> <td style="font-family: verdana;font-size: 8pt;font-weight: bold;text-align: center;background-color: <?=$title_background_color?>;color: <?=$title_font_color?>"><?=$title?></td> </tr> <?php for ($i = 0; $i<$limit; $i++) { $titles[] = iconv("utf-8","windows-1255",$load_xml_file->channel->item[$i]->title); $links[] = iconv("utf-8","windows-1255",$load_xml_file->channel->item[$i]->link); echo "<tr> <td style=' border-right: 1px solid $table_border_color; border-left: 1px solid $table_border_color; border-bottom: 1px solid $table_border_color;'> <a style='color: $font_color;' href='".$links[$i]."'>".$titles[$i]."</a> </td> </tr>"; } ?> </table> <!--End Box Design!--> <? } load_ynet_rss(8,"מחשבים","טכנולוגיה"); ?> </body> </html>
|