|
|
|
|
|
|
|
|
? $this->config['includeTemplates'] |
|
|
? $this->config['includeTemplates'] |
|
|
: $f3->get('includeTemplates') ? : FALSE |
|
|
: $f3->get('includeTemplates') ? : FALSE |
|
|
; |
|
|
; |
|
|
foreach($this->structs[$domain_key]['tpl'] as $key=>$file) { |
|
|
|
|
|
$str = \Template::instance()->render(substr($file,7)); |
|
|
|
|
|
$str = self::linkify($str); |
|
|
|
|
|
$this->content[$domain][$key."00tpl"] = sprintf( |
|
|
|
|
|
"<div class=\"item %s %s\">%s</div>", |
|
|
|
|
|
$page, |
|
|
|
|
|
$key, |
|
|
|
|
|
$str |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
if ($includeTemplates) { |
|
|
|
|
|
foreach($this->structs[$domain_key]['tpl'] as $key=>$file) { |
|
|
|
|
|
$str = \Template::instance()->render(substr($file,7)); |
|
|
|
|
|
$str = self::linkify($str); |
|
|
|
|
|
$this->content[$domain][$key."00tpl"] = sprintf( |
|
|
|
|
|
"<div class=\"item %s %s\">%s</div>", |
|
|
|
|
|
$page, |
|
|
|
|
|
$key, |
|
|
|
|
|
$str |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
$bulkIncludePic = array_key_exists('bulkIncludePic',$this->config) |
|
|
$bulkIncludePic = array_key_exists('bulkIncludePic',$this->config) |
|
|
? $this->config['bulkIncludePic'] |
|
|
? $this->config['bulkIncludePic'] |
|
|
|
|
|
|
|
|
$token = md5($timestamp . $form_config_file . rand(100,999)); |
|
|
$token = md5($timestamp . $form_config_file . rand(100,999)); |
|
|
|
|
|
|
|
|
$f3->config($form_config_file); |
|
|
$f3->config($form_config_file); |
|
|
|
|
|
$fields = $f3->get('fields'); |
|
|
|
|
|
foreach ($fields as $k => $v) { |
|
|
|
|
|
if ($v['type'] == 'custom') { |
|
|
|
|
|
$fields[$k]['template'] = sprintf( |
|
|
|
|
|
"%s%s", |
|
|
|
|
|
substr($this->folder,8), //assumens content folder is content |
|
|
|
|
|
$v['template'] |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$f3->set('fields', |
|
|
$f3->set('fields', |
|
|
array_merge( |
|
|
array_merge( |
|
|
$f3->get('fields'), |
|
|
|
|
|
|
|
|
$fields, |
|
|
['xss-token'=>[ |
|
|
['xss-token'=>[ |
|
|
'type'=>'hidden', |
|
|
'type'=>'hidden', |
|
|
'value'=>$token, |
|
|
'value'=>$token, |