<div class="medium-4 columns panel">
			<h3>Lista de Canais</h3>
			
			<table>
			<thead>
				<tr>
					<th>#</th>
					<th>Nome</th>
				</tr>
			</thead>
			
			<tbody>
			<?php 
require "config/TVApi.php";
$API = new TVApi();
$channels = $API->getChannelList();
for ($i = 0; $i < sizeof($channels); $i++) {
    echo "<tr>";
    echo "<td>";
    echo $i;
    echo "</td>";
    echo "<td>";
    echo $channels[$i]->getName() . "&nbsp; (<a href='guiatv.php?sigla=" . $channels[$i]->getSigla() . "'>" . $channels[$i]->getSigla() . "</a>)";
    echo "</td>";
    echo "</tr>";
}
?>
			</tbody>
			</table>
		</div>
<?php

require "config/functions.php";
require "config/TVApi.php";
$API = new TVApi();
echo "No. of Channels: " . $API->getChannelCount() . "<br>";
echo "Channel " . $API->getChannel($API->getChannelID("FOX"))->getName();
echo "<br>Today: " . $today . "+00:00:00";
echo "<br>Tomorrow: " . $tomorrow . "+00:00:00";
$API->getChannel(4)->getPrograms($API->getChannel($API->getChannelID("FOX"))->getSigla() . "&startDate=" . $today . "&endDate=" . $tomorrow);
$API->getChannel(4)->getProgramListing();
/*

require "config/NewsApi.php";

$cm = new NewsFeed("http://www.cmjornal.xl.pt/rss.aspx");
$cm->getOutput();
*/
require "NewsApi.php";
require "TVApi.php";
require "weatherAPI.php";
if (isset($_REQUEST["ajaxGetNews"])) {
    $request = $_REQUEST["ajaxGetNews"];
    if ($request == "CM") {
        $news = new NewsFeed("http://www.cmjornal.xl.pt/rss.aspx");
        $json = $news->getJSON();
        print $json;
    } else {
        exit;
    }
} else {
    if (isset($_REQUEST["ajaxGetTVGuide"])) {
        $channel = $_REQUEST["ajaxGetTVGuide"];
        $API = new TVApi();
        $API->getChannel(0)->getPrograms($API->getChannel($API->getChannelID($channel))->getSigla() . "&startDate=" . $today . "&endDate=" . $tomorrow);
        print $API->getChannel(0)->getJSON();
    } else {
        if (isset($_REQUEST["ajaxGetWeather"])) {
            $city = $_REQUEST["ajaxGetWeather"];
            $w = new Weather($city);
            $w->getWeather();
            $w->getWeatherForecast();
            $json_forecast = $w->getForecastJSON();
            $curWeather = $w->getCurrent();
            $curTempInterval = $w->getTempInterval();
            $curTemp = $w->getTemp();
            $cur = array();
            array_push($cur, $curWeather, $curTemp, $curTempInterval);
            $rtn = array();