diff --git a/public/index.php b/public/index.php
index e82d185..b4118f0 100644
--- a/public/index.php
+++ b/public/index.php
@@ -107,11 +107,20 @@ try {
$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)
+ array("sort"=>array("about.data"=>-1),"limit"=>1)
);
if (sizeof($gossipNews)>0){
$gossipNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $gossipNews);
}
+
+ $professioniNews = GlobalVariables::get("dao")->query("NotiziaModel",
+ array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_MESTIERI,'_id'=>array('$nin'=>$ansaIds),
+ "about.data"=>array('$lte'=>new MongoDate())),
+ array("sort"=>array("about.data"=>-1),"limit"=>1)
+ );
+ if (sizeof($professioniNews)>0){
+ $professioniNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $professioniNews);
+ }
/**
* Elezioni Rimosso dalla homepage 21/06/2016 in qunato finite elezioni
*/
@@ -410,6 +419,31 @@ catch (Exception $ex){
}?>
+
+
+ 0){
+ $i = 0;
+ foreach($professioniNews as $professioni){
+ $i++;
+// $stringTitle = (strlen($gossip->titolo) > 53) ? htmlentities( substr( html_entity_decode( $gossip->titolo ) ,0,50) ) .'...' : $gossip->titolo;
+// $stringSubTitle = (strlen($last->sottotitolo) > 23) ? htmlentities( substr( html_entity_decode( $last->sottotitolo ) ,0,20) ) .'...' : $last->sottotitolo;
+ $stringTitle = $professioni->cutTextHtmlSafe("titolo",50);
+ $stringSubTitle = $professioni->cutTextHtmlSafe("sottotitolo",20);
+ ?>
+
+
+ renderMedia();?>
+
+
+
+
+
+
0){
?>
diff --git a/public/mobile/index.php b/public/mobile/index.php
index 31fd902..6ab5a4e 100644
--- a/public/mobile/index.php
+++ b/public/mobile/index.php
@@ -83,6 +83,15 @@ try {
if (sizeof($foodNews)>0){
$foodNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $foodNews);
}
+
+ $professioniNews = GlobalVariables::get("dao")->query("NotiziaModel",
+ array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>NotiziaModel::CATEGORY_MESTIERI,'_id'=>array('$nin'=>$ansaIds),
+ "about.data"=>array('$lte'=>new MongoDate())),
+ array("sort"=>array("about.data"=>-1),"limit"=>4)
+ );
+ if (sizeof($professioniNews)>0){
+ $professioniNews = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $professioniNews);
+ }
}
catch (Exception $ex){
echo $ex->getMessage();
@@ -265,6 +274,43 @@ catch (Exception $ex){
}?>
+
+
">
+
+
+ 0){
+ $i=0;
+ foreach (professioniNews as $articolo){
+
+ $stringTitolo = (strlen($articolo->titolo) > 53) ? htmlentities ( substr( html_entity_decode( $articolo->titolo ) ,0,50) ) .'...' : $articolo->titolo;
+// $string = (strlen($politica->sottotitolo) > 33) ? substr($politica->sottotitolo,0,30).'...' : $politica->sottotitolo;?>
+
+
+ $