/** * Show the form to create a new order. */ private function AddOrder() { $GLOBALS['BreadcrumEntries'][GetLang('AddAnOrder')] = 'index.php?ToDo=addOrder'; if (!$GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Add_Orders)) { $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR); return; } $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintHeader(); // Load the customers language file explicitly $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('customers'); $GLOBALS['FormAction'] = 'saveNewOrder'; $GLOBALS['Title'] = GetLang('AddAnOrder'); $GLOBALS['Intro'] = GetLang('AddOrderIntro'); $GLOBALS['SaveAndAddAnother'] = GetLang('SaveAndAddAnother'); $GLOBALS['CurrentTab'] = 0; $GLOBALS['HideCustomerPasswordReminder'] = 'display: none'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { $GLOBALS['OrderSession'] = isc_html_escape($_POST['orderSession']); $sessionId = $_POST['orderSession']; } else { $this->CleanupOrderManagerSessions(); do { $sessionId = md5(uniqid()); } while (isset($_SESSION['ORDER_MANAGER'][$sessionId])); } $api = $this->GetCartApi($sessionId); $GLOBALS['OrderSession'] = $sessionId; $this->SetupOrderManagementForm(); $GLOBALS['OrderItems'] = $this->GenerateOrderItemsGrid(); $GLOBALS['OrderSummary'] = $this->GenerateOrderSummaryTable(); $GLOBALS['YearList'] = $this->fn_getYMMOptions($params, 'year'); $GLOBALS['MakeList'] = $this->fn_getYMMOptions($params, 'make'); $GLOBALS['ModelList'] = $this->fn_getYMMOptions($params, 'model'); $GLOBALS['CabSize'] = ISC_ADMIN_CLARION::fn_getCabBedsize(1); $GLOBALS['BedSize'] = ISC_ADMIN_CLARION::fn_getCabBedsize(2); $GLOBALS["ISC_ADMIN_CLARION"] = new ISC_ADMIN_CLARION(); $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate('order.form'); $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(); $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->PrintFooter(); }
/** * Add a customer YMM page * * Method will construct the add customer YMM page * * @access public * @param string $MsgDesc The optional message to display * @param string $MsgStatus The optional status of the message * @param bool $PreservePost TRUE to use the REQUEST variable, FALSE to read from the database. Default is FALSE * @return Void */ function addCustomerYMMStep1($MsgDesc = "", $MsgStatus = "", $PreservePost = false) { // Show the form to add the customer YMM $customerId = isc_html_escape((int) $_REQUEST['customerId']); if ($MsgDesc != "") { $GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus); } $GLOBALS['CurrentTab'] = 0; $GLOBALS['FormAction'] = 'addCustomerYMM2'; $GLOBALS['Title'] = GetLang('AddCustomerYMMTitle'); $GLOBALS['Intro'] = GetLang('AddCustomerYMMIntro'); $GLOBALS['CustomerId'] = $customerId; if (!$GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Edit_Customers)) { $GLOBALS['CancelGoToManager'] = '1'; } else { $GLOBALS['CancelGoToManager'] = ''; } $GLOBALS['CustomFieldsAddressFormId'] = FORMFIELDS_FORM_ADDRESS; $GLOBALS['AddressFields'] = $this->generateAddressFields('address', $PreservePost); $GLOBALS['CustomFields'] = ''; if (gzte11(ISC_MEDIUMPRINT)) { $GLOBALS['CustomFields'] = $this->generateAddressFields('custom', $PreservePost); } if ($GLOBALS['CustomFields'] == '') { $GLOBALS[base64_decode('SGlkZUN1c3RvbUZpZWxkcw==')] = "none"; } /** * Add this to generate our JS event script */ $GLOBALS['FormFieldEventData'] = $GLOBALS['ISC_CLASS_FORM']->buildRequiredJS(); $GLOBALS['YearList'] = $this->fn_getYMMOptions($params, 'year'); $GLOBALS['MakeList'] = $this->fn_getYMMOptions($params, 'make'); $GLOBALS['ModelList'] = $this->fn_getYMMOptions($params, 'model'); $GLOBALS['CabSize'] = ISC_ADMIN_CLARION::fn_getCabBedsize(1); $GLOBALS['BedSize'] = ISC_ADMIN_CLARION::fn_getCabBedsize(2); $GLOBALS['SaveAndAddAnother'] = GetLang('SaveAndAddAnother'); $GLOBALS['CancelMessage'] = GetLang('ConfirmCancelCustomerAddress'); $GLOBALS["ISC_CLASS_TEMPLATE"]->SetTemplate("customer.YMM.form"); $GLOBALS["ISC_CLASS_TEMPLATE"]->ParseTemplate(); }