Merge branch 'master' of ssh://gitolite@asdynamics.com:50005/projects/fdn2.git
This commit is contained in:
@@ -150,6 +150,9 @@ GUIHandler::generateHtmlHeaders(array("additionalHeaders"=>$additionalHeaders));
|
||||
</div>
|
||||
<div class="articoloLeftBar">
|
||||
<div class="utilityBar">
|
||||
<div class="stamp">
|
||||
<a href="javascript:void(0);" onclick="javascript:printNews('<?php echo $articolo->id;?>');"><div style="background-image:url(images/stampa.png);"></div></a>
|
||||
</div>
|
||||
<div class="socialBarArticolo">
|
||||
<a class="socialLink" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://ifattidinapoli.com/articolo.php?id=<?php echo $articolo->id;?>"><div style="background-image:url(images/fb_round.png);"></div></a>
|
||||
<a class="socialLink" target="_blank" href="https://twitter.com/intent/tweet?via=fattidinapoli&url=http://ifattidinapoli.com/articolo.php?id=<?php echo $articolo->id;?>"><div style="background-image:url(images/twitter_round.png);"></div></a>
|
||||
|
||||
+36
-2
@@ -21,7 +21,7 @@ try {
|
||||
|
||||
$ansaNews = GlobalVariables::get("dao")->query("NotiziaModel",
|
||||
array('$and'=>array(array("isAnsa"=>true),array("status"=>NotiziaModel::STATUS_ACCEPTED))),
|
||||
array("sort"=>array("about.data"=>-1),"limit"=>2)
|
||||
array("sort"=>array("about.data"=>-1),"limit"=>3)
|
||||
);
|
||||
|
||||
$ansaIds = array();
|
||||
@@ -109,6 +109,16 @@ try {
|
||||
$lastViaggi->testo = strip_tags($lastViaggi->testo);
|
||||
$lastViaggi->sottotitolo = strip_tags($lastViaggi->sottotitolo);
|
||||
}
|
||||
|
||||
|
||||
$animalNews = GlobalVariables::get("dao")->getFirst("NotiziaModel",
|
||||
array('$and'=>array(array("status"=>NotiziaModel::STATUS_ACCEPTED),array("category"=>NotiziaModel::CATEGORY_ANIMALI),array('_id'=>array('$nin'=>$ansaIds)))),
|
||||
array("sort"=>array("about.data"=>-1))
|
||||
);
|
||||
if (!is_null($animalNews)){
|
||||
$animalNews->testo = strip_tags($animalNews->testo);
|
||||
$animalNews->sottotitolo = strip_tags($animalNews->sottotitolo);
|
||||
}
|
||||
// var_dump($politicaNews);
|
||||
// if(sizeof($politicaNews)<=0){
|
||||
// echo "non trovateee!!!!";
|
||||
@@ -314,6 +324,7 @@ catch (Exception $ex){
|
||||
<?php }
|
||||
}?>
|
||||
</div>
|
||||
<div class="middleBanner mediaContent"><?php BannerHelper::printBanner(BannerModel::POSITION_BODY);?></div>
|
||||
</div>
|
||||
<div class="rightBarNews">
|
||||
<?php HTMLHelper::getMeteoBlock(); ?>
|
||||
@@ -382,7 +393,7 @@ catch (Exception $ex){
|
||||
</div>
|
||||
<?php if(!is_null($lastViaggi)){
|
||||
$stringTitle = (strlen($lastViaggi->titolo) > 53) ? substr($lastViaggi->titolo,0,50).'...' : $lastViaggi->titolo;?>
|
||||
<div class="viaggiContainer">
|
||||
<div class="animaliContainer">
|
||||
<?php $media = DaoMediaHandler::getMainMediaFromModel($lastViaggi);
|
||||
if(!is_null($media)){?>
|
||||
<div class="culturaMainMedia mediaContent"><?php $media->renderMedia();?></div>
|
||||
@@ -398,6 +409,29 @@ catch (Exception $ex){
|
||||
</script>
|
||||
<?php }?>
|
||||
</div>
|
||||
<div class="animali">
|
||||
<div class="categoryBar" style="text-align:left;">
|
||||
<div class="categoryTag"><span>ANIMALI</span></div>
|
||||
<div class="categoryLine"></div>
|
||||
</div>
|
||||
<?php if(!is_null($animalNews)){
|
||||
$stringTitle = (strlen($animalNews->titolo) > 53) ? substr($animalNews->titolo,0,50).'...' : $animalNews->titolo;?>
|
||||
<div class="animaliContainer">
|
||||
<?php $media = DaoMediaHandler::getMainMediaFromModel($animalNews);
|
||||
if(!is_null($media)){?>
|
||||
<div class="culturaMainMedia mediaContent"><?php $media->renderMedia();?></div>
|
||||
<?php }?>
|
||||
<div class="animaliTitle"><?php echo $stringTitle;?></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(event){
|
||||
$(".animaliTitle").click(function(event){
|
||||
window.location.href="articolo.php?id=<?php echo $animalNews->id;?>";
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
GUIHandler::generateFooter();
|
||||
|
||||
@@ -75,3 +75,13 @@ function hidePreview(){
|
||||
$('.clickableImageContainer').css("display","none");
|
||||
$('#clickImage').remove();
|
||||
}
|
||||
|
||||
function printNews(newsId){
|
||||
// $.ajax({
|
||||
// method:"POST",
|
||||
// url:'printPage.php?id='+ newsId,
|
||||
// dataType:'html',
|
||||
//
|
||||
// });
|
||||
openPagePost("printPage.php",[{name:'id',value:newsId}],true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
|
||||
require_once(dirname(__FILE__)."/load.php");
|
||||
|
||||
try {
|
||||
|
||||
// var_dump($_POST);
|
||||
// var_dump($_GET);
|
||||
$articolo = null;
|
||||
if (array_key_exists("id", $_POST)){
|
||||
$articolo = GlobalVariables::get("dao")->getFirst("NotiziaModel",array("id"=>$_POST["id"],"status"=>NotiziaModel::STATUS_ACCEPTED));
|
||||
}
|
||||
|
||||
if (is_null($articolo)){
|
||||
GUIHandler::redirect("index.php");
|
||||
}
|
||||
|
||||
$media = DaoMediaHandler::getMainMediaFromModel($articolo);
|
||||
|
||||
$mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile',
|
||||
'Maggio', 'Giugno', 'Luglio', 'Agosto',
|
||||
'Settembre', 'Ottobre', 'Novembre','Dicembre');
|
||||
|
||||
$data = date("d",$articolo->about->data->sec)." ".$mesi[date("n",$articolo->about->data->sec)]." ".date("Y",$articolo->about->data->sec);
|
||||
|
||||
$mediaMetaInfo = '';
|
||||
if ($media->mediaType == MediaModel::TYPE_LOCALVIDEO || $media->mediaType == MediaModel::TYPE_YOUTUBE){
|
||||
$mediaMetaInfo = 'itemprop="video"';
|
||||
if ($media->mediaType == MediaModel::TYPE_YOUTUBE){
|
||||
$additionalHeaders[] = '<meta property="og:image" content="'.$media->getRenderer()->getThumbnailLink().'"/>';
|
||||
|
||||
$additionalHeaders[] = '<meta property="og:video" content="'.$media->getRenderer()->getVideoLink().'"/>';
|
||||
$additionalHeaders[] = '<meta property="og:video:type" content="application/x-shockwave-flash"/>';
|
||||
$additionalHeaders[] = '<meta property="og:video:width" content="240"/>';
|
||||
$additionalHeaders[] = '<meta property="og:video:height" content="205"/>';
|
||||
}
|
||||
}
|
||||
else if ($media->mediaType == MediaModel::TYPE_IMAGE){
|
||||
$mediaMetaInfo = 'itemprop="image"';
|
||||
$additionalHeaders[] = '<meta property="og:image" content="'.$media->getRenderer()->getImageLink(MediaRenderer::SIZE_SMALL).'"/>';
|
||||
}
|
||||
|
||||
}catch(GUIException $ex){
|
||||
$error = $ex->getMessage();
|
||||
}catch (Exception $exec){
|
||||
$msg = LogModel::fromException($exec);
|
||||
GlobalVariables::get("dao")->save($msg);
|
||||
|
||||
GUIHandler::redirect("index.php");
|
||||
}
|
||||
GUIHandler::generateHtmlHeaders(array("additionalHeaders"=>$additionalHeaders));
|
||||
|
||||
?>
|
||||
|
||||
<div style="padding:15px;">
|
||||
<div><?php echo $data;?></div>
|
||||
<div style="font-size:14pt;font-weight:bold;"><?php echo NotiziaModel::$NOTIZIE_CATEGORY[$articolo->category]["label"]?></div>
|
||||
<div style="font-size:18pt;font-weight:bold;"><?php echo $articolo->titolo;?></div>
|
||||
<div style="font-size:14pt;font-style:italic;color:#666;"><?php echo $articolo->sottotitolo;?></div>
|
||||
<div class="articoloCont">
|
||||
<div style="float:left;margin-right:5px;">
|
||||
<?php $media->renderMedia(array("size"=>MediaRenderer::SIZE_MEDIUM))?>
|
||||
</div>
|
||||
<span><?php echo $articolo->testo;?></span>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
window.print();
|
||||
});
|
||||
</script>
|
||||
+31
-12
@@ -163,7 +163,7 @@ display: inline-block;
|
||||
|_| |___/
|
||||
*/
|
||||
|
||||
.ansaContainer{margin-bottom:25px; border:none;height:420px}
|
||||
.ansaContainer{margin-bottom:25px; border:none;}
|
||||
.ansa{border:solid #d6d6d6 1px;border-left:0px;border-right:0px;border-top:0px;/* height:180px; */}
|
||||
.ansa> div {display:inline-block;vertical-align:top;}
|
||||
|
||||
@@ -197,6 +197,7 @@ display: inline-block;
|
||||
margin: 0px;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
letter-spacing:-1px;
|
||||
}
|
||||
|
||||
|
||||
@@ -224,18 +225,19 @@ display: inline-block;
|
||||
.sportSummary .newsMainMedia{width:300px;height:168px;}
|
||||
.middleBarNews{
|
||||
display:inline-block;
|
||||
width:150px;
|
||||
width:110px;
|
||||
/* max-height:1380px; */
|
||||
/* height:1380px; */
|
||||
/* background-color:#f4f4f4; */
|
||||
border-top:0px;
|
||||
border-bottom:0px;
|
||||
border-right:solid #b3b3b3 1px;
|
||||
vertical-align:top;
|
||||
text-align:center;
|
||||
padding:10px 15px;
|
||||
padding:10px 10px;
|
||||
}
|
||||
|
||||
.titleContainer > .categoryTitle{font-weight:bold; font-size:15px;}
|
||||
.titleContainer > .categoryTitle{font-weight:bold; font-size:10pt;}
|
||||
.titleContainer > .culturaLine{height: 3px;background-color: #339cd5;}
|
||||
.ristorantiBlock, .culturaNews{
|
||||
text-align:center;
|
||||
@@ -259,14 +261,14 @@ display: inline-block;
|
||||
.culturaMainMedia.mediaContent > iframe{min-height:150px;max-height:180px;}
|
||||
.ristorantiTitle, .culturaTitle{font-weight: bold;text-align: left;font-size: 12px;}
|
||||
.ristorantiBlock .ristorantiLink > a, .culturaNews .culturaLink > a{color:#3498d4;font-size:13px;}
|
||||
.middleBanner{height:115px; width:150px;}
|
||||
.middleBanner{height:115px; width:110px;}
|
||||
.middleBanner > img{max-height:100px;max-width:220px;}
|
||||
|
||||
.ristorantiTitle{margin-top:10px;}
|
||||
|
||||
.ristorantiTitle .categoryTag{min-width:110px;}
|
||||
.rightBarNews{
|
||||
display:inline-block;
|
||||
width:160px;
|
||||
width:200px;
|
||||
/*max-height:1380px;*/
|
||||
/* height:1380px; */
|
||||
vertical-align:top;
|
||||
@@ -298,9 +300,9 @@ display: inline-block;
|
||||
.gossipTitle{margin-bottom:5px;font-weight:bold;font-size:20px;}
|
||||
.gossipSubtitle{margin-bottom:5px;color:#64bff0;font-weight:bold;font-size:15px;}
|
||||
|
||||
.viaggiContainer{/* max-height:165px; */margin-top:5px;margin-bottom:5px;}
|
||||
.viaggiContainer > .culturaMainMedia{text-align:left;}
|
||||
.viaggiTitle{cursor:pointer;margin-bottom:5px;font-weight:bold;font-size:17px;}
|
||||
.animaliContainer,.viaggiContainer{/* max-height:165px; */margin-top:5px;margin-bottom:5px;}
|
||||
.animaliContainer > .culturaMainMedia,.viaggiContainer > .culturaMainMedia{text-align:left;}
|
||||
.animaliTitle,.viaggiTitle{cursor:pointer;margin-bottom:5px;font-weight:bold;font-size:17px;}
|
||||
|
||||
/*
|
||||
_ _ _ _
|
||||
@@ -352,8 +354,15 @@ display: inline-block;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
.socialBarArticolo > a{margin-right:3px;display:inline-block;}
|
||||
.socialBarArticolo > a > div{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;background-position:center;}
|
||||
.utilityBar > .stamp{
|
||||
height:22px;
|
||||
padding: 4px 10px;
|
||||
float:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
.stamp > a, .socialBarArticolo > a{margin-right:3px;display:inline-block;}
|
||||
.stamp > a > div,.socialBarArticolo > a > div{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;background-position:center;}
|
||||
|
||||
.articoloLeftBar{width:700px;display:inline-block;vertical-align:top;}
|
||||
|
||||
@@ -546,3 +555,13 @@ Password Recovery
|
||||
z-index: 11;
|
||||
display:none;
|
||||
}
|
||||
|
||||
/*
|
||||
____ _ _ ____
|
||||
| _ \ _ __(_)_ __ | |_| _ \ __ _ __ _ ___
|
||||
| |_) | '__| | '_ \| __| |_) / _` |/ _` |/ _ \
|
||||
| __/| | | | | | | |_| __/ (_| | (_| | __/
|
||||
|_| |_| |_|_| |_|\__|_| \__,_|\__, |\___|
|
||||
|___/
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user