Exemple #1
0
 /**
  * Methode : gestion du listing en ajax
  */
 public function resultatAjax()
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $arrayCol = array('id', 'title', 'module_map', 'region_id', 'x', 'y', 'z');
     $searchAjax = Search_Model::instance();
     $arrayResultat = $searchAjax->indexRecherche($arrayCol, 'map', $this->input, array('module_map !=' => ''));
     $display = false;
     $list_carte = Region_Model::instance()->listing_parent();
     foreach ($arrayResultat as $row) {
         $v[] = '<center>' . $row->id . '</center>';
         $v[] = $row->title ? $row->title : '<strong class="rouge">' . Kohana::lang('form.inconnu') . '</strong>';
         $v[] = '<center>' . $row->module_map . '</center>';
         $v[] = '<center>' . $list_carte[$row->region_id]->name . '</center>';
         $v[] = '<center>' . $row->x . '</center>';
         $v[] = '<center>' . $row->y . '</center>';
         $v[] = '<center>' . $row->z . '</center>';
         $display .= '[' . parent::json($v) . '],';
         unset($v);
     }
     echo $searchAjax->displayRecherche($display, $this->input->get('sEcho'));
 }
Exemple #2
0
 /**
  * Methode : gestion du listing en ajax
  */
 public function resultatAjax()
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $arrayCol = array('id_article', 'title', 'article_category_id', 'status');
     $searchAjax = Search_Model::instance();
     $arrayResultat = $searchAjax->indexRecherche($arrayCol, 'articles', $this->input);
     $display = false;
     foreach ($this->acticles->selectListeCategories() as $list) {
         $categorie[$list->id_article_category] = $list->name;
     }
     foreach ($arrayResultat as $row) {
         $url = 'articles/show/' . $row->id_article;
         $v[] = '<center>' . html::anchor($url, $row->id_article) . '</center>';
         $v[] = html::anchor($url, $row->title);
         $v[] = $row->article_category_id ? $categorie[$row->article_category_id] : Kohana::lang('article.no_category');
         $v[] = $row->status ? '<center class="vert">' . Kohana::lang('form.actif') . '</center>' : '<center class="rouge">' . Kohana::lang('form.no_actif') . '</center>';
         $v[] = '<center>' . html::anchor($url, html::image('images/template/drawings.png', array('title' => Kohana::lang('form.edit'), 'class' => 'icon_list'))) . '</center>';
         $display .= '[' . parent::json($v) . '],';
         unset($v);
     }
     echo $searchAjax->displayRecherche($display, $this->input->get('sEcho'));
 }
Exemple #3
0
 /**
  * Methode : gestion du listing en ajax
  */
 public function resultatAjax()
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $arrayCol = array('id', 'username', 'last_login', 'email');
     $searchAjax = Search_Model::instance();
     $arrayResultat = $searchAjax->indexRecherche($arrayCol, 'users', $this->input);
     $display = false;
     foreach ($arrayResultat as $row) {
         $url = 'users/show/' . $row->id;
         $v[] = '<center>' . $row->id . '</center>';
         $v[] = html::anchor($url, $row->username);
         $v[] = date::FormatDate(date::unix2mysql($row->last_login));
         $v[] = $row->email;
         $v[] = '<center>' . html::anchor($url, html::image('images/template/drawings.png', array('title' => Kohana::lang('form.edit'), 'class' => 'icon_list'))) . '</center>';
         $display .= '[' . parent::json($v) . '],';
         unset($v);
     }
     echo $searchAjax->displayRecherche($display, $this->input->get('sEcho'));
 }
