Пример #1
0
 function output()
 {
     global $application;
     $settings = modApiFunc('Product_Files', 'getSettings');
     $template_contents = array('HLTLField' => HtmlForm::genInputTextField('25', 'pf_sets[HL_TL]', '5', $settings['HL_TL']), 'HLMaxTryField' => HtmlForm::genInputTextField('25', 'pf_sets[HL_MAX_TRY]', '5', $settings['HL_MAX_TRY']), "ResultMessage" => $this->outputResultMessage());
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $this->mTmplFiller =& $application->getInstance('TmplFiller');
     return $this->mTmplFiller->fill("product_files/settings/", "container.tpl.html", array());
 }
 function output()
 {
     global $application;
     $settings = modApiFunc('Quick_Books', 'getSettings');
     $op_as_inv_select = array("select_name" => "qbs[OP_AS_INV]", "selected_value" => $settings['OP_AS_INV'], 'class' => 'form-control input-sm input-xsmall', "values" => array(array('value' => 'Y', 'contents' => getMsg('QB', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('QB', 'LBL_NO'))));
     $template_contents = array("TrnsClassField" => HtmlForm::genInputTextField('255', 'qbs[TRNS_CLASS]', '70', $settings['TRNS_CLASS']), "AccTaxField" => HtmlForm::genInputTextField('255', 'qbs[ACC_TAX]', '70', $settings['ACC_TAX']), "AccProductField" => HtmlForm::genInputTextField('255', 'qbs[ACC_PRODUCT]', '70', $settings['ACC_PRODUCT']), "AccShippingField" => HtmlForm::genInputTextField('255', 'qbs[ACC_SHIPPING]', '70', $settings['ACC_SHIPPING']), "AccInventoryField" => HtmlForm::genInputTextField('255', 'qbs[ACC_INVENTORY]', '70', $settings['ACC_INVENTORY']), "AccGlobalDiscountField" => HtmlForm::genInputTextField('255', 'qbs[ACC_GLOBAL_DISCOUNT]', '70', $settings['ACC_GLOBAL_DISCOUNT']), "AccPromoCodeDiscountField" => HtmlForm::genInputTextField('255', 'qbs[ACC_PROMOCODE_DISCOUNT]', '70', $settings['ACC_PROMOCODE_DISCOUNT']), "AccQuantityDiscountField" => HtmlForm::genInputTextField('255', 'qbs[ACC_QUANTITY_DISCOUNT]', '70', $settings['ACC_QUANTITY_DISCOUNT']), "OpAsInvField" => HtmlForm::genDropdownSingleChoice($op_as_inv_select), "MinQISField" => HtmlForm::genInputTextField('255', 'qbs[MIN_QIS]', '70', $settings['MIN_QIS']), "AccCOGSField" => HtmlForm::genInputTextField('255', 'qbs[ACC_COGS]', '70', $settings['ACC_COGS']), "OrdersPrefixField" => HtmlForm::genInputTextField('255', 'qbs[QB_ORDERS_PREFIX]', '70', $settings['QB_ORDERS_PREFIX']), "ResultMessage" => $this->outputResultMessage());
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $this->mTmplFiller =& $application->getInstance('TmplFiller');
     return $this->mTmplFiller->fill("quick_books/settings/", "container.tpl.html", array());
 }
Пример #3
0
 function output()
 {
     global $application;
     $settings = modApiFunc('Manufacturers', 'getSettings');
     $ag_select = array("select_name" => "pi_sets[AUTO_GEN_MAIN_SMALL_IMAGE]", "selected_value" => $settings['AUTO_GEN_MAIN_SMALL_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('MNF', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('MNF', 'LBL_NO'))));
     $ag_param = '';
     if (!function_exists('gd_info')) {
         $ag_select["selected_value"] = "N";
         $ag_param = 'disabled';
     }
     $template_contents = array('TSField' => HtmlForm::genInputTextField('25', 'pi_sets[THUMB_SIDE]', '5', $settings['THUMB_SIDE']), 'TPLField' => HtmlForm::genInputTextField('25', 'pi_sets[THUMBS_PER_LINE]', '5', $settings['THUMBS_PER_LINE']), 'AGField' => HtmlForm::genDropdownSingleChoice($ag_select, $ag_param), 'MISField' => HtmlForm::genInputTextField('25', 'pi_sets[MAIN_IMAGE_SIDE]', '5', $settings['MAIN_IMAGE_SIDE'], $ag_param), "ResultMessage" => $this->outputResultMessage());
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $this->mTmplFiller =& $application->getInstance('TmplFiller');
     return $this->mTmplFiller->fill("manufacturers/settings/", "container.tpl.html", array());
 }
 /**
  * Outputs the form field for the given params
  */
 function outputField($field_type, $field_name, $def_value, $onchange = '', $id = '')
 {
     $return_value = '';
     switch ($field_type) {
         case 'hidden':
             $return_value = '<input type="hidden"' . HtmlForm::genHiddenField($field_name, $def_value) . ' id="' . $field_name . '" />';
             break;
         case 'rate':
             $return_value = '<input type="text"' . HtmlForm::genInputTextField('255', $field_name, '70', $def_value, $onchange . 'style="width: 98%;" class="form-control input-sm input-large"') . ' />';
             break;
         case 'visible':
             $return_value = HtmlForm::genDropdownSingleChoice(array("select_name" => $field_name, "selected_value" => $def_value, "onChange" => $onchange, "values" => array(array('value' => 'Y', 'contents' => getMsg('CR', 'CR_SHOW')), array('value' => 'N', 'contents' => getMsg('CR', 'CR_HIDE')))));
             break;
         case 'checkbox':
             $return_value = HtmlForm::genCheckbox(array("value" => $def_value, "name" => $field_name, "onclick" => $onchange, "id" => $id, "is_checked" => ''));
             break;
     }
     return $return_value;
 }
Пример #5
0
 function output()
 {
     global $application;
     $settings = modApiFunc('Product_Images', 'getSettings');
     $detailedFullImageResizeSelect = array("select_name" => "pi_sets[RESIZE_DETAILED_LARGE_IMAGE]", "selected_value" => $settings['RESIZE_DETAILED_LARGE_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('PI', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('PI', 'LBL_NO'))));
     $fullImageResizeSelect = array("select_name" => "pi_sets[RESIZE_LARGE_IMAGE]", "selected_value" => $settings['RESIZE_LARGE_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('PI', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('PI', 'LBL_NO'))));
     $ag_select = array("select_name" => "pi_sets[AUTO_GEN_MAIN_SMALL_IMAGE]", "selected_value" => $settings['AUTO_GEN_MAIN_SMALL_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('PI', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('PI', 'LBL_NO'))));
     $ag_param = '';
     if (!function_exists('gd_info')) {
         $ag_select["selected_value"] = "N";
         $ag_param = 'disabled';
     }
     $cat_ag_select = array("select_name" => "pi_sets[AUTO_GEN_CAT_SMALL_IMAGE]", "selected_value" => $settings['AUTO_GEN_CAT_SMALL_IMAGE'], "values" => array(array('value' => 'Y', 'contents' => getMsg('PI', 'LBL_YES')), array('value' => 'N', 'contents' => getMsg('PI', 'LBL_NO'))));
     $cat_ag_param = '';
     if (!function_exists('gd_info')) {
         $cat_ag_select["selected_value"] = "N";
         $cat_ag_param = 'disabled';
     }
     $template_contents = array('TSField' => HtmlForm::genInputTextField('25', 'pi_sets[THUMB_SIDE]', '5', $settings['THUMB_SIDE']), 'TPLField' => HtmlForm::genInputTextField('25', 'pi_sets[THUMBS_PER_LINE]', '5', $settings['THUMBS_PER_LINE']), 'TPLSetting' => $application->getAppIni('PRODUCT_LIST_DISABLE_TR_TD'), 'AGField' => HtmlForm::genDropdownSingleChoice($ag_select, $ag_param), 'CatAGField' => HtmlForm::genDropdownSingleChoice($cat_ag_select, $cat_ag_param), 'fullImageResizeField' => HtmlForm::genDropdownSingleChoice($fullImageResizeSelect, $ag_param), 'detailedFullImageResizeField' => HtmlForm::genDropdownSingleChoice($detailedFullImageResizeSelect, $ag_param), 'MISField' => HtmlForm::genInputTextField('25', 'pi_sets[MAIN_IMAGE_SIDE]', '5', $settings['MAIN_IMAGE_SIDE'], $ag_param), 'CatMISField' => HtmlForm::genInputTextField('25', 'pi_sets[CAT_IMAGE_SIDE]', '5', $settings['CAT_IMAGE_SIDE'], $cat_ag_param), 'firField' => HtmlForm::genInputTextField('25', 'pi_sets[LARGE_IMAGE_SIZE]', '5', $settings['LARGE_IMAGE_SIZE'], $ag_param), 'dfirField' => HtmlForm::genInputTextField('25', 'pi_sets[DETAILED_LARGE_IMAGE_SIZE]', '5', $settings['DETAILED_LARGE_IMAGE_SIZE'], $ag_param), "ResultMessage" => $this->outputResultMessage());
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $this->mTmplFiller =& $application->getInstance('TmplFiller');
     return $this->mTmplFiller->fill("product_images/settings/", "container.tpl.html", array());
 }
 /**
  *
  */
 function output()
 {
     global $application;
     if ($this->ViewState["hasCloseScript"] == "true") {
         modApiFunc("application", "closeChild_UpdateParent");
         return;
     }
     loadCoreFile('html_form.php');
     $HtmlForm = new HtmlForm();
     $formAction = $this->outputFormAction();
     $template_contents = array("FORM" => $HtmlForm->genForm($formAction, "POST", ""), "FormAction" => $this->outputFormActionJS(), "HiddenArrayViewState" => $this->outputViewState(), "PageTitle" => $this->outputPageTitle(), "FirstName" => $HtmlForm->genInputTextField("128", "FirstName", "25", prepareHTMLDisplay($this->POST["FirstName"])), "LastName" => $HtmlForm->genInputTextField("128", "LastName", "25", prepareHTMLDisplay($this->POST["LastName"])), "Email" => $HtmlForm->genInputTextField("128", "Email", "25", $this->POST["Email"]), "PasswordFields" => $this->outputPasswordFields(), "PasswordRequirements" => $this->outputPasswordRequirements(), "PermissionsList" => $this->outputPermissionsList(), "Errors" => $this->outputErrors(), "PSWUPD_000" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_000")), "PSWUPD_009" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_009")), "PSWUPD_002" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_002")), "PSWUPD_004" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_004")), "PSWUPD_005" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_005")), "PSWUPD_007" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_007")), "PSWUPD_011" => $this->MessageResources->getMessage(new ActionMessage("PSWUPD_011")));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return modApiFunc('TmplFiller', 'fill', "users/admin_member_add/", "admin_member_add.tpl.html", array());
 }
 function output()
 {
     global $application;
     if ($this->ViewState["hasCloseScript"] == "true") {
         modApiFunc("application", "closeChild_UpdateParent");
         return;
     }
     if (isset($this->test_results)) {
         foreach ($this->test_results as $api_name => $api_res) {
             if (!empty($api_res['methods'])) {
                 $per_item_shipping_cost_sum = $api_res['methods'][0]['shipping_cost']['PerItemShippingCostSum'];
                 $per_item_handling_cost_sum = $api_res['methods'][0]['shipping_cost']['PerItemHandlingCostSum'];
                 $total_handling_charge = $api_res['methods'][0]['shipping_cost']['TotalHandlingCharge'];
                 break;
             }
         }
     }
     $GSS = modApiFunc("Shipping_Cost_Calculator", "getSettings");
     $template_contents = array("HiddenArrayViewState" => $this->outputViewState(), "OrigAddress" => $this->MessageResources->getMessage("LABEL_ORIG_ADDRESS"), "OrigCity" => modApiFunc("Configuration", "getTagValue", "StoreOwnerCity"), "OrigCountry" => modApiFunc("Configuration", "getTagValue", "StoreOwnerCountry"), "OrigState" => modApiFunc("Configuration", "getTagValue", "StoreOwnerState"), "OrigZip" => modApiFunc("Configuration", "getTagValue", "StoreOwnerPostcode"), "DstAddress" => $this->MessageResources->getMessage("LABEL_DEST_ADDRESS"), "JavascriptCountriesAndStates" => $this->out_JS_CS(), "DstCity" => HtmlForm::genInputTextField("125", "DstCity", "55", $this->POST["DstCity"]), "DstCountry" => $this->outCountrySelect(), "DstState" => $this->outStatesSelect(), "DstZip" => HtmlForm::genInputTextField("125", "DstZip", "55", $this->POST["DstZip"]), "LBL_ShoppingCart" => $this->MessageResources->getMessage('LABEL_CART'), "LBL_Product" => $this->MessageResources->getMessage('LABEL_PRODUCT'), "LBL_Qty" => $this->MessageResources->getMessage('LABEL_QTY'), "LBL_Weight" => $this->MessageResources->getMessage('LABEL_WEIGHT'), "LBL_Cost" => $this->MessageResources->getMessage('LABEL_COST'), "LBL_Shipping_Charge" => $this->MessageResources->getMessage('LABEL_SHIPPING_CHARGE'), "LBL_Handling_Charge" => $this->MessageResources->getMessage('LABEL_HANDLING_CHARGE'), "LBL_Free_Shipping" => $this->MessageResources->getMessage('LABEL_FREE_SHIPPING'), "LBL_Subtotal" => $this->MessageResources->getMessage('LABEL_SUBTOTAL'), "LBL_TotalWeight" => $this->MessageResources->getMessage('LABEL_TOTAL_WEIGHT'), "LBL_EmptyCart" => $this->MessageResources->getMessage('LABEL_EMPTY_CART'), "LBL_FHFOO" => $this->MessageResources->getMessage('FREE_HANDLING'), "LBL_FSFOO" => $this->MessageResources->getMessage('FREE_SHIPPING'), "LBL_MinSC" => $this->MessageResources->getMessage('MINIMUM_SHIPPING_COST'), "LBL_PerISCS" => $this->MessageResources->getMessage('PER_ITEM_SHIPPING_COST_SUM'), "LBL_PerOSF" => $this->MessageResources->getMessage('PER_ORDER_SHIPPING_COST'), "LBL_PerIHCS" => $this->MessageResources->getMessage('PER_ITEM_HANDLING_COST_SUM'), "LBL_PerOHF" => $this->MessageResources->getMessage('PER_ORDER_HANDLING_COST'), "LBL_TotalHC" => $this->MessageResources->getMessage('TOTAL_HANDLING_CHARGE'), "GSS_FHFOO" => $GSS["FH_OO"] != "" ? modApiFunc("Localization", "currency_format", $GSS["FH_OO"]) : $this->MessageResources->getMessage('LBL_NA'), "GSS_FSFOO" => $GSS["FS_OO"] != "" ? modApiFunc("Localization", "currency_format", $GSS["FS_OO"]) : $this->MessageResources->getMessage('LBL_NA'), "GSS_MinSC" => modApiFunc("Localization", "currency_format", $GSS["MIN_SC"]), "Cart_PerISCS" => isset($per_item_shipping_cost_sum) ? modApiFunc("Localization", "currency_format", $per_item_shipping_cost_sum) : $this->MessageResources->getMessage('LBL_NA'), "GSS_PerOSF" => $GSS["PO_SC_TYPE"] == "A" ? modApiFunc("Localization", "currency_format", $GSS["PO_SC"]) : $GSS["PO_SC"] . "%", "Cart_PerIHCS" => isset($per_item_handling_cost_sum) ? modApiFunc("Localization", "currency_format", $per_item_handling_cost_sum) : $this->MessageResources->getMessage('LBL_NA'), "GSS_PerOHF" => modApiFunc("Localization", "currency_format", $GSS["PO_HC"]), "Cart_TotalHC" => isset($total_handling_charge) ? modApiFunc("Localization", "currency_format", $total_handling_charge) : $this->MessageResources->getMessage('LBL_NA'), "Cart_Subtotal" => modApiFunc("Localization", "currency_format", $this->POST["Cart"]["subtotal"]), "Cart_TotalWeight" => $this->POST["Cart"]["total_weight"], "genJSproducts" => $this->outJSproducts(), "WeightSymbol" => modApiFunc('Localization', 'getUnitTypeValue', 'weight'), "Results" => $this->outResults());
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return $this->mTmplFiller->fill("shipping_tester/", "window.tpl.html", array());
 }
Пример #8
0
 /**
  * Outputs form contents.
  */
 function output()
 {
     global $application;
     $retval = '';
     loadCoreFile('html_form.php');
     $HtmlForm1 = new HtmlForm();
     $request = new Request();
     $request->setView("AdminSignIn");
     $request->setAction("SignIn");
     $form_action = $request->getURL();
     $request = new Request();
     $request->setView("AdminPasswordRecovery");
     $PasswordForgottenLink = $request->getURL();
     $this->_Template_Content = array("HiddenArrayViewState" => $this->outputViewState(), "FORM" => $HtmlForm1->genForm($form_action, "POST", ""), "Email" => $HtmlForm1->genInputTextField("255", "AdminEmail", "40", $this->POST["AdminEmail"]), "Password" => $HtmlForm1->genInputTextField("255", "Password", "40", ""), "RememberChecked" => $this->POST["RememberEmail"] != '' ? 'CHECKED' : '', "PasswordForgottenLink" => $PasswordForgottenLink, "Errors" => $this->outputErrors(), "Version" => PRODUCT_VERSION_NUMBER . " " . PRODUCT_VERSION_TYPE . ', build ' . PRODUCT_VERSION_BUILD);
     $application->registerAttributes($this->_Template_Content);
     $retval = modApiFunc('TmplFiller', 'fill', "users/", "signin.tpl.html", array());
     return $retval;
 }
 /**
  * Returns the "Catalog -> Add Category" view html code.
  *
  */
 function output()
 {
     global $application;
     loadCoreFile('html_form.php');
     $HtmlForm1 = new HtmlForm();
     $this->MessageResources =& $application->getInstance('MessageResources');
     if ($this->ViewState["hasCloseScript"] == "true") {
         $this->outputFinalScript();
         return;
     }
     $template_contents_l1 = array("CatImageControls" => $this->outputCatImageControls($this->ViewState));
     $template_contents = array();
     $template_contents = array("Local_CategoryBookmarks" => getCategoryBookmarks('details', $this->_cat_id, $this->_bms_page_stat), "Subtitle" => $this->outputSubtitle(), "Errors" => $this->outputErrors(), "SubcategoriesError" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_001']) ? $this->ErrorMessages['ERR_AZ_CAT_ADDCAT_001'] : "", "MetaKeywordsError" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_003']) ? $this->ErrorMessages['ERR_AZ_CAT_ADDCAT_003'] : "", "MetaDescriptionError" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_004']) ? $this->ErrorMessages['ERR_AZ_CAT_ADDCAT_004'] : "", "SubcategoriesInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_001']) ? "error" : "", "MetaKeywordsInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_003']) ? "error" : "", "MetaDescriptionInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_CAT_ADDCAT_004']) ? "error" : "", "AddCatForm" => $HtmlForm1->genForm(modApiFunc("application", "getPagenameByViewname", "NavigationBar", -1, -1, 'AdminZone'), "POST", "AddCatForm"), "HiddenFormSubmitValue" => $HtmlForm1->genHiddenField("FormSubmitValue", "UploadImagesAndSave"), "HiddenArrayViewStateConstants" => $this->outputViewStateConstants(), "HiddenArrayViewState" => $this->outputViewState(), "SubcategoryId" => $this->outputCategoryId(), "Subcategory" => $HtmlForm1->genInputTextField("255", "Subcategory", "75", prepareHTMLDisplay($this->POST["SubcategoryText"])), "CategoryStatus" => $this->outputCategoryStatus(), "CategoryShowProductsRecursivelyStatus" => $this->outputCategoryShowProductsRecursivelyStatus(), "CategoryDescription" => $HtmlForm1->genInputTextAreaField("77", "CategoryDescription", "10"), "DescriptionText" => prepareHTMLDisplay($this->POST["DescriptionText"]), "ImageControls" => $template_contents_l1["CatImageControls"], "PageTitle" => $HtmlForm1->genInputTextField("256", "PageTitle", "76", prepareHTMLDisplay($this->POST["PageTitleText"])), "MetaKeywords" => $HtmlForm1->genInputTextAreaField("75", "MetaKeywords", "5"), "MetaKeywordsText" => prepareHTMLDisplay($this->POST["MetaKeywordsText"]), "MetaDescription" => $HtmlForm1->genInputTextAreaField("75", "MetaDescription", "5"), "MetaDescriptionText" => prepareHTMLDisplay($this->POST["MetaDescriptionText"]), "SEO_URL_prefix" => $HtmlForm1->genInputTextField("256", "SEO_URL_prefix", "76", prepareHTMLDisplay($this->POST["SEO_URL_prefix"])), "SubmitSaveScript" => $HtmlForm1->genSubmitScript("AddCatForm"));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $this->MessageResources =& $application->getInstance('MessageResources');
     //: correct error codes
     $output = modApiFunc('TmplFiller', 'fill', './../../js/', 'validate.msgs.js.tpl', array("STRING1024" => $this->MessageResources->getMessage(new ActionMessage(array('CATADD_001'))), "STRING128" => $this->MessageResources->getMessage(new ActionMessage(array('CATADD_002'))), "STRING256" => $this->MessageResources->getMessage(new ActionMessage(array('CATADD_003'))), "STRING512" => $this->MessageResources->getMessage(new ActionMessage(array('CATADD_004')))));
     return $output . $this->mTmplFiller->fill("catalog/add_cat/", "list.tpl.html", array());
 }
