1 Commits
Author SHA1 Message Date
r.didato e2fb0d6d89 #3 - Fatto, da testare 2022-09-25 18:46:44 +02:00
14 changed files with 54 additions and 106 deletions
+3
View File
@@ -12,5 +12,8 @@ mkdir -p "/tmp/${DDNINJA_AUTHOR}/${DDNINJA_BUILDNAME}"
chown -R www-data:www-data "/tmp/${DDNINJA_AUTHOR}/${DDNINJA_BUILDNAME}" chown -R www-data:www-data "/tmp/${DDNINJA_AUTHOR}/${DDNINJA_BUILDNAME}"
chown -R www-data:www-data /var/log/${DDNINJA_AUTHOR} chown -R www-data:www-data /var/log/${DDNINJA_AUTHOR}
mkdir -p "/home/${DDNINJA_AUTHOR}/storage/${DDNINJA_BUILDNAME}/media/"
chown -R www-data:www-data "/home/${DDNINJA_AUTHOR}/storage/${DDNINJA_BUILDNAME}/media/"
asdphp-entrypoint & wait asdphp-entrypoint & wait
exit $? exit $?
+1 -3
View File
@@ -19,9 +19,7 @@ class BannerHelper {
} }
public static function printBanner($position = BannerModel::POSITION_HEAD){ public static function printBanner($position = BannerModel::POSITION_HEAD){
$category = BannerModel::GENERAL_CATEGORY; $cur = self::getPlaceholderId();
$cur = self::getPlaceholderId();
if (!array_key_exists($position, self::$positions)) { if (!array_key_exists($position, self::$positions)) {
self::$positions[$position] = []; self::$positions[$position] = [];
+8 -4
View File
@@ -19,9 +19,7 @@ class GUIHandler {
private static $onLoadEvents = array(); private static $onLoadEvents = array();
public static function generateHtmlHeaders(array $data = array(), $admin = false){ public static function generateHtmlHeaders(array $data = array(), $admin = false){
if ($admin) { ASDSessionHandler::getSessionId();
ASDSessionHandler::getSessionId();
}
$conf = GlobalVariables::get("config"); $conf = GlobalVariables::get("config");
$title = $conf->info->projectName; $title = $conf->info->projectName;
@@ -222,7 +220,10 @@ class GUIHandler {
<?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?> <?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?>
</div> </div>
</div> </div>
<div class="bottomBar" style="height:40px;width:1000px;"></div> <div class="bottomBar" style="width:1000px;"></div>
<div class="banner subheadBanner mediaContent">
<?php BannerHelper::printBanner(BannerModel::POSITION_TOP);?>
</div>
</div> </div>
<?php <?php
} }
@@ -329,6 +330,9 @@ class GUIHandler {
self::setCookieSeen(); self::setCookieSeen();
} }
?> ?>
<div class="banner footerBanner mediaContent">
<?php BannerHelper::printBanner(BannerModel::POSITION_BOTTOM);?>
</div>
<div class="footer"> <div class="footer">
<div class="footerCategory"> <div class="footerCategory">
<a href="index.php">Home</a> <a href="index.php">Home</a>
+3 -6
View File
@@ -343,12 +343,6 @@ class GUIHandlerMobile {
public static function generateFooter(){ public static function generateFooter(){
if (!self::hasSeenCookieMessage()){ if (!self::hasSeenCookieMessage()){
?> ?>
<!-- <div class="cookieAdvice"> -->
<!-- <div>Questo sito utilizza cookie tecnici per offrirti una migliore esperienza di navigazione sul sito.</div> -->
<!-- <div>Navigando su questo sito accetti l'utilizzo dei cookie.</div><br/> -->
<!-- <a class="closeAdvice">Chiudi</a> -->
<!-- <br/><br/> -->
<!-- </div> -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
$('.closeAdvice').click(function(){ $('.closeAdvice').click(function(){
@@ -363,6 +357,9 @@ class GUIHandlerMobile {
self::setCookieSeen(); self::setCookieSeen();
} }
?> ?>
<div class="banner footerBanner mediaContent">
<?php BannerHelper::printBanner(BannerModel::POSITION_BOTTOM);?>
</div>
<div class="footer"> <div class="footer">
<div class="footerButton" style="text-align:center;"> <div class="footerButton" style="text-align:center;">
<a href="#"> <a href="#">
+11 -3
View File
@@ -91,9 +91,17 @@ try{
<span class="label">Posizione:</span> <span class="label">Posizione:</span>
<select name="position"> <select name="position">
<option disabled selected style="display:none;">Seleziona Posizione</option> <option disabled selected style="display:none;">Seleziona Posizione</option>
<option <?php echo $banner->position==BannerModel::POSITION_HEAD?"selected":"";?> value="<?php echo BannerModel::POSITION_HEAD;?>"><?php echo BannerModel::$BANNER_POSITIONS[BannerModel::POSITION_HEAD]["label"];?></option> <?php
<option <?php echo $banner->position==BannerModel::POSITION_BODY?"selected":"";?> value="<?php echo BannerModel::POSITION_BODY;?>"><?php echo BannerModel::$BANNER_POSITIONS[BannerModel::POSITION_BODY]["label"];?></option> foreach (BannerModel::$BANNER_POSITIONS as $type => $data) {
<option <?php echo $banner->position==BannerModel::POSITION_LONG?"selected":"";?> value="<?php echo BannerModel::POSITION_LONG;?>"><?php echo BannerModel::$BANNER_POSITIONS[BannerModel::POSITION_LONG]["label"];?></option> printf(
'<option %s value="%s">%s</option>',
$banner->position==$type ? "selected" : "",
$type,
$data['label']
);
}
?>
</select> </select>
</div> </div>
<div> <div>
+2
View File
@@ -74,6 +74,8 @@ HTMLHelper::generateAdminHead();
<li>Banner testata:<b>180x60px</b></li> <li>Banner testata:<b>180x60px</b></li>
<li>Banner corpo:<b>160x120px</b></li> <li>Banner corpo:<b>160x120px</b></li>
<li>Banner lungo:<b>160x240px</b></li> <li>Banner lungo:<b>160x240px</b></li>
<li>Banner Inizio pagina:<b>1000x120px</b></li>
<li>Banner Fine pagina:<b>1000x200px</b></li>
</ul> </ul>
Tale restizione &egrave; consigliata anche per i banner di tipo <i>HTML5</i>. Tale restizione &egrave; consigliata anche per i banner di tipo <i>HTML5</i>.
</p> </p>
+1 -74
View File
@@ -23,18 +23,6 @@ try{
$newMedia = null; $newMedia = null;
$mediaTypeSaved = PostHandler::get("mediaType"); $mediaTypeSaved = PostHandler::get("mediaType");
// if(!is_null($bannerId) && strcmp($bannerId, "")!=0){
// $edit = true;
// $banner = GlobalVariables::get("dao")->getFirst("BannerModel",array("id"=>$bannerId));
// $newMedias = DaoMediaHandler::getMedias($banner);
// if(sizeof($newMedias)>0){
// $newMedia = reset($newMedias);
// }
// if($banner->hasProperty("type") && !is_null($banner->type)){
// $mediaTypeSaved = $banner->type;
// }
// }
if(array_key_exists("action", $_POST) && strcmp(PostHandler::get("action"), "save")==0){ if(array_key_exists("action", $_POST) && strcmp(PostHandler::get("action"), "save")==0){
$mediaType = PostHandler::get("mediaType"); $mediaType = PostHandler::get("mediaType");
if (!is_null($mediaType) && strcmp($mediaType, "")!=0){ if (!is_null($mediaType) && strcmp($mediaType, "")!=0){
@@ -98,69 +86,7 @@ try{
else { else {
throw new GUIException("Selezionare il tipo di file multimediale da utilizzare"); throw new GUIException("Selezionare il tipo di file multimediale da utilizzare");
} }
// if(is_null($bannerId) || strcmp($bannerId, "")==0){
// $banner->customer = PostHandler::get("customer");
// $banner->type = PostHandler::get("mediaType");
// $banner->start = new Mongodate(strtotime(PostHandler::get("dateStart")));
// $banner->end = new Mongodate(strtotime(PostHandler::get("dateEnd")));
// GlobalVariables::get("dao")->save($banner);
// $bannerId = $banner->id;
// }
// if(!is_null($bannerId) && strcmp($bannerId, "")!=0){
// $edit=true;
// // $banner = GlobalVariables::get("dao")->getFirst("BannerModel",array("id"=>$bannerId));
// $file = "";
// $mediaType = PostHandler::get("mediaType");
// $banner->type=$mediaType;
// if(strcmp($mediaType, "")!=0){
// $tmp = array();
// $saveable = new stdClass();
// $saveable->mediaType = $mediaType;
// if(strcmp($mediaType,MediaModel::TYPE_HTML5)==0){
// $saveable->code = PostHandler::get("data");
// $media = DaoMediaHandler::createNewTextBasedMedia($saveable);
// }
// else if(strcmp($mediaType,MediaModel::TYPE_IMAGE)==0){
// $file = $_FILES['data']['tmp_name'];
// $info = pathinfo($_FILES['data']['name']);
// // $file = PostHandler::get("data");
// $media = DaoMediaHandler::createNewFileBasedMedia($saveable, $file,$info["extension"]);
// }
// if(!is_null($media)){
// GlobalVariables::get("dao")->save($media);
// DaoMediaHandler::addMedia($banner, $media);
// GlobalVariables::get("dao")->save($banner);
// }
// else{
// throw new Exception("Cannot save a null media in the news with id '".$bannerId."'");
// }
// }
// else{
// throw new Exception("Invalid mediaType '".$mediaType."' while trying to add the media in editBanner");
// }
// GUIHandler::redirect("admin/listBanner.php");
// }
} }
// else if(array_key_exists("action", $_POST) && strcmp(PostHandler::get("action"), "delete")==0){
// if(!is_null($bannerId) && strcmp($bannerId, "")!=0){
// $banner = GlobalVariables::get("dao")->getFirst("BannerModel",array("id"=>$bannerId));
// $medias = DaoMediaHandler::getMedias($banner);
// // $media = reset($medias);
// // $media = GlobalVariables::get("dao")->getFirst("MediaModel",array("id"=>$mediaId));
// foreach ($medias as $media){
// DaoMediaHandler::deleteMedia($banner, $media);
// $banner->type = null;
// GlobalVariables::get("dao")->save($banner);
// }
// }
// GUIHandler::redirect("admin/listBanner.php");
// }
$formFile = '<input type="hidden" name="MAX_FILE_SIZE" value="52428800" /> $formFile = '<input type="hidden" name="MAX_FILE_SIZE" value="52428800" />
<span class="label">Seleziona file</span><input type="file" name="data" />'; <span class="label">Seleziona file</span><input type="file" name="data" />';
if($edit && !is_null($newMedia)){ if($edit && !is_null($newMedia)){
@@ -173,6 +99,7 @@ try{
}catch(GUIException $ex){ }catch(GUIException $ex){
$error = $ex->getMessage(); $error = $ex->getMessage();
}catch (Exception $exec){ }catch (Exception $exec){
var_dump($exec);
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_ERROR, $exec->getMessage()); LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_ERROR, $exec->getMessage());
$error = "Si è verificato un errore inaspettato durante l'esecuzione della pagina. Se l'errore persiste contattare il supporto tecnico."; $error = "Si è verificato un errore inaspettato durante l'esecuzione della pagina. Se l'errore persiste contattare il supporto tecnico.";
} }
+3 -2
View File
@@ -152,8 +152,9 @@ try {
</div> </div>
<div class="archivioResults"> <div class="archivioResults">
<div style="text-align:center;"> <div style="text-align:center;">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <div class="banner subheadBanner mediaContent">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <?php BannerHelper::printBanner(BannerModel::POSITION_TOP);?>
</div>
</div> </div>
<?php if(!$post){ <?php if(!$post){
?> ?>
+3 -2
View File
@@ -136,8 +136,9 @@ GUIHandlerMobile::generateHtmlHeaders(array("additionalMetadata"=>$additionalHea
</script> </script>
<div class="newsContainer"> <div class="newsContainer">
<div style="text-align:center;"> <div style="text-align:center;">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <div class="banner subheadBanner mediaContent">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <?php BannerHelper::printBanner(BannerModel::POSITION_TOP);?>
</div>
</div> </div>
<div class="articoloCategoryName" style="color:white;background-color:<?php echo NotiziaModel::$NOTIZIE_CATEGORY[$articolo->category]["color"] ?>;"> <div class="articoloCategoryName" style="color:white;background-color:<?php echo NotiziaModel::$NOTIZIE_CATEGORY[$articolo->category]["color"] ?>;">
<span itemprop="articleSection"><?php echo strtoupper(NotiziaModel::$NOTIZIE_CATEGORY[$articolo->category]["label"]);?></span> <span itemprop="articleSection"><?php echo strtoupper(NotiziaModel::$NOTIZIE_CATEGORY[$articolo->category]["label"]);?></span>
+4 -3
View File
@@ -65,9 +65,10 @@ try{
GUIHandlerMobile::generateHeadPublic(); GUIHandlerMobile::generateHeadPublic();
GUIHandlerMobile::generateMenu();?> GUIHandlerMobile::generateMenu();?>
<div class="categorySummaryContainer"> <div class="categorySummaryContainer">
<div style="text-align:center;"> <div style="text-align:center;">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <div class="banner subheadBanner mediaContent">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <?php BannerHelper::printBanner(BannerModel::POSITION_TOP);?>
</div>
</div> </div>
<?php $i=0; <?php $i=0;
if(sizeof($notizie)>0){ if(sizeof($notizie)>0){
+3 -2
View File
@@ -144,8 +144,9 @@ catch (Exception $ex){
?> ?>
<div class="newsBarMobile"> <div class="newsBarMobile">
<div style="text-align:center;"> <div style="text-align:center;">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <div class="banner subheadBanner mediaContent">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <?php BannerHelper::printBanner(BannerModel::POSITION_TOP);?>
</div>
</div> </div>
<div class="newsContainer" > <div class="newsContainer" >
<?php $i=0; foreach($ansaNews as $ansa){ <?php $i=0; foreach($ansaNews as $ansa){
+3 -2
View File
@@ -88,8 +88,9 @@ try {
GUIHandlerMobile::generateMenu();?> GUIHandlerMobile::generateMenu();?>
<div class="searchResultsContainer"> <div class="searchResultsContainer">
<div style="text-align:center;"> <div style="text-align:center;">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <div class="banner subheadBanner mediaContent">
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div> <?php BannerHelper::printBanner(BannerModel::POSITION_TOP);?>
</div>
</div> </div>
<?php <?php
if ($found){ if ($found){
+8 -5
View File
@@ -22,11 +22,14 @@ body{font-family:lato, arial;}
.socialBar > a > div{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;} .socialBar > a > div{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;}
.middleBar{position:relative;height:138px;border:solid #d6d6d6 1px;border-top:0px;border-left:0px;border-right:0px;} .middleBar{position:relative;height:138px;border:solid #d6d6d6 1px;border-top:0px;border-left:0px;border-right:0px;}
.banner img{ width: 100%; height: 100%; overflow: hidden; }
.leftBanner{position:absolute;top:45px;left:10px;} .leftBanner{position:absolute;top:45px;left:10px;}
.logo{display:inline-block;width:50%;text-align:center;margin:12px 250px;} .logo{display:inline-block;width:50%;text-align:center;margin:12px 250px;}
.rightBanner{position:absolute;top:45px;right:10px;} .rightBanner{position:absolute;top:45px;right:10px;}
.topBanner{width:180px;height:60px;} .topBanner{width:180px;height:60px;}
.topBanner > *{max-widht:100%;max-height:100%;} .topBanner > * { max-width:100%; max-height:100%; }
.subheadBanner { width:1000px; height:120px; }
.footerBanner { width:1000px; height:200px; }
.menuContainer{position:relative;} .menuContainer{position:relative;}
@@ -312,23 +315,23 @@ display: inline-block;
.meteo div span{font-weight:bold;} .meteo div span{font-weight:bold;}
.middleRightBanner{width:210px;overflow: hidden;height: 157px;margin: 5px 0;} .middleRightBanner{width:210px;overflow: hidden;height: 157px;margin: 5px 0;}
.middleRightBanner img{width:100%; heigth:100%;} .middleRightBanner img{width:100%; height:100%;}
.middleRightLongBanner img{height:100%;width:100%;} .middleRightLongBanner img{height:100%;width:100%;}
.middleRightLongBanner{height:314px; width:210px;overflow: hidden;margin: 5px 0;} .middleRightLongBanner{height:314px; width:210px;overflow: hidden;margin: 5px 0;}
.reader > .lastContainer, .lastContainer{/* max-height:120px */;display:block;padding:5px;border-bottom:dotted #C1B4B4 1px;cursor:pointer;text-decoration:none;color:black;} .reader > .lastContainer, .lastContainer{ display:block;padding:5px;border-bottom:dotted #C1B4B4 1px;cursor:pointer;text-decoration:none;color:black;}
.reader > .lastContainer:last-child, .lastContainer:last-child {border-bottom: none;} .reader > .lastContainer:last-child, .lastContainer:last-child {border-bottom: none;}
.reader > .lastData, .lastData{font-size:12px;} .reader > .lastData, .lastData{font-size:12px;}
.reader > .lastTitle, .lastTitle{font-size:12px;font-weight:bold;} .reader > .lastTitle, .lastTitle{font-size:12px;font-weight:bold;}
.reader > .lastContinua, .lastContinua{text-align:right; font-size:12px;font-weight:bold;padding-bottom:5px;} .reader > .lastContinua, .lastContinua{text-align:right; font-size:12px;font-weight:bold;padding-bottom:5px;}
.reader > .lastContinua a, .lastContinua a{color:#64bff0;} .reader > .lastContinua a, .lastContinua a{color:#64bff0;}
.gossipContainer{/* max-height:165px */;/* margin-top:5px */;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;cursor:pointer;overflow:hidden;text-decoration:none;color:black;} .gossipContainer{margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;cursor:pointer;overflow:hidden;text-decoration:none;color:black;}
.gossipContainer#gossip_2{border-bottom:none;} .gossipContainer#gossip_2{border-bottom:none;}
.gossipTitle{margin-bottom:5px;font-weight:bold;font-size:20px;} .gossipTitle{margin-bottom:5px;font-weight:bold;font-size:20px;}
.gossipSubtitle{margin-bottom:5px;color:#64bff0;font-weight:bold;font-size:15px;} .gossipSubtitle{margin-bottom:5px;color:#64bff0;font-weight:bold;font-size:15px;}
.animaliContainer,.viaggiContainer{/* max-height:165px; *//* margin-top:5px */;display:block;margin-bottom:5px;text-decoration:none;color:black;} .animaliContainer,.viaggiContainer{display:block;margin-bottom:5px;text-decoration:none;color:black;}
.animaliContainer > .culturaMainMedia,.viaggiContainer > .culturaMainMedia{text-align:left;} .animaliContainer > .culturaMainMedia,.viaggiContainer > .culturaMainMedia{text-align:left;}
.animaliTitle,.viaggiTitle{cursor:pointer;margin-bottom:5px;font-weight:bold;font-size:17px;} .animaliTitle,.viaggiTitle{cursor:pointer;margin-bottom:5px;font-weight:bold;font-size:17px;}
+1
View File
@@ -1,2 +1,3 @@
DDNINJA_PROJECTNAME=FDN2 DDNINJA_PROJECTNAME=FDN2
DDNINJA_BUILDNAME=fdn2 DDNINJA_BUILDNAME=fdn2
DDNINJA_AUTHOR=ddninja