0) { $opt[]="lim=$lim";
if (intval($form['start'])!= 0) { $opt[]='start=' . intval($form['start']); }
}
// urlencode the category name
if ($form['cat'] !='') {
$cat ="cat=" . getQuery('cat');
$opt[]=$cat; }
else { $cat =''; }
if ($clim > 0) { $opt[]="clim=$clim"; }
if (count($opt) > 0) { $options = '?' . join('%26', $opt); } else { $options=''; }
$url=BASEURL.'/api/api_programmeList.php' . $options;
$cache=''; // do not cache search results
// Get and then poplulate our xml object
$xml=getXMLData($url, $cache);
// Parse XML
$xml->Parse();
// If no data we error
if ($xml->document->results[0]->error[0]->tagData =='No Data') {
noResultsMsg();
}
else {
// Create our output
$out='
Search Results:
';
$links= createPrevNextLinks($xml);
$out.= displayProgrammeList($xml) . $links;
}
// Display output
print $html['header'] . $out . $html['footer'];
exit;
?>