Пример #10
0
 function getTag($tag)
 {
     $value = null;
     switch ($tag) {
         case 'Local_FormActionURL':
             $request = new Request();
             $request->setAction('register_customer');
             $request->setView('Registration');
             $value = $request->getURL();
             break;
         case 'Local_Form':
             $value = $this->out_GroupAttributes();
             break;
         case 'Local_FieldName':
             $value = $this->current_attr_info['visible_name'];
             break;
         case 'Local_Field':
             $attr_value = '';
             if ($this->customer_info != null and isset($this->customer_info[$this->current_group_name][$this->current_attr_name])) {
                 $attr_value = $this->customer_info[$this->current_group_name][$this->current_attr_name];
             }
             switch (_ml_strtolower($this->current_attr_name)) {
                 case 'country':
                     $value = $this->out_CountrySelect($attr_value);
                     break;
                 case 'state':
                     $value = $this->out_StatesSelect($attr_value);
                     break;
                 default:
                     $value = '<input class="form-control" type="' . (preg_match("/password/i", $this->current_attr_name) ? 'password' : 'text') . '" ' . HtmlForm::genInputTextField(255, 'customer_info[' . $this->current_group_name . '][' . $this->current_attr_name . ']', 32, prepareHTMLDisplay($attr_value)) . ' />';
                     break;
             }
             break;
     }
     return $value;
 }
 /**
  * Outputs the search form
  */
 function outputSearchReviews()
 {
     global $application;
     $start_year = (int) modApiFunc('Settings', 'getParamValue', 'VISUAL_INTERFACE', 'SEARCH_START_YEAR');
     $year_offset = (int) ((int) (date("Y") - $start_year) + modApiFunc('Settings', 'getParamValue', 'VISUAL_INTERFACE', 'SEARCH_YEAR_OFFSET'));
     $template_contents = array('LabelPending' => $this->outputLabel('ShowPendingReviews'), 'LabelBad' => $this->outputLabel('ShowBadReviews'), 'LabelGood' => $this->outputLabel('ShowGoodReviews'), 'LabelAll' => $this->outputLabel('ShowAllReviews'), 'LabelDate' => $this->outputLabel('SearchReviews', 'from'), 'LabelAuthor' => $this->outputLabel('SearchReviews', 'author'), 'LabelIPAddress' => $this->outputLabel('SearchReviews', 'ip_address'), 'LabelProduct' => $this->outputLabel('SearchReviews', 'product'), 'LabelRating' => $this->outputLabel('SearchReviews', 'rating'), 'LabelStatus' => $this->outputLabel('SearchReviews', 'status'), 'CountPending' => $this->outputCount('pending'), 'CountBad' => $this->outputCount('bad'), 'CountGood' => $this->outputCount('good'), 'CountAll' => $this->outputCount('all'), 'ActionField' => '<input type="hidden" ' . HtmlForm::genHiddenField('asc_action', 'SearchReviews') . ' />', 'ProductField' => '<input type="hidden" ' . HtmlForm::genHiddenField('product_id', @$this->_search_filter['product']['id']) . ' />', 'SelectFromDay' => HtmlForm::genDropdownDaysList('from_day', @$this->_search_filter['from']['day']), 'SelectFromMonth' => HtmlForm::genDropdownMonthsList('from_month', @$this->_search_filter['from']['month']), 'SelectFromYear' => HtmlForm::genDropdownYearsList('from_year', @$this->_search_filter['from']['year'], $start_year, $year_offset), 'SelectToDay' => HtmlForm::genDropdownDaysList('to_day', @$this->_search_filter['to']['day']), 'SelectToMonth' => HtmlForm::genDropdownMonthsList('to_month', @$this->_search_filter['to']['month']), 'SelectToYear' => HtmlForm::genDropdownYearsList('to_year', @$this->_search_filter['to']['year'], $start_year, $year_offset), 'AuthorField' => '<input class="form-control input-sm input-large" style="float:left;" type="text"' . HtmlForm::genInputTextField('128', 'author_name', 52, prepareHTMLDisplay(@$this->_search_filter['author']['name'])) . ' />', 'AuthorCheckbox' => HtmlForm::genCheckbox(array('value' => 'Y', 'is_checked' => @$this->_search_filter['author']['exactly'] == 'Y' ? 'checked' : '', 'name' => 'author_exactly', 'id' => 'author_exactly')), 'IPAddressField' => '<input class="form-control input-sm input-large" type="text"' . HtmlForm::genInputTextField('15', 'ip_address', 52, prepareHTMLDisplay(@$this->_search_filter['ip_address'])) . ' />', 'ProductNameField' => '<input class="form-control input-sm input-large" style="float:left;" type="text"' . HtmlForm::genInputTextField('128', 'product_name', 52, prepareHTMLDisplay(@$this->_search_filter['product']['name'])) . ' />', 'ProductCheckbox' => HtmlForm::genCheckbox(array('value' => 'Y', 'is_checked' => @$this->_search_filter['product']['exactly'] == 'Y' ? 'checked' : '', 'name' => 'product_exactly', 'id' => 'product_exactly')), 'RatingSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'rate', 'selected_value' => @$this->_search_filter['rating']['rate'], 'id' => 'rate', 'class' => 'input-small rating-margin-btm', 'values' => modApiFunc('Customer_Reviews', 'getRateValues'))), 'RatingAddSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'rate_range', 'selected_value' => @$this->_search_filter['rating']['range'], 'id' => 'rate_range', 'class' => 'input-small', 'values' => array(array('value' => '+', 'contents' => getMsg('CR', 'CR_ABOVE')), array('value' => '=', 'contents' => getMsg('CR', 'CR_EXACTLY')), array('value' => '-', 'contents' => getMsg('CR', 'CR_BELOW'))))), 'StatusSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'status', 'selected_value' => @$this->_search_filter['status'], 'id' => 'status', 'class' => 'input-small', 'values' => array(array('value' => 'All', 'contents' => getMsg('CR', 'CR_STATUS_ALL')), array('value' => 'A', 'contents' => getMsg('CR', 'CR_STATUS_APPROVED')), array('value' => 'P', 'contents' => getMsg('CR', 'CR_STATUS_PENDING')), array('value' => 'N', 'contents' => getMsg('CR', 'CR_STATUS_NOTAPPROVED'))))));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return $this->mTmplFiller->fill('customer_reviews/manage_customer_reviews/', 'search-reviews.tpl.html', array());
 }
 /**
  * Outputs form contents.
  */
 function output()
 {
     global $application;
     $obj =& $application->getInstance('MessageResources');
     $retval = '';
     loadCoreFile('html_form.php');
     $HtmlForm1 = new HtmlForm();
     $request = new Request();
     $request->setView("AdminPasswordUpdate");
     $request->setAction("PasswordUpdate");
     $form_action = $request->getURL();
     $this->_Template_Content = array("HiddenArrayViewState" => $this->outputViewState(), "FORM" => $HtmlForm1->genForm($form_action, "POST", ""), "Email" => $HtmlForm1->genInputTextField("255", "AdminEmail", "40", $this->POST["AdminEmail"]), "Password" => $HtmlForm1->genHiddenField("Password", $this->POST["Password"]), "Old_Password" => $HtmlForm1->genInputTextField("255", "Old_Password", "40", ""), "New_Password" => $HtmlForm1->genInputTextField("255", "New_Password", "40", ""), "Verify_New_Password" => $HtmlForm1->genInputTextField("255", "Verify_New_Password", "40", ""), "Errors" => $this->outputErrors(), "PSWUPD_000" => $obj->getMessage(new ActionMessage("PSWUPD_000")), "PSWUPD_001" => $obj->getMessage(new ActionMessage("PSWUPD_001")), "PSWUPD_002" => $obj->getMessage(new ActionMessage("PSWUPD_002")), "PSWUPD_003" => $obj->getMessage(new ActionMessage("PSWUPD_003")), "PSWUPD_004" => $obj->getMessage(new ActionMessage("PSWUPD_004")), "PSWUPD_005" => $obj->getMessage(new ActionMessage("PSWUPD_005")), "PSWUPD_006" => $obj->getMessage(new ActionMessage("PSWUPD_006")), "PSWUPD_007" => $obj->getMessage(new ActionMessage("PSWUPD_007")));
     $application->registerAttributes($this->_Template_Content);
     $retval = modApiFunc('TmplFiller', 'fill', "users/", "password_update.tpl.html", array());
     return $retval;
 }
 function output()
 {
     global $application;
     $otype_select = array("select_name" => "Option[OptionType]", "selected_value" => $this->DATA["Option"]["OptionType"], "id" => "Option_OptionType", "onChange" => "javascript: onOptionTypeChanged();", "values" => array());
     $template_contents = array();
     foreach ($this->_option_types as $otype => $show_types) {
         $otype_select["values"][] = array("value" => $otype, "contents" => $this->MessageResources->getMessage('OT_' . $otype));
         $tmp = array("select_name" => "Option[ShowType][{$otype}]", "selected_value" => $this->DATA["Option"]["ShowType"][$otype], "id" => "Option_ShowType_{$otype}", "onChange" => $otype == "CI" ? "javascript: onShowTypeChanged();" : "", "values" => array());
         foreach ($show_types as $shtype) {
             $tmp["values"][] = array("value" => $shtype, "contents" => $this->MessageResources->getMessage('ST_' . $otype . '_' . $shtype));
         }
         $template_contents["ShowType" . $otype . "Field"] = HtmlForm::genDropdownSingleChoice($tmp, 'style="width: 200px;"');
     }
     $yes_no_values = array();
     foreach (array('YES', 'NO') as $lbl) {
         $yes_no_values[] = array("value" => $lbl, "contents" => $this->MessageResources->getMessage('LBL_' . $lbl));
     }
     $discard_avail_select = array("select_name" => "Option[DiscardAvail]", "selected_value" => $this->DATA["Option"]["DiscardAvail"], "onChange" => "javascript: onDiscardAvailChanged();", "id" => "Option_DiscardAvail", "values" => $yes_no_values);
     $use_for_it_select = array("select_name" => "Option[UseForIT]", "selected_value" => $this->DATA["Option"]["UseForIT"], "id" => "Option_UseForIT", "values" => $yes_no_values);
     $request = new Request();
     $request->setView('PO_OptionsList');
     $request->setKey("parent_entity", $this->option_info["parent_entity"]);
     $request->setKey("entity_id", $this->option_info["entity_id"]);
     $template_contents = array_merge($template_contents, array("ActualHeader" => $this->outputActualHeader(), "ResultMessage" => $this->outputResultMessage(), "_option_id" => $this->option_id, "_parent_entity" => $this->option_info["parent_entity"], "_entity_id" => $this->option_info["entity_id"], "OptionNameField" => HtmlForm::genInputTextField('255', 'Option[OptionName]', '65', prepareHTMLDisplay($this->DATA["Option"]["OptionName"])), "DisplayNameField" => HtmlForm::genInputTextField('255', 'Option[DisplayName]', '65', prepareHTMLDisplay($this->DATA["Option"]["DisplayName"])), "OptionDescription" => HtmlForm::genInputTextAreaField("77", "Option[DisplayDescr]", "5"), "DescriptionText" => $this->DATA["Option"]["DisplayDescr"], "OptionTypeField" => HtmlForm::genDropdownSingleChoice($otype_select, 'style="width: 200px;"'), "JS_OnOptionTypeChanged" => $this->output__JS_OnOptionTypeChanged($this->_option_types, "show_type_for_"), "DiscardAvailField" => HtmlForm::genDropdownSingleChoice($discard_avail_select, 'style="width: 200px;"'), "DiscardValueField" => HtmlForm::genInputTextField('255', 'Option[DiscardValue]', '65', prepareHTMLDisplay(@$this->DATA["Option"]["DiscardValue"]), 'id=Option_DiscardValue'), "JS_OnDiscardAvailChanged" => $this->output__JS_OnDiscardAvailChanged('Option_DiscardAvail', 'Option_DiscardValue'), "CheckBoxTextField" => HtmlForm::genInputTextField('255', 'Option[CheckBoxText]', '65', prepareHTMLDisplay($this->DATA["Option"]["CheckBoxText"]), 'id=Option_CheckBoxText'), "UseForITField" => HtmlForm::genDropdownSingleChoice($use_for_it_select, 'style="width: 200px;"'), "JS_OnShowTypeChanged" => $this->output__JS_OnShowTypeChanged(array('CBSI', 'CBTA'), 'Option_CheckBoxText'), "EditValuesForm" => $this->outputEditValuesForm(), "AddNewValueForm" => $this->outputAddNewValueForm(), "CancelLink" => $request->getURL(), "ValuesSortForm" => $this->outputValuesSortForm(), "JSchangeToCIwarning" => $this->outputJSchangeToCIwarning(), "JSchangeINVwarning" => $this->outputJSchangeINVwarning(), "HintLink_OpName" => $this->Hints->getHintLink(array('OPTION_NAME', 'product-options-messages')), "HintLink_DspName" => $this->Hints->getHintLink(array('DISPLAY_NAME', 'product-options-messages')), "HintLink_DspDescr" => $this->Hints->getHintLink(array('DISPLAY_DESCR', 'product-options-messages')), "HintLink_OpType" => $this->Hints->getHintLink(array('OPTION_TYPE', 'product-options-messages')), "HintLink_ShType" => $this->Hints->getHintLink(array('SHOW_TYPE', 'product-options-messages')), "HintLink_DisAvail" => $this->Hints->getHintLink(array('DISCARD_AVAIL', 'product-options-messages')), "HintLink_DisValue" => $this->Hints->getHintLink(array('DISCARD_VALUE', 'product-options-messages')), "HintLink_CBText" => $this->Hints->getHintLink(array('CHECKBOX_TEXT', 'product-options-messages')), "HintLink_UseForIT" => $this->Hints->getHintLink(array('USE_FOR_IT', 'product-options-messages')), "JSforIE6" => $this->outputJSforIE6()));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $this->mTmplFiller =& $application->getInstance('TmplFiller');
     return $this->mTmplFiller->fill("product_options/", "edit-option-container.tpl.html", array());
 }
 /**
  * Return the "PromoCodes -> Add Promo Code" view html code.
  *
  */
 function output()
 {
     global $application;
     loadCoreFile('html_form.php');
     $this->Hints =& $application->getInstance('Hint');
     $HtmlForm1 = new HtmlForm();
     $this->MessageResources =& $application->getInstance('MessageResources', "promo-codes-messages", "AdminZone");
     if ($this->ViewState["hasCloseScript"] == "true") {
         modApiFunc("application", "closeChild_UpdateParent");
     }
     //        $promo_code_summary = ;
     $promo_code_order_list = $this->outputOrderList();
     $this->_Template_Contents = array("OrderList" => $promo_code_order_list);
     $application->registerAttributes($this->_Template_Contents);
     $template_contents = array("Subtitle" => $this->outputSubtitle(), "Errors" => $this->outputErrors(), "PromoCodeId" => $this->outputPromoCodeId(), "PromoCodeSummary" => $this->outputPromoCodeSummary(), "PromoCodeEffectiveAreaLaconic" => $this->outputEffectiveAreaLaconic(), "OrderList" => $promo_code_order_list, "PromoCodeCampaignNameError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_001']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_001'] : "", "PromoCodeCampaignNameInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_001']) ? "error" : "", "PromoCodeCampaignName" => $HtmlForm1->genInputTextField("128", "PromoCodeCampaignName", "75", prepareHTMLDisplay($this->POST["PromoCodeCampaignNameText"])), "PromoCodeCampaignFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_CAMPAIGN_NAME_NAME', 'promo-codes-messages')), "PromoCodePromoCodeError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_002']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_002'] : "", "PromoCodePromoCodeInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_002']) ? "error" : "", "PromoCodePromoCode" => $HtmlForm1->genInputTextField("128", "PromoCodePromoCode", "75", prepareHTMLDisplay($this->POST["PromoCodePromoCodeText"])), "PromoCodePromoCodeFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_PROMO_CODE_NAME', 'promo-codes-messages')), "PromoCodeStatusError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_004']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_004'] : "", "PromoCodeStatusInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_004']) ? "error" : "", "PromoCodeStatus" => $this->outputStatus(), "PromoCodeStatusFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_STATUS_NAME', 'promo-codes-messages')), "PromoCodeMinSubtotalError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_005']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_005'] : "", "PromoCodeMinSubtotalInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_005']) ? "error" : "", "PromoCodeMinSubtotal" => $HtmlForm1->genInputTextField("10", "PromoCodeMinSubtotal", "10", prepareHTMLDisplay($this->POST["PromoCodeMinSubtotalText"])), "PromoCodeMinSubtotalFormat" => modApiFunc("Localization", "format_settings_for_js", "currency"), "PromoCodeMinSubtotalSign" => modApiFunc("Localization", "getCurrencySign"), "PromoCodeMinSubtotalFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_MIN_SUBTOTAL_NAME', 'promo-codes-messages')), "PromoCodeDiscountCostError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_006']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_006'] : "", "PromoCodeDiscountCostInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_006']) ? "error" : "", "PromoCodeDiscountCost" => $HtmlForm1->genInputTextField("10", "PromoCodeDiscountCost", "10", prepareHTMLDisplay($this->POST["PromoCodeDiscountCostText"])), "PromoCodeDiscountCostFormat" => modApiFunc("Localization", "format_settings_for_js", "currency"), "PromoCodeDiscountCostFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_DISCOUNT_COST_NAME', 'promo-codes-messages')), "PromoCodeDiscountCostTypeIDError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_007']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_007'] : "", "PromoCodeDiscountCostTypeIDInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_007']) ? "error" : "", "PromoCodeDiscountCostTypeID" => $this->outputDiscountCostTypeID(), "PromoCodeStartDateFYearError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_008']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_008'] : "", "PromoCodeStartDateFYearInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_008']) ? "error" : "", "PromoCodeStartDateFYear" => $this->outputFYear("StartDate"), "PromoCodeStartDateFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_START_DATE_NAME', 'promo-codes-messages')), "PromoCodeStartDateMonthError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_009']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_009'] : "", "PromoCodeStartDateMonthInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_009']) ? "error" : "", "PromoCodeStartDateMonth" => $this->outputMonth("StartDate"), "PromoCodeStartDateDayError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_010']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_010'] : "", "PromoCodeStartDateDayInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_010']) ? "error" : "", "PromoCodeStartDateDay" => $this->outputDay("StartDate"), "PromoCodeEndDateFYearError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_011']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_011'] : "", "PromoCodeEndDateFYearInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_011']) ? "error" : "", "PromoCodeEndDateFYear" => $this->outputFYear("EndDate"), "PromoCodeEndDateFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_END_DATE_NAME', 'promo-codes-messages')), "PromoCodeEndDateMonthError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_012']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_012'] : "", "PromoCodeEndDateMonthInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_012']) ? "error" : "", "PromoCodeEndDateMonth" => $this->outputMonth("EndDate"), "PromoCodeEndDateDayError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_013']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_013'] : "", "PromoCodeEndDateDayInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_013']) ? "error" : "", "PromoCodeEndDateDay" => $this->outputDay("EndDate"), "PromoCodeTimesToUseError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_014']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_014'] : "", "PromoCodeTimesToUseInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_014']) ? "error" : "", "PromoCodeTimesToUse" => $HtmlForm1->genInputTextField("10", "PromoCodeTimesToUse", "10", prepareHTMLDisplay($this->POST["PromoCodeTimesToUseText"])), "PromoCodeTimesToUseFormat" => modApiFunc("Localization", "format_settings_for_js", "item"), "PromoCodeTimesToUseFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_TIMES_TO_USE_NAME', 'promo-codes-messages')), "PromoCodeBIgnoreOtherDiscountsError" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_003']) ? $this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_003'] : "", "PromoCodeBIgnoreOtherDiscountsInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_PROMOCODES_ADD_PROMO_CODE_003']) ? "error" : "", "PromoCodeBIgnoreOtherDiscounts" => $this->outputBIgnoreOtherDiscounts(), "PromoCodeBIgnoreOtherDiscountsFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_B_IGNORE_OTHER_DISCOUNTS_NAME', 'promo-codes-messages')), "PromoCodeOffersFreeShippingFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_OFFERS_FREE_SHIPPING_NAME', 'promo-codes-messages')), "PromoCodeOffersFreeShippingOptions" => $this->outputFreeShippingOptions(), "PromoCodeOffersFreeHandlingFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_OFFERS_FREE_HANDLING_NAME', 'promo-codes-messages')), "PromoCodeOffersFreeHandlingOptions" => $this->outputFreeHandlingOptions(), "PromoCodeStrictCartFieldHint" => $this->Hints->getHintLink(array('PROMO_CODE_STRICT_CART_NAME', 'promo-codes-messages')), "PromoCodeStrictCartOptions" => $this->outputStrictCartOptions(), "AddPromoCodeForm" => $HtmlForm1->genForm(modApiFunc("application", "getPagenameByViewname", "PromoCodesNavigationBar", -1, -1, 'AdminZone'), "POST", "AddPromoCodeForm"), "HiddenFormSubmitValue" => $HtmlForm1->genHiddenField("FormSubmitValue", "Save"), "HiddenArrayViewStateConstants" => $this->outputViewStateConstants(), "HiddenArrayViewState" => $this->outputViewState(), "SubmitSaveScript" => $HtmlForm1->genSubmitScript("AddPromoCodeForm"));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $SpecMessageResources =& $application->getInstance('MessageResources');
     //: correct error codes
     $output = modApiFunc('TmplFiller', 'fill', './../../js/', 'validate.msgs.js.tpl', array("STRING1024" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_001'))), "STRING128" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_002'))), "STRING256" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_003'))), "STRING512" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_004'))), "INTEGER" => $SpecMessageResources->getMessage(new ActionMessage(array('PRDADD_001'))), "FLOAT" => $SpecMessageResources->getMessage(new ActionMessage(array('PRDADD_002'))), "CURRENCY" => addslashes($SpecMessageResources->getMessage(new ActionMessage(array('CURRENCY_FIELD', modApiFunc("Localization", "FloatToFormatStr", 12.35, "currency"), modApiFunc("Localization", "FloatToFormatStr", 34, "currency"), modApiFunc("Localization", "FloatToFormatStr", 99.0, "currency"))))), "WEIGHT" => addslashes($SpecMessageResources->getMessage(new ActionMessage(array('WEIGHT_FIELD', modApiFunc("Localization", "FloatToFormatStr", 23.325, "weight"), modApiFunc("Localization", "FloatToFormatStr", 34, "weight"), modApiFunc("Localization", "FloatToFormatStr", 99.2, "weight"))))), "ITEM" => $SpecMessageResources->getMessage(new ActionMessage(array('ITEM_FIELD')))));
     return $output . $this->mTmplFiller->fill("promo_codes/add_promo_code/", "list.tpl.html", array());
 }
 /**
  * Outputs form contents.
  */
 function output()
 {
     global $application;
     $retval = '';
     if ($this->outputErrors() == "" && $this->POST["AdminEmail"] != "") {
         $request = new Request();
         $request->setView("");
         $this->_Template_Content = array("Email" => $this->POST["AdminEmail"], "ContinueLink" => $request->getURL());
         $application->registerAttributes($this->_Template_Content);
         $retval = modApiFunc('TmplFiller', 'fill', "users/", "password_recovery_success.tpl.html", array());
     } else {
         loadCoreFile('html_form.php');
         $HtmlForm1 = new HtmlForm();
         $request = new Request();
         $request->setView("AdminPasswordRecovery");
         $request->setAction("PasswordRecovery");
         $form_action = $request->getURL();
         $this->_Template_Content = array("HiddenArrayViewState" => $this->outputViewState(), "FORM" => $HtmlForm1->genForm($form_action, "POST", "PasswordRecoveryForm"), "Email" => $HtmlForm1->genInputTextField("255", "AdminEmail", "40", $this->POST["AdminEmail"]), "Errors" => $this->outputErrors());
         $application->registerAttributes($this->_Template_Content);
         $retval = modApiFunc('TmplFiller', 'fill', "users/", "password_recovery.tpl.html", array());
     }
     return $retval;
 }
