当前位置: 首页>>代码示例>>PHP>>正文


PHP Template_Controller::json方法代码示例

本文整理汇总了PHP中Template_Controller::json方法的典型用法代码示例。如果您正苦于以下问题:PHP Template_Controller::json方法的具体用法?PHP Template_Controller::json怎么用?PHP Template_Controller::json使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Template_Controller的用法示例。


在下文中一共展示了Template_Controller::json方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: resultatAjax

 /**
  * 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'));
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:27,代码来源:elements.php

示例2: resultatAjax

 /**
  * 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'));
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:28,代码来源:articles.php

示例3: resultatAjax

 /**
  * 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'));
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:25,代码来源:users.php

示例4: resultatAjax

 /**
  * 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'));
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:24,代码来源:items.php

示例5: resultatAjax

 /**
  * 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'));
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:33,代码来源:quetes.php

示例6: resultatAjax

 /**
  * 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'));
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:26,代码来源:regions.php


注:本文中的Template_Controller::json方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。