12 $this->type = $htVars->post(
'type', $htVars->get(
'type'));
13 $this->
config = $htVars->post(
'config', $htVars->get(
'config',
'default'));
15 $this->myCfg = $this->cfg->default;
16 if ($this->
config !=
'default' && is_array($this->cfg->get($this->config)))
19 $this->dir = $this->myCfg[
'dir'];
20 if ($this->myCfg[
'subdir'])
21 $this->dir.=
DS.$this->myCfg[
'subdir'];
23 $this->dir.=
DS.$this->type;
27 $resp->setLayout($this->myCfg[
'layout']);
28 $resp->setTitle($this->myCfg[
'title']);
29 $resp->initIncFiles(
false);
30 foreach($this->myCfg[
'incFiles'] as $ic)
36 protected function execIndex(array $prm = array()) {
39 $pattern = FILESROOT.$this->dir.DS.
'*';
42 $pattern.= strtolower($search).
'*';
43 $this->uri.=
'search='.$search.
'&';
48 $file = FILESROOT.urldecode($delete);
66 if (strpos($f,
'nyroBrowserThumb') ===
false) {
68 if ($this->type ==
'image' && strlen($name) > 15)
76 $this->uri.
'delete='.urlencode(str_replace(FILESROOT,
'', $f)).
'&' 87 'searchButton'=>$this->myCfg[
'search'],
89 'imgHelper'=>$this->myCfg[
'imgHelper'],
90 'filesTitle'=>$this->myCfg[
'filesTitle'],
91 'noFiles'=>$this->myCfg[
'noFiles'],
92 'name'=>$this->myCfg[
'name'],
93 'size'=>$this->myCfg[
'size'],
94 'date'=>$this->myCfg[
'date'],
95 'delete'=>$this->myCfg[
'delete'],
101 'sectionName'=>$this->myCfg[
'formName'],
103 ), $this->myCfg[
'formCfg']));
105 $form->add(
'file', array(
107 'subdir'=>$this->dir,
108 'helper'=>$this->myCfg[
'helper'][$this->type][
'name'],
109 'helperPrm'=>$this->myCfg[
'helper'][$this->type][
'prm'],
111 $form->get(
'file')->plupload(array_merge($this->myCfg[
'plupload'][$this->type], array(
112 'multipart_params'=>array(
116 'onAllComplete'=>
'function() {window.location.href = "'.$this->uri.
'";}'
static formatDate($date, $type='date', $len='short2', $htmlOut=true)
if(!defined('NYROROOT')) define('NYROROOT' ROOT DS
static humanSize($file, $sizeGiven=false)
static getInstance(array $cfg=array())
static uploadedUri($file, array $prm=array())
static mergeCfg(array &$prm, array $cfg)
static multipleDelete($pattern, $matchPattern=null)
static uriDef(array $prm=array(), array $use=array('lang', 'module', 'action', 'param', 'out'))
setViewVars(array $values)
static search($pattern, $matchPattern=null)
execIndex(array $prm=array())
static get($className, array $cfg=array())