Пример #16
0
 /**
  *
  */
 function output()
 {
     global $application;
     loadCoreFile('html_form.php');
     $this->Hints =& $application->getInstance('Hint');
     $HtmlForm1 = new HtmlForm();
     $this->MessageResources =& $application->getInstance('MessageResources', "shipping-cost-calculator-messages", "AdminZone");
     if ($this->ViewState["hasCloseScript"] == "true") {
         modApiFunc("application", "UpdateParentsParent");
         //modApiFunc("application", "closeChild_UpdateParent");
     }
     $request = new Request();
     $request->setView("EditFsRule");
     $request->setAction($this->getAction());
     $form_url = $request->getURL();
     $template_contents = array("Subtitle" => $this->outputSubtitle(), "Errors" => $this->outputErrors(), "FsRuleNameError" => isset($this->ErrorMessages['ERR_AZ_SCC_ADD_PROMO_CODE_001']) ? $this->ErrorMessages['ERR_AZ_SCC_ADD_PROMO_CODE_001'] : "", "FsRuleNameInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_SCC_ADD_PROMO_CODE_001']) ? "error" : "", "FsRuleName" => $HtmlForm1->genInputTextField("128", "FsRuleName", "50", prepareHTMLDisplay($this->POST["FsRuleName"])), "FsRuleFieldHint" => $this->Hints->getHintLink(array('SCC_FSTABLE_RULE_NAME_LABEL', 'shipping-cost-calculator-messages')), "FsRuleEffectiveAreaLaconic" => $this->outputEffectiveAreaLaconic(), "FsRuleStrictCartSelect" => $this->outputFsRuleStrictCartSelect(), "FsRuleMinSubtotalError" => isset($this->ErrorMessages['ERR_AZ_SCC_ADD_PROMO_CODE_005']) ? $this->ErrorMessages['ERR_AZ_SCC_ADD_PROMO_CODE_005'] : "", "FsRuleMinSubtotalInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_SCC_ADD_PROMO_CODE_005']) ? "error" : "", "FsRuleMinSubtotal" => $HtmlForm1->genInputTextField("10", "FsRuleMinSubtotal", "10", prepareHTMLDisplay($this->POST["FsRuleMinSubtotal"])), "FsRuleMinSubtotalFormat" => modApiFunc("Localization", "format_settings_for_js", "currency"), "FsRuleMinSubtotalSign" => modApiFunc("Localization", "getCurrencySign"), "FsRuleMinSubtotalFieldHint" => $this->Hints->getHintLink(array('SCC_MIN_SUBTOTAL_LABEL', 'shipping-cost-calculator-messages')), "AddFsRuleForm" => $HtmlForm1->genForm($form_url, "POST", "AddFsRuleForm"), "HiddenFormSubmitValue" => $HtmlForm1->genHiddenField("FormSubmitValue", "Save"), "HiddenArrayViewStateConstants" => $this->outputViewStateConstants(), "HiddenArrayViewState" => $this->outputViewState(), "SubmitSaveScript" => $HtmlForm1->genSubmitScript("AddFsRuleForm"));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $SpecMessageResources =& $application->getInstance('MessageResources');
     //: correct error codes
     $output = '';
     $output = modApiFunc('TmplFiller', 'fill', './../../js/', 'validate.msgs.js.tpl', array("STRING1024" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_001'))), "STRING128" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_002'))), "STRING256" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_003'))), "STRING512" => $SpecMessageResources->getMessage(new ActionMessage(array('CATADD_004'))), "INTEGER" => $SpecMessageResources->getMessage(new ActionMessage(array('PRDADD_001'))), "FLOAT" => $SpecMessageResources->getMessage(new ActionMessage(array('PRDADD_002'))), "CURRENCY" => addslashes($SpecMessageResources->getMessage(new ActionMessage(array('CURRENCY_FIELD', modApiFunc("Localization", "FloatToFormatStr", 12.35, "currency"), modApiFunc("Localization", "FloatToFormatStr", 34, "currency"), modApiFunc("Localization", "FloatToFormatStr", 99.0, "currency"))))), "WEIGHT" => addslashes($SpecMessageResources->getMessage(new ActionMessage(array('WEIGHT_FIELD', modApiFunc("Localization", "FloatToFormatStr", 23.325, "weight"), modApiFunc("Localization", "FloatToFormatStr", 34, "weight"), modApiFunc("Localization", "FloatToFormatStr", 99.2, "weight"))))), "ITEM" => $SpecMessageResources->getMessage(new ActionMessage(array('ITEM_FIELD')))));
     return $output . $this->mTmplFiller->fill("shipping_cost_calculator/add_fs_rule/", "list.tpl.html", array());
 }
