} // Access.. if (!in_array($cmd, $userAccess) && $MSTEAM->id != '1') { $HEADERS->err403(true); } // Load mail params include REL_PATH . 'control/mail-data.php'; // Call the relevant classes.. include_once REL_PATH . 'control/classes/class.tickets.php'; include_once PATH . 'control/classes/class.accounts.php'; include_once REL_PATH . 'control/classes/class.fields.php'; include_once REL_PATH . 'control/classes/class.accounts.php'; $MSACC = new accounts(); $MSPORTAL = new accountSystem(); $MSPTICKETS = new tickets(); $MSCFMAN = new customFieldManager(); $MSACC->settings = $SETTINGS; $MSPTICKETS->settings = $SETTINGS; $MSPTICKETS->datetime = $MSDT; $MSPORTAL->settings = $SETTINGS; // Add ticket.. if (isset($_POST['process'])) { $OK = 'fail'; if ($_POST['subject'] && $_POST['comments'] && $_POST['name'] && mswIsValidEmail($_POST['email'])) { // Check if account exists for email address.. $PORTAL = mswGetTableData('portal', 'email', mswSafeImportString($_POST['email'])); // Check language.. if (isset($_PORTAL->id) && $PORTAL->language && file_exists(LANG_BASE_PATH . $PORTAL->language . '/mail-templates/admin-add-ticket.txt')) { $mailT = LANG_BASE_PATH . $PORTAL->language . '/mail-templates/admin-add-ticket.txt'; $pLang = $PORTAL->language; } else {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ if (!defined('PARENT') || !defined('TICKET_REPLY')) { $HEADERS->err403(true); } // Merge reload time.. define('MERGE_RELOAD_TIME', 5); // Load mail params include REL_PATH . 'control/mail-data.php'; // Call the relevant classes.. include_once REL_PATH . 'control/classes/class.tickets.php'; include_once PATH . 'control/classes/class.accounts.php'; include_once REL_PATH . 'control/classes/class.fields.php'; $MSACC = new accounts(); $MSPTICKETS = new tickets(); $MSCFMAN = new customFieldManager(); $MSACC->settings = $SETTINGS; $MSPTICKETS->settings = $SETTINGS; $MSPTICKETS->datetime = $MSDT; // Add only if comments are added.. if (trim($_POST['comments'])) { $replyToAddr = ''; $isDispute = $SETTINGS->disputes == 'yes' && $_POST['isDisputed'] == 'yes' ? 'yes' : 'no'; // Add reply.. // $ret[0] = yes/no for merge // $ret[1] = Ticket ID // $ret[2] = Merged ticket subject // $ret[3] = Reply ID $ret = $MSTICKET->addTicketReply(); // Get merged parent ticket or current ticket.. $TICKET = mswGetTableData('tickets', 'id', $ret[1]);
public function build($area, $dept) { $html = ''; $tab = 6; $qF = mysql_query("SELECT * FROM `" . DB_PREFIX . "cusfields`\n WHERE FIND_IN_SET('{$area}',`fieldLoc`) > 0\n AND `enField` = 'yes'\n AND FIND_IN_SET('{$dept}',`departments`) > 0\n ORDER BY `orderBy`\n ") or die(mswMysqlErrMsg(mysql_errno(), mysql_error(), __LINE__, __FILE__)); if (mysql_num_rows($qF) > 0) { while ($F = mysql_fetch_object($qF)) { switch ($F->fieldType) { case 'textarea': $html .= customFieldManager::textarea(mswCleanData($F->fieldInstructions), $F->id, ++$tab, $F->fieldReq); break; case 'input': $html .= customFieldManager::box(mswCleanData($F->fieldInstructions), $F->id, ++$tab, $F->fieldReq); break; case 'select': $html .= customFieldManager::select(mswCleanData($F->fieldInstructions), $F->id, $F->fieldOptions, ++$tab, $F->fieldReq); break; case 'checkbox': $html .= customFieldManager::checkbox(mswCleanData($F->fieldInstructions), $F->id, $F->fieldOptions, $F->fieldReq); break; } } } return $html ? trim($html) : ''; }