function manejarSesionActiva_saveForms($oPaloConsola, $estado) { $formdata = getParameter('data'); $formInfo = array(); $i = 0; $getValue = array(); foreach ($formdata as $tupladata) { $regs = NULL; if (preg_match('/^field-(\\d+)-(\\d+)$/', $tupladata[0], $regs)) { $formInfo[$regs[1]][$regs[2]] = $tupladata[1]; $getValue[$i] = $tupladata[1]; } $i++; } $respuesta = array('action' => 'saved', 'message' => _tr('Đã gửi ticket cho số điện thoại ' . $getValue[6] . '!')); //0 -> Ten KH 1 -> SDT 2,3 -> Cat 4 -> Desc 5->Resolved 6->callerid $to = '*****@*****.**'; $message = 'Tên khách hàng: ' . $getValue[0] . ' Số điện thoại: ' . $getValue[1] . ' Loại xử lý: ' . $getValue[2] . '-' . $getValue[3] . ' Mô tả: ' . $getValue[4]; $subject = $getValue[6] . '_' . $getValue[2] . ': ' . $getValue[3] . '_' . date('dmY-His') . ($getValue[5] == "Resolved" ? ' (Resolved)' : ''); $from = $getValue[7]; mailTicket($to, $subject, $message, "From: " . $from); $json = new Services_JSON(); Header('Content-Type: application/json'); return $json->encode($respuesta); }
function manejarSesionActiva_saveForms($estado) { $formdata = getParameter('data'); $getValue = array(); foreach ($formdata as $field) { $getValue[$field[0]] = $field[1]; } $respuesta = array('action' => 'saved', 'message' => _tr('Đã gửi ticket cho số điện thoại ' . $getValue['callerid'] . '!')); $to = '*****@*****.**'; $message = 'Tên khách hàng: ' . $getValue['customer_name'] . ' Số điện thoại: ' . $getValue['customer_number'] . ' Loại xử lý: ' . $getValue['issue_category'] . '-' . $getValue['issue_detail'] . ' Mô tả: ' . $getValue['description']; $subject = $getValue['callerid'] . '_' . $getValue['issue_category'] . ': ' . $getValue['issue_detail'] . '_' . date('dmY-His') . ($getValue['resolved'] == "Resolved" ? ' (Resolved)' : ''); $from = $getValue['agent_email']; mailTicket($to, $subject, $message, "From: " . $from); $json = new Services_JSON(); Header('Content-Type: application/json'); return $json->encode($respuesta); }