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


PHP file::listing_dir方法代码示例

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


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

示例1: listing_material

 /**
  * Page qui affiche les choix pour le material
  *
  * @return  void
  */
 public function listing_material()
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $v = new View('editor/material');
     $v->material = file::listing_dir(DOCROOT . 'images/background/');
     $v->render(TRUE);
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:15,代码来源:editor.php

示例2: compileJs

 /**
  * Methode : génération du fichier JS
  */
 public function compileJs()
 {
     header('Content-type: text/javascript');
     $display = null;
     foreach (file::listing_dir(DOCROOT . 'js/class') as $row) {
         if (is_file(DOCROOT . 'js/class/' . $row)) {
             $display .= implode('', file(DOCROOT . 'js/class/' . $row)) . "\n";
         }
     }
     $display .= implode('', file(DOCROOT . 'js/map.js')) . "\n";
     $this->auto_render = FALSE;
     echo $display;
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:16,代码来源:home.php

示例3: vignette

 /**
  * Methode :
  */
 public function vignette($img = false)
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $v = new View('formulaire/vignette');
     $v->images = file::listing_dir(DOCROOT . '../images/modules');
     $v->selected = $img;
     $v->module = 'modules';
     $v->width = 96;
     $v->height = 96;
     $v->render(true);
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:17,代码来源:elements.php

示例4: form

 /**
  * Methode : affiche le formulaire en overlay pour edit
  */
 public function form($id_region, $x, $y, $z)
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return;
     }
     $view = new View('mapping/form');
     $view->x = $x;
     $view->y = $y;
     $view->z = $z;
     $view->region_id = $id_region;
     $view->type = 'add';
     if ($view->row = Map_Model::instance()->select(array('region_id' => $id_region, 'x' => $x, 'y' => $y, 'z' => $z, 'module_map IS NOT' => NULL), 1)) {
         $view->type = 'edit';
         $view->id = $view->row->id;
         if ($view->row->action_map) {
             $view->row = unserialize($view->row->action_map);
         }
     }
     $view->actions = file::listing_dir(MODPATH . '/plugins/views');
     $view->render(true);
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:25,代码来源:mapping.php

