Inizio dockerizzazione

This commit is contained in:
2022-08-29 23:20:16 +02:00
parent b348b3a83d
commit 3d22f4cc6a
851 changed files with 1117 additions and 904 deletions
+74
View File
@@ -0,0 +1,74 @@
<?php
/*
Author: Riccardo Di Dato
Creation Date: 14/gen/2016
*/
class HTMLHelper {
public static function generateAdminHead() {
echo '<div class="admin_head"><img alt="" src="'.GUIHandler::getImagesUrl()."admin/header.png".'"></div>';
}
public static function generateModelsTable(array $columnInfo, array $models, array $datatableOpts = array()) {
echo '<table>';
$colLabels = "<tr>";
foreach ($columnInfo as $col){
$colLabels.= '<th>'.$col["label"].'</th>';
}
$colLabels.= '</tr>';
echo '<thead>'.$colLabels.'</thead><tfoot>'.$colLabels.'</tfoot>';
if (sizeof($models)>0){
echo '<tbody>';
foreach ($models as $model){
echo '<tr>';
foreach ($columnInfo as $col){
$field = $col["field"];
echo '<td>'.$model->$field.'</td>';
}
echo '</tr>';
}
echo '<tbody>';
}
echo '</table>';
}
public static function getMeteoBlock(){
$config = GlobalVariables::get("config");
if(file_exists($config->files->meteoCache)){
$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;
?>
<div class="meteoTitle">Meteo Napoli</div>
<div class="meteo">
<div class="today">
<div class="day">Oggi</div>
<div class="image"><img src="<?php echo $todayImgUrl;?>" alt="" /><?php echo $todayTemp;?>&deg;</div>
<div><span class="label">Max:</span> <?php echo $todayMax;?>&deg;</div>
<div><span class="label">Min:</span> <?php echo $todayMin;?>&deg;</div>
</div><div class="tomorrow">
<div class="day">Domani</div>
<div class="image"><img src="<?php echo $tomorrowImgUrl;?>" alt="" /><?php echo $tomorrowTemp;?>&deg;</div>
<div><span class="label">Max:</span> <?php echo $tomorrowMax;?>&deg;</div>
<div><span class="label">Min:</span> <?php echo $tomorrowMin;?>&deg;</div>
</div>
</div>
<?php
}
}
}
?>