Пример #17
0
 function getParamHTMLControl($group_name, $param_name)
 {
     loadCoreFile('html_form.php');
     $param_info = $this->getParamBaseInfo($group_name, $param_name);
     $control_value = $param_info['PARAM_CURRENT_VALUE'];
     $control_name = SETTIGS_POST_MAP_NAME . '[' . $param_info['GROUP_NAME'] . '][' . $param_info['PARAM_NAME'] . ']';
     $html = '';
     switch ($param_info['PARAM_TYPE']) {
         case PARAM_TYPE_FLOAT:
         case PARAM_TYPE_INT:
         case PARAM_TYPE_STRING:
             $html = '<input class="form-control form-filter input-large" type="text" ' . HtmlForm::genInputTextField(250, $control_name, 50, $control_value) . ' />';
             break;
         case PARAM_TYPE_LIST:
             $param_values = modApiFunc('Settings', 'getParamValueList', $param_info['GROUP_NAME'], $param_info['PARAM_NAME'], SETTINGS_WITH_DESCRIPTION);
             $select_data = array('onChange' => '', 'select_name' => $control_name, 'selected_value' => $control_value, 'values' => array());
             foreach ($param_values as $value) {
                 $select_data['values'][] = array('value' => $value['VALUE'], 'contents' => $value['VALUE_DESCRIPTION']['NAME']);
             }
             $html = HtmlForm::genDropdownSingleChoice($select_data);
             break;
     }
     return $html;
 }
 /**
  *
  */
 function output()
 {
     global $application;
     loadCoreFile('html_form.php');
     $HtmlForm1 = new HtmlForm();
     if ($this->ViewState["hasCloseScript"] == "true") {
         modApiFunc("application", "closeChild_UpdateParent");
         return;
     }
     $request = new Request();
     $request->setView('CheckoutPaymentModuleSettings');
     $request->setAction("update_offline_cc");
     $form_action = $request->getURL();
     $request = new Request();
     $request->setView('CheckoutPaymentModuleSettings');
     $checkout_payment_module_settings_url = $request->getURL();
     $template_contents = array("EditOfflineCCForm" => $HtmlForm1->genForm($form_action, "POST", "EditOfflineCCForm"), "HiddenArrayViewState" => $this->outputViewState(), "ModuleType" => $this->MessageResources->getMessage('MODULE_TYPE'), "ModuleName" => $this->MessageResources->getMessage('MODULE_NAME'), "Subtitle" => $this->MessageResources->getMessage('FORM_SUBTITLE'), "Errors" => $this->outputErrors(), "ModuleStatusFieldName" => $this->MessageResources->getMessage('MODULE_STATUS_FIELD_NAME'), "ModuleStatusFieldHint" => $this->Hints->getHintLink(array('MODULE_STATUS_FIELD_NAME', 'payment-module-offline-messages')), "ModuleStatusField" => $this->outputStatus(), "ModuleNameFieldName" => $this->MessageResources->getMessage('MODULE_NAME_FIELD_NAME'), "ModuleNameFieldHint" => $this->Hints->getHintLink(array('MODULE_NAME_FIELD_NAME', 'payment-module-offline-messages')), "ModuleNameField" => $HtmlForm1->genInputTextField("128", "ModuleName", "60", prepareHTMLDisplay($this->POST["ModuleName"])), "MathLibNameFieldName" => $this->MessageResources->getMessage('MATH_LIB_NAME_FIELD_NAME'), "MathLibNameFieldHint" => $this->Hints->getHintLink(array('MATH_LIB_NAME_FIELD_NAME', 'payment-module-offline-messages')), "MathLibNameField" => $this->outputMathLibName(), "HTTPSRequirement" => $this->outputHTTPSRequirement(), "RSAKeyPairGenerator" => $this->outputGenRSAKeyPair(), "ReplacementRSAKeyPairGenerator" => $this->outputGenReplacementRSAKeyPair(), "Alert_001" => $this->MessageResources->getMessage('ALERT_001'), "Alert_002" => $this->MessageResources->getMessage('ALERT_002'), "Alert_003" => $this->MessageResources->getMessage('ALERT_003'), "Alert_004" => $this->MessageResources->getMessage('ALERT_004'), "Alert_005" => $this->MessageResources->getMessage('ALERT_005'), "Alert_006" => $this->MessageResources->getMessage('ALERT_006'), "MODULE_PAYMENT_OFFLINE_CC_MSG_GENERATE_KEY_008" => $this->MessageResources->getMessage('MODULE_PAYMENT_OFFLINE_CC_MSG_GENERATE_KEY_008'), "checkout_payment_module_settings_url" => $checkout_payment_module_settings_url);
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return $this->mTmplFiller->fill("payment_module_offline_cc/", "list.tpl.html", array());
 }
 /**
  * @abstract Prepares the list of custom attributes for each group
  * @param $variantId group id
  */
 function getCustomAttributesList($variantId)
 {
     global $application;
     $ids = modApiFunc('Checkout', 'getPersonInfoAttributeIdList', $variantId, 'CUSTOM_ATTRIBUTES_ONLY');
     $value = "";
     if (count($ids) == 0) {
         $value = $this->TemplateFiller->fill("checkout/checkout-info/", "no-custom-attributes.tpl.html", array());
         return $value;
     }
     foreach ($ids as $attributeId) {
         $fields = modApiFunc('Checkout', 'getPersonInfoFieldsList', $variantId, $attributeId);
         $yes_no_tpl = array('name' => '', 'value' => '', 'id' => '', 'is_checked' => '', 'onclick' => '');
         $param = "";
         $name_textbox = "<input type='text' style='border:1px solid #B2C2DF; font-family:Verdana,Arial,sans-serif; font-size:11px; vertical-align:top;' " . HtmlForm::genInputTextField(40, $fields['attribute_id'] . '[name]', 40, $fields['name'], "onchange='javascript:OnCheckboxClick" . $variantId . "(id)'") . "/>";
         if ($this->_Group_Template_Contents["PersonInfoTypeStatus"] == "false") {
             $name_textbox = $fields['name'];
             $param = "disabled";
         }
         foreach (array('visible', 'required') as $prop_name) {
             $var_name = $prop_name . '_checkbox';
             ${$var_name} = $yes_no_tpl;
             ${$var_name}['name'] = $fields['attribute_id'] . '[' . $prop_name . ']';
             ${$var_name}['value'] = "1";
             ${$var_name}['is_checked'] = $fields[$prop_name] == "1" ? "checked" : "";
             ${$var_name}['id'] = $fields['attribute_id'] . '_' . $prop_name;
             ${$var_name}['onclick'] = 'OnCheckboxClick' . $variantId . "('" . ${$var_name}['id'] . "')";
             if (!empty($fields['unremovable'])) {
                 $param = "disabled";
             }
             ${$var_name} = HtmlForm::genCheckbox(${$var_name}, $param);
             ${$var_name} .= "\n<input type='hidden' " . HtmlForm::genHiddenField($fields['attribute_id'] . '[attr_id]', $attributeId) . " />";
             if (!empty($fields['unremovable'])) {
                 ${$var_name} .= "\n<input type='hidden' " . HtmlForm::genHiddenField($fields['attribute_id'] . '[unremovable]', "unremovable") . " />";
             }
         }
         //$fields['name'];
         $template_contents = array("VariantId" => $variantId, "AttributeId" => $attributeId, "Name" => $name_textbox, "Descr" => $fields['descr'], "IsVisible" => $visible_checkbox, "IsRequiered" => $required_checkbox);
         $this->_Template_Contents = array_merge($this->_Template_Contents, $template_contents);
         $application->registerAttributes($this->_Template_Contents);
         switch ($this->_Group_Template_Contents["PersonInfoTypeStatus"]) {
             case "false":
                 $value .= $this->TemplateFiller->fill("checkout/checkout-info/", "attribute_inactive.tpl.html", array());
                 break;
             case "true":
                 $value .= $this->TemplateFiller->fill("checkout/checkout-info/", "attribute.tpl.html", array());
                 break;
             default:
                 //error
                 break;
         }
     }
     return $value;
 }
 /**
  * Output the attribute data
  */
 function outputAttr($prod_id, $attr, $index, $v_index)
 {
     if (!$attr['visible']) {
         return getMsg('CTL', 'CTL_PGE_NA');
     }
     $output = '';
     // setting the style and value depending on the error
     $style = '';
     $value = @$attr['value'];
     if (isset($this->_Errors[$prod_id]) && isset($this->_Errors[$prod_id][$attr['view_tag']])) {
         $style = ' style="border: 1px solid; border-color: red;"';
         if (isset($this->_Posted_Data[$prod_id][$attr['view_tag']])) {
             $value = $this->_Posted_Data[$prod_id][$attr['view_tag']];
         }
     }
     // tabbing
     $tabbing = $this->_tabbing == 'RIGHT' ? count($this->_attrs) * $index + $v_index : count($this->_Prod_IDs) * $v_index + $index;
     $tabbing = ' tabindex="' . $tabbing . '"';
     switch ($attr['input_type_name']) {
         case 'read-only':
             $output = prepareHTMLDisplay($value);
             break;
         case 'select':
             $values = array();
             foreach ($attr['input_type_values'] as $k => $v) {
                 $values[] = array('value' => $k, 'contents' => $v);
             }
             $output = HtmlForm::genDropdownSingleChoice(array('onChange' => '', 'class' => 'input-sm', 'select_name' => 'posted_data[' . $prod_id . '][' . $attr['view_tag'] . ']', 'values' => $values, 'selected_value' => $value), $style . $tabbing);
             break;
         case 'text':
             $size = 40;
             if ($attr['size'] < 50) {
                 $size = 8;
             }
             if ($attr['size'] < 20) {
                 $size = 5;
             }
             $output = '<input class="form-control input-sm" type="text"' . HtmlForm::genInputTextField($attr['max'], 'posted_data[' . $prod_id . '][' . $attr['view_tag'] . ']', $size, $value) . $style . $tabbing . ' />';
             break;
         default:
             $output = getMsg('CTL', 'CTL_PGE_NA');
     }
     return $output;
 }