示例5: index

 /**
  * Méthode :
  */
 public function index(&$view)
 {
     $view->sounds = file::listing_dir(DOCROOT . '../audios');
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:7,代码来源:admin_sound.php

示例6: listing_avatar

 /**
  * Page qui affiche les avatars pour modifier
  * 
  * @return  void
  */
 public function listing_avatar()
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $v = new View('users/avatar');
     $v->avatar = file::listing_dir(DOCROOT . '../images/character/');
     $v->render(TRUE);
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:15,代码来源:users.php

示例7: index

 /**
  * Générer un JSON
  *
  * @return void
  */
 public function index($render = TRUE)
 {
     $json = new View('map/json');
     $json->my = $this->user;
     if (!($this->region = Region_Model::instance()->select(array('id' => $this->user->region_id), 1))) {
         return FALSE;
     }
     $json->items = Item_Model::instance()->select();
     $elements = $modules = $items = FALSE;
     if (($rows = Map_Model::instance()->select(array('region_id' => $this->region->id), FALSE)) !== FALSE) {
         $prenoms = Name_Model::instance()->select();
         $listName = array();
         foreach ($prenoms as $prenom) {
             $listName[] = ucfirst(mb_strtolower($prenom->prenom));
         }
         $images = file::listing_dir(DOCROOT . 'images/character');
         foreach ($rows as $row) {
             if (!$row->module_map && !$row->bot) {
                 $elements[] = '{"x" : ' . $row->x . ', "z" : ' . $row->z . ', "y" : ' . $row->y . ', "subX" : ' . $row->subX . ', "subZ" : ' . $row->subZ . ', "subY" : ' . $row->subY . ', "materials" : [ "' . $row->background_px . '", "' . $row->background_nx . '", "' . $row->background_py . '", "' . $row->background_ny . '", "' . $row->background_pz . '", "' . $row->background_nz . '"	] }';
             } else {
                 $data = @unserialize($row->action_map);
                 $action = json_encode($data);
                 if ($row->module_map == 'article') {
                     $article = Article_Model::instance()->select(array('id_article' => $data->id_article, 'article_category_id' => 2, 'status' => 1), 1);
                     $modules[] = '{"x" : ' . $row->x . ', "z" : ' . $row->z . ', "y" : ' . $row->y . ', "subX" : ' . $row->subX . ', "subZ" : ' . $row->subZ . ', "subY" : ' . $row->subY . ', "data" : ' . $action . ', "article" : ' . json_encode($article->article) . ' }';
                 } elseif ($row->bot) {
                     $v = new stdClass();
                     $v->id = 0;
                     $v->name = $row->bot ? $row->title : $listName[array_rand($listName)];
                     $v->x = $row->x;
                     $v->y = $row->y;
                     $v->z = $row->z;
                     $v->region_id = $row->region_id;
                     $v->user_id = $this->user->id;
                     if ($row->bot == 2) {
                         $v->image = 'animals/bears.png';
                     } elseif ($row->bot == 3) {
                         $v->image = 'animals/dog.png';
                     } else {
                         $v->image = 'character/' . $images[array_rand($images)];
                     }
                     $v->hp_max = 100;
                     $v->hp = 100;
                     $v->leak = 0;
                     $v->type = $row->bot;
                     $v->fixe = $row->bot && !$row->module_map ? 0 : 1;
                     $v->argent = 1000;
                     $v->xp = 10;
                     $v->niveau = 0;
                     $this->botFixe[] = $v;
                     if ($row->module_map == 'quete') {
                         $modules[] = '{"x" : ' . $row->x . ', "z" : ' . $row->z . ', "y" : ' . ($row->y - 1) . ', "subX" : ' . $row->subX . ', "subZ" : ' . $row->subZ . ', "subY" : ' . $row->subY . ', "data" : ' . $action . ', "article" : "" }';
                     }
                 } else {
                     $modules[] = '{"x" : ' . $row->x . ', "z" : ' . $row->z . ', "y" : ' . ($row->y - 1) . ', "subX" : ' . $row->subX . ', "subZ" : ' . $row->subZ . ', "subY" : ' . $row->subY . ', "data" : ' . $action . ', "article" : "" }';
                 }
             }
         }
     }
     $articles = Article_Model::instance()->select(array('region_id' => $this->region->id, 'article_category_id' => 2, 'status' => 1));
     $articlesList = null;
     if ($articles) {
         foreach ($articles as $row) {
             $articlesList[] = json_encode($row->reponse ? $row->article . '<div class="reponse">' . $row->reponse . '</div>' : $row->article);
         }
     }
     $this->region->map = new stdClass();
     $this->region->map->region = $this->region;
     $this->region->map->elements = $elements ? implode(',', $elements) : FALSE;
     $this->region->map->modules = $modules ? implode(',', $modules) : FALSE;
     $this->region->map->articles = $articlesList ? implode(',', $articlesList) : FALSE;
     $this->region->map->region->bots = $this->botFixe;
     $json->region = $this->region;
     $sounds = file::listing_dir(DOCROOT . 'audios', array('home.mp3'));
     $json->sounds = $sounds ? json_encode($sounds) : FALSE;
     return $json->render($render);
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:82,代码来源:map.php

示例8: vignette_global

 /**
  * Methode :
  */
 private function vignette_global($img, $dossier, $x, $y)
 {
     $this->auto_render = FALSE;
     if (!request::is_ajax()) {
         return FALSE;
     }
     $v = new View('formulaire/vignette');
     $v->images = file::listing_dir(DOCROOT . '../images/' . $dossier);
     $v->selected = $img;
     $v->class = $dossier;
     $v->module = $dossier;
     $v->width = $x;
     $v->height = $y;
     $v->render(true);
 }
开发者ID:ezioms,项目名称:RpgEditor,代码行数:18,代码来源:regions.php


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