$c = db_connect(); $res = array(); $s = oci_parse($c, $sql); if ($bind != null) { foreach ($bind as $key => $value) { oci_bind_by_name($s, ":" . $key, htmlentities($value, ENT_QUOTES)); } } $res = oci_execute($s); return $res; } include_once 'lib/RSS.php'; $myfeed = new RSSFeed(); $myfeed->SetChannel('http://apps.v2nportal.com/services/marss/', 'mAgric Pest', '', 'en-us', 'VAS2Nets Technologies', 'VAS2Nets Technologies', 'VAS2Nets Technologies mAgric Pest'); $series = array('1' => '1121', '2' => '1141', '3' => '1161', '4' => '1101', '5' => '1081', '6' => '1181'); $id = $_REQUEST['cat']; $cid = $series[$id]; if (!$cid) { exit; } $tip = get_tips($cid); $myfeed->SetItem('http://www.v2nportal.com/marss/rss.php?feed_id=' . $tip->CATEGORY, 'mAgric', $tip->MESSAGE); echo $myfeed->output(); function get_tips($id) { $today = date('Y-m-d'); $sql = "select * from alert where service_id = {$id} and to_char(schedule, 'yyyy-mm-dd')='{$today}'"; $res = array_shift(db_query($sql)); //var_dump($res); exit; return $res; }
if ("true" == $status && "Up" == getStr("Device.MoCA.Interface.1.Status")) { $tip = 'Status: Connected<br/>' . (1 + intval(getStr("Device.MoCA.Interface.1.AssociatedDeviceNumberOfEntries"))) . ' nodes connected'; } else { $tip = 'Status: Unconnected<br/>no nodes'; } break; case "sta_dect": if ("true" == $status) { $tip = getStr("Device.X_CISCO_COM_MTA.Dect.HandsetsNumberOfEntries") . ' Handsets connected'; } else { $tip = 'no Handsets'; } break; case "sta_fire": $tip = 'Firewall is set to ' . $status; break; default: $tip = "No Tips!"; break; } return $tip; } $tags = explode(',', $arConfig['target']); $stas = explode(',', $arConfig['status']); $tips = array(); for ($i = 0; $i < count($tags); $i++) { array_push($tips, get_tips($tags[$i], $stas[$i])); } $arConfig = array('tags' => $tags, 'tips' => $tips); $jsConfig = json_encode($arConfig); echo $jsConfig;
$xml->writeCData($msg); $xml->endElement(); $xml->startElement('preview'); $xml->writeCData(stripslashes($msg)); $xml->endElement(); $xml->endElement(); echo 'yes4<br>'; $file = "bundesligaweekly.xml"; echo $file; file_put_contents("rss/" . $file, $xml->outputMemory(true)); } #Serie A echo '<br><br>SERIE A<br><br>'; for ($i = 0; $i <= count($seriea_service_ids); $i++) { $sid = $seriea_service_ids[$i]; $feed = get_tips($sid); $msg = ''; $sch = ''; $older_sch; if (!$feed->SMSCONTENT) { $msg = ''; $sch = ''; continue; } else { $msg = $feed->SMSCONTENT; $sch = $feed->TIME; if (!empty($msg) && $sch > $older_sch) { $older_sch = $sch; } else { continue; }