function SaveTicket($_group, $_config) { $ticket = new UserTicket(getTicketId(), true); $ticket->IP = getIP(); setCookieValue("form_111", AJAXDecode($_POST[POST_EXTERN_USER_NAME])); setCookieValue("form_112", AJAXDecode($_POST[POST_EXTERN_USER_EMAIL])); setCookieValue("form_113", AJAXDecode($_POST[POST_EXTERN_USER_COMPANY])); if (!isTicketFlood()) { $ticket->Fullname = AJAXDecode($_POST[POST_EXTERN_USER_NAME]); $ticket->UserId = AJAXDecode($_POST[POST_EXTERN_USER_USERID]); $ticket->Email = AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]); $ticket->Group = $_group; $ticket->Company = AJAXDecode($_POST[POST_EXTERN_USER_COMPANY]); $ticket->Text = AJAXDecode($_POST[POST_EXTERN_USER_MAIL]); for ($i = 0; $i < 10; $i++) { if (isset($_POST["p_cf" . $i]) && isset($_config["gl_ci_list"][$i]) && !isset($_group->TicketInputsHidden[$i])) { $ticket->Customs[$i] = base64UrlDecode($_POST["p_cf" . $i]); } } if (!(!empty($_config["gl_rm_om"]) && $_config["gl_rm_om_time"] == 0)) { $ticket->Save(); } $this->AddFunctionCall("lz_chat_mail_callback(true);", false); return true; } else { $this->AddFunctionCall("lz_chat_mail_callback(false);", false); } return false; }
function SaveTicket($_group) { $ticket = new UserTicket(getTicketId(), true); $ticket->IP = getIP(); setCookieValue("login_name", AJAXDecode($_POST[POST_EXTERN_USER_NAME])); setCookieValue("login_email", AJAXDecode($_POST[POST_EXTERN_USER_EMAIL])); setCookieValue("login_company", AJAXDecode($_POST[POST_EXTERN_USER_COMPANY])); if (!isTicketFlood()) { $ticket->Fullname = AJAXDecode($_POST[POST_EXTERN_USER_NAME]); $ticket->UserId = $_POST[POST_EXTERN_USER_USERID]; $ticket->Email = AJAXDecode($_POST[POST_EXTERN_USER_EMAIL]); $ticket->Group = $_group; $ticket->Company = AJAXDecode($_POST[POST_EXTERN_USER_COMPANY]); $ticket->Text = AJAXDecode($_POST[POST_EXTERN_USER_MAIL]); saveTicket($ticket); $this->AddFunctionCall("lz_chat_mail_callback(true);", false); return true; } else { $this->AddFunctionCall("lz_chat_mail_callback(false);", false); } return false; }