Exemple #4
0
 /**
  * Methode : gestion du listing en ajax
  */
 public function resultatAjax()
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $arrayCol = array('id', 'name', 'image');
     $searchAjax = Search_Model::instance();
     $arrayResultat = $searchAjax->indexRecherche($arrayCol, 'items', $this->input);
     $display = false;
     foreach ($arrayResultat as $row) {
         $url = 'items/show/' . $row->id;
         $v[] = '<center>' . $row->id . '</center>';
         $v[] = '<center><img src="' . url::base() . '../images/items/' . $row->image . '" width="24" height="24" id="imageItem" class="imageItem" /></center>';
         $v[] = html::anchor($url, $row->name);
         $v[] = '<center>' . html::anchor($url, html::image('images/template/drawings.png', array('title' => Kohana::lang('form.edit'), 'class' => 'icon_list'))) . '</center>';
         $display .= '[' . parent::json($v) . '],';
         unset($v);
     }
     echo $searchAjax->displayRecherche($display, $this->input->get('sEcho'));
 }
Exemple #5
0
 /**
  * Methode : gestion du listing en ajax
  */
 public function resultatAjax()
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $arrayCol = array('id_quete', 'title', 'element_detail_id_start', 'element_detail_id_stop', 'niveau', 'argent', 'status');
     $searchAjax = Search_Model::instance();
     $arrayResultat = $searchAjax->indexRecherche($arrayCol, 'quetes', $this->input);
     if (($module = Map_Model::instance()->select(array('module_map' => 'quete'), false)) !== FALSE) {
         foreach ($module as $row) {
             $showModule[$row->id] = $row;
         }
     }
     $display = false;
     foreach ($arrayResultat as $row) {
         $url = 'quetes/show/' . $row->id_quete;
         $v[] = '<center>' . $row->id_quete . '</center>';
         $v[] = html::anchor($url, $row->title);
         $v[] = isset($showModule[$row->element_detail_id_start]) ? $showModule[$row->element_detail_id_start]->title : Kohana::lang('form.inconnu');
         $v[] = isset($showModule[$row->element_detail_id_stop]) ? $showModule[$row->element_detail_id_stop]->title : Kohana::lang('form.inconnu');
         $v[] = $row->niveau;
         $v[] = number_format($row->argent) . ' ' . Kohana::config('game.money');
         $v[] = $row->status ? '<strong class="vert">' . Kohana::lang('form.actif') . '</strong>' : '<strong class="rouge">' . Kohana::lang('form.no_actif') . '</strong>';
         $v[] = '<center>' . html::anchor($url, html::image('images/template/drawings.png', array('title' => Kohana::lang('form.edit'), 'class' => 'icon_list'))) . '</center>';
         $display .= '[' . parent::json($v) . '],';
         unset($v);
     }
     echo $searchAjax->displayRecherche($display, $this->input->get('sEcho'));
 }
Exemple #6
0
 /**
  * Methode : gestion du listing en ajax
  */
 public function resultatAjax()
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $arrayCol = array('id', 'name', 'x', 'y', 'z', 'id_parent');
     $searchAjax = Search_Model::instance();
     $arrayResultat = $searchAjax->indexRecherche($arrayCol, 'regions', $this->input, array('id_parent' => cookie::get('id_map_parent', 0)));
     $display = false;
     foreach ($arrayResultat as $row) {
         $url = 'mapping/panel/' . $row->id;
         $v[] = '<center>' . $row->id . '</center>';
         $v[] = html::anchor($url, $row->name);
         $v[] = '<center>' . $row->x . '</center>';
         $v[] = '<center>' . $row->y . '</center>';
         $v[] = '<center>' . $row->z . '</center>';
         $v[] = '<center>' . html::anchor('regions/child/' . $row->id, html::image('images/template/category.png'), array('title' => Kohana::lang('region.look_all_map'), 'class' => 'icon_list')) . ' ' . html::anchor($url, html::image('images/template/drawings.png', array('title' => Kohana::lang('form.edit'), 'class' => 'icon_list'))) . ' ' . html::anchor('regions/show/' . $row->id, html::image('images/template/icn_settings.png', array('title' => Kohana::lang('form.params'), 'class' => 'icon_list'))) . '</center>';
         $display .= '[' . parent::json($v) . '],';
         unset($v);
     }
     echo $searchAjax->displayRecherche($display, $this->input->get('sEcho'));
 }