Creato admin model Aggiunte alcune classi di utility gui iniziato login manager creato session handler
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
/*
|
|
Author: Riccardo Di Dato
|
|
Creation Date: 13/gen/2016
|
|
*/
|
|
|
|
class GUIHandler {
|
|
|
|
public static function generateHtmlHeaders(array $data = array()){
|
|
$conf = GlobalVariables::get("config");
|
|
|
|
$title = $conf->info->projectName;
|
|
if (array_key_exists("title", $data)){
|
|
$title = $data["title"];
|
|
}
|
|
|
|
$description = $conf->info->projectDescription;
|
|
if (array_key_exists("description", $data)){
|
|
$description = $data["description"];
|
|
}
|
|
|
|
$author = $conf->info->author;
|
|
if (array_key_exists("author", $data)){
|
|
$author = $data["author"];
|
|
}
|
|
|
|
header("Content-type: text/html; charset=utf-8");
|
|
|
|
echo "<!DOCTYPE html>\n";
|
|
echo "<html class=\"sidebar_default no-js\" lang=\"en\">\n<head>\n";
|
|
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
|
|
echo "<title>$title</title>\n";
|
|
echo "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n";
|
|
echo "<meta name=\"description\" content=\"$description\">\n";
|
|
echo "<meta name=\"author\" content=\"$author\">\n";
|
|
echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge,chrome=1\">";
|
|
echo '<link rel="shortcut icon" href="'.self::getImagesUrl().'/favicon.png">'."\n";
|
|
// foreach (self::$inclusions as $incl){
|
|
// $incl->render();
|
|
// }
|
|
echo '</head>';
|
|
}
|
|
|
|
public static function getImagesUrl(){
|
|
return "./images";
|
|
}
|
|
|
|
}
|
|
|
|
?>
|