';
}
public static function generateModelsTable(array $columnInfo, array $models, array $datatableOpts = array()) {
echo '';
$colLabels = "";
foreach ($columnInfo as $col){
$colLabels.= '| '.$col["label"].' | ';
}
$colLabels.= '
';
echo ''.$colLabels.''.$colLabels.'';
if (sizeof($models)>0){
echo '';
foreach ($models as $model){
echo '';
foreach ($columnInfo as $col){
$field = $col["field"];
echo '| '.$model->$field.' | ';
}
echo '
';
}
echo '';
}
echo '
';
}
public static function getMeteoBlock(){
$config = GlobalVariables::get("config");
$cont = file_get_contents($config->files->meteoCache);
$json = json_decode($cont);
$todayImgUrl = " http://openweathermap.org/img/w/".$json->list[0]->weather[0]->icon.".png";
$todayTemp = $json->list[0]->main->temp;
$todayMax = $json->list[0]->main->temp_max;
$todayMin = $json->list[0]->main->temp_min;
$tomorrowImgUrl = " http://openweathermap.org/img/w/".$json->list[1]->weather[0]->icon.".png";
$tomorrowTemp = $json->list[1]->main->temp;
$tomorrowMax = $json->list[1]->main->temp_max;
$tomorrowMin = $json->list[1]->main->temp_min;
?>
Meteo Napoli
Oggi

°
Max: °
Min: °
Domani

°
Max: °
Min: °