Пример #21
0
 function outputRatesTable()
 {
     global $application;
     if (!isset($_REQUEST["rates_method_id"])) {
         return "";
     }
     if (!modApiFunc("Shipping_Module_DSR", "isValidShippingMethodId", $_REQUEST["rates_method_id"])) {
         return "";
     }
     $method_id = $_REQUEST["rates_method_id"];
     $return_html_code = "";
     $method_info = modApiFunc("Shipping_Module_DSR", "getShippingMethodInfo", $method_id);
     $this->_Template_Contents = array("RatesHeader" => str_replace("%METHOD_NAME%", $method_info["method_name"], $this->MessageResources->getMessage('RATES_HEADER')), "lbl_Destination" => $this->MessageResources->getMessage('LBL_DESTINATION'), "lbl_WeightRange" => $this->CurrentRateUnit . $this->MessageResources->getMessage('LBL_RANGE'), "lbl_BaseCharge" => $this->MessageResources->getMessage('LBL_BASE_CHARGE'), "lbl_AdditionalCharge" => $this->MessageResources->getMessage('LBL_ADDITIONAL_CHARGE'), "lbl_PerItem" => $this->MessageResources->getMessage('LBL_PER') . " " . $this->MessageResources->getMessage('LBL_ITEM'), "lbl_PerWeightUnit" => $this->MessageResources->getMessage('LBL_PER') . " " . modApiFunc('Localization', 'getUnitTypeValue', 'weight'), "RatesList" => $this->outputRatesList($method_id), "WRangeFromField" => HtmlForm::genInputTextField(10, "NewRate[wrange_from]", 5, $this->POST["NewRate"]["wrange_from"]), "WRangeToField" => HtmlForm::genInputTextField(10, "NewRate[wrange_to]", 5, $this->POST["NewRate"]["wrange_to"]), "BChargeAbsField" => HtmlForm::genInputTextField(10, "NewRate[bcharge_abs]", 5, $this->POST["NewRate"]["bcharge_abs"]), "BChargePercField" => HtmlForm::genInputTextField(10, "NewRate[bcharge_perc]", 5, $this->POST["NewRate"]["bcharge_perc"]), "AChargePerItemAbsField" => HtmlForm::genInputTextField(10, "NewRate[acharge_pi_abs]", 5, $this->POST["NewRate"]["acharge_pi_abs"]), "AChargePerWUAbsField" => HtmlForm::genInputTextField(10, "NewRate[acharge_pwu_abs]", 5, $this->POST["NewRate"]["acharge_pwu_abs"]), "MethodID" => $method_id, "WeightSymbol" => $this->CurrentRateUnitSign, "CurrencySymbol" => modApiFunc('Localization', 'getUnitTypeValue', 'currency'), "JavascriptSynchronizeCountriesAndStatesLists" => modApiFunc("Location", "getJavascriptCountriesStatesArrays", true, array(), array(), true, true) . modApiFunc("Checkout", "getJavascriptSynchronizeCountriesAndStatesLists") . "<SCRIPT LANGUAGE=\"JavaScript\">" . "\n" . "<!--\n" . "\n" . "var onload_bak = window.onload;" . "\n" . "window.onload = function()" . "\n" . "{" . "\n" . "    if(onload_bak){onload_bak();}" . "\n" . "    refreshStatesList('DstCountry', 'DstState_menu_select', 'stub_state_text_input');" . "}" . "\n" . "//-->" . "\n" . "</SCRIPT>" . "\n", "CountriesOptions" => modApiFunc("Checkout", "genCountrySelectList", $this->POST["DstCountry"], false, true), "StatesOptions" => modApiFunc("Checkout", "genStateSelectList", $this->POST["DstState_menu_select"], $this->POST["DstCountry"], true), "lbl_CloneSelected" => $this->MessageResources->getMessage('LBL_DELETE_SELECTED'), "lbl_RenameSelected" => $this->MessageResources->getMessage('LBL_RENAME_SELECTED'), "lbl_DeleteSelected" => $this->MessageResources->getMessage('LBL_DELETE_SELECTED'), "DSR_Formula" => $this->getFormula(), "RatesLink" => "onClick=\"javascript: window.location='<?php  EditLink(); ?>'\">");
     $application->registerAttributes($this->_Template_Contents);
     $return_html_code .= $this->mTmplFiller->fill("shipping_module_dsr/", "rates_table.tpl.html", array());
     return $return_html_code;
 }
 /**
  * Outputs the language name input box
  */
 function outputLanguageName($lng)
 {
     return '<input type="text"' . HtmlForm::genInputTextField(255, 'posted_data[' . $lng['lng'] . '][lng_name]', 32, $lng['lng_name'], ' class="form-control input-sm input-large" onchange="SelectLanguage(\'' . $lng['lng'] . '\')"') . ' />';
 }
 function getTag($tag)
 {
     $value = null;
     switch ($tag) {
         case 'Local_FormActionURL':
             $r = new Request();
             $r->setAction('save_personal_info');
             $r->setView('CustomerPersonalInfo');
             $value = $r->getURL();
             break;
         case 'Local_PersonalInfo':
             $value = $this->out_PersonalInfoGroups();
             break;
         case 'Local_FormName':
             $group_info = $this->customer_obj->getPersonInfoGroupInfoByName($this->current_group_name);
             $value = getMsg('CA', $group_info['lang_code']);
             break;
         case 'Local_Form':
             $value = $this->out_GroupAttributes();
             break;
         case 'Local_FieldName':
             $attr_info = $this->customer_obj->getPersonInfoAttrInfoByName($this->current_attr_name, $this->current_group_name);
             $value = prepareHTMLDisplay($attr_info['visible_name']);
             break;
         case 'Local_Field':
             $attr_value = $this->customer_obj->getPersonInfo($this->current_attr_name, $this->current_group_name);
             switch (_ml_strtolower($this->current_attr_name)) {
                 case 'country':
                     $value = $this->out_CountrySelect($attr_value);
                     break;
                 case 'state':
                     $value = $this->out_StatesSelect($attr_value);
                     break;
                     //                    case 'accountname':
                     //                    case 'email':
                     //                        if($this->current_group_name == 'Customer')
                     //                        {
                     //                            if($this->customer_obj->getPersonInfo('account') == $attr_value)
                     //                            {
                     //                                $value = prepareHTMLDisplay($attr_value);
                     //                                break;
                     //                            };
                     //                        };
                 //                    case 'accountname':
                 //                    case 'email':
                 //                        if($this->current_group_name == 'Customer')
                 //                        {
                 //                            if($this->customer_obj->getPersonInfo('account') == $attr_value)
                 //                            {
                 //                                $value = prepareHTMLDisplay($attr_value);
                 //                                break;
                 //                            };
                 //                        };
                 default:
                     $input_type = 'text';
                     if (preg_match("/password\$/i", $this->current_attr_name)) {
                         $input_type = "password";
                     }
                     $value = '<input type="' . $input_type . '" ' . HtmlForm::genInputTextField(255, 'customer_info[' . $this->current_group_name . '][' . $this->current_attr_name . ']', 32, prepareHTMLDisplay($attr_value)) . ' />';
                     break;
             }
             break;
     }
     return $value;
 }
 /**
  * Outputs the field for the given params
  */
 function outputField($field_type, $def_value = '', $max_select_count = 0)
 {
     $return_value = '';
     switch ($field_type) {
         case 'action':
             $return_value = '<input type="hidden" ' . HtmlForm::genHiddenField('asc_action', 'update_review_data') . ' />';
             break;
         case 'mode':
             $return_value = '<input type="hidden" ' . HtmlForm::genHiddenField('mode', 'update') . ' />';
             break;
         case 'cr_id':
             $return_value = '<input type="hidden" ' . HtmlForm::genHiddenField('review_data[cr_id]', @$this->_Review_Data['cr_id']) . ' />';
             break;
         case 'ip_address':
             $return_value = '<input type="hidden" ' . HtmlForm::genHiddenField('review_data[ip_address]', isset($this->_Review_Data['ip_address']) ? $this->_Review_Data['ip_address'] : $_SERVER['REMOTE_ADDR']) . ' />';
             break;
         case 'author':
             $return_value = '<input class="form-control input-sm input-large" type="text"' . HtmlForm::genInputTextField('128', 'review_data[author]', '70', prepareHTMLDisplay(@$this->_Review_Data['author'])) . ' />';
             break;
         case 'review':
             $return_value = '<textarea class="form-control input-large" name="review_data[review]" cols="53" rows="8">' . prepareHTMLDisplay(@$this->_Review_Data['review']) . '</textarea>';
             break;
         case 'status':
             $values = array();
             $values[] = array('value' => 'A', 'contents' => getMsg('CR', 'CR_STATUS_APPROVED'));
             if (@$this->_Review_Data['status'] == 'P') {
                 $values[] = array('value' => 'P', 'contents' => getMsg('CR', 'CR_STATUS_PENDING'));
             }
             $values[] = array('value' => 'N', 'contents' => getMsg('CR', 'CR_STATUS_NOTAPPROVED'));
             $return_value = HtmlForm::genDropdownSingleChoice(array('select_name' => 'review_data[status]', 'selected_value' => @$this->_Review_Data['status'], 'onChange' => '', 'id' => 'review_data[status]', 'class' => 'form-control input-sm input-small', 'values' => $values));
             break;
         case 'hour':
         case 'minute':
         case 'second':
             $values = array();
             for ($i = 0; $i < $max_select_count; $i++) {
                 $values[] = array('value' => sprintf("%02d", $i), 'contents' => sprintf("%02d", $i));
             }
             $return_value = HtmlForm::genDropdownSingleChoice(array('select_name' => 'review_data[' . $field_type . ']', 'selected_value' => $def_value, 'id' => 'review_data[' . $field_type . ']', 'values' => $values));
             break;
     }
     return $return_value;
 }
