// Insert ticket $ticketID = mysqli_insert_id($db); mysqli_query($db, "\r\n\t\t\t\t\tINSERT INTO {$dbinfo[pre]}ticket_messages \r\n\t\t\t\t\t(\r\n\t\t\t\t\t \tticket_id,\r\n\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\tsubmit_date,\r\n\t\t\t\t\t\tadmin_response,\r\n\t\t\t\t\t\tadmin_id\r\n\t\t\t\t\t)\r\n\t\t\t\t\tVALUES\r\n\t\t\t\t\t(\r\n\t\t\t\t\t \t'{$ticketID}',\r\n\t\t\t\t\t\t'{$message}',\r\n\t\t\t\t\t\t'{$nowGMT}',\r\n\t\t\t\t\t\t'0',\r\n\t\t\t\t\t\t'0'\r\n\t\t\t\t\t)\t\t\t\t\r\n\t\t\t\t\t"); // Insert message // xxxx Notify admin of new support ticket response $notify = 1; if ($notify && $_SESSION['member']['email'] != "") { // Build email $toEmail = $config['settings']['support_email']; $content = getDatabaseContent('newAdminTicketResponse'); // Get content from db $content['name'] = $smarty->fetch('eval:' . $content['name']); $content['body'] = $smarty->fetch('eval:' . $content['body']); $options['replyEmail'] = $config['settings']['support_email']; $options['replyName'] = $config['settings']['business_name']; kmail($toEmail, $toEmail, $config['settings']['support_email'], $config['settings']['business_name'], $content['name'], $content['body'], $options); // Send email } $notice = 'ticketSubmitted'; $smarty->assign('notice', $notice); } } $smarty->display('ticket.new.tpl'); } catch (Exception $e) { echo $e->getMessage(); } include BASE_PATH . '/assets/includes/debug.php'; if ($db) { mysqli_close($db); } // Close any database connections
if ($config['settings']['notify_account']) { try { $member['primaryAddress']['state'] = $adminStateName; $member['primaryAddress']['country'] = $adminCountryName; /* $content = new databaseContent(51); $content->setMemberInfo($memberInfo); $content->setLanguage(); $content->includeManagerLang(); $adminEmailContent = $content->getContent(); $adminSubject = $adminEmailContent['name']; $adminBody = $adminEmailContent['content']; */ $content = getDatabaseContent('newMemberEmailAdmin'); $content['body'] = $smarty->fetch('eval:' . $content['body']); kmail($config['settings']['support_email'], $config['settings']['business_name'], $config['settings']['support_email'], $config['settings']['business_name'], $content['name'], $content['body']); // Notify the admin that there is a new member } catch (Exception $e) { echo $e->getMessage(); exit; } } //echo 'jt:'.$jumpToOnCreate; exit; header("location: {$jumpToOnCreate}"); exit; } } else { $formNotice[] = 'emailExists'; } // Email already exists in the system }
foreach ($badChars as $badChar) { if (strpos($_POST['form']['email'], $badChar) !== false or strpos($_POST['form']['name'], $badChar) !== false) { header("location: error.php?eType=invalidQuery"); exit; } } $smarty->assign('form', $_POST['form']); //$smarty->assign('formEmail',$_POST['form']['email']); //$smarty->assign('formQuestion',$_POST['form']['question']); $content = getDatabaseContent('contactFormEmailAdmin', $config['settings']['lang_file_mgr']); // Get content and force language for admin $content['name'] = $smarty->fetch('eval:' . $content['name']); $content['body'] = $smarty->fetch('eval:' . $content['body']); $options['replyEmail'] = $_POST['form']['email']; $options['replyName'] = $_POST['form']['name']; kmail($config['settings']['sales_email'], $config['settings']['business_name'], $config['settings']['sales_email'], $lang['contactFromName'], $content['name'], $content['body'], $options); // Send email to sales email $smarty->assign("contactNotice", 'contactMessage'); unset($form); } catch (Exception $e) { echo $e->getMessage(); exit; } } else { if ($error == 1) { $smarty->assign("contactNotice", 'captchaError'); // Incorrect Captcha } else { $smarty->assign("contactNotice", 'contactError'); // No email specified }