diff --git a/private/lib/dao/models/NotiziaModel.php b/private/lib/dao/models/NotiziaModel.php index 2bff056..614ce01 100644 --- a/private/lib/dao/models/NotiziaModel.php +++ b/private/lib/dao/models/NotiziaModel.php @@ -33,14 +33,26 @@ class NotiziaModel extends HasMediaModel{ const CATEGORY_CULTURA = 4; const CATEGORY_GOSSIP = 5; const CATEGORY_ANIMALI = 6; + const CATEGORY_VIAGGI = 7; + const CATEGORY_RISTORANTI = 8; + const CATEGORY_MESTIERI = 9; + const CATEGORY_CASA = 10; + const CATEGORY_SALUTE = 11; + const CATEGORY_ANNUNCI = 12; public static $NOTIZIE_CATEGORY = array( - self::CATEGORY_POLITICA=>array("label"=>"Politica","mainMenu"=>true), - self::CATEGORY_CRONACA=>array("label"=>"Cronaca","mainMenu"=>true), - self::CATEGORY_SPORT=>array("label"=>"Sport","mainMenu"=>true), - self::CATEGORY_CULTURA=>array("label"=>"Cultura&Spettacolo","mainMenu"=>true), - self::CATEGORY_GOSSIP=>array("label"=>"Gossip","mainMenu"=>true), - self::CATEGORY_ANIMALI=>array("label"=>"Mondo Animale","mainMenu"=>false) + self::CATEGORY_POLITICA=>array("label"=>"Politica","mainMenu"=>true,"hidden"=>false), + self::CATEGORY_CRONACA=>array("label"=>"Cronaca","mainMenu"=>true, "hidden"=>false), + self::CATEGORY_SPORT=>array("label"=>"Sport","mainMenu"=>true, "hidden"=>false), + self::CATEGORY_CULTURA=>array("label"=>"Cultura&Spettacolo","mainMenu"=>true, "hidden"=>false), + self::CATEGORY_GOSSIP=>array("label"=>"Gossip","mainMenu"=>false, "hidden"=>false), + self::CATEGORY_ANIMALI=>array("label"=>"Mondo Animale","mainMenu"=>false, "hidden"=>false), + self::CATEGORY_VIAGGI=>array("label"=>"Viaggi","mainMenu"=>false, "hidden"=>true), + self::CATEGORY_RISTORANTI=>array("label"=>"Ristoranti","mainMenu"=>false, "hidden"=>true), + self::CATEGORY_MESTIERI=>array("label"=>"Mestieri","mainMenu"=>false, "hidden"=>true), + self::CATEGORY_CASA=>array("label"=>"Casa","mainMenu"=>false, "hidden"=>true), + self::CATEGORY_SALUTE=>array("label"=>"Salute","mainMenu"=>false, "hidden"=>true), + self::CATEGORY_ANNUNCI=>array("label"=>"Annunci","mainMenu"=>false, "hidden"=>true) ); public static function getCollectionName(){ diff --git a/private/lib/gui/GUIHandler.php b/private/lib/gui/GUIHandler.php index 129bacf..576d0c0 100644 --- a/private/lib/gui/GUIHandler.php +++ b/private/lib/gui/GUIHandler.php @@ -149,27 +149,6 @@ class GUIHandler { 'Settembre', 'Ottobre', 'Novembre','Dicembre'); $day = date("d"); - /* - * -
-
'.$day." ".$mesi[date("n")]." ".date("Y").' - Aggiornato alle <'.date("H:i").'
-
LOGIN | REGISTER
-
- - - - - -
-
-
-
- -
-
-
- - */ $head = '
'.$day." ".$mesi[date("n")]." ".date("Y").' - Aggiornato alle '.date("H:i").'
@@ -200,7 +179,7 @@ class GUIHandler { } foreach (NotiziaModel::$NOTIZIE_CATEGORY as $category=>$data){ - if($data["mainMenu"]){ + if(($data["mainMenu"]) && !$data["hidden"]){ if(strcmp($data["label"],$pageSelected)==0){ $html .= ''; } diff --git a/private/lib/gui/html.inclusion.php b/private/lib/gui/html.inclusion.php index 408da75..38d80b8 100644 --- a/private/lib/gui/html.inclusion.php +++ b/private/lib/gui/html.inclusion.php @@ -39,7 +39,7 @@ GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN,"datetimepicker-master GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN,"highcharts.js"); -GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN,"functions.js?rev=".time()); +GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_GENERAL,"functions.js?rev=".time()); /* ____ _ _ ____ _ ___ ____ diff --git a/oth/img/minoImg/ads_big.png b/public/images/ads_big.png similarity index 100% rename from oth/img/minoImg/ads_big.png rename to public/images/ads_big.png diff --git a/public/images/bannerMiddle.png b/public/images/bannerMiddle.png new file mode 100644 index 0000000..7a4683a Binary files /dev/null and b/public/images/bannerMiddle.png differ diff --git a/public/index.php b/public/index.php index 97eadd1..74ee379 100644 --- a/public/index.php +++ b/public/index.php @@ -16,7 +16,7 @@ try { $mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre','Dicembre'); - $day = date("d"); +// $day = date("d"); $pageSelected="home"; $ansaNews = GlobalVariables::get("dao")->query("NotiziaModel", @@ -39,6 +39,30 @@ try { array("sort"=>array("about.data"=>-1),"limit"=>2) ); + $culturaNews = GlobalVariables::get("dao")->query("NotiziaModel", + array('$and'=>array(array("status"=>NotiziaModel::STATUS_ACCEPTED),array("category"=>NotiziaModel::CATEGORY_CULTURA))), + array("sort"=>array("about.data"=>-1),"limit"=>4) + ); + + $ristorantiNews = GlobalVariables::get("dao")->query("NotiziaModel", + array('$and'=>array(array("status"=>NotiziaModel::STATUS_ACCEPTED),array("category"=>NotiziaModel::CATEGORY_RISTORANTI))), + array("sort"=>array("about.data"=>-1),"limit"=>4) + ); + + $lastsNews = GlobalVariables::get("dao")->query("NotiziaModel", + array("status"=>NotiziaModel::STATUS_ACCEPTED), + array("sort"=>array("about.data"=>-1),"limit"=>5) + ); + + $gossipNews = GlobalVariables::get("dao")->query("NotiziaModel", + array('$and'=>array(array("status"=>NotiziaModel::STATUS_ACCEPTED),array("category"=>NotiziaModel::CATEGORY_GOSSIP))), + array("sort"=>array("about.data"=>-1),"limit"=>2) + ); + + $lastViaggi = GlobalVariables::get("dao")->getFirst("NotiziaModel", + array('$and'=>array(array("status"=>NotiziaModel::STATUS_ACCEPTED),array("category"=>NotiziaModel::CATEGORY_VIAGGI))), + array("sort"=>array("about.data"=>-1)) + ); // var_dump($politicaNews); // if(sizeof($politicaNews)<=0){ // echo "non trovateee!!!!"; @@ -83,20 +107,22 @@ catch (Exception $ex){
- sottotitolo) > 53) ? substr($politica->sottotitolo,0,50).'...' : $politica->sottotitolo;?> -
-
-
renderMedia();?>
- -
titolo;?>
-
-
-
Continua
-
- + 0){ + foreach ($politicaNews as $politica){ + $string = (strlen($politica->sottotitolo) > 53) ? substr($politica->sottotitolo,0,50).'...' : $politica->sottotitolo;?> +
+
+
renderMedia();?>
+ +
titolo;?>
+
+
+
Continua
+
+
@@ -106,46 +132,142 @@ catch (Exception $ex){
- sottotitolo) > 53) ? substr($cronaca->sottotitolo,0,50).'...' : $cronaca->sottotitolo;?> -
-
-
renderMedia();?>
- -
titolo;?>
-
-
-
Continua
-
- + 0){ + foreach ($cronacaNews as $cronaca){ + $string = (strlen($cronaca->sottotitolo) > 53) ? substr($cronaca->sottotitolo,0,50).'...' : $cronaca->sottotitolo;?> +
+
+
renderMedia();?>
+ +
titolo;?>
+
+
+
Continua
+
+
-
SPORT
- sottotitolo) > 53) ? substr($sport->sottotitolo,0,50).'...' : $sport->sottotitolo;?> -
-
-
renderMedia();?>
- -
titolo;?>
-
+ 0){ + foreach ($sportNews as $sport){ + $string = (strlen($sport->sottotitolo) > 53) ? substr($sport->sottotitolo,0,50).'...' : $sport->sottotitolo;?> +
+
+
renderMedia();?>
+ +
titolo;?>
+
+
+
Continua
-
Continua
-
- +
+
+
CULTURA&SPETTACOLO
+
+
+ 0){ + foreach ($culturaNews as $cultura){ + $string = (strlen($sport->titolo) > 103) ? substr($sport->titolo,0,100).'...' : $sport->titolo;?> +
+
renderMedia();?>
+ +
+
Leggi
+
+ + +
+
+
+
RISTORANTI
+
+
+ 0){ + foreach ($ristorantiNews as $ristoranti){ + $string = (strlen($sport->titolo) > 103) ? substr($sport->titolo,0,100).'...' : $sport->titolo;?> +
+
renderMedia();?>
+ +
+
Leggi
+
+ + +
+
+
+
+
+
+
Più Letti
+
+
+ 0){ + foreach($lastsNews as $last){ + $data = $mesi[date("n",$last->data->sec)]." ".date("Y",$last->about->data->sec); + $string = (strlen($last->titolo) > 103) ? substr($last->titolo,0,100).'...' : $last->titolo;?> +
+
+ +
+ +
+
+
+
+
GOSSIP
+
+
+ 0){ + foreach($gossipNews as $gossip){ + $stringTitle = (strlen($last->titolo) > 53) ? substr($last->titolo,0,50).'...' : $last->titolo; + $stringSubTitle = (strlen($last->sottotitolo) > 23) ? substr($last->sottotitolo,0,20).'...' : $last->sottotitolo;?> +
+
+
+
+ + +
+
+
+
VIAGGI
+
+
+ titolo) > 53) ? substr($lastViaggi->titolo,0,50).'...' : $lastViaggi->titolo;?> +
+ +
renderMedia();?>
+ +
+
+ +
\ No newline at end of file diff --git a/public/style/public.css b/public/style/public.css index 79ba090..7dda653 100644 --- a/public/style/public.css +++ b/public/style/public.css @@ -31,9 +31,9 @@ body{font-family:lato, arial;} .searchBar > input{border-radius:6px;border:none;padding:5px;} -.leftBarNews{width:500px;margin-top:23px;border:solid #d6d6d6 1px;border-left:2px;border-right:2px;display:inline-block;} -.ansaContainer{margin-bottom:25px; border:none;} -.ansa{border:solid #d6d6d6 1px;border-left:0px;border-right:0px;border-top:0px;} +.leftBarNews{width:500px;margin-top:23px;border:solid #d6d6d6 1px;border-left:2px;border-right:2px;display:inline-block;height:1380px;} +.ansaContainer{margin-bottom:25px; border:none;height:420px} +.ansa{border:solid #d6d6d6 1px;border-left:0px;border-right:0px;border-top:0px;height:180px;} .ansa> div {display:inline-block;vertical-align:top;} .ansaImage{display:inline-block;margin:15px 7px;width:150px;overflow:hidden;text-align:center;} @@ -48,7 +48,7 @@ body{font-family:lato, arial;} .socialBarAnsa > a{margin-right:3px;display:inline-block;} .socialBarAnsa > a > div{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;background-position:center;} -.categoryNews{width:500px;height:284px;margin-bottom:29px;position:relative;} +.categoryNews{width:500px;height:285px;margin-bottom:29px;position:relative;} .categoryBar{height:22px;} .categoryTag{ display: inline-block; @@ -90,11 +90,49 @@ body{font-family:lato, arial;} .middleBarNews{ display:inline-block; width:220px; -/* border:solid #d1d1d1 1px; */ + height:1380px; background-color:#f4f4f4; border-top:0px; border-bottom:0px; vertical-align:top; text-align:center; - height:1000px; + padding:10px 15px; } + +.titleContainer > .categoryTitle{font-weight:bold; font-size:15px;} +.titleContainer > .culturaLine{height: 3px;background-color: #339cd5;} +.culturaNews{ + text-align:center; + margin-top: 5px; + margin-bottom:10px; + border:dashed #C1B4B4 1px; + border-top:0px; + border-right:0px; + border-left:0px; + max-height:165px; +} +.culturaMainMedia{ + overflow: hidden; + text-align: center; + margin-bottom:10px; + max-height: 100px; +} +.culturaMainMedia > img{max-height: 100px;} + +.culturaNews > .newsTitle{margin-bottom:5px;} +.middleBanner{max-height:165px;} +.middleBanner > img{max-height:100px;max-width:220px;} + +.ristorantiTitle{margin-top:10px;} + +.rightBarNews{display:inline-block;width:230px;height:1380px;vertical-align:top;margin-top:20px;} +.middleRightBanner{width:220px;overflow:hidden;} +.middleRightBanner > img{max-width:220px; max-heigth:200px;} + +.lastContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;} +.lastData{font-size:12px;} +.lastTitle{font-size:12px;font-weight:bold;margin-bottom:5px;} +.lastTitle > a{color:#64bff0;} + +.gossipContainer{max-height:120px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;} +.viaggiContainer{max-height:165px;margin-top:5px;margin-bottom:5px;border-bottom:dotted #C1B4B4 1px;}