function showLeaveMessageSentPage() { $TML = new SmartyClass(); $TML->assignCompanyInfoAndTheme(); $TML->assign('theme', Browser::getCurrentTheme()); $TML->display('leave-message-sent.tpl'); exit; }
$token = verify_param("token", "/^\\d{1,8}\$/"); $threadid = verify_param("threadid", "/^\\d{1,8}\$/"); $thread = Thread::getInstance()->GetThreadById($threadid); if (!$thread || !isset($thread['token']) || $token != $thread['token']) { die("wrong thread"); } $email = !empty($_POST['email']) ? trim($_POST['email']) : false; $email_from = !empty($_POST['email_from']) ? trim($_POST['email_from']) : false; $mode = !empty($_POST['mode']) ? trim($_POST['mode']) : false; $dept = !empty($_POST['dept']) ? trim($_POST['dept']) : false; // отправке диалогов из мессенджера ---------- if ($dept && isset($aDko[$dept]['email'])) { $email = $aDko[$dept]['email']; } $TML = new SmartyClass(); $TML->assignCompanyInfoAndTheme(); $has_errors = false; if ($mode != 'cons' && empty($email)) { $TML->assign('erroremail', true); $has_errors = true; } elseif ($mode != 'cons' && !is_valid_email($email)) { $TML->assign('erroremailformat', true); $has_errors = true; } if ($mode == 'cons' && empty($email_from)) { $TML->assign('erroremail_from', true); $has_errors = true; } elseif ($mode == 'cons' && !is_valid_email($email_from)) { $TML->assign('erroremailformat_from', true); $has_errors = true; }