pages->remoteLocationPath."categorySummary_".$_GET["category"]; $additionalHeaders = array(); $additionalHeaders[] = ''; GUIHandlerMobile::generateHtmlHeaders(array( "title"=>NotiziaModel::$NOTIZIE_CATEGORY[$_GET["category"]]["label"], "additionalMetadata"=>$additionalHeaders )); $category = ""; if(array_key_exists("category", $_GET) && strcmp($_GET["category"], "")!=0){ // var_dump(NotiziaModel::$NOTIZIE_CATEGORY[intval($_GET["category"])]["hidden"]); if(NotiziaModel::$NOTIZIE_CATEGORY[$_GET["category"]]["hidden"]){ GUIHandlerMobile::redirect("index.php"); } $category = $_GET["category"]; // $category = NotiziaModel::CATEGORY_CRONACA; $category = intval($category); BannerHelper::setCategory($category); // $notizie = GlobalVariables::get("dao")->query("NotiziaModel", // array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>$category,"about.data"=>array('$lte'=>new MongoDate())), // array("sort"=>array("about.data"=>-1),"limit"=>10) // ); $notizie = GlobalVariables::get("dao")->query("NotiziaModel", array("status"=>NotiziaModel::STATUS_ACCEPTED,"category"=>$category,"about.lastEdit"=>array('$lte'=>new MongoDB\BSON\UTCDateTime( time() * 1000 ))), array("sort"=>array("about.lastEdit"=>-1),"limit"=>20) ); if (sizeof($notizie)>0){ $notizie = array_map(function($ele){$ele->testo = strip_tags($ele->testo);$ele->sottotitolo = strip_tags($ele->sottotitolo); return $ele; }, $notizie); } } else{ GUIHandlerMobile::redirect("index.php"); } }catch(GUIException $ex){ $error = $ex->getMessage(); }catch (Exception $exec){ $msg = LogModel::fromException($exec); GlobalVariables::get("dao")->save($msg); GUIHandlerMobile::redirect("index.php"); } ?>