nyroFwk  0.2
nyro/module/nyroUtils/controller.class.php
Go to the documentation of this file.
1 <?php
11 
12  protected function execIcon($prm=null) {
13  response::getInstance()->neverExpire();
14  if (array_search('..', $prm) !== false)
15  response::getInstance()->error(null, 403);
16  response::getInstance()->showFile(file::nyroExists(array(
17  'name'=>'icons'.DS.implode(DS, $prm),
18  'realName'=>true,
19  'type'=>'other'
20  )));
21  }
22 
23  protected function execUploadedFiles($prm=null) {
24  if (array_search('..', $prm) !== false)
25  response::getInstance()->error(null, 403);
26  $text = request::get('text');
27 
28  $file = FILESROOT.urldecode(implode(DS, $prm));
29  if ($text)
30  $file.= DS.$text;
31 
32  $out = request::get('out');
33  if ($out != 'html')
34  $file.= '.'.$out;
35 
36  response::getInstance()->showFile($file);
37  }
38 
39  protected function execTinyMce($prm=null) {
40  $search = 'js/tiny_mce/';
41  $request = request::get('request');
42  $pos = strpos($request, $search);
43  if ($pos === false)
44  exit;
45  $tmp = substr($request, $pos+strlen($search));
46  $file = file::nyroExists(array(
47  'name'=>'lib'.DS.'tinyMce'.DS.$tmp,
48  'realName'=>true,
49  'type'=>'other'
50  ));
51  if (strpos($file, '.php') !== false) {
52  array_walk($_GET, create_function('&$v', '$v = urldecode($v);'));
53  $path = str_replace($tmp, '', $file);
54  ini_set('include_path', $path);
55  define('TINYMCEPATH', substr($path, 0, -1));
56  define('TINYMCECACHEPATH', substr(TMPROOT, 0, -1));
57  if (ob_get_length())
58  ob_clean();
59  include($file);
60  exit;
61  } else
62  response::getInstance()->showFile($file);
63  }
64 
65 }
static get($get=null)
if(!defined('NYROROOT')) define('NYROROOT' ROOT DS
Definition: start.inc.php:56
static getInstance()
static nyroExists($prm)
Definition: file.class.php:137
Generated on Sun Oct 15 2017 22:25:20 for nyroFwk by doxygen 1.8.13