Пример #25
0
 function output()
 {
     global $application;
     $mr_info = modApiFunc('Mod_Rewrite', 'detectModRewrite');
     $rw_schemes = modApiFunc('Mod_Rewrite', 'getRewriteSchemes');
     // <begin>                                      mod_rewrite
     $tests_results = array();
     //                     "     "
     echo "<!-- Tests results:\n";
     for ($i = 1; $i <= 2; $i++) {
         $tests_results[$i] = $this->_makeTest($i, "Ok");
         if ($tests_results[$i]) {
             echo "{$i}: Ok\n";
         } else {
             echo "{$i}: Error\n";
         }
     }
     echo " -->";
     if (!in_array(true, $tests_results)) {
         $mr_info['tests_status'] = false;
     } else {
         //                                    ,
         //        Options +FollowSymLinks   .htaccess
         $mr_info['tests_status'] = true;
         $_sets = array('ADD_FSL_STRING' => array_search(true, $tests_results) == 2 ? 'Y' : 'N');
         modApiFunc('Mod_Rewrite', 'updateSettings', $_sets);
     }
     // <end>                                      mod_rewrite
     $schemes_select = array("id" => "sets[REWRITE_SCHEME]", "select_name" => "sets[REWRITE_SCHEME]", "selected_value" => $this->mr_settings['REWRITE_SCHEME'], "onChange" => "changeSampleLinks(this.value);", "values" => array());
     foreach ($rw_schemes as $k => $scheme_info) {
         $schemes_select['values'][] = array("value" => $scheme_info['scheme_id'], "contents" => getMsg('MR', 'RS_' . _ml_strtoupper($scheme_info['scheme_name'])));
     }
     $template_contents = array('ResultMessage' => $this->outputResultMessage(), 'ServerSoft' => $mr_info['server_soft'], 'MRloaded' => $mr_info['mod_rewrite_loaded'], 'setsCatsPrefix' => HtmlForm::genInputTextField('255', 'sets[CATS_PREFIX]', '50', $this->mr_settings['CATS_PREFIX']), 'setsProdsPrefix' => HtmlForm::genInputTextField('255', 'sets[PRODS_PREFIX]', '50', $this->mr_settings['PRODS_PREFIX']), 'setsCMSPrefix' => HtmlForm::genInputTextField('255', 'sets[CMS_PREFIX]', '50', $this->mr_settings['CMS_PREFIX']), 'MRStatusMessage' => $this->outMRStatusMessage($mr_info), 'setsSchemesSelect' => HtmlForm::genDropdownSingleChoice($schemes_select), 'jsLinkSmaplesArray' => $this->out_jsLinkSmaplesArray(), 'currentSchemeID' => $this->mr_settings['REWRITE_SCHEME'], 'LayoutsSettings' => $this->_form_disabled ? '' : $this->out_LayoutsSettings(), 'disableAllCondition' => $this->_form_disabled ? 'true' : 'false');
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $this->mTmplFiller =& $application->getInstance('TmplFiller');
     return $this->mTmplFiller->fill("mod_rewrite/", "container.tpl.html", array());
 }
