|
|
@ -26,11 +26,11 @@ class ContactsNew |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
// папка с шаблонами |
|
|
|
// папка с шаблонами |
|
|
|
var $tpl_dir; |
|
|
|
public $tpl_dir; |
|
|
|
// основные поля |
|
|
|
// основные поля |
|
|
|
var $fields_main = array(); |
|
|
|
public $fields_main = array(); |
|
|
|
var $fields_main_in_string = array(); |
|
|
|
public $fields_main_in_string = array(); |
|
|
|
var $fields_main_data = array( |
|
|
|
public $fields_main_data = array( |
|
|
|
'email' => array( |
|
|
|
'email' => array( |
|
|
|
'new' => true, |
|
|
|
'new' => true, |
|
|
|
'title' => 'email', |
|
|
|
'title' => 'email', |
|
|
@ -67,7 +67,7 @@ class ContactsNew |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
// переменная для хранения формы |
|
|
|
// переменная для хранения формы |
|
|
|
var $form = array(); |
|
|
|
public $form = array(); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Внутренние методы класса |
|
|
|
* Внутренние методы класса |
|
|
@ -82,6 +82,35 @@ class ContactsNew |
|
|
|
$this->fields_main_in_string = "'" . implode("','",$this->fields_main) . "'"; |
|
|
|
$this->fields_main_in_string = "'" . implode("','",$this->fields_main) . "'"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Возвращаем JSON |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
function _json($data, $exit = false) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
header("Content-Type: application/json;charset=utf-8"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$json = json_encode($data); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($json === false) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$json = json_encode(array("jsonError", json_last_error_msg())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($json === false) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$json = '{"jsonError": "unknown"}'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http_response_code(500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo $json; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($exit) |
|
|
|
|
|
|
|
exit; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Метод забирает форму из бд по алиасу/id |
|
|
|
* Метод забирает форму из бд по алиасу/id |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -91,15 +120,20 @@ class ContactsNew |
|
|
|
|
|
|
|
|
|
|
|
// иначе забираем из бд форму |
|
|
|
// иначе забираем из бд форму |
|
|
|
$form = array(); |
|
|
|
$form = array(); |
|
|
|
|
|
|
|
|
|
|
|
// основные параметры |
|
|
|
// основные параметры |
|
|
|
$form = $AVE_DB->Query(" |
|
|
|
$form = $AVE_DB->Query(" |
|
|
|
SELECT * FROM " . PREFIX . "_module_contactsnew_forms |
|
|
|
SELECT * FROM " . PREFIX . "_module_contactsnew_forms |
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
" . (is_numeric($alias_id) ? 'id' : 'alias') . " = '" . $alias_id . "' |
|
|
|
" . (is_numeric($alias_id) ? 'id' : 'alias') . " = '" . $alias_id . "' |
|
|
|
")->FetchAssocArray(); |
|
|
|
")->FetchAssocArray(); |
|
|
|
|
|
|
|
|
|
|
|
// если форма не обнаружена, выходим |
|
|
|
// если форма не обнаружена, выходим |
|
|
|
if (empty($form)) return array(); |
|
|
|
if (empty($form)) |
|
|
|
|
|
|
|
return array(); |
|
|
|
|
|
|
|
|
|
|
|
$form['alias_id'] = $alias_id; |
|
|
|
$form['alias_id'] = $alias_id; |
|
|
|
|
|
|
|
|
|
|
|
// получатели |
|
|
|
// получатели |
|
|
|
$form['mail_set'] = unserialize($form['mail_set']); |
|
|
|
$form['mail_set'] = unserialize($form['mail_set']); |
|
|
|
|
|
|
|
|
|
|
@ -111,7 +145,9 @@ class ContactsNew |
|
|
|
WHERE form_id = '" . $form['id'] . "' |
|
|
|
WHERE form_id = '" . $form['id'] . "' |
|
|
|
ORDER BY id ASC |
|
|
|
ORDER BY id ASC |
|
|
|
"); |
|
|
|
"); |
|
|
|
|
|
|
|
|
|
|
|
$form['fields'] = array(); |
|
|
|
$form['fields'] = array(); |
|
|
|
|
|
|
|
|
|
|
|
while ($field = $sql->FetchAssocArray()) |
|
|
|
while ($field = $sql->FetchAssocArray()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// раскрываем массив настроек для селектов |
|
|
|
// раскрываем массив настроек для селектов |
|
|
@ -144,6 +180,7 @@ class ContactsNew |
|
|
|
$form['fields'][$field['id']] = $field; |
|
|
|
$form['fields'][$field['id']] = $field; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// убираем слеши |
|
|
|
// убираем слеши |
|
|
|
$form = $this->_stripslashes($form); |
|
|
|
$form = $this->_stripslashes($form); |
|
|
|
|
|
|
|
|
|
|
@ -158,8 +195,10 @@ class ContactsNew |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function _stripslashes($var) |
|
|
|
function _stripslashes($var) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!is_array($var)) return stripslashes($var); |
|
|
|
if (! is_array($var)) |
|
|
|
else return array_map(array($this,'_stripslashes'),$var); |
|
|
|
return stripslashes($var); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return array_map(array($this, '_stripslashes'), $var); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -167,8 +206,10 @@ class ContactsNew |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function _trim($var) |
|
|
|
function _trim($var) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!is_array($var)) return trim($var); |
|
|
|
if (! is_array($var)) |
|
|
|
else return array_map(array($this,'_trim'),$var); |
|
|
|
return trim($var); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return array_map(array($this, '_trim'), $var); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -176,21 +217,31 @@ class ContactsNew |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function _cleanvar($var) |
|
|
|
function _cleanvar($var) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!is_array($var)) return trim($var) > '' ? trim($var) : null; |
|
|
|
if (! is_array($var)) |
|
|
|
|
|
|
|
return trim($var) > '' |
|
|
|
|
|
|
|
? trim($var) |
|
|
|
|
|
|
|
: null; |
|
|
|
|
|
|
|
|
|
|
|
$narr = array(); |
|
|
|
$narr = array(); |
|
|
|
|
|
|
|
|
|
|
|
while(list($key, $val) = each($var)) |
|
|
|
while(list($key, $val) = each($var)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (is_array($val)) |
|
|
|
if (is_array($val)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$val = _cleanvar($val); |
|
|
|
$val = _cleanvar($val); |
|
|
|
if (count($val) > 0) $narr[$key] = $val; |
|
|
|
|
|
|
|
|
|
|
|
if (count($val) > 0) |
|
|
|
|
|
|
|
$narr[$key] = $val; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (trim($val) > '') $narr[$key] = $val; |
|
|
|
if (trim($val) > '') |
|
|
|
|
|
|
|
$narr[$key] = $val; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
unset ($var); |
|
|
|
unset ($var); |
|
|
|
|
|
|
|
|
|
|
|
return $narr; |
|
|
|
return $narr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -208,12 +259,14 @@ class ContactsNew |
|
|
|
function _alias_validate ($alias = '', $fid = 0) |
|
|
|
function _alias_validate ($alias = '', $fid = 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $AVE_DB; |
|
|
|
global $AVE_DB; |
|
|
|
|
|
|
|
|
|
|
|
// соответствие требованиям |
|
|
|
// соответствие требованиям |
|
|
|
if ( |
|
|
|
if ( |
|
|
|
empty ($alias) || |
|
|
|
empty ($alias) || |
|
|
|
preg_match('/^[A-Za-z0-9-_]{1,20}$/i', $alias) !== 1 || |
|
|
|
preg_match('/^[A-Za-z0-9-_]{1,20}$/i', $alias) !== 1 || |
|
|
|
is_numeric($alias) |
|
|
|
is_numeric($alias) |
|
|
|
) return 'syn'; |
|
|
|
) return 'syn'; |
|
|
|
|
|
|
|
|
|
|
|
// уникальность |
|
|
|
// уникальность |
|
|
|
return !(bool)$AVE_DB->Query(" |
|
|
|
return !(bool)$AVE_DB->Query(" |
|
|
|
SELECT 1 FROM " . PREFIX . "_module_contactsnew_forms |
|
|
|
SELECT 1 FROM " . PREFIX . "_module_contactsnew_forms |
|
|
@ -223,48 +276,71 @@ class ContactsNew |
|
|
|
")->GetCell(); |
|
|
|
")->GetCell(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Получение списка рубрик |
|
|
|
* Получение списка рубрик |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function _rubrics () |
|
|
|
function _rubrics () |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $AVE_DB; |
|
|
|
global $AVE_DB; |
|
|
|
|
|
|
|
|
|
|
|
$rubs = array(); |
|
|
|
$rubs = array(); |
|
|
|
|
|
|
|
|
|
|
|
$sql = $AVE_DB->Query(" |
|
|
|
$sql = $AVE_DB->Query(" |
|
|
|
SELECT Id, rubric_title FROM " . PREFIX . "_rubrics |
|
|
|
SELECT Id, rubric_title FROM " . PREFIX . "_rubrics |
|
|
|
"); |
|
|
|
"); |
|
|
|
while ($rub = $sql->FetchAssocArray()) $rubs[$rub['Id']] = $rub['rubric_title']; |
|
|
|
|
|
|
|
|
|
|
|
while ($rub = $sql->FetchAssocArray()) |
|
|
|
|
|
|
|
$rubs[$rub['Id']] = $rub['rubric_title']; |
|
|
|
|
|
|
|
|
|
|
|
return $rubs; |
|
|
|
return $rubs; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Получение списка документов |
|
|
|
* Получение списка документов |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function _docs ($rubs_id = array()) |
|
|
|
function _docs ($rubs_id = array()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $AVE_DB; |
|
|
|
global $AVE_DB; |
|
|
|
if (empty($rubs_id)) return array(); |
|
|
|
|
|
|
|
|
|
|
|
if (empty($rubs_id)) |
|
|
|
|
|
|
|
return array(); |
|
|
|
|
|
|
|
|
|
|
|
// @fix для v1.0 beta <= 2: поддержка одной рубрики, не массива |
|
|
|
// @fix для v1.0 beta <= 2: поддержка одной рубрики, не массива |
|
|
|
if (!is_array($rubs_id)) $rubs_id = array(0 => $rubs_id); |
|
|
|
if (! is_array($rubs_id)) |
|
|
|
|
|
|
|
$rubs_id = array(0 => $rubs_id); |
|
|
|
|
|
|
|
|
|
|
|
$docs = array(); |
|
|
|
$docs = array(); |
|
|
|
|
|
|
|
|
|
|
|
$sql = $AVE_DB->Query(" |
|
|
|
$sql = $AVE_DB->Query(" |
|
|
|
SELECT Id, document_title FROM " . PREFIX . "_documents |
|
|
|
SELECT Id, document_title FROM " . PREFIX . "_documents |
|
|
|
WHERE rubric_id IN (" . implode(',',$rubs_id) . ") |
|
|
|
WHERE rubric_id IN (" . implode(',',$rubs_id) . ") |
|
|
|
"); |
|
|
|
"); |
|
|
|
while ($doc = $sql->FetchAssocArray()) $docs[$doc['Id']] = $doc['document_title']; |
|
|
|
|
|
|
|
|
|
|
|
while ($doc = $sql->FetchAssocArray()) |
|
|
|
|
|
|
|
$docs[$doc['Id']] = $doc['document_title']; |
|
|
|
|
|
|
|
|
|
|
|
return $docs; |
|
|
|
return $docs; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Парсинг главных тегов |
|
|
|
* Парсинг главных тегов |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function _parse_tags ($str) |
|
|
|
function _parse_tags ($str) |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $AVE_Core, $AVE_DB; |
|
|
|
global $AVE_Core, $AVE_DB; |
|
|
|
if (empty($_SESSION['user_login'])) $_SESSION['user_login'] = (UGROUP != 2) ? $AVE_DB->Query("SELECT user_name FROM " . PREFIX . "_users WHERE Id = '" . UID . "'")->GetCell() : ''; |
|
|
|
|
|
|
|
|
|
|
|
if (empty($_SESSION['user_login'])) |
|
|
|
|
|
|
|
$_SESSION['user_login'] = (UGROUP != 2) |
|
|
|
|
|
|
|
? $AVE_DB->Query("SELECT user_name FROM " . PREFIX . "_users WHERE Id = '" . UID . "'")->GetCell() |
|
|
|
|
|
|
|
: ''; |
|
|
|
|
|
|
|
|
|
|
|
$str = preg_replace_callback('/\[tag:(css|js):([^ :\/]+):?(\S+)*\]/', array($AVE_Core, '_parse_combine'), $str); |
|
|
|
$str = preg_replace_callback('/\[tag:(css|js):([^ :\/]+):?(\S+)*\]/', array($AVE_Core, '_parse_combine'), $str); |
|
|
|
|
|
|
|
|
|
|
|
$str = parse_hide($str); |
|
|
|
$str = parse_hide($str); |
|
|
|
|
|
|
|
|
|
|
|
return str_replace(array( |
|
|
|
return str_replace(array( |
|
|
|
'[tag:docid]', |
|
|
|
'[tag:docid]', |
|
|
|
'[tag:formtitle]', |
|
|
|
'[tag:formtitle]', |
|
|
@ -307,8 +383,11 @@ class ContactsNew |
|
|
|
function _eval2var($code) |
|
|
|
function _eval2var($code) |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $AVE_DB, $AVE_Core, $AVE_Template; |
|
|
|
global $AVE_DB, $AVE_Core, $AVE_Template; |
|
|
|
|
|
|
|
|
|
|
|
ob_start(); |
|
|
|
ob_start(); |
|
|
|
|
|
|
|
|
|
|
|
eval($code); |
|
|
|
eval($code); |
|
|
|
|
|
|
|
|
|
|
|
return ob_get_clean(); |
|
|
|
return ob_get_clean(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -320,6 +399,7 @@ class ContactsNew |
|
|
|
foreach ($this->fields_main as $field_title) |
|
|
|
foreach ($this->fields_main as $field_title) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$count = 0; |
|
|
|
$count = 0; |
|
|
|
|
|
|
|
|
|
|
|
$tpl = str_replace(array( |
|
|
|
$tpl = str_replace(array( |
|
|
|
'[tag:fld:' . $field_title . ']', |
|
|
|
'[tag:fld:' . $field_title . ']', |
|
|
|
'[tag:if_fld:' . $field_title, |
|
|
|
'[tag:if_fld:' . $field_title, |
|
|
@ -329,8 +409,11 @@ class ContactsNew |
|
|
|
'[tag:if_fld:' . $this->form['fields_main'][$field_title], |
|
|
|
'[tag:if_fld:' . $this->form['fields_main'][$field_title], |
|
|
|
'[tag:elseif_fld:' . $this->form['fields_main'][$field_title], |
|
|
|
'[tag:elseif_fld:' . $this->form['fields_main'][$field_title], |
|
|
|
),$tpl,$count); |
|
|
|
),$tpl,$count); |
|
|
|
if ($save_is) $this->form['is_' . $field_title] = $count > 0 ? true : false; |
|
|
|
|
|
|
|
|
|
|
|
if ($save_is) |
|
|
|
|
|
|
|
$this->form['is_' . $field_title] = $count > 0 ? true : false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $tpl; |
|
|
|
return $tpl; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -351,7 +434,10 @@ class ContactsNew |
|
|
|
function _parse_tag_title ($matches) |
|
|
|
function _parse_tag_title ($matches) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$field_id = $matches[1]; |
|
|
|
$field_id = $matches[1]; |
|
|
|
return !$this->form['fields'][$field_id]['main'] ? $this->form['fields'][$field_id]['title'] : $this->form['fields'][$field_id]['title_lang']; |
|
|
|
|
|
|
|
|
|
|
|
return !$this->form['fields'][$field_id]['main'] |
|
|
|
|
|
|
|
? $this->form['fields'][$field_id]['title'] |
|
|
|
|
|
|
|
: $this->form['fields'][$field_id]['title_lang']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -368,17 +454,30 @@ class ContactsNew |
|
|
|
function _parse_tag_fld_form ($matches) |
|
|
|
function _parse_tag_fld_form ($matches) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$field_id = (int)$matches[1]; |
|
|
|
$field_id = (int)$matches[1]; |
|
|
|
|
|
|
|
|
|
|
|
// забираем массив поля |
|
|
|
// забираем массив поля |
|
|
|
$field = $this->form['fields'][$field_id]; |
|
|
|
$field = $this->form['fields'][$field_id]; |
|
|
|
|
|
|
|
|
|
|
|
// если поля нет, возвращаем тег обратно |
|
|
|
// если поля нет, возвращаем тег обратно |
|
|
|
if (empty($field)) return $matches[0]; |
|
|
|
if (empty($field)) |
|
|
|
|
|
|
|
return $matches[0]; |
|
|
|
|
|
|
|
|
|
|
|
// если поле выключено, возвращаем пустую строку |
|
|
|
// если поле выключено, возвращаем пустую строку |
|
|
|
if (empty($field['active'])) return ''; |
|
|
|
if (empty($field['active'])) |
|
|
|
|
|
|
|
return ''; |
|
|
|
|
|
|
|
|
|
|
|
$alias_id = $this->form['alias_id']; |
|
|
|
$alias_id = $this->form['alias_id']; |
|
|
|
$fld_val = $this->form['is_submited'] ? $this->_stripslashes($_POST['form-' . $alias_id][$field_id]) : |
|
|
|
|
|
|
|
(in_array($field['type'],array('input','textarea')) ? $this->_eval2var('?>' . $field['defaultval'] . '<?') : $field['defaultval']); |
|
|
|
$fld_val = $this->form['is_submited'] |
|
|
|
|
|
|
|
? $this->_stripslashes($_POST['form-' . $alias_id][$field_id]) |
|
|
|
|
|
|
|
: (in_array($field['type'],array('input','textarea')) |
|
|
|
|
|
|
|
? $this->_eval2var('?>' . $field['defaultval'] . '<?') |
|
|
|
|
|
|
|
: $field['defaultval']); |
|
|
|
|
|
|
|
|
|
|
|
$attributes = trim($field['attributes']); |
|
|
|
$attributes = trim($field['attributes']); |
|
|
|
|
|
|
|
|
|
|
|
$this->form['fields'][$field_id]['is_used'] = true; |
|
|
|
$this->form['fields'][$field_id]['is_used'] = true; |
|
|
|
|
|
|
|
|
|
|
|
$input = ''; |
|
|
|
$input = ''; |
|
|
|
$return = ''; |
|
|
|
$return = ''; |
|
|
|
|
|
|
|
|
|
|
@ -442,8 +541,12 @@ class ContactsNew |
|
|
|
$input .= '</select>'; |
|
|
|
$input .= '</select>'; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// вставляем поле в шаблон поля |
|
|
|
// вставляем поле в шаблон поля |
|
|
|
$return = trim($field['tpl']) > '' ? str_replace('[tag:fld]',$input,$field['tpl']) : $input; |
|
|
|
$return = trim($field['tpl']) > '' |
|
|
|
|
|
|
|
? str_replace('[tag:fld]',$input,$field['tpl']) |
|
|
|
|
|
|
|
: $input; |
|
|
|
|
|
|
|
|
|
|
|
// парсим теги названия и id |
|
|
|
// парсим теги названия и id |
|
|
|
$return = str_replace(array( |
|
|
|
$return = str_replace(array( |
|
|
|
'[tag:id]', |
|
|
|
'[tag:id]', |
|
|
@ -452,6 +555,7 @@ class ContactsNew |
|
|
|
$field['id'], |
|
|
|
$field['id'], |
|
|
|
'[tag:title:' . $field_id . ']', |
|
|
|
'[tag:title:' . $field_id . ']', |
|
|
|
), $return); |
|
|
|
), $return); |
|
|
|
|
|
|
|
|
|
|
|
// если попытка отправить форму, обрабатываем валидацию и пустоту |
|
|
|
// если попытка отправить форму, обрабатываем валидацию и пустоту |
|
|
|
if ($this->form['is_submited']) |
|
|
|
if ($this->form['is_submited']) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -490,6 +594,7 @@ class ContactsNew |
|
|
|
$this->form['ajax']['fields'][$field_id]['validate'] = false; |
|
|
|
$this->form['ajax']['fields'][$field_id]['validate'] = false; |
|
|
|
$this->form['ajax']['fields'][$field_id]['is_valid'] = null; |
|
|
|
$this->form['ajax']['fields'][$field_id]['is_valid'] = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// пустота (для любых обязательных полей) |
|
|
|
// пустота (для любых обязательных полей) |
|
|
|
if (! empty($field['required']) && $field['required']) |
|
|
|
if (! empty($field['required']) && $field['required']) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -929,19 +1034,25 @@ class ContactsNew |
|
|
|
return $fid_new; |
|
|
|
return $fid_new; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Вывод формы |
|
|
|
* Вывод формы |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function form_display ($alias_id) |
|
|
|
function form_display ($alias_id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $AVE_Template; |
|
|
|
global $AVE_Template; |
|
|
|
|
|
|
|
|
|
|
|
$form = $this->_form($alias_id); |
|
|
|
$form = $this->_form($alias_id); |
|
|
|
if (empty($form)) return "[mod_contactsnew:$alias_id] - " . $AVE_Template->get_config_vars('form_notfound'); |
|
|
|
|
|
|
|
|
|
|
|
if (empty($form)) |
|
|
|
|
|
|
|
return "[mod_contactsnew:$alias_id] - " . $AVE_Template->get_config_vars('form_notfound'); |
|
|
|
|
|
|
|
|
|
|
|
// по дефолту форма валидна, но не отправлена - потом перезаписываем, если что |
|
|
|
// по дефолту форма валидна, но не отправлена - потом перезаписываем, если что |
|
|
|
$this->form['is_valid'] = true; |
|
|
|
$this->form['is_valid'] = true; |
|
|
|
$this->form['ajax']['form']['is_valid'] = true; |
|
|
|
$this->form['ajax']['form']['is_valid'] = true; |
|
|
|
$this->form['ajax']['form']['is_sent'] = false; |
|
|
|
$this->form['ajax']['form']['is_sent'] = false; |
|
|
|
$this->form['ajax']['form']['finish_tpl'] = null; |
|
|
|
$this->form['ajax']['form']['finish_tpl'] = null; |
|
|
|
|
|
|
|
|
|
|
|
// rubheader |
|
|
|
// rubheader |
|
|
|
$GLOBALS['user_header']['module_contactsnew_' . $alias_id] = $this->_parse_tags($this->form['rubheader']); |
|
|
|
$GLOBALS['user_header']['module_contactsnew_' . $alias_id] = $this->_parse_tags($this->form['rubheader']); |
|
|
|
|
|
|
|
|
|
|
@ -951,9 +1062,11 @@ class ContactsNew |
|
|
|
if ($_SESSION['mcnfinish'][$form['id'] . $_GET['mcnfinish']] === true) |
|
|
|
if ($_SESSION['mcnfinish'][$form['id'] . $_GET['mcnfinish']] === true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
unset($_SESSION['mcnfinish'][$form['id'] . $_GET['mcnfinish']]); |
|
|
|
unset($_SESSION['mcnfinish'][$form['id'] . $_GET['mcnfinish']]); |
|
|
|
|
|
|
|
|
|
|
|
// формируем финишную страницу |
|
|
|
// формируем финишную страницу |
|
|
|
$tpl = $this->_parse_tags($form['finish_tpl']); |
|
|
|
$tpl = $this->_parse_tags($form['finish_tpl']); |
|
|
|
$tpl = $this->_eval2var('?>' . $tpl . '<?'); |
|
|
|
$tpl = $this->_eval2var('?>' . $tpl . '<?'); |
|
|
|
|
|
|
|
|
|
|
|
return $tpl; |
|
|
|
return $tpl; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
@ -962,9 +1075,10 @@ class ContactsNew |
|
|
|
exit; |
|
|
|
exit; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// определяем (bool) отправка формы |
|
|
|
// определяем (bool) отправка формы |
|
|
|
else $this->form['is_submited'] = false; |
|
|
|
else |
|
|
|
|
|
|
|
$this->form['is_submited'] = false; |
|
|
|
|
|
|
|
|
|
|
|
if (! empty($_POST['form-' . $alias_id])) |
|
|
|
if (! empty($_POST['form-' . $alias_id])) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->form['is_submited'] = true; |
|
|
|
$this->form['is_submited'] = true; |
|
|
@ -1009,14 +1123,18 @@ class ContactsNew |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Отправка формы |
|
|
|
* Отправка формы |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function form_submit ($alias_id) |
|
|
|
function form_submit ($alias_id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
global $AVE_DB, $AVE_Template; |
|
|
|
global $AVE_DB, $AVE_Template; |
|
|
|
|
|
|
|
|
|
|
|
$form = $this->form; |
|
|
|
$form = $this->form; |
|
|
|
|
|
|
|
|
|
|
|
$fields = $form['fields']; |
|
|
|
$fields = $form['fields']; |
|
|
|
|
|
|
|
|
|
|
|
$fid = $form['id']; |
|
|
|
$fid = $form['id']; |
|
|
|
|
|
|
|
|
|
|
|
// формируем список получателей |
|
|
|
// формируем список получателей |
|
|
@ -1029,8 +1147,13 @@ class ContactsNew |
|
|
|
) |
|
|
|
) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$email = ''; |
|
|
|
$email = ''; |
|
|
|
if ($form['is_email'] === true) $email = $_POST['form-' . $alias_id][$form['fields_main']['email']]; |
|
|
|
|
|
|
|
if (empty($email)) $email = $_SESSION['user_email']; |
|
|
|
if ($form['is_email'] === true) |
|
|
|
|
|
|
|
$email = $_POST['form-' . $alias_id][$form['fields_main']['email']]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($email)) |
|
|
|
|
|
|
|
$email = $_SESSION['user_email']; |
|
|
|
|
|
|
|
|
|
|
|
if (! empty($email)) |
|
|
|
if (! empty($email)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$recs[] = array( |
|
|
|
$recs[] = array( |
|
|
@ -1039,12 +1162,19 @@ class ContactsNew |
|
|
|
'agent' => 'user', |
|
|
|
'agent' => 'user', |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$history['email'] = $email; |
|
|
|
$history['email'] = $email; |
|
|
|
} else // если чекбоксы - отправить копию неактивные |
|
|
|
} |
|
|
|
|
|
|
|
else // если чекбоксы - отправить копию неактивные |
|
|
|
{ |
|
|
|
{ |
|
|
|
$email = ''; |
|
|
|
$email = ''; |
|
|
|
if ($form['is_email'] === true) $email = $_POST['form-' . $alias_id][$form['fields_main']['email']]; |
|
|
|
|
|
|
|
if (empty($email)) $email = $_SESSION['user_email']; |
|
|
|
if ($form['is_email'] === true) |
|
|
|
|
|
|
|
$email = $_POST['form-' . $alias_id][$form['fields_main']['email']]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($email)) |
|
|
|
|
|
|
|
$email = $_SESSION['user_email']; |
|
|
|
|
|
|
|
|
|
|
|
$history['email'] = $email; |
|
|
|
$history['email'] = $email; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1066,10 +1196,13 @@ class ContactsNew |
|
|
|
|
|
|
|
|
|
|
|
// перезаписываем список уникальных получателей в переменную письма |
|
|
|
// перезаписываем список уникальных получателей в переменную письма |
|
|
|
$this->form['receivers'] = array(); |
|
|
|
$this->form['receivers'] = array(); |
|
|
|
|
|
|
|
|
|
|
|
foreach ($recs as $rec) |
|
|
|
foreach ($recs as $rec) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!isset($this->form['receivers'][$rec['email']]) && trim($rec['email']) > '') $this->form['receivers'][trim($rec['email'])] = $rec; |
|
|
|
if (!isset($this->form['receivers'][$rec['email']]) && trim($rec['email']) > '') |
|
|
|
|
|
|
|
$this->form['receivers'][trim($rec['email'])] = $rec; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$recs = $this->form['receivers']; |
|
|
|
$recs = $this->form['receivers']; |
|
|
|
$recs[] = array('agent' => 'history'); |
|
|
|
$recs[] = array('agent' => 'history'); |
|
|
|
|
|
|
|
|
|
|
@ -1081,37 +1214,48 @@ class ContactsNew |
|
|
|
|
|
|
|
|
|
|
|
// обрабатываем шаблон письма |
|
|
|
// обрабатываем шаблон письма |
|
|
|
$tpl = $form['mail_tpl']; |
|
|
|
$tpl = $form['mail_tpl']; |
|
|
|
|
|
|
|
|
|
|
|
// меняем теги основных полей на стандартные |
|
|
|
// меняем теги основных полей на стандартные |
|
|
|
$tpl = $this->_parse_tag_fld_main($tpl); |
|
|
|
$tpl = $this->_parse_tag_fld_main($tpl); |
|
|
|
|
|
|
|
|
|
|
|
// парсим [tag:easymail] |
|
|
|
// парсим [tag:easymail] |
|
|
|
if (strpos($tpl,'[tag:easymail]') !== false) |
|
|
|
if (strpos($tpl,'[tag:easymail]') !== false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$easy = ''; |
|
|
|
$easy = ''; |
|
|
|
|
|
|
|
|
|
|
|
foreach ($fields as $field_id => $field) |
|
|
|
foreach ($fields as $field_id => $field) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($field['is_used'] !== true || $field['title'] == 'captcha' || empty($field['active'])) continue; |
|
|
|
if ($field['is_used'] !== true || $field['title'] == 'captcha' || empty($field['active'])) |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
$easy .= "[tag:title:$field_id]" . ": [tag:fld:$field_id];" . ($form['mail_set']['format'] === 'text' ? "\r\n" : '<br>'); |
|
|
|
$easy .= "[tag:title:$field_id]" . ": [tag:fld:$field_id];" . ($form['mail_set']['format'] === 'text' ? "\r\n" : '<br>'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// убираем последний перевод строки |
|
|
|
// убираем последний перевод строки |
|
|
|
$easy = ($form['mail_set']['format'] === 'text') ? rtrim($easy) : substr($easy,0,-4); |
|
|
|
$easy = ($form['mail_set']['format'] === 'text') ? rtrim($easy) : substr($easy,0,-4); |
|
|
|
$tpl = str_replace('[tag:easymail]',$easy,$tpl); |
|
|
|
$tpl = str_replace('[tag:easymail]',$easy,$tpl); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// парсим теги полей и названий |
|
|
|
// парсим теги полей и названий |
|
|
|
$tpl = preg_replace_callback('/\[tag:fld:(\d+)]/', array($this,'_parse_tag_fld_mail'),$tpl); |
|
|
|
$tpl = preg_replace_callback('/\[tag:fld:(\d+)]/', array($this,'_parse_tag_fld_mail'),$tpl); |
|
|
|
$tpl = preg_replace_callback('/\[tag:title:([A-Za-z0-9-_]+)]/', array($this,'_parse_tag_title'),$tpl); |
|
|
|
$tpl = preg_replace_callback('/\[tag:title:([A-Za-z0-9-_]+)]/', array($this,'_parse_tag_title'),$tpl); |
|
|
|
|
|
|
|
|
|
|
|
// парсим основные теги |
|
|
|
// парсим основные теги |
|
|
|
$tpl = $this->_parse_tags($tpl); |
|
|
|
$tpl = $this->_parse_tags($tpl); |
|
|
|
|
|
|
|
|
|
|
|
// заменяем теги условий |
|
|
|
// заменяем теги условий |
|
|
|
$tpl = preg_replace('/\[tag:(if|elseif)_fld:(\d*)(.*?)]/si','<? $1 (\$_POST["form-' . $alias_id . '"][$2]$3): ?>',$tpl);
|
|
|
|
$tpl = preg_replace('/\[tag:(if|elseif)_fld:(\d*)(.*?)]/si','<? $1 (\$_POST["form-' . $alias_id . '"][$2]$3): ?>',$tpl);
|
|
|
|
$tpl = str_replace(array('[tag:else_fld]','[/tag:if_fld]'),array('<? else: ?>','<? endif ?>'),$tpl);
|
|
|
|
$tpl = str_replace(array('[tag:else_fld]','[/tag:if_fld]'),array('<? else: ?>','<? endif ?>'),$tpl);
|
|
|
|
|
|
|
|
|
|
|
|
// файлы-вложения |
|
|
|
// файлы-вложения |
|
|
|
$attach = array(); |
|
|
|
$attach = array(); |
|
|
|
|
|
|
|
|
|
|
|
if (! empty($_FILES['form-' . $alias_id]['tmp_name'])) |
|
|
|
if (! empty($_FILES['form-' . $alias_id]['tmp_name'])) |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach ($_FILES['form-' . $alias_id]['name'] as $field_id => $fname) |
|
|
|
foreach ($_FILES['form-' . $alias_id]['name'] as $field_id => $fname) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$ext = (end(explode('.', $fname))); |
|
|
|
$ext = (end(explode('.', $fname))); |
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|
!empty($_FILES['form-' . $alias_id]['tmp_name'][$field_id]) && |
|
|
|
!empty($_FILES['form-' . $alias_id]['tmp_name'][$field_id]) && |
|
|
|
!empty($form['fields'][$field_id]) && |
|
|
|
!empty($form['fields'][$field_id]) && |
|
|
@ -1120,8 +1264,12 @@ class ContactsNew |
|
|
|
) |
|
|
|
) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$fname = BASE_DIR . '/' . ATTACH_DIR . '/' . str_replace(' ', '_', mb_strtolower(trim($fname))); |
|
|
|
$fname = BASE_DIR . '/' . ATTACH_DIR . '/' . str_replace(' ', '_', mb_strtolower(trim($fname))); |
|
|
|
if (file_exists($fname)) $fname = rtrim($fname,'.' . $ext) . '_' . mt_rand(0,10000) . '.' . $ext; |
|
|
|
|
|
|
|
|
|
|
|
if (file_exists($fname)) |
|
|
|
|
|
|
|
$fname = rtrim($fname,'.' . $ext) . '_' . mt_rand(0,10000) . '.' . $ext; |
|
|
|
|
|
|
|
|
|
|
|
@move_uploaded_file($_FILES['form-' . $alias_id]['tmp_name'][$field_id], $fname); |
|
|
|
@move_uploaded_file($_FILES['form-' . $alias_id]['tmp_name'][$field_id], $fname); |
|
|
|
|
|
|
|
|
|
|
|
$attach[] = $fname; |
|
|
|
$attach[] = $fname; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1132,11 +1280,13 @@ class ContactsNew |
|
|
|
$from_name_tpl = $this->_parse_tags($from_name_tpl); |
|
|
|
$from_name_tpl = $this->_parse_tags($from_name_tpl); |
|
|
|
$from_name_tpl = $this->_parse_tag_fld_main($from_name_tpl); |
|
|
|
$from_name_tpl = $this->_parse_tag_fld_main($from_name_tpl); |
|
|
|
$from_name_tpl = preg_replace_callback('/\[tag:fld:(\d+)]/', array($this,'_parse_tag_fld_post'),$from_name_tpl); |
|
|
|
$from_name_tpl = preg_replace_callback('/\[tag:fld:(\d+)]/', array($this,'_parse_tag_fld_post'),$from_name_tpl); |
|
|
|
|
|
|
|
|
|
|
|
// Email отправителя |
|
|
|
// Email отправителя |
|
|
|
$from_email_tpl = $form['mail_set']['from_email']; |
|
|
|
$from_email_tpl = $form['mail_set']['from_email']; |
|
|
|
$from_email_tpl = $this->_parse_tags($from_email_tpl); |
|
|
|
$from_email_tpl = $this->_parse_tags($from_email_tpl); |
|
|
|
$from_email_tpl = $this->_parse_tag_fld_main($from_email_tpl); |
|
|
|
$from_email_tpl = $this->_parse_tag_fld_main($from_email_tpl); |
|
|
|
$from_email_tpl = preg_replace_callback('/\[tag:fld:(\d+)]/', array($this,'_parse_tag_fld_post'),$from_email_tpl); |
|
|
|
$from_email_tpl = preg_replace_callback('/\[tag:fld:(\d+)]/', array($this,'_parse_tag_fld_post'),$from_email_tpl); |
|
|
|
|
|
|
|
|
|
|
|
// Тема |
|
|
|
// Тема |
|
|
|
$subject_tpl = $form['mail_set']['subject_tpl']; |
|
|
|
$subject_tpl = $form['mail_set']['subject_tpl']; |
|
|
|
$subject_tpl = $this->_parse_tags($subject_tpl); |
|
|
|
$subject_tpl = $this->_parse_tags($subject_tpl); |
|
|
@ -1147,8 +1297,11 @@ class ContactsNew |
|
|
|
foreach ($recs as $rec) |
|
|
|
foreach ($recs as $rec) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$mail = $tpl; |
|
|
|
$mail = $tpl; |
|
|
|
|
|
|
|
|
|
|
|
$from_name = $from_name_tpl; |
|
|
|
$from_name = $from_name_tpl; |
|
|
|
|
|
|
|
|
|
|
|
$from_email = $from_email_tpl; |
|
|
|
$from_email = $from_email_tpl; |
|
|
|
|
|
|
|
|
|
|
|
$subject = $subject_tpl; |
|
|
|
$subject = $subject_tpl; |
|
|
|
|
|
|
|
|
|
|
|
$if_user_open = ($rec['agent'] === 'user'); |
|
|
|
$if_user_open = ($rec['agent'] === 'user'); |
|
|
@ -1171,6 +1324,7 @@ class ContactsNew |
|
|
|
{ |
|
|
|
{ |
|
|
|
$history['dialog']['request']['body'] = $mail; |
|
|
|
$history['dialog']['request']['body'] = $mail; |
|
|
|
$history['dialog']['request']['format'] = $form['mail_set']['format']; |
|
|
|
$history['dialog']['request']['format'] = $form['mail_set']['format']; |
|
|
|
|
|
|
|
|
|
|
|
$AVE_DB->Query(" |
|
|
|
$AVE_DB->Query(" |
|
|
|
INSERT INTO " . PREFIX . "_module_contactsnew_history |
|
|
|
INSERT INTO " . PREFIX . "_module_contactsnew_history |
|
|
|
SET |
|
|
|
SET |
|
|
@ -1181,6 +1335,7 @@ class ContactsNew |
|
|
|
dialog = '" . addslashes(serialize($history['dialog'])) . "', |
|
|
|
dialog = '" . addslashes(serialize($history['dialog'])) . "', |
|
|
|
postdata = '" . addslashes(serialize($_POST)) . "' |
|
|
|
postdata = '" . addslashes(serialize($_POST)) . "' |
|
|
|
"); |
|
|
|
"); |
|
|
|
|
|
|
|
|
|
|
|
unset($history); |
|
|
|
unset($history); |
|
|
|
} |
|
|
|
} |
|
|
|
// иначе, отправляем письмо |
|
|
|
// иначе, отправляем письмо |
|
|
@ -1190,11 +1345,14 @@ class ContactsNew |
|
|
|
$this->_parse_tag_if($from_name,'if_admin',$if_admin_open); |
|
|
|
$this->_parse_tag_if($from_name,'if_admin',$if_admin_open); |
|
|
|
$this->_parse_tag_if($from_email,'if_user',$if_user_open); |
|
|
|
$this->_parse_tag_if($from_email,'if_user',$if_user_open); |
|
|
|
$this->_parse_tag_if($from_email,'if_admin',$if_admin_open); |
|
|
|
$this->_parse_tag_if($from_email,'if_admin',$if_admin_open); |
|
|
|
|
|
|
|
|
|
|
|
$from_name = $this->_eval2var('?>' . $from_name . '<?'); |
|
|
|
$from_name = $this->_eval2var('?>' . $from_name . '<?'); |
|
|
|
$from_name = trim(preg_replace('/\s+/',' ',$from_name)); |
|
|
|
$from_name = trim(preg_replace('/\s+/',' ',$from_name)); |
|
|
|
$from_email = $this->_eval2var('?>' . $from_email . '<?'); |
|
|
|
$from_email = $this->_eval2var('?>' . $from_email . '<?'); |
|
|
|
$from_email = trim(preg_replace('/\s+/','',$from_email)); |
|
|
|
$from_email = trim(preg_replace('/\s+/','',$from_email)); |
|
|
|
if (empty($from_email)) $from_email = get_settings('mail_from'); |
|
|
|
|
|
|
|
|
|
|
|
if (empty($from_email)) |
|
|
|
|
|
|
|
$from_email = get_settings('mail_from'); |
|
|
|
|
|
|
|
|
|
|
|
send_mail( |
|
|
|
send_mail( |
|
|
|
$rec['email'], |
|
|
|
$rec['email'], |
|
|
@ -1204,7 +1362,8 @@ class ContactsNew |
|
|
|
$from_name, |
|
|
|
$from_name, |
|
|
|
$form['mail_set']['format'], |
|
|
|
$form['mail_set']['format'], |
|
|
|
$attach, |
|
|
|
$attach, |
|
|
|
false,false |
|
|
|
false, |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
// @fix для AVE.cms.v1.5.beta <= 28: в send_mail() не выключен кэш в конце |
|
|
|
// @fix для AVE.cms.v1.5.beta <= 28: в send_mail() не выключен кэш в конце |
|
|
|
//ob_end_clean(); |
|
|
|
//ob_end_clean(); |
|
|
@ -1231,6 +1390,7 @@ class ContactsNew |
|
|
|
// сохраняем информацию для аякса |
|
|
|
// сохраняем информацию для аякса |
|
|
|
$this->form['ajax']['form']['is_sent'] = true; |
|
|
|
$this->form['ajax']['form']['is_sent'] = true; |
|
|
|
$this->form['ajax']['form']['finish_tpl'] = $tpl; |
|
|
|
$this->form['ajax']['form']['finish_tpl'] = $tpl; |
|
|
|
|
|
|
|
|
|
|
|
return $tpl; |
|
|
|
return $tpl; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|