/** * Constructor */ function CR_Rates_Settings() { // loading the prototypes of form fields loadCoreFile('html_form.php'); // initializing the template filler $this->mTmplFiller = new TmplFiller(); }
function PO_CRulesEditor() { global $application; $this->MessageResources =& $application->getInstance("MessageResources", "product-options-messages", "AdminZone"); $this->NoView = false; loadCoreFile('html_form.php'); }
function OrderList() { global $application; #check if fatal errors of the block tag exist $this->NoView = false; if ($application->issetBlockTagFatalErrors("OrderList")) { $this->NoView = true; } $settings = modApiFunc('Customer_Account', 'getSettings'); if ($settings['CHECKOUT_TYPE'] == CHECKOUT_TYPE_QUICK) { $this->NoView = true; } loadCoreFile('html_form.php'); $this->customer_obj = null; $this->incoming_filter = null; $email = modApiFunc('Customer_Account', 'getCurrentSignedCustomer'); if ($email !== null) { $this->customer_obj =& $application->getInstance('CCustomerInfo', $email); $request = new Request(); $filter = $request->getValueByKey('filter'); if ($filter != null) { $orders_search_filter = null; if ($filter == 'id') { $orders_search_filter = array('type' => 'id', 'order_status' => ORDER_STATUS_ALL, 'order_id' => intval($request->getValueByKey('order_id'))); } elseif ($filter != 'custom' and defined('ORDER_STATUS_' . _ml_strtoupper($filter))) { $orders_search_filter = array('type' => 'quick', 'order_status' => constant('ORDER_STATUS_' . _ml_strtoupper($filter))); } elseif ($filter == 'custom') { $orders_search_filter = array('type' => 'custom', 'order_status' => $request->getValueByKey('order_status'), 'order_payment_status' => $request->getValueByKey('order_payment_status'), 'day_from' => $request->getValueByKey('day_from'), 'month_from' => $request->getValueByKey('month_from'), 'year_from' => $request->getValueByKey('year_from'), 'day_to' => $request->getValueByKey('day_to'), 'month_to' => $request->getValueByKey('month_to'), 'year_to' => $request->getValueByKey('year_to')); } $this->incoming_filter = $orders_search_filter; $this->customer_obj->setOrdersHistoryFilter($this->incoming_filter); } } }
/** * Constructor */ function LanguageSettings() { // initializing the template engine $this->mTmplFiller = new TmplFiller(); // loading the html patterns loadCoreFile('html_form.php'); }
/** * */ function output() { global $application; loadCoreFile('html_form.php'); $this->_messageResources =& Subscriptions::getMessageResources(); $this->_tmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/'); $this->_topic_id = modApiFunc('Request', 'getValueByKey', 'topic'); if (!empty($this->_topic_id)) { $this->_mode = SM_SHOW_TOPIC; $this->initShowTopic(); if (empty($this->_topic)) { return $this->_tmplFiller->fill('', 'errors/no_topic_manage.tpl.html', array('Message' => $this->_messageResources->getMessage(new ActionMessage(array('TOPIC_DOESNT_EXISTS', $this->_topic_id))))); } } else { $this->_mode = SM_SHOW_TOPICS_LIST; $this->topics = modApiFunc('Subscriptions', 'getTopicsList'); } $this->initFormData(); $this->_templateContents = array('ToolbarTop', 'ToolbarBottom', 'FormErrors', 'ItemsList', 'EmailsPaginator', 'EmailSearchForm', 'LinkResetSearchEmail'); $application->registerAttributes($this->_templateContents); $request = new Request(); $request->setView(CURRENT_REQUEST_URL); $vars = array('FormAction' => $request->getURL(), 'AddTopicURL' => $this->urlAddTopic(), 'EditTopicURL' => $this->urlEditTopic(), 'SortTopicsURL' => $this->urlSortTopic(), 'DeleteTopicsURL' => $this->urlDeleteTopics(), 'SubscribeURL' => $this->urlSubscribe(), 'UnsubscribeURL' => $this->urlUnsubscribe(), 'ExportURL' => $this->urlExport()); $result = $this->_tmplFiller->fill('', 'manage.tpl.html', $vars); return $result; }
/** * */ function onAction() { global $application; loadCoreFile('licensekey.php'); loadCoreFile('licenseaccount.php'); // sending the registration request $lk = new LicenseKey(); $lac = new LicenseAccountClient(); $response = $lac->requestUpdateLicense(array("LicenseKey" => $lk->getLicenseKey(), "LicenseDomain" => $lk->getLicenseURL(), "LicenseType" => PRODUCT_VERSION_INTERNAL_TYPE)); $result_msg = "UNKNOWN_ERROR"; if ($response['CODE'] == 0 && !empty($response['CERT'])) { loadCoreFile('licensecert.php'); $lc = new LicenseCertificate(); if ($lc->_save_cert_to_file($response['CERT']) === false) { // error saving certificate $result_msg = "CERT_ERROR_CANNOT_SAVE"; } else { if ($lc->certificate_status === CERTIFICATE_OK) { // certificate saved successfully $result_msg = "UPDATE_SUCCESS"; } else { // invalid certificate received $result_msg = "CERT_ERROR_INVALID"; } } } else { if (!empty($response['CODE'])) { // error handling $result_msg = "RESPONSE_" . $response['CODE']; } } //$request = $application->getInstance('Request'); modApiFunc('Session', 'set', 'ResultMessage', $result_msg); $this->redirect(); }
function output($mode) { global $application; loadCoreFile('html_form.php'); $this->_prefix = _ml_strtolower($mode); $this->_Prefix = _ml_strtoupper($mode[0]) . _ml_substr($this->_prefix, 1); $this->_PREFIX = _ml_strtoupper($mode); $this->_messageResources =& Subscriptions::getMessageResources(); $this->_tmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/'); $this->initFormData(); $result = ''; //$action = modApiFunc('Request', 'getValueByKey', 'asc_action'); $action = @$this->POST['asc_action']; $has_errors = sizeof($this->ErrorsArray) > 0; $stage = modApiFunc('Request', 'getValueByKey', 'stage'); if (empty($stage)) { $result = $this->outputAskEmails(); } elseif ($stage == 'confirm') { $result = $this->outputAskConfirmation(); } elseif ($stage == 'finish') { // @ show errors if were modApiFunc("application", "closeChild_UpdateParent"); } return $result; }
function doInstall() { loadCoreFile('obj_xml.php'); $parser = new xml_doc(file_get_contents(NOTIFICATIONS_INSTALL_DATA_XML_FILE)); $parser->parse(); foreach ($parser->xml_index as $tag) { if ($tag->name == 'NOTIFICATIONS_INSTALL_DATA') { foreach ($tag->children as $id_child) { switch ($id_child->name) { case 'INFOTAGS': $this->__install_ProcessInfotags($id_child); break; case 'BLOCKTAGS': $this->__install_ProcessBlocktags($id_child); break; case 'ACTIONS': $this->__install_ProcessActions($id_child); break; case 'NOTIFICATIONS': $this->__install_ProcessNotifications($id_child); break; } } } } $this->__install_addEventsHandlers(); return; }
function OrderSearchForm() { global $application; #check if fatal errors of the block tag exist $this->NoView = false; if ($application->issetBlockTagFatalErrors("OrderSearchForm")) { $this->NoView = true; } $settings = modApiFunc('Customer_Account', 'getSettings'); if ($settings['CHECKOUT_TYPE'] == CHECKOUT_TYPE_QUICK) { $this->NoView = true; } loadCoreFile('html_form.php'); $this->customer_obj = null; $this->incoming_filter = null; $email = modApiFunc('Customer_Account', 'getCurrentSignedCustomer'); if ($email !== null) { $this->customer_obj =& $application->getInstance('CCustomerInfo', $email); $request = new Request(); $filter = $request->getValueByKey('filter'); if ($filter != null) { $orders_search_filter = null; if ($filter == 'custom') { $orders_search_filter = array('type' => 'custom', 'order_status' => $request->getValueByKey('order_status'), 'order_payment_status' => $request->getValueByKey('order_payment_status'), 'day_from' => $request->getValueByKey('day_from'), 'month_from' => $request->getValueByKey('month_from'), 'year_from' => $request->getValueByKey('year_from'), 'day_to' => $request->getValueByKey('day_to'), 'month_to' => $request->getValueByKey('month_to'), 'year_to' => $request->getValueByKey('year_to')); } $this->incoming_filter = $orders_search_filter; } } }
function ManageCustomFields() { global $application; loadCoreFile('html_form.php'); $this->MessageResources =& $application->getInstance('MessageResources'); $this->TemplateFiller = $application->getInstance('TmplFiller'); $this->HtmlForm = new HtmlForm(); $request = new Request(); $this->mode = isset($_POST["mode"]) ? $_POST["mode"] : $request->getValueByKey("mode"); $this->var_id = isset($_POST["variant_id"]) ? $_POST["variant_id"] : $request->getValueByKey("variant_id"); $this->attr_id = isset($_POST["attribute_id"]) ? $_POST["attribute_id"] : $request->getValueByKey("attribute_id"); $custom_fields_data = modApiFunc("Checkout", 'getPersonCustomAttributes', $this->var_id); if ($this->attr_id == null && $this->mode != "add") { if (count($custom_fields_data) != 0) { $this->attr_id = $custom_fields_data[0]['person_attribute_id']; } } if ($this->mode == null) { $this->mode = "edit"; } if (count($custom_fields_data) == 0) { $this->mode = "add"; } if ($this->attr_id != null) { $this->field_data = modAPIFunc("Checkout", "getPersonAttributeData", $this->var_id, $this->attr_id); } if (modApiFunc("Session", "is_set", "FormData")) { $this->field_data['postdata'] = modApiFunc("Session", "get", "FormData"); modApiFunc("Session", "un_set", "FormData"); } if (modApiFunc("Session", "is_set", "UpdateParent") && modApiFunc("Session", "get", "UpdateParent") == true) { modApiFunc("Session", "un_set", "UpdateParent"); $application->UpdateParent(); } }
function CustomerPersonalInfo() { global $application; #check if fatal errors of the block tag exist $this->NoView = false; if ($application->issetBlockTagFatalErrors("CustomerPersonalInfo")) { $this->NoView = true; } $settings = modApiFunc('Customer_Account', 'getSettings'); if ($settings['CHECKOUT_TYPE'] == CHECKOUT_TYPE_QUICK) { $this->NoView = true; } $this->customer_obj = null; $email = modApiFunc('Customer_Account', 'getCurrentSignedCustomer'); if ($email != null) { $this->customer_obj =& $application->getInstance('CCustomerInfo', $email); $this->customer_obj->setPersonInfoAttrsType(PERSON_INFO_GROUP_ATTR_VISIBLE); } loadCoreFile('html_form.php'); $this->invalid_fields = array(); if (modApiFunc('Session', 'is_set', 'InvalidFields')) { $this->invalid_fields = modApiFunc('Session', 'get', 'InvalidFields'); modApiFunc('Session', 'un_set', 'InvalidFields'); } }
function output() { global $application; loadCoreFile('html_form.php'); $this->_messageResources =& Subscriptions::getMessageResources(); $this->_tmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/'); $this->_topic_id = modApiFunc('Request', 'getValueByKey', 'topic'); if (!empty($this->_topic_id)) { $this->_mode = SM_EDIT_TOPIC; } else { $this->_mode = SM_NEW_TOPIC; } $this->initFormData(); if (@$this->ViewState['hasCloseScript'] == 'true') { modApiFunc("application", "closeChild_UpdateParent"); return; } $this->_templateContents = array('ErrorsBox', 'AscAction'); $application->registerAttributes($this->_templateContents); if ($this->_mode == SM_EDIT_TOPIC && empty($this->_topic)) { return $this->_tmplFiller->fill('', 'errors/no_topic_edit.tpl.html', array('Message' => $this->_messageResources->getMessage(new ActionMessage(array('TOPIC_DOESNT_EXISTS', $this->_topic_id))))); } $request = new Request(); $request->setView(CURRENT_REQUEST_URL); $vars = array('FormAction' => $request->getURL(), 'AscAction' => $this->_mode == SM_NEW_TOPIC ? 'create_topic' : 'update_topic', 'TopicId' => $this->_topic_id, 'WinTitle' => $this->_messageResources->getMessage($this->_mode == SM_NEW_TOPIC ? 'TITLE_ADD_TOPIC' : 'TITLE_EDIT_TOPIC'), 'TopicName' => @$this->POST['topic_name'], 'TopicStatusSelect' => $this->getTopicStatusSelect('topic_status', @$this->POST['topic_status']), 'TopicAccessSelect' => $this->getTopicAccessSelect('topic_access', @$this->POST['topic_access']), 'TopicAutosubscribeSelect' => $this->getTopicAutoSubscribeSelect('topic_auto', @$this->POST['topic_auto'])); $result = $this->_tmplFiller->fill('', 'edit_topic.tpl.html', $vars); return $result; }
function doInstall() { loadCoreFile('obj_xml.php'); $parser = new xml_doc(file_get_contents(CUSTOMER_ACCOUNT_INSTALL_DATA_XML)); $parser->parse(); $groups_ids = array(); $attrs_ids = array(); foreach ($parser->xml_index as $tag) { if ($tag->name == 'CUSTOMER_ACCOUNT_INSTALL_DATA') { foreach ($tag->children as $id_child) { switch ($id_child->name) { case 'PERSON_INFO_GROUPS': $groups_ids = $this->__install_ProcessPersonInfoGroups($id_child); break; case 'PERSON_INFO_ATTRS': $attrs_ids = $this->__install_ProcessPersonInfoAttrs($id_child); break; case 'ATTRS_TO_GROUPS': $this->__install_ProcessAttrsToGroups($id_child, $groups_ids, $attrs_ids); break; case 'SETTINGS': $this->__install_ProcessSettings($id_child); break; } } } } $this->__install_AddAttrsVisibleNames(); $this->__install_addEventsHandlers(); return; }
function OrderSearchByIdForm() { global $application; #check if fatal errors of the block tag exist $this->NoView = false; if ($application->issetBlockTagFatalErrors("OrderSearchByIdForm")) { $this->NoView = true; } $settings = modApiFunc('Customer_Account', 'getSettings'); if ($settings['CHECKOUT_TYPE'] == CHECKOUT_TYPE_QUICK) { $this->NoView = true; } loadCoreFile('html_form.php'); $this->customer_obj = null; $this->incoming_filter = null; $email = modApiFunc('Customer_Account', 'getCurrentSignedCustomer'); if ($email !== null) { $this->customer_obj =& $application->getInstance('CCustomerInfo', $email); $request = new Request(); $filter = $request->getValueByKey('filter'); if ($filter != null) { $orders_search_filter = null; if ($filter == 'id') { $o_id = $request->getValueByKey('order_id'); if (!$o_id || !is_int($o_id)) { return; } $orders_search_filter = array('type' => 'id', 'order_status' => ORDER_STATUS_ALL, 'order_id' => intval($o_id)); } $this->incoming_filter = $orders_search_filter; } } }
function PO_OptionsList() { global $application; $this->MessageResources =& $application->getInstance('MessageResources', "product-options-messages", "AdminZone"); $this->Hints =& $application->getInstance('Hint'); $this->NoView = false; loadCoreFile('html_form.php'); }
function CReportRenderCSV() { global $application; loadCoreFile('csv_parser.php'); $cache_folder = $application->getAppIni('PATH_CACHE_DIR'); $this->__file_name = $cache_folder . 'report_' . md5(rand(0, 999999999)) . '.csv'; $this->__csv_writer = new CSV_Writer(CSV_WRITER_ENABLE_BUFFERING); $this->__csv_writer->setDelimetr(';'); }
/** * Contructor */ function ManageCustomerReviews() { loadCoreFile('html_form.php'); modApiFunc('paginator', 'setCurrentPaginatorName', 'CR_List_AZ'); // filling search filter $this->setSearchFilter(); // filling quick navigation $this->fillQuickNavigationData(); // initializing the template filler $this->mTmplFiller = new TmplFiller(); }
function outputAcceptedCurrenciesRule($options_values, $selected_value) { $options = array(); foreach ($options_values as $rule) { $options[] = array("value" => $rule['rule_name'], "contents" => getMsg('SYS', $rule['rule_name'])); } loadCoreFile('html_form.php'); $HtmlForm1 = new HtmlForm(); $value = $HtmlForm1->genDropdownSingleChoice(array("onChange" => "try{accepted_currencies_rule_onchange();} catch(ex) {};", "select_name" => "pm_sm_accepted_currencies_rule", "class" => "input-large", "values" => $options, "selected_value" => $selected_value, "id" => "pm_sm_accepted_currencies_rule")); return $value; }
function RegisterFormEditor() { $group_info = modApiFunc('Customer_Account', 'getPersonInfoGroupInfoByName', 'Customer'); $this->reg_form_attrs = modApiFunc('Customer_Account', 'getPersonInfoGroupAttrs', $group_info['group_id']); loadCoreFile('html_form.php'); $this->not_change_props = array('Password', 'RePassword', 'Email'); $this->hidden_props = array('AccountName'); $this->login_attr_id = null; $this->email_attr_id = null; $this->settings = modApiFunc('Customer_Account', 'getSettings'); }
function SearchResult() { global $application; loadCoreFile('cstring.php'); $this->cstring = new CString(); #check if fatal errors exist in the block tag $this->NoView = false; if ($application->issetBlockTagFatalErrors("SearchResult")) { $this->NoView = true; } }
/** * Outputs the view. * * @ $request->setView ( '' ) -define the view name */ function output() { global $application; if (!isset($this->HTML_TAGS_PREFIX_WITHOUT_MODULE_UID)) { $this->HTML_TAGS_PREFIX_WITHOUT_MODULE_UID = $this->HTML_TAGS_PREFIX; } // - PersonInfoType, , // . $person_info_types = modApiFunc("Checkout", "getPersonInfoTypeList"); foreach ($person_info_types as $id => $info) { if ($info['tag'] == $this->CHECKOUT_PREREQUISITE_NAME && $info['active'] == DB_FALSE) { return ""; } } //Read the decrypted credit card data from the session $prerequisiteValidationResults = modApiFunc("Checkout", "getPrerequisiteValidationResults", $this->CHECKOUT_PREREQUISITE_NAME); if ($prerequisiteValidationResults["isMet"] == false) { return ""; } // build direct tag list with values. // they are may be used in the container template. // Example: Local_Firstname(); $this->direct_tags = modApiFunc("Checkout", "getPersonInfoTagList", $this->CHECKOUT_PREREQUISITE_NAME); /* if ($this->NoView) { $application->outputTagErrors(true, "CartContent", "Errors"); return ""; } else { $application->outputTagErrors(true, "CartContent", "Warnings"); }*/ $AttributesArray = array($this->HTML_TAGS_PREFIX . 'OutputAllAttributes' => "", $this->HTML_TAGS_PREFIX_WITHOUT_MODULE_UID . 'OutputAllAttributes' => "", $this->HTML_TAGS_PREFIX . 'OutputAllAttributesRows' => "", $this->HTML_TAGS_PREFIX_WITHOUT_MODULE_UID . 'OutputAllAttributesRows' => ""); foreach ($prerequisiteValidationResults['validatedData'] as $data_id => $data) { if ($data['view_tag'] == "Statemenu") { $AttributesArray[$this->HTML_TAGS_PREFIX . "State"] = ''; } else { if ($data['view_tag'] == "Statetext") { } else { $AttributesArray[$this->HTML_TAGS_PREFIX . $data['view_tag']] = ''; } } } $application->registerAttributes($AttributesArray); $application->registerAttributes($this->direct_tags); loadCoreFile('UUIDUtils.php'); $this->templateFiller =& $application->getInstance('TemplateFiller'); $this->template = $application->getBlockTemplate(UUIDUtils::cut_uuid_suffix($this->BLOCK_TAG_NAME, "js")); //__CLASS__ is lowercase class name, get_class() also returns class name in lowercase. $this->templateFiller->setTemplate($this->template); $retval = $this->templateFiller->fill("OutputContainer"); return $retval; }
/** * Action: UpdateCountries. * */ function onAction() { global $application; $SessionPost = array(); if (modApiFunc('Session', 'is_Set', 'SessionPost')) { _fatal(array("CODE" => "CORE_050"), __CLASS__, __FUNCTION__); } $SessionPost = $_POST; switch ($SessionPost["ViewState"]["FormSubmitValue"]) { case "update": $nErrors = 0; $SessionPost["ViewState"]["ErrorsArray"] = array(); $live_countries_present = false; // foreach ($SessionPost as $key => $val) // { // if ((_ml_substr($key, 0, 3) == "hf_")) // { // if (isset($SessionPost["cb_".$val])) // $live_countries_present = true; // } // } for ($i = 0; $i <= 237; $i++) { if (isset($SessionPost["cb_" . $i])) { $live_countries_present = true; } } if (!$live_countries_present) { $SessionPost["ViewState"]["ErrorsArray"][] = "error"; //getMsg("MNG_CNTR_NO_SELECTED_ERROR"); } loadCoreFile('html_form.php'); $HtmlForm1 = new HtmlForm(); $error_message_text = ""; $nErrors = sizeof($SessionPost["ViewState"]["ErrorsArray"]); if ($nErrors == 0) { unset($SessionPost["ViewState"]["ErrorsArray"]); $this->updateDataInDB($SessionPost); $SessionPost["ViewState"]["hasCloseScript"] = "true"; modApiFunc('Session', 'set', 'ResultMessage', 'MNG_CNTR_RESULT_MESSAGE'); } else { modApiFunc('Session', 'set', 'ResultMessage', 'MNG_CNTR_RESULT_ERROR_MESSAGE'); } break; default: break; } modApiFunc('Session', 'set', 'SessionPost', $SessionPost); // get view name by action name. $request = new Request(); $request->setView("CountriesList"); $application->redirect($request); }
function ShippingTesterWindow() { global $application; $this->MessageResources =& $application->getInstance('MessageResources', "shipping-tester-messages", "AdminZone"); $this->mTmplFiller =& $application->getInstance('TmplFiller'); if (modApiFunc("Session", "is_set", "SessionPost")) { $this->copyFormData(); modApiFunc('Session', 'un_set', 'SessionPost'); } else { $this->initFormData(); } loadCoreFile('html_form.php'); }
function __readScriptsDefinition() { loadCoreFile('obj_xml.php'); $parser = new xml_doc(file_get_contents(DC_SCRIPTS_DEFINITION_FILE)); $parser->parse(); foreach ($parser->xml_index as $tag) { if ($tag->name == 'SCRIPTS') { foreach ($tag->children as $scripts_child) { if ($scripts_child->name == 'SCRIPT') { $script_info = array('steps' => array()); $script_code = ''; foreach ($scripts_child->children as $script_child) { switch ($script_child->name) { case 'CODE': $script_code = $script_child->contents; break; case 'NAME': $script_info[_ml_strtolower($script_child->name)] = $script_child->contents; break; case 'STEPS': $script_info['steps_count'] = $script_child->contents; break; case 'STEP': $step_info = array(); $step_number = 0; foreach ($script_child->children as $step_child) { switch ($step_child->name) { case 'NUMBER': $step_number = $step_child->contents; break; case 'READER': case 'FILTER': case 'WRITER': $step_info[_ml_strtolower($step_child->name)] = $step_child->contents; break; } } if ($step_number > 0) { $script_info['steps'][$step_number] = $step_info; } break; } } if ($script_code != '') { $this->_scripts_definition[$script_code] = $script_info; } } } } } }
/** * */ function output() { global $application; loadCoreFile('html_form.php'); $HtmlForm = new HtmlForm(); $request = new Request(); $request->setView('DateTimeFormat'); $request->setAction('UpdateDateTimeFormat'); $formAction = $request->getURL(); $template_contents = array("FORM" => $HtmlForm->genForm($formAction, "POST", "DateTimeForm"), "DateFormats" => $this->outputDateTimeFormats("date"), "TimeFormats" => $this->outputDateTimeFormats("time"), "ResultMessage" => $this->outputResultMessage()); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', "localization/date_settings/", "container.tpl.html", array()); }
function addFPLinksToCategory($category_id, $fp_ids) { global $application; loadCoreFile('db_multiple_insert.php'); $so = $this->__getMaxFPSortOrderForCategory($category_id); $query = new DB_Multiple_Insert('fp_links'); $query->setInsertFields(array('category_id', 'fp_id', 'sort_order')); foreach ($fp_ids as $fp_id) { $i_arr = array('category_id' => $category_id, 'fp_id' => $fp_id, 'sort_order' => ++$so); $query->addInsertValuesArray($i_arr); } $application->db->PrepareSQL($query); return $application->db->DB_Exec(); }
/** * */ function output() { global $application; loadCoreFile('html_form.php'); $HtmlForm = new HtmlForm(); $request = new Request(); $request->setView('WeightUnit'); $request->setAction('UpdateWeightUnit'); $formAction = $request->getURL(); $template_contents = array("FORM" => $HtmlForm->genForm($formAction, "POST", "WeightForm"), "WeightUnit" => modApiFunc("Localization", "getValue", "WEIGHT_UNIT"), "WeightCoeff" => modApiFunc("Localization", "FloatToFormatStr", modApiFunc("Localization", "getValue", "WEIGHT_COEFF"), "weight_coeff"), "CoeffFormat" => modApiFunc("Localization", "format_settings_for_js", "weight_coeff"), "ResultMessage" => $this->outputResultMessage()); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', "localization/weight_settings/", "container.tpl.html", array()); }
function FreeShippingRulesList() { global $application; $this->MessageResources =& $application->getInstance('MessageResources', "shipping-cost-calculator-messages", "AdminZone"); $this->mTmplFiller =& $application->getInstance('TmplFiller'); $this->rulesList = execQuery('SELECT_SCC_FS_RULES', array()); if (modApiFunc("Session", "is_Set", "SessionPost")) { $this->copyFormData(); modApiFunc('Session', 'un_Set', 'SessionPost'); } else { $this->initFormData(); } loadCoreFile('html_form.php'); }
/** * Constructor */ function LabelEditor() { // initializing the template engine $this->mTmplFiller = new TmplFiller(); // loading the html patterns loadCoreFile('html_form.php'); // setting the paginator modApiFunc('paginator', 'setCurrentPaginatorName', 'ML_Labels_AZ'); // filling search filter $this->setSearchFilter(); // filling quick navigation $this->fillQuickNavigationData(); // getting the list of modules $this->_modules = modApiFunc('MultiLang', 'getResourceModuleList'); }
function output() { global $application; $parameters = func_get_args(); $this->asc_ctor($parameters[1]); $image_data = modApiFunc("Images", "getImageData", $this->image_obj->get_id()); $image_data['image_obj'] = $this->image_obj; loadCoreFile('JsHttpRequest.php'); $this->_Template_Contents = array("IIId" => $parameters[0], "IIimage_data" => JsHttpRequest::php2js($image_data), "EMPTY_IMAGE_SRC" => modApiFunc("Images", "getAZImageSRC", EMPTY_IMAGE_BASENAME), "EMPTY_IMAGE_WIDTH" => EMPTY_IMAGE_WIDTH, "EMPTY_IMAGE_HEIGHT" => EMPTY_IMAGE_HEIGHT, "IMAGE_THUMB_SIZE" => IMAGE_THUMB_SIZE, "EMPTY_IMAGE_ALT_TEXT" => getMsg('IMG', 'EMPTY_IMAGE_ALT_TEXT')); $application->registerAttributes($this->_Template_Contents); $this->mTmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/'); $res = $this->mTmplFiller->fill("image_input/", "js.tpl.html", array()); $res .= $this->mTmplFiller->fill("image_input/", "container.tpl.html", array()); return $res; }