Пример #26
0
 function output()
 {
     global $application;
     $request =& $application->getInstance('Request');
     if ($request->getValueByKey('output_not_needed') == 'yes') {
         return '';
     }
     global $_RESULT;
     if (isset($_RESULT['fault_by']) and $_RESULT['fault_by'] != '') {
         return '';
     }
     $page_number = $request->getValueByKey('page_number');
     $this->parent_entity = $request->getValueByKey('parent_entity');
     $this->entity_id = $request->getValueByKey('entity_id');
     $this->Options = modApiFunc("Product_Options", "getOptionsWithValues", $this->parent_entity, $this->entity_id);
     $res_arr = modApiFunc("Product_Options", "getInventoryPage", $this->parent_entity, $this->entity_id, $page_number);
     $_RESULT["inv_pages_count"] = $res_arr["pages_count"];
     $_RESULT["inv_page_number"] = $res_arr["page_number"];
     /*
             $template_contents = array(
                 "InvPaginatorField" => HtmlForm::genInputTextField('10','InvPaginator','2',$res_arr["page_number"])
                ,"leftImgSuffix" => $res_arr["page_number"]<=1 ? '_na' : ''
                ,"rightImgSuffix" => $res_arr["page_number"]==$res_arr["pages_count"] ? '_na' : ''
                ,"firstOnClick" => $res_arr["page_number"]<=1 ? '' : 'loadInvPage(1);'
                ,"prevOnClick" => $res_arr["page_number"]<=1 ? '' : 'loadInvPage('.($res_arr["page_number"]-1).');'
                ,"nextOnClick" => $res_arr["page_number"]==$res_arr["pages_count"] ? '' : 'loadInvPage('.($res_arr["page_number"]+1).')'
                ,"lastOnClick" => $res_arr["page_number"]==$res_arr["pages_count"] ? '' : 'loadInvPage('.($res_arr["pages_count"]).')'
                ,"directOnClick" => "loadInvPage(document.getElementById('directPageNumber').value);"
                ,"leftStyle" => $res_arr["page_number"]<=1 ? '' : 'style="cursor: pointer;"'
                ,"rightStyle" => $res_arr["page_number"]==$res_arr["pages_count"] ? '' : 'style="cursor: pointer;"'
                ,"PagesCount" => $res_arr["pages_count"]
             );
             $this->_Template_Contents=$template_contents;
             $application->registerAttributes($this->_Template_Contents);
             $this->mTmplFiller = &$application->getInstance('TmplFiller');
             $_RESULT["inv_paginator_html"] = $this->mTmplFiller->fill("product_options/", "inv-paginator.tpl.html",array());
     */
     /*
             if($res_arr['inv_count']!=0)
             {
                 $sectors_count = ceil($res_arr['pages_count']  / $this->pages_per_sector);
                 $sector_number = ceil($res_arr['page_number'] / $this->pages_per_sector);
     
                 $template_contents = array(
                     "leftImgSuffix" => $sector_number<=1 ? '_na' : ''
                    ,"rightImgSuffix" => $sector_number==$sectors_count ? '_na' : ''
                    ,"firstOnClick" => $sector_number<=1 ? '' : 'loadInvPage('.(($sector_number-1)*($this->pages_per_sector)-($this->pages_per_sector-1)).');'
                    ,"lastOnClick" => $sector_number==$sectors_count ? '' : 'loadInvPage('.(($sector_number+1)*($this->pages_per_sector)-($this->pages_per_sector-1)).')'
                    ,"leftStyle" => $sector_number<=1 ? '' : 'style="cursor: pointer;"'
                    ,"rightStyle" => $sector_number==$sectors_count ? '' : 'style="cursor: pointer;"'
                    ,"SectorPages" => $this->outputSectorPages($res_arr)
                    ,"SectorSizeChoiser" => $this->outputSectorSizeChoiser($res_arr['inv_per_page'])
                 );
                 $this->_Template_Contents=$template_contents;
                 $application->registerAttributes($this->_Template_Contents);
                 $this->mTmplFiller = &$application->getInstance('TmplFiller');
                 $_RESULT["inv_paginator_html"] = $this->mTmplFiller->fill("product_options/", "inv-paginator-2.tpl.html",array());
             }
             else
             {
                 $_RESULT["inv_paginator_html"] = "";
             };
     */
     if ($res_arr['inv_count'] != 0 and $res_arr['inv_count'] > 10) {
         $sectors_count = ceil($res_arr['pages_count'] / $this->pages_per_sector);
         $sector_number = ceil($res_arr['page_number'] / $this->pages_per_sector);
         $template_contents = array("leftImgSuffix" => $sector_number <= 1 ? '_na' : '', "rightImgSuffix" => $sector_number == $sectors_count ? '_na' : '', "firstOnClick" => $sector_number <= 1 ? '' : 'loadInvPage(' . (($sector_number - 1) * $this->pages_per_sector - ($this->pages_per_sector - 1)) . ');', "lastOnClick" => $sector_number == $sectors_count ? '' : 'loadInvPage(' . (($sector_number + 1) * $this->pages_per_sector - ($this->pages_per_sector - 1)) . ')', "leftStyle" => $sector_number <= 1 ? 'style="display: none"' : 'style="cursor: pointer;"', "rightStyle" => $sector_number == $sectors_count ? 'style="display: none"' : 'style="cursor: pointer;"', "SectorPages" => $this->outputSectorPages($res_arr), "SectorSizeChoiser" => $this->outpur_jsDDforSSC($res_arr['inv_per_page']));
         $this->_Template_Contents = $template_contents;
         $application->registerAttributes($this->_Template_Contents);
         $this->mTmplFiller =& $application->getInstance('TmplFiller');
         $_RESULT["inv_paginator_html"] = $this->mTmplFiller->fill("product_options/", "inv-paginator-2.tpl.html", array());
     } else {
         $_RESULT["inv_paginator_html"] = "";
     }
     $inventory_page = $res_arr["page_content"];
     $return_html_code = "";
     for ($i = 0; $i < count($inventory_page); $i++) {
         if (empty($inventory_page[$i]['combination'])) {
             $inventory_page[$i]['combination'] = "[0]{{0}}";
         }
         $cmb_arr = modApiFunc("Product_Options", "_unserialize_combination", $inventory_page[$i]['combination']);
         $counter = 0;
         foreach ($cmb_arr as $oid => $vdata) {
             $strings = $this->_ids2strings(array($oid, $vdata));
             $template_contents = array("OptionName" => empty($strings['option_name']) ? 'not specified' : $strings['option_name'], "ValuesField" => empty($strings['value_name']) ? '' : $strings['value_name'], "RowsCount" => count($cmb_arr), "CycleColor" => $i % 2 == 0 ? "#DEE2E8" : "#EEF2F8", "SKUField" => HtmlForm::genInputTextField('255', 'Inventory[' . $inventory_page[$i]['it_id'] . '][sku]', '17', $inventory_page[$i]['sku']), "QuantityField" => HtmlForm::genInputTextField('255', 'Inventory[' . $inventory_page[$i]['it_id'] . '][quantity]', '11', $inventory_page[$i]['quantity']), "InvRecID" => $inventory_page[$i]['it_id'], "SortOrderID" => $inventory_page[$i]['sort_order']);
             $fn = $counter == 0 ? 'first' : 'other';
             $this->_Template_Contents = $template_contents;
             $application->registerAttributes($this->_Template_Contents);
             $this->mTmplFiller =& $application->getInstance('TmplFiller');
             $return_html_code .= $this->mTmplFiller->fill("product_options/", "it-page-element-{$fn}-row.tpl.html", array());
             $counter++;
         }
     }
     if ($return_html_code == "") {
         $MR =& $application->getInstance('MessageResources', 'product-options-messages', 'AdminZone');
         $return_html_code = "<tr><td colspan='3'><i>" . $MR->getMessage('NO_INVENTORY_DEFINED') . "</td></tr></i>";
     } else {
         $return_html_code .= '<tr bgcolor="#DEE2E8"><td></td><td><input type="checkbox" onClick="setCBstate(\'InventoryForm\',\'_ir_\',this.checked);"></td><td colspan="4"></td></tr>';
     }
     return $return_html_code;
 }
 /**
  * Return the "Manufacturers -> Add Manufacturer" view html code.
  *
  */
 function output()
 {
     global $application;
     loadCoreFile('html_form.php');
     $this->Hints =& $application->getInstance('Hint');
     $HtmlForm1 = new HtmlForm();
     $this->MessageResources =& $application->getInstance('MessageResources', "manufacturers-messages", "AdminZone");
     if ($this->ViewState["hasCloseScript"] == "true") {
         modApiFunc("application", "closeChild_UpdateParent");
         return;
     }
     $manufacturer_summary = $this->outputManufacturerSummary();
     $this->_Template_Contents = array("ManufacturerSummary" => $manufacturer_summary);
     $application->registerAttributes($this->_Template_Contents);
     $template_contents = array("Subtitle" => $this->outputSubtitle(), "Errors" => $this->outputErrors(), "ManufacturerId" => $this->outputManufacturerId(), "ManufacturerSummary" => $manufacturer_summary, "ManufacturerNameError" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_001']) ? $this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_001'] : "", "ManufacturerNameInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_001']) ? "error" : "", "ManufacturerName" => $HtmlForm1->genInputTextField("128", "ManufacturerName", "75", prepareHTMLDisplay($this->POST["ManufacturerNameText"])), "ManufacturerIdFieldHint" => $this->Hints->getHintLink(array('MANUFACTURER_ID_NAME', 'manufacturers-messages')), "ManufacturerNameFieldHint" => $this->Hints->getHintLink(array('MNF_NAME_NAME', 'manufacturers-messages')), "ManufacturerImage" => getimage_input_az('mnf_image', $this->POST["ManufacturerImage"]), "ManufacturerImageFieldHint" => $this->Hints->getHintLink(array('MNF_IMAGE_NAME', 'manufacturers-messages')), "ManufacturerUrlError" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_004']) ? $this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_004'] : "", "ManufacturerUrlInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_004']) ? "error" : "", "ManufacturerUrl" => $HtmlForm1->genInputTextField("128", "ManufacturerUrl", "75", prepareHTMLDisplay($this->POST["ManufacturerUrlText"] === NULL ? '' : $this->POST["ManufacturerUrlText"])), "ManufacturerUrlFieldHint" => $this->Hints->getHintLink(array('MNF_URL_NAME', 'manufacturers-messages')), "ManufacturerDescError" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_002']) ? $this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_002'] : "", "ManufacturerDescInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_002']) ? "error" : "", "ManufacturerDesc" => $HtmlForm1->genInputTextAreaField("77", "ManufacturerDesc", "10"), "ManufacturerDescText" => prepareHTMLDisplay($this->POST["ManufacturerDescText"]), "ManufacturerDescFieldHint" => $this->Hints->getHintLink(array('MNF_DESC_NAME', 'manufacturers-messages')), "ManufacturerStatusError" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_003']) ? $this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_003'] : "", "ManufacturerStatusInputStyleClass" => isset($this->ErrorMessages['ERR_AZ_MNF_ADD_MNF_003']) ? "error" : "", "ManufacturerStatus" => $this->outputStatus(), "ManufacturerStatusFieldHint" => $this->Hints->getHintLink(array('MNF_STATUS_NAME', 'manufacturers-messages')), "AddManufacturerForm" => $HtmlForm1->genForm(modApiFunc("application", "getPagenameByViewname", "ManufacturersList", -1, -1, 'AdminZone'), "POST", "AddManufacturer"), "HiddenFormSubmitValue" => $HtmlForm1->genHiddenField("FormSubmitValue", "Save"), "HiddenArrayViewStateConstants" => $this->outputViewStateConstants(), "HiddenArrayViewState" => $this->outputViewState(), "SubmitSaveScript" => $HtmlForm1->genSubmitScript("AddManufacturerForm"));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     $SpecMessageResources =& $application->getInstance('MessageResources');
     //: correct error codes
     return $output = $this->mTmplFiller->fill("manufacturers/add_manufacturer/", "list.tpl.html", array());
 }
