<?
Header("content-type: application/x-javascript");
//$serverIP=$_SERVER['REMOTE_ADDR'];
require_once('/domains/images/simplepie.inc');
$feed = new SimplePie('http://nottechsupport.resourceserver.org/?feed=rss2&cat=4');
$feed->handle_content_type();
echo "var techsupport_notifications\n";
echo "techsupport_notifications='<div class=\"techsupport_notifications_list\">'\n";
?>

<?php
$new_lines = array("\r\n", "\n", "\r");
$result_set = $feed->get_items();

$i=1;
foreach ($result_set as $item)
{
	echo "techsupport_notifications+='<h3 class=\"post-title\" onclick=\"showNotice(\'post-{$i}\');\"><small>".$item->get_date('j F Y')."</small><br>'\n";
	echo "techsupport_notifications+='".$item->get_title()."</h3>'\n";
	echo "techsupport_notifications+='<div class=\"para-wrapper\" id=\"post-".$i."\" style=\"display: none;\">'\n";
	echo "techsupport_notifications+='<div>".str_replace($new_lines,'',$item->get_content())."</div>'\n";
	echo "techsupport_notifications+='</div>'\n";
	echo "techsupport_notifications+='<div class=\"readmore-notice\"><a href=\"#123\" onclick=\"showNotice(\'post-{$i}\');\"><small>Read More &raquo;</small></a></div>'\n";
	$i++;
}
?>

<?php
echo "techsupport_notifications+='</div>'\n";
echo "if(document.getElementById('techsupport_notifications')){document.getElementById('techsupport_notifications').innerHTML=techsupport_notifications;}";
?>