function outputMoveHref() { $request = new Request(); $request->setView('MoveProducts'); $request->setAction('MoveToProducts'); return $request->getURL(); }
/** * MailInfo constructor */ function MailInfo() { global $application; $MR =& $application->getInstance('MessageResources'); //initialize form data with null values when adding a new notification $this->currentNotificationId = modApiFunc("Notifications", "getCurrentNotificationId"); if ($this->currentNotificationId == 'Add') { $this->notificationInfo = array('Id' => '', 'Name' => '', 'Subject' => '', 'Body' => '', 'JavascriptBody' => '', 'From_addr' => '', 'Email_Code' => '', 'Active' => 'checked', 'Action_id' => 1); $request = new Request(); $request->setView('NotificationInfo'); $request->setAction('AddNotification'); $formAction = $request->getURL(); $this->properties = array('SubmitButton' => $MR->getMessage('BTN_ADD'), 'FormAction' => $formAction); } else { //initialize form data with database values when editing the notification $this->notificationInfo = modApiFunc("Notifications", "getNotificationInfo", $this->currentNotificationId); if (sizeof($this->notificationInfo) == 1) { $this->notificationInfo = $this->notificationInfo[0]; $this->notificationInfo['JavascriptBody'] = addcslashes(addslashes($this->notificationInfo['Body']), ".."); $this->notificationInfo['Body'] = prepareHTMLDisplay($this->notificationInfo['Body']); } else { $this->currentNotificationId = 'Add'; $this->notificationInfo = array('Id' => '', 'Name' => '', 'Subject' => '', 'Body' => '', 'JavascriptBody' => '', 'From_addr' => '', 'Email_Code' => '', 'Active' => 'checked', 'Action_id' => 1); } $request = new Request(); $request->setView('NotificationInfo'); $request->setAction('SaveNotification'); $formAction = $request->getURL(); $this->properties = array('SubmitButton' => $MR->getMessage('BTN_SAVE'), 'FormAction' => $formAction); } $this->actionsList = modApiFunc("Notifications", "getActionsList"); $this->InfoTags = modApiFunc("Notifications", "getAvailableTagsList", $this->actionsList); }
function getTag($tag) { $value = null; switch ($tag) { case 'Local_SetCurrencyLink': $r = new Request(); $r->setView(CURRENT_REQUEST_URL); $r->setAction('SetDisplayCurrency'); $r->setKey('currency_id', '%currency_id_value%'); $value = $r->getURL(); break; case 'Local_CurrencyName': $value = $this->_Currency['name']; break; case 'Local_CurrencySelected': $b = $this->_Currency['id'] == modApiFunc("Localization", "getSessionDisplayCurrency"); $value = $b ? 'selected="selected"' : ""; break; case 'Local_CurrencyId': $value = $this->_Currency['id']; break; case 'Local_Items': $value = $this->outputItems(); break; case 'Local_CurrentCurrency': $value = modApiFunc("Localization", "getCurrencyCodeById", modApiFunc("Localization", "getSessionDisplayCurrency")); break; case 'Local_CurrencyCode': $value = $this->_Currency['code']; break; } return $value; }
/** * @ describe the function ->getTag. */ function getTag($tag) { global $application; $value = null; switch ($tag) { case 'EditLink': $request = new Request(); $request->setAction('SetCurrentProductType'); $request->setView('EditProductType'); $request->setKey('type_id', $this->_type['id']); $value = $request->getURL(); break; case 'TypeName': $value = $this->_type['name']; break; case 'TypeDescription': $value = ''; if ($this->_type['description'] != '') { $value = ' - ' . $this->_type['description']; } break; case 'ProductTypes': $value = $this->outputProductTypes(); break; default: break; } return $value; }
/** * */ function output() { global $application; $request = new Request(); $request->setView('AdminBackupDeleteProgress'); $request->setAction('BackupDeleteAction'); $ProgressBarFormAction = $request->getURL(); $ImgQtyTotal = modApiFunc("Tools", "getImgQtyTotal"); $DeletedImgQty = modApiFunc("Tools", "getDeletedImgQty"); if ($ImgQtyTotal) { if ($ImgQtyTotal == $DeletedImgQty + 3) { $ProgressBarWidth = 400; modApiFunc("Tools", "unsetDeletedImgQty"); modApiFunc("Tools", "unsetImgQtyTotal"); } else { $ProgressBarWidth = floor($DeletedImgQty / $ImgQtyTotal * 400); } } else { $ProgressBarWidth = 0; } if (!is_dir($application->getAppIni('PATH_BACKUP_DIR') . modApiFunc("Tools", "getCurrentBackupFile") . "/")) { $ProgressBarWidth = 400; modApiFunc("Tools", "unsetDeletedImgQty"); modApiFunc("Tools", "unsetImgQtyTotal"); } modApiFunc("Tools", "saveState"); $template_contents = array('ProgressBarFormAction' => $ProgressBarFormAction, 'ProgressBarWidth' => $ProgressBarWidth); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', "tools/backup_delete_progress/", "container.tpl.html", array()); }
/** * Returns Review info tag value */ function getReviewTagValue($tag) { $output = ''; // if productid is incorrect returns '' in any case if ($this->_productid_invalid) { return ''; } switch ($tag) { case 'number': $output = modApiFunc('Customer_Reviews', 'getProductCustomerReviewNumber', $this->_productid); if (!$this->checkReviewAvail(6, 7)) { $output = 0; } break; case 'averagerating': $output = modApiFunc('Customer_Reviews', 'getTotalProductRating', $this->_productid); $output = $output['total_rating']; if (!$this->checkReviewAvail(7)) { $output = 0; } break; case 'link': $cid = modApiFunc('CProductListFilter', 'getCurrentCategoryId'); $r = new Request(); $r->setView('ProductInfo'); $r->setAction('SetCurrentProduct'); $r->setKey('prod_id', $this->_productid); $r->setProductID($this->_productid); $r->setCategoryID($cid); $r->setAnchor('customer_reviews_' . $this->_productid); return $r->getURL(); } return $output; }
function formAction() { global $application; $request = new Request(); $request->setView('EditTaxName'); $request->setAction('UpdateTaxNameAction'); return $request->getURL(); }
function formAction() { global $application; $request = new Request(); $request->setView('EditTaxRate'); $request->setAction($this->ViewState["TaxRateAction"]); return $request->getURL(); }
function formAction() { global $application; $request = new Request(); $request->setView('AddTaxClass'); $request->setAction('AddProdTaxClass'); return $request->getURL(); }
/** * Redirect after action */ function redirect() { global $application; $request = new Request(); $request->setView('EditPromoCode'); $request->setAction('SetEditablePromoCode'); $request->setKey('PromoCode_id', $this->pcid); $application->redirect($request); }
function getTag($tag) { $value = null; switch ($tag) { case 'Local_FormActionURL': $r = new Request(); $r->setView('CustomerChangePassword'); $r->setAction('change_account_password'); $value = $r->getURL(); break; } return $value; }
/** * */ 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 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 output() { global $application; $this->_tmplFiller =& $application->getInstance('TmplFiller'); $request = new Request(); $request->setView(CURRENT_REQUEST_URL); $request->setAction('do_newsletter_delete'); $self_url = $request->getURL(); $self_url = "{$self_url}&letter_id="; $templateContents = array('MessagesList' => $this->outputMessagesList(), 'SelfUrl' => $self_url); $this->_templateContents = $templateContents; $application->registerAttributes($this->_templateContents); $result = $this->_tmplFiller->fill('newsletter/', 'list.tpl.html', array()); return $result; }
/** * Outputs references to the category. */ function getLinkToView($cid, $view_name, &$cat_info) { $_request = new Request(); $_request->setView($view_name); $_request->setAction("SetCurrCat"); $_request->setKey("category_id", $cid); $res = $_request->getURL(); if ($cat_info->getCategoryTagValue('RecursiveStatus') == CATEGORY_STATUS_ONLINE) { } else { $res = $res . '" style="color: rgb(175, 175, 175);'; } return $res; //@ check, whether last parameter was ever used //$application->href($_request, -1, -1, 'AdminZone'); }
/** * */ function output() { global $application; $request = new Request(); $request->setView('AdminBackupProgress'); $request->setAction('DBStat'); $Backup_Start_Link = $request->getURL(); $request = new Request(); $request->setView('AdminBackup'); $request->setAction('BackupCancel'); $Backup_Cancel_Link = $request->getURL(); $template_contents = array('BackupStartLink' => $Backup_Start_Link, 'BackupCancelLink' => $Backup_Cancel_Link); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', $this->container_template_folder_name, "container.tpl.html", array()); }
function outFilesByOne() { global $application; $html_code = ''; foreach ($this->PFiles as $k => $pf_info) { $r = new Request(); $r->setAction('direct_download_file'); $r->setKey('file_id', $pf_info['file_id']); $template_contents = array('CycleColor' => $k % 2 == 0 ? '#FFFFFF' : '#EEF2F8', 'FileID' => $pf_info['file_id'], 'FileName' => $pf_info['file_name'], 'FSize' => modApiFunc('Product_Files', 'formatFileSize', $pf_info['file_size']), 'FileDescr' => prepareHTMLDisplay($pf_info['file_descr']), 'DirectFileLink' => $r->getURL()); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); $this->mTmplFiller =& $application->getInstance('TmplFiller'); $html_code .= $this->mTmplFiller->fill("product_files/files_list/", "one-file.tpl.html", array()); } return $html_code; }
/** * Returns the generated ProductList view. * * @return string */ function output() { global $application; $arg_list = func_get_args(); if (sizeof($arg_list) == 1) { $step_id = $arg_list[0]; } else { $step_id = modApiFunc("Checkout", "getCurrentStepID"); } $request = new Request(); $request->setAction('SetCurrStep'); $request->setView('CheckoutView'); $request->setKey('step_id', $step_id); $request = modApiFunc("Checkout", "appendCheckoutCZGETParameters", $request); return $request->getURL(); }
function getTag($tag) { $value = null; switch ($tag) { case 'CustomerAccountName': $value = $this->customer_obj->getDisplayAccountName(); break; case 'Local_FormActionURL': $r = new Request(); $r->setView('CustomerNewPassword'); $r->setAction('save_account_password'); $r->setKey('key', $this->key); $value = $r->getURL(); break; } return $value; }
function gen_bmOnClick($bm_location) { $code = "window.location='"; $request = new Request(); $request->setView($bm_location['view']); if (isset($bm_location['action'])) { $request->setAction($bm_location['action']); } if (isset($bm_location['keys'])) { foreach ($bm_location['keys'] as $key => $value) { $request->setKey($key, $value); } } $code .= $request->getURL(); $code .= "';"; return $code; }
/** * Prepares data for the View "Modules List". */ function getModulesList($groups = null) { global $application; $SelectedModules = modApiFunc("Checkout", "getSelectedModules", "shipping"); $pm_list = $this->getInstalledModulesListData($groups); $items = array(); $new_selected_module_sort_order = 0; foreach ($pm_list as $pm_item) { // create/use some mm function to convert class names. $name = _ml_strtolower($pm_item->name); $shipping_group = modApiFunc("Checkout", "getShippingModuleGroup", $pm_item); /* Don't show the "All Inactive" shipping module */ if ($shipping_group == "") { continue; } $pmInfo = modApiFunc($name, "getInfo"); if (!array_key_exists($pmInfo['GlobalUniqueShippingModuleID'], $SelectedModules)) { continue; } $this->_Current_Module = $pmInfo; $request = new Request(); $request->setView('CheckoutShippingModuleSettings'); $request->setAction("SetCurrentShippingModuleSettingsViewName"); $request->setKey("pm_viewclassname", $this->_Current_Module["PreferencesAZViewClassName"]); $request->setKey("sm_uid", $this->_Current_Module["GlobalUniqueShippingModuleID"]); $pmInfo['InfoLink'] = $request->getURL(); //product without small image or small image file is corrupted or absent. $this->_Current_Module['ShippingModuleStatusMessage'] = $pmInfo["StatusMessage"]; $this->_Current_Module['ShippingModuleName'] = prepareHTMLDisplay($pmInfo["Name"]); $this->_Current_Module['ShippingModuleID'] = $pmInfo["GlobalUniqueShippingModuleID"]; $filename_messages = str_replace('_', '-', $name) . "-messages"; $MessageResources =& $application->getInstance('MessageResources', $filename_messages, "AdminZone"); $description = $MessageResources->getMessage("MODULE_DESCR"); $this->_Current_Module['ShippingModuleDescription'] = $description; // $this->_Current_Module['ShippingModuleDescription'] = $pmInfo["Description"]; $this->_Current_Module['InfoLink'] = $pmInfo['InfoLink']; $application->registerAttributes($this->_Current_Module); //If sort id is not defined then assign the highest possible sort id to this item: 0, -1, -2 ... $sort_id = empty($SelectedModules[$pmInfo["GlobalUniqueShippingModuleID"]]["sort_order"]) ? $new_selected_module_sort_order-- : $SelectedModules[$pmInfo["GlobalUniqueShippingModuleID"]]["sort_order"]; $items[$sort_id] = modApiFunc('TmplFiller', 'fill', "checkout/shipping_modules_list/", "list_item.tpl.html", array()); } //Sort items by sort_id and implode them. ksort($items, SORT_NUMERIC); $value = implode("", $items); return $value; }
/** * */ function output() { global $application; $request = new Request(); $request->setView('AdminBackupInfo'); $request->setAction('UpdateBackupInfo'); $FormAction = $request->getURL(); $backup_name = modApiFunc("Tools", "getCurrentBackupFile"); $backup_dir = $application->getAppIni('PATH_BACKUP_DIR'); $backup_info = _parse_ini_file($backup_dir . $backup_name . "/info/backup.ini"); $log_file_content = @file_get_contents($backup_dir . $backup_name . "/info/backup.log"); // $txt_file_content = @file_get_contents($backup_dir.$backup_name."/info/backup.txt"); $template_contents = array('FormAction' => $FormAction, 'BackupName' => $backup_name, 'BackupSQLSize' => modApiFunc("Localization", "num_format", $backup_info['sql_file_size'] / 1024) . " Kb", 'BackupImgSize' => modApiFunc("Localization", "num_format", $backup_info['img_dir_size'] / 1024) . " Kb", 'BackupCreationDate' => modApiFunc("Localization", "timestamp_date_format", $backup_info['backup_start_time']), 'BackupCreationStartTime' => modApiFunc("Localization", "timestamp_time_format", $backup_info['backup_start_time']), 'BackupCreationFinishTime' => modApiFunc("Localization", "timestamp_time_format", $backup_info['backup_end_time']), 'History' => $log_file_content, 'Comments' => "", 'CommentsHash' => "", 'ResultMessage' => $this->outputResultMessage()); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', "tools/backup_info/", "container.tpl.html", array()); }
/** * Outputs the cart contents view. */ function output() { $cc = modApiFunc('Cart', 'getCartContent'); $unit_values = ''; $unit_id = ''; if (NULL == $cc) { $items = modApiFunc('TmplFiller', 'fill', "cart/cart_thumbnail/", "list_empty.tpl.html", array()); $retval = modApiFunc('TmplFiller', 'fill', "cart/cart_thumbnail/", "list.tpl.html", array('{ListItems}' => $items, '{ListFooter}' => '')); } else { $items = ""; $col = 1; $item_color = COLOR1_IN_CART_THUMBNAIL; foreach ($cc as $productInfo) { $request = new Request(); $request->setView('Catalog_ProdInfo'); $request->setAction('SetCurrentProduct'); $request->setKey('prod_id', $productInfo['{ID}']); $productInfo['{Info_Link}'] = $request->getURL(); $unit_values = $productInfo['attributes']['{Unit_Price}']['attr_unit_type_values']; $unit_id = $productInfo['attributes']['{Unit_Price}']['attr_unit_type_value']; $productInfo['{Item_Color}'] = $item_color; if (USE_TWO_COLORS_IN_CART_THUMBNAIL) { if ($item_color == COLOR1_IN_CART_THUMBNAIL) { $item_color = COLOR2_IN_CART_THUMBNAIL; } else { $item_color = COLOR1_IN_CART_THUMBNAIL; } } if ($col == 1) { $items .= '<tr><td>'; $col++; } else { $items .= '<td>'; $col++; } if ($col > COLS_IN_CART_THUMBNAIL) { $col = 1; } $items .= modApiFunc('TmplFiller', 'fill', "cart/cart_thumbnail/", "list_item.tpl.html", $productInfo); } $footer = modApiFunc('TmplFiller', 'fill', "cart/cart_thumbnail/", "list_footer.tpl.html", array('{SubTotal}' => modApiFunc('Cart', 'getCartSubtotal') . ' ' . $unit_values[$unit_id])); $retval = modApiFunc('TmplFiller', 'fill', "cart/cart_thumbnail/", "list.tpl.html", array('{ListItems}' => $items, '{ListFooter}' => $footer)); } return $retval; }
function getTag($tag) { global $application; $value = null; switch ($tag) { case 'Local_FormActionURL': $r = new Request(); $r->setView(CURRENT_REQUEST_URL); $r->setAction('FindUpdatedFileAction'); $value = $r->getURL(); break; case 'Local_FormSendMailActionURL': $r = new Request(); $r->setView(CURRENT_REQUEST_URL); $r->setAction('SendResultMailAction'); $value = $r->getURL(); break; case 'Local_ErrorMessage': $value = modApiFunc('SecureStore', 'CheckErrorMessage'); break; case 'Local_MailResultMessage': $value = modApiFunc('SecureStore', 'checkSessionForMailSendResultMessage'); if (modApiFunc('Session', 'is_set', 'MailSendResultMessage')) { modApiFunc('Session', 'set', 'MailSendResultMessage', ""); } break; case 'Local_CheckShellEnabled': $chk = modApiFunc('SecureStore', 'CheckShellEnabled'); if ($chk == 'Y') { $value = ""; } else { $value = getMsg('SS', 'SHELL_NOT_ENABLED'); } break; case 'Local_ModifiedResultOutput': $value = modApiFunc('SecureStore', 'checkSessionForModifiedFile'); break; case 'Local_NewlyAddedResultOutput': $value = modApiFunc('SecureStore', 'checkSessionForNewlyAddedFile'); break; default: break; } return $value; }
/** * */ function output() { global $application; $retval = ""; $request = new Request(); $request->setView('Index'); $request->setAction('UpdateLicenseKey'); $formAction = $request->getURL(); $_state = modApiFunc("License", "checkLicense"); $licenseInfo = modApiFunc("License", "getLicenseInfo", $_state); if ($licenseInfo === null || $_state === STATE_3) { return ''; } $this->_Template_Contents = array("FormAction" => $formAction, "Message" => $licenseInfo['license_message_home'], "ResultMessage" => $this->outputResultMessage()); if (!empty($this->_Template_Contents["Message"])) { $application->registerAttributes($this->_Template_Contents); $retval = modApiFunc('TmplFiller', 'fill', "license/license_mention/", "container.tpl.html", array()); } return $retval; }
/** * */ function output() { global $application; $request = new Request(); $request->setView('ProductTaxClassSettings'); $request->setAction('AddProdTaxClass'); $addAction = $request->getURL(); $request = new Request(); $request->setView('ProductTaxClassSettings'); $request->setAction('UpdateProdTaxClass'); $updateAction = $request->getURL(); $request = new Request(); $request->setView('ProductTaxClassSettings'); $request->setAction('DeleteProdTaxClass'); $request->setKey('ptc_id', ''); $deleteLink = $request->getURL(); $this->_Template_Contents = array('Items' => $this->outputClassesList(), 'AddAction' => $addAction, 'UpdateAction' => $updateAction, 'DeleteLink' => $deleteLink, 'AddProdTaxClassFromCatalog' => modApiFunc("Taxes", "getAddProdTaxClassFromCatalog")); $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', "taxes/prod-tax-class-settings/", "container.tpl.html", array()); }
/** * Returns the Catalog Category Info view. * * @ finish the functions on this page */ function output() { global $application; $obj =& $application->getInstance('MessageResources'); $CatID = modApiFunc('Catalog', 'getEditableCategoryID'); if ($CatID == NULL) { } else { $catInfo = new CCategoryInfo($CatID); $request = new Request(); $request->setView('EditCategory'); $request->setAction('SetEditableCategory'); $request->setKey('category_id', $CatID); $catInfo->setAdditionalCategoryTag('EditCatHref', $request->getURL()); $cat_status = ""; switch ($catInfo->getCategoryTagValue("Status")) { case CATEGORY_STATUS_ONLINE: $cat_status = getMsg('SYS', 'CAT_STATUS_ONLINE'); break; case CATEGORY_STATUS_OFFLINE: $cat_status = getMsg('SYS', 'CAT_STATUS_OFFLINE'); break; default: //: report error $cat_status = ""; } $this->_Current_Category = $catInfo; $this->_Current_Category->setAdditionalCategoryTag('ShowProductsRecursivelyStatus', $catInfo->getCategoryTagValue('showproductsrecursivelystatus', CATEGORYINFO_LOCALIZED_DATA)); $this->_Current_Category->setAdditionalCategoryTag('CategoryStatus', $catInfo->getCategoryTagValue('status', CATEGORYINFO_LOCALIZED_DATA)); $this->_Current_Category->setAdditionalCategoryTag('AttributeImageWidth', $catInfo->getCategoryTagValue('LargeImageWidth')); $this->_Current_Category->setAdditionalCategoryTag('AttributeImageHeight', $catInfo->getCategoryTagValue('LargeImageHeight')); $this->_Current_Category->setAdditionalCategoryTag('AttributeImageURL', $catInfo->getCategoryTagValue('LargeImageSrc')); $this->_Current_Category->setAdditionalCategoryTag('largeimage', $obj->getMessage(new ActionMessage('INFO_CTGR_NO_IMG'))); $application->registerAttributes($this->_Current_Category->getAdditionalCategoryTagList()); $application->registerAttributes(array('SmallImage')); if ($this->_Current_Category->getCategoryTagValue('largeimagesrc') != '') { $this->_Current_Category->setAdditionalCategoryTag('largeimage', modApiFunc('TmplFiller', 'fill', "catalog/view_cat/", "attr-large-image.tpl.html", array())); } $retval = modApiFunc('TmplFiller', 'fill', "catalog/view_cat/", "list.tpl.html", array()); } return $retval; }
function getTag($tag) { $value = null; global $application; switch ($tag) { case 'Local_FormActionURL': $r = new Request(); $r->setView(CURRENT_REQUEST_URL); $r->setAction('customer_sign_in'); $value = $r->getURL($application->getSectionProtocol('CustomerSignIn')); break; case 'Local_RememberMeOptionEnabled': if (modApiFunc('Settings', 'getParamValue', 'CUSTOMER_ACCOUNT_SETTINGS', 'ENABLE_SAVE_SESSION') === 'YES') { $value = "TRUE"; } else { $value = "FALSE"; } break; } return $value; }
/** * */ function output() { global $application; $MessageResources =& $application->getInstance('MessageResources'); if ($error = modApiFunc("Tools", "getRestoreError")) { modApiFunc("Tools", "unsetRestoreError"); modApiFunc("Tools", "saveState"); $template_contents = array('ErrorMsg' => $MessageResources->getMessage($error)); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', "tools/backup_restore/", "error.tpl.html", array()); } $request = new Request(); $request->setView('AdminRestoreProgress'); $request->setAction('CreateAutoBackup'); $request->setKey('AutoBackup', ''); $Backup_Start_Link = $request->getURL(); $template_contents = array('RestoreStartLink' => $Backup_Start_Link); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', "tools/backup_restore/", "container.tpl.html", array()); }
/** * */ function output() { global $application; $request = new Request(); $request->setView('AdminBackupProgress'); $request->setAction('BackupProgressAction'); $ProgressBarFormAction = $request->getURL(); $request = new Request(); $request->setView('AdminBackupProgress'); $request->setAction('BackupImagesProgressAction'); $ProgressBar2FormAction = $request->getURL(); $tables = modApiFunc("Tools", "getDBStat"); if (sizeof($tables)) { $ProgressBarWidth = floor(modApiFunc("Tools", "getDBRecordsExported") / $tables["Total_Records"] * 400); $DBBackup = "true"; } else { $ProgressBarWidth = 400; $DBBackup = "false"; } $ProgressBarWidth2 = 0; if ($DBBackup == "false") { if (!(($count = modApiFunc("Tools", "getCopiedImageFilesCount")) === NULL)) { $total_files_count = modApiFunc("Tools", "getImageFilesCount"); if ($count == "no") { $ProgressBarWidth2 = 0; } else { $ProgressBarWidth2 = floor($count / $total_files_count * 400); } } else { $ProgressBarWidth2 = 400; } } $template_contents = array('DBBackup' => $DBBackup, 'ProgressBarFormAction' => $ProgressBarFormAction, 'ProgressBarWidth' => $ProgressBarWidth, 'ProgressBar2FormAction' => $ProgressBar2FormAction, 'ProgressBarWidth2' => $ProgressBarWidth2); $this->_Template_Contents = $template_contents; $application->registerAttributes($this->_Template_Contents); return modApiFunc('TmplFiller', 'fill', "tools/backup_progress/", "container.tpl.html", array()); }