芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/www/resupres/application/classes/controller/parti.php
order_by('nom', 'ASC') ->find_all(); $this->template->content = View::factory('parti/list'); $this->template->content->partis = $partis; } public function action_detail() { $parti = ORM::factory('parti', $this->request->param('id')); if ($parti->loaded()){ $nom = URL::title($parti->nom, '_', true); $personnalites = ORM::factory('candidat') ->where('parti_id', '=', $parti->id) ->and_where('id', '!=', 0) ->order_by('nom', 'ASC') ->order_by('prenom', 'ASC') ->find_all(); if($this->request->param('parti') != $nom){ $this->request->redirect('parti/detail/'.$parti->id.'-'.$nom); } $this->template->metaDescription = 'Fiche du parti : '.$parti->nom. ' - '.$parti->orientation->nom; $this->template->metaKeywords = 'Statistiques, sondages, présidentielles 2012, candidats 2012, election 2012,'.$parti->nom.', sarkozy 2012, le pen 2012, ségolène royale 2012, 2012'; $this->template->pageTitle = $parti->nom; $this->template->content = View::factory('parti/detail'); $this->template->content->parti = $parti; $this->template->content->personnalites = $personnalites; /* * Flux rss google par mot clé http://news.google.fr/news?output=rss&q=MON_MOT_CLE * http://fr.news.search.yahoo.com/rss?ei=UTF-8&p=MOT_CLE&fr=news_sb_hd&source=yahoo */ $url = 'http://fr.news.search.yahoo.com/rss?ei=UTF-8&p='.URL::title($parti->nom, '%20', true);//.'&fr=news_sb_hd&source=yahoo'; $rss_file = file_get_contents($url); $xml = new SimpleXMLElement($rss_file); $this->template->content->xml = $xml; } // } }