Пример #28
0
 function outImagesByOne()
 {
     global $application;
     $html_code = '';
     //'<tr bgcolor="#CED4DD"><td colspan="2">'.getMsg('PI','HDR_IMAGE').'</td><td>'.getMsg('PI','HDR_ALT_TEXT').'</td><td>'.getMsg('PI','HDR_SIZE').'</td></tr>';
     foreach ($this->PImages as $k => $pi_info) {
         $template_contents = array('CycleColor' => $k % 2 == 0 ? '#FFFFFF' : '#EEF2F8', 'ImageID' => $pi_info['image_id'], 'ImageThumb' => $this->outThumbIMG($pi_info), 'ImageSize' => $this->outImageSizes($pi_info), 'ImageAltTextField' => HtmlForm::genInputTextField('', 'img_alt_text[' . $pi_info['image_id'] . ']', '50', $pi_info['alt_text']));
         $this->_Template_Contents = $template_contents;
         $application->registerAttributes($this->_Template_Contents);
         $this->mTmplFiller =& $application->getInstance('TmplFiller');
         $html_code .= $this->mTmplFiller->fill("product_images/images_list/", "one-image.tpl.html", array());
     }
     return $html_code;
 }
 /**
  * Outputs the Filter form
  */
 function outputLabelFilter()
 {
     global $application;
     $template_contents = array('DefLanguage' => modApiFunc('MultiLang', 'getDefaultLanguage'), 'Language' => $this->_search_filter['lng'], 'ActionField' => '<input type="hidden" ' . HtmlForm::genHiddenField('asc_action', 'FilterLabels') . ' />', 'HLAllLabels' => $this->outputLabel('ShowAllLabels'), 'HLSFLabels' => $this->outputLabel('ShowStorefrontLabels'), 'HLCLabels' => $this->outputLabel('ShowCustomLabels'), 'HLNTLabels' => $this->outputLabel('ShowNonTranslatedLabels'), 'HLTLabels' => $this->outputLabel('ShowTranslatedLabels'), 'HLLanguage' => $this->outputLabel('FilterLabels', 'lng'), 'HLLabel' => $this->outputLabel('FilterLabels', 'label'), 'HLLPattern' => $this->outputLabel('FilterLabels', 'pattern'), 'HLLType' => $this->outputLabel('FilterLabels', 'type'), 'HLLStatus' => $this->outputLabel('FilterLabels', 'status'), 'CountAll' => $this->outputCount('all'), 'CountSF' => $this->outputCount('storefront'), 'CountC' => $this->outputCount('custom'), 'CountNT' => $this->outputCount('nontranslated'), 'CountT' => $this->outputCount('translated'), 'LangSelect' => $this->outputLangSelect(), 'LabelField' => '<input class="form-control input-sm input-large" type="text"' . HtmlForm::genInputTextField('255', 'label', 60, prepareHTMLDisplay(@$this->_search_filter['label']['value'])) . ' />', 'LabelCheckBox' => HtmlForm::genCheckbox(array('value' => 'Y', 'is_checked' => @$this->_search_filter['label']['exactly'] == 'Y' ? 'checked' : '', 'name' => 'label_exactly', 'id' => 'label_exactly'), "class=''"), 'ValueField' => '<input class="form-control input-sm input-large" type="text"' . HtmlForm::genInputTextField('255', 'pattern', 60, prepareHTMLDisplay(@$this->_search_filter['pattern']['value'])) . ' />', 'ValueCheckBox' => HtmlForm::genCheckbox(array('value' => 'Y', 'is_checked' => @$this->_search_filter['pattern']['exactly'] == 'Y' ? 'checked' : '', 'name' => 'label_pattern_exactly', 'id' => 'label_pattern_exactly'), "class=''"), 'TypeSelect' => $this->outputTypeSelect(), 'StatusSelect' => HtmlForm::genDropdownSingleChoice(array('select_name' => 'status', 'selected_value' => @$this->_search_filter['status'], 'id' => 'status', 'values' => array(array('value' => 'all', 'contents' => getMsg('ML', 'ML_ALL_LABELS')), array('value' => 'translated', 'contents' => getMsg('ML', 'ML_TRANSLATED_LABELS')), array('value' => 'nontranslated', 'contents' => getMsg('ML', 'ML_NON_TRANSLATED_LABELS'))))));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return $this->mTmplFiller->fill('multilang/label_editor/', 'label_filter.tpl.html', array());
 }
 /**
  * Outputs custom name field
  */
 function outputCustomNameField($Label_Data)
 {
     // if the label is not custom -> returning a space
     if (_ml_substr($Label_Data['label'], 0, 7) != 'CUSTOM_') {
         return '&nbsp;';
     }
     return '<input style="display:inline;" class="form-control input-sm input-large" type="text"' . HtmlForm::genInputTextField('255', 'label_data[custom_label]', 60, prepareHTMLDisplay(isset($Label_Data['custom_label']) ? $Label_Data['custom_label'] : _ml_substr($Label_Data['label'], 7))) . ' style="width: 100%;" onkeyup="showLabelUsage(this);" />';
 }