芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/www/resupres/application/classes/controller/region.php
where_open() ->and_where("departement_id", "IS", NULL) ->and_where("region_id", "IS", NULL) ->and_where("ville_id", "IS", NULL) ->and_where("candidat_id", "!=", 0) ->where_close() ->order_by("tauxvotes", "DESC") ->find_all(); $regions = ORM::factory('regionrslt')->find_all(); $this->template->menuActif = 'region'; $this->template->content = View::factory('region/carte'); $this->template->content->nomregion = "France"; $this->template->content->regions = $regions; $this->template->content->resultats = $resultats; } public function action_resultat_election() { $this->template->menuActif = 'region'; if ($this->request->param('id') != '') { $region = ORM::factory('regionrslt', $this->request->param("id")); if ($region->loaded()) { $urlregion = URL::title($region->nom, '_', true); if ($this->request->param("region") != $urlregion) { $this->request->redirect('region/resultat_election/' . $region->id . '-' . $urlregion); } $resultats = ORM::factory('resultat') ->where_open() ->and_where("region_id", "=", $this->request->param("id")) ->and_where("candidat_id", "!=", 0) ->where_close() ->order_by("tauxvotes", "DESC") ->find_all(); $regions = ORM::factory('regionrslt')->find_all(); $this->template->content = View::factory('region/carte'); $this->template->content->nomregion = $region->nom; $this->template->content->pageTitle = 'Région '.$region->nom.' '; $this->template->content->regions = $regions; $this->template->content->regionselect = $region; $this->template->content->resultats = $resultats; } } } }