adattati i banner alla versione mobile
importati i file funzionali per i banner nella parte mobile
This commit is contained in:
@@ -141,6 +141,10 @@ try {
|
||||
</form>
|
||||
</div>
|
||||
<div class="archivioResults">
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div>
|
||||
</div>
|
||||
<?php if(!$post){
|
||||
?>
|
||||
<div>Selezionate una data per la ricerca, e premere il tasto Invia.</div>
|
||||
@@ -165,6 +169,14 @@ try {
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
if($i%4==0){
|
||||
?>
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="paging">
|
||||
|
||||
@@ -58,6 +58,10 @@ try{
|
||||
GUIHandlerMobile::generateHeadPublic($category);
|
||||
GUIHandlerMobile::generateMenu();?>
|
||||
<div class="categorySummaryContainer">
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div>
|
||||
</div>
|
||||
<?php $i=0;
|
||||
if(sizeof($notizie)>0){
|
||||
foreach ($notizie as $notizia){
|
||||
@@ -76,6 +80,14 @@ try{
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
if($i%5==0){
|
||||
?>
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
|
||||
require_once(dirname(__FILE__)."/../load.php");
|
||||
|
||||
$replaced = null;
|
||||
if (array_key_exists("replaced",$_GET)) {
|
||||
$replaced = $_GET["replaced"];
|
||||
}
|
||||
|
||||
$position = BannerModel::POSITION_HEAD;
|
||||
if (array_key_exists("pos",$_GET)) {
|
||||
$intPost = intval($_GET["pos"]);
|
||||
if (array_key_exists($intPost,BannerModel::$BANNER_POSITIONS)){
|
||||
$position = $intPost;
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists("cat",$_GET)) {
|
||||
$category = intval($_GET["cat"]);
|
||||
if ($category!= BannerModel::GENERAL_CATEGORY && !array_key_exists($category,NotiziaModel::$NOTIZIE_CATEGORY)){
|
||||
$category = BannerModel::GENERAL_CATEGORY;
|
||||
}
|
||||
}
|
||||
|
||||
// $banner = GlobalVariables::get("dao")->getFirst("BannerModel",array("id"=>$_GET['id']));
|
||||
|
||||
// ASDSessionHandler::setSessionValue("bannerActive",array());
|
||||
$banner = AnalyticsHelper::getBannerToShow($position,$replaced,$category);
|
||||
if (is_null($banner) && $category!=BannerModel::GENERAL_CATEGORY){
|
||||
$banner = AnalyticsHelper::getBannerToShow($position,$replaced,BannerModel::GENERAL_CATEGORY);
|
||||
}
|
||||
// var_dump($replaced);
|
||||
|
||||
if (!is_null($banner)){
|
||||
$media = DaoMediaHandler::getMainMediaFromModel($banner);
|
||||
echo '<a id="'.$banner->id.'" href="javascript:'.AnalyticsHelper::getBannerClickLink($banner).'">';
|
||||
$media->renderMedia(array("size"=>MediaRendererInterface::SIZE_BIG));
|
||||
echo '</a>';
|
||||
AnalyticsHelper::logBannerImpression($banner->id);
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var rand = Math.floor((Math.random() * 100) + 1);
|
||||
setTimeout(function () {
|
||||
bannerRoll('<?php echo $banner->id;?>',<?php echo $position; ?>,<?php echo $category?>);
|
||||
},60000+rand);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
// GUIHandler::generateHtmlHeaders(array(),true);
|
||||
?>
|
||||
+12
-82
@@ -75,88 +75,6 @@ try {
|
||||
$culturaNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $culturaNews);
|
||||
}
|
||||
|
||||
// $ristorantiNews = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_RISTORANTI,'_id'=>array('$nin'=>$ansaIds),
|
||||
// "about.data"=>array('$lte'=>new MongoDate())),
|
||||
// array("sort"=>array("about.data"=>-1),"limit"=>3)
|
||||
// );
|
||||
// if (sizeof($ristorantiNews)>0){
|
||||
// $ristorantiNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $ristorantiNews);
|
||||
// }
|
||||
|
||||
// $stats = GlobalVariables::get("dao")->aggregate("StatisticModel",PipelineHelper::getMostViewedOfLastDays(strtotime("-7 days"),5));
|
||||
// $idArray = array_map(function ($ele){ return new MongoId($ele["_id"]["notizia"]);}, $stats);
|
||||
|
||||
// $lastsNews = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"_id"=>array('$in'=>$idArray),"about.data"=>array('$lte'=>new MongoDate(),'$gte'=>new MongoDate(strtotime('-2 months')))),
|
||||
// array("sort"=>array("about.data"=>-1))
|
||||
// );
|
||||
// if (sizeof($lastsNews)<5){
|
||||
// $missing = 5-sizeof($lastsNews);
|
||||
// $add = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"_id"=>array('$nin'=>$idArray),"about.data"=>array('$lte'=>new MongoDate())),
|
||||
// array("sort"=>array("about.data"=>-1),"limit"=>$missing)
|
||||
// );
|
||||
// $lastsNews = array_merge($lastsNews,$add);
|
||||
// }
|
||||
// if (sizeof($lastsNews)>0){
|
||||
// $lastsNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $lastsNews);
|
||||
// }
|
||||
|
||||
|
||||
// $gossipNews = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_GOSSIP,'_id'=>array('$nin'=>$ansaIds),
|
||||
// "about.data"=>array('$lte'=>new MongoDate())),
|
||||
// array("sort"=>array("about.data"=>-1),"limit"=>2)
|
||||
// );
|
||||
// if (sizeof($gossipNews)>0){
|
||||
// $gossipNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $gossipNews);
|
||||
// }
|
||||
|
||||
// $elezioni = GlobalVariables::get("dao")->getFirst("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_SPECIALE_ELEZIONI,'_id'=>array('$nin'=>$ansaIds),
|
||||
// "about.data"=>array('$lte'=>new MongoDate())),
|
||||
// array("sort"=>array("about.data"=>-1))
|
||||
// );
|
||||
// if (!is_null($elezioni)){
|
||||
// $elezioni->testo = strip_tags($elezioni->testo);
|
||||
// $elezioni->sottotitolo = strip_tags($elezioni->sottotitolo);
|
||||
// }
|
||||
|
||||
// $lastViaggi = GlobalVariables::get("dao")->getFirst("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_VIAGGI,'_id'=>array('$nin'=>$ansaIds),
|
||||
// "about.data"=>array('$lte'=>new MongoDate())),
|
||||
// array("sort"=>array("about.data"=>-1))
|
||||
// );
|
||||
// if (!is_null($lastViaggi)){
|
||||
// $lastViaggi->testo = strip_tags($lastViaggi->testo);
|
||||
// $lastViaggi->sottotitolo = strip_tags($lastViaggi->sottotitolo);
|
||||
// }
|
||||
|
||||
|
||||
// $animalNews = GlobalVariables::get("dao")->getFirst("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_ANIMALI,'_id'=>array('$nin'=>$ansaIds),
|
||||
// "about.data"=>array('$lte'=>new MongoDate())),
|
||||
// array("sort"=>array("about.data"=>-1))
|
||||
// );
|
||||
// if (!is_null($animalNews)){
|
||||
// $animalNews->testo = strip_tags($animalNews->testo);
|
||||
// $animalNews->sottotitolo = strip_tags($animalNews->sottotitolo);
|
||||
// }
|
||||
|
||||
// $saluteNews = GlobalVariables::get("dao")->getFirst("NotiziaModel",
|
||||
// array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_SALUTE,'_id'=>array('$nin'=>$ansaIds),
|
||||
// "about.data"=>array('$lte'=>new MongoDate())),
|
||||
// array("sort"=>array("about.data"=>-1))
|
||||
// );
|
||||
// if (!is_null($saluteNews)){
|
||||
// $saluteNews->testo = strip_tags($saluteNews->testo);
|
||||
// $saluteNews->sottotitolo = strip_tags($saluteNews->sottotitolo);
|
||||
// }
|
||||
// var_dump($politicaNews);
|
||||
// if(sizeof($politicaNews)<=0){
|
||||
// echo "non trovateee!!!!";
|
||||
// }
|
||||
}
|
||||
catch (Exception $ex){
|
||||
echo $ex->getMessage();
|
||||
@@ -167,6 +85,10 @@ catch (Exception $ex){
|
||||
GUIHandlerMobile::generateMenu();
|
||||
?>
|
||||
<div class="newsBarMobile">
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div>
|
||||
</div>
|
||||
<div class="newsContainer" >
|
||||
<?php $i=0; foreach($ansaNews as $ansa){
|
||||
$i++;
|
||||
@@ -223,6 +145,10 @@ catch (Exception $ex){
|
||||
}?>
|
||||
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
</div>
|
||||
<div class="newsContainer">
|
||||
<div class="categoryBar" style="background-color:<?php echo NotiziaModel::$NOTIZIE_CATEGORY[NotiziaModel::CATEGORY_CRONACA]["color"] ?>">
|
||||
<span>CRONACA</span>
|
||||
@@ -295,6 +221,10 @@ catch (Exception $ex){
|
||||
}?>
|
||||
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
</div>
|
||||
<div class="newsContainer">
|
||||
<div class="categoryBar" style="background-color:#095a87;text-align:center;font-size:1vw;">
|
||||
<span>CULTURA&SPETTACOLO</span>
|
||||
|
||||
@@ -87,6 +87,10 @@ try {
|
||||
GUIHandlerMobile::generateHeadPublic();
|
||||
GUIHandlerMobile::generateMenu();?>
|
||||
<div class="searchResultsContainer">
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_HEAD);?></div>
|
||||
</div>
|
||||
<?php
|
||||
if ($found){
|
||||
$i=0;
|
||||
@@ -106,6 +110,14 @@ try {
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
if($i%4==0){
|
||||
?>
|
||||
<div style="text-align:center;">
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="paging">
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 02/mar/2016
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__)."/../../load.php");
|
||||
|
||||
try {
|
||||
if (array_key_exists("HTTP_REFERER",$_SERVER)){
|
||||
$host = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
|
||||
|
||||
if (strcmp($host,$_SERVER["HTTP_HOST"])==0){
|
||||
$banner = PostHandler::get("banner");
|
||||
$source = PostHandler::get("source");
|
||||
if (!is_null($banner) && !is_null($source)){
|
||||
AnalyticsHelper::saveBannerClick($banner, $source);
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Dropped statistical data coming from referer '".$host."'");
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Dropped statistical data coming from null referer. Related ip '".$_SERVER['REMOTE_ADDR']."'");
|
||||
}
|
||||
}
|
||||
catch (Exception $ex){
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Error while logging statistical data. Message: '".$ex->getMessage()."'");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 02/mar/2016
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__)."/../../load.php");
|
||||
|
||||
try {
|
||||
if (array_key_exists("HTTP_REFERER",$_SERVER)){
|
||||
$host = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
|
||||
|
||||
if (strcmp($host,$_SERVER["HTTP_HOST"])==0){
|
||||
$ip = PostHandler::get("ip");
|
||||
$banner = PostHandler::get("banner");
|
||||
$source = PostHandler::get("source");
|
||||
if (!is_null($ip) && !is_null($banner) && !is_null($source)){
|
||||
AnalyticsHelper::saveBannerImpression($ip, $banner, $source);
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Dropped statistical data coming from referer '".$host."'");
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Dropped statistical data coming from null referer. Related ip '".$_SERVER['REMOTE_ADDR']."'");
|
||||
}
|
||||
}
|
||||
catch (Exception $ex){
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Error while logging statistical data. Message: '".$ex->getMessage()."'");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 28/gen/2016
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__)."/../../load.php");
|
||||
|
||||
try {
|
||||
if (array_key_exists("HTTP_REFERER",$_SERVER)){
|
||||
$host = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
|
||||
|
||||
if (strcmp($host,$_SERVER["HTTP_HOST"])==0){
|
||||
$ip = PostHandler::get("ip");
|
||||
$notizia = PostHandler::get("notizia");
|
||||
$source = PostHandler::get("source");
|
||||
if (!is_null($ip) && !is_null($notizia) && !is_null($source)){
|
||||
AnalyticsHelper::saveNotiziaImpression($ip, $notizia, $source);
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Dropped statistical data coming from referer '".$host."'");
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Dropped statistical data coming from null referer. Related ip '".$_SERVER['REMOTE_ADDR']."'");
|
||||
}
|
||||
}
|
||||
catch (Exception $ex){
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Error while logging statistical data. Message: '".$ex->getMessage()."'");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
Author: Riccardo Di Dato
|
||||
Creation Date: 27/gen/2016
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__)."/../../load.php");
|
||||
|
||||
try {
|
||||
if (array_key_exists("HTTP_REFERER",$_SERVER)){
|
||||
$host = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
|
||||
|
||||
if (strcmp($host,$_SERVER["HTTP_HOST"])==0){
|
||||
$ip = PostHandler::get("ip");
|
||||
$content = PostHandler::get("content");
|
||||
$source = PostHandler::get("source");
|
||||
if (!is_null($ip) && !is_null($content) && !is_null($source)){
|
||||
AnalyticsHelper::savePageImpression($ip, $content, $source);
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Dropped statistical data coming from referer '".$host."'");
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Dropped statistical data coming from null referer. Related ip '".$_SERVER['REMOTE_ADDR']."'");
|
||||
}
|
||||
}
|
||||
catch (Exception $ex){
|
||||
LoggingFacilityManager::getLogger("gui")->log(LoggingFacility::$LEVEL_INFO,"Error while logging statistical data. Message: '".$ex->getMessage()."'");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -263,3 +263,22 @@ CATEGORY SUMMARY
|
||||
|
||||
.contattiRedazione{text-align:center;font-size:14pt;padding:10px 5px;color:#199fe6;}
|
||||
.contattiRedazione a{color:black;}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
.middleBanner {
|
||||
width: 45vw;
|
||||
display:inline-block;
|
||||
}
|
||||
.mediaContent{overflow:hidden;}
|
||||
.mediaContent *{max-height:100%;max-width:100%;}
|
||||
.mediaContent > a{height:100%; width:100%;display:inline-block;}
|
||||
.middleBanner img {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
Reference in New Issue
Block a user