/**
  * Parse Settings E-mail templates section
  */
 function emailTemplates()
 {
     global $_CORELANG, $_ARRAYLANG, $objDatabase;
     $this->_objTpl->addBlockfile('NEWSLETTER_SETTINGS_FILE', 'settings_block', 'newsletter_config_email_templates.html');
     $this->_objTpl->setVariable('TXT_TITLE', $_ARRAYLANG['TXT_NEWSLETTER_EMAIL_TEMPLATES']);
     $_REQUEST['active_tab'] = 1;
     if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'mailtemplate_edit') {
         $_REQUEST['active_tab'] = 2;
     }
     \Cx\Core\MailTemplate\Controller\MailTemplate::deleteTemplate('Newsletter');
     // If there is anything to be stored, and if that fails, return to
     // the edit view in order to save the posted form content
     $resultStore = \Cx\Core\MailTemplate\Controller\MailTemplate::storeFromPost('Newsletter');
     if ($resultStore === false) {
         $_REQUEST['active_tab'] = 2;
     }
     $objTemplate = null;
     \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, $_CORELANG['TXT_CORE_MAILTEMPLATES'], \Cx\Core\MailTemplate\Controller\MailTemplate::overview('Newsletter', 'config')->get());
     \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, empty($_REQUEST['key']) ? $_CORELANG['TXT_CORE_MAILTEMPLATE_ADD'] : $_CORELANG['TXT_CORE_MAILTEMPLATE_EDIT'], \Cx\Core\MailTemplate\Controller\MailTemplate::edit('Newsletter')->get());
     \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, $_ARRAYLANG['TXT_NEWSLETTER_PLACEHOLDERS'], $this->getNewsletterPlaceHoldersList());
     $this->_objTpl->setVariable(array('NEWSLETTER_MAIL_TEMPLATE_SETTINGS' => $objTemplate->get(), 'TXT_NEWSLETTER_EMAIL_TEMPLATES' => $_ARRAYLANG['TXT_NEWSLETTER_EMAIL_TEMPLATES']));
 }
Ejemplo n.º 2
0
 /**
  * Set the cms system settings
  * @global  ADONewConnection
  * @global  array   Core language
  * @global  \Cx\Core\Html\Sigma
  */
 function showSettings()
 {
     global $objTemplate, $_ARRAYLANG;
     $template = new \Cx\Core\Html\Sigma();
     $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_system', 'settings.html');
     $templateObj = new \Cx\Core\Html\Sigma(ASCMS_CORE_PATH . '/Config/View/Template/Backend');
     $templateObj->loadTemplateFile('development_tools.html');
     $templateObj->setVariable(array('TXT_TITLE_SET5' => $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'], 'TXT_DEBUGGING_STATUS' => $_ARRAYLANG['TXT_DEBUGGING_STATUS'], 'TXT_DEBUGGING_FLAGS' => $_ARRAYLANG['TXT_DEBUGGING_FLAGS'], 'TXT_SETTINGS_DEBUGGING_FLAG_LOG' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG'], 'TXT_SETTINGS_DEBUGGING_FLAG_PHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_PHP'], 'TXT_SETTINGS_DEBUGGING_FLAG_DB' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB'], 'TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE'], 'TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE'], 'TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR'], 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE'], 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP'], 'TXT_DEBUGGING_EXPLANATION' => $_ARRAYLANG['TXT_DEBUGGING_EXPLANATION'], 'TXT_SAVE_CHANGES' => $_ARRAYLANG['TXT_SAVE'], 'TXT_RADIO_ON' => $_ARRAYLANG['TXT_ACTIVATED'], 'TXT_RADIO_OFF' => $_ARRAYLANG['TXT_DEACTIVATED']));
     if (in_array('SystemInfo', \Env::get('cx')->getLicense()->getLegalComponentsList())) {
         if (isset($_POST['debugging'])) {
             $this->updateDebugSettings($_POST['debugging']);
         }
         $this->setDebuggingVariables($templateObj);
     }
     \Cx\Core\Setting\Controller\Setting::init('Config', null, 'Yaml', null, \Cx\Core\Setting\Controller\Setting::REPOPULATE);
     \Cx\Core\Setting\Controller\Setting::storeFromPost();
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'site');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_SITE'], $_ARRAYLANG['TXT_CORE_CONFIG_SITE'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'contactInformation');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'], $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'administrationArea');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'security');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'], $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     if (in_array('SystemInfo', \Env::get('cx')->getLicense()->getLegalComponentsList())) {
         \Cx\Core\Setting\Controller\Setting::show_external($template, $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'], $templateObj->get());
     }
     \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'otherConfigurations');
     \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'], $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'], 'TXT_CORE_CONFIG_', !$this->isWritable());
     // show also hidden settins
     if (in_array('SystemInfo', \Env::get('cx')->getLicense()->getLegalComponentsList()) && \Permission::hasAllAccess() && isset($_GET['all'])) {
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'core');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'CORE', 'CORE', 'TXT_CORE_CONFIG_', true);
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'release');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'RELEASE', 'RELEASE', 'TXT_CORE_CONFIG_', true);
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'component');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'COMPONENT', 'COMPONENT', 'TXT_CORE_CONFIG_', !$this->isWritable());
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'license');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'LICENSE', 'LICENSE', 'TXT_CORE_CONFIG_', true);
         \Cx\Core\Setting\Controller\Setting::setEngineType('Config', 'Yaml', 'cache');
         \Cx\Core\Setting\Controller\Setting::show($template, 'index.php?cmd=Config', 'CACHE', 'CACHE', 'TXT_CORE_CONFIG_', true);
     }
     $this->checkFtpAccess();
     $objTemplate->setVariable('SETTINGS_TABLE', $template->get());
     $objTemplate->parse('settings_system');
 }
Ejemplo n.º 3
0
 /**
  * Sets up the Country settings page
  * @return  string          The page content
  */
 static function settings()
 {
     global $_CORELANG;
     $objTemplateCountry = new \Cx\Core\Html\Sigma(\Env::get('cx')->getCodeBaseCorePath() . '/Country/View/Template/Generic');
     $objTemplateCountry->loadTemplateFile('Overview.html');
     // Adds messages
     self::storeSettings();
     self::storeFromPost();
     $uri = \Html::getRelativeUri();
     // Let all links in this tab point here again
     \Html::replaceUriParameter($uri, 'active_tab=' . \Cx\Core\Setting\Controller\Setting::tab_index());
     // Create a copy of the URI for the Paging, as this is passed by
     // reference and modified
     $uri_paging = $uri;
     //DBG::log("URI: $uri");
     $objSorting = new Sorting($uri, array('id' => $_CORELANG['TXT_CORE_COUNTRY_ID'], 'active' => $_CORELANG['TXT_CORE_COUNTRY_ACTIVE'], 'ord' => $_CORELANG['TXT_CORE_COUNTRY_ORD'], 'name' => $_CORELANG['TXT_CORE_COUNTRY_NAME'], 'alpha2' => $_CORELANG['TXT_CORE_COUNTRY_ISO2'], 'alpha3' => $_CORELANG['TXT_CORE_COUNTRY_ISO3']), true, 'order_country');
     \Cx\Core\Setting\Controller\Setting::init('core', 'country');
     $limit = \Cx\Core\Setting\Controller\Setting::getValue('numof_countries_per_page_backend', 'core');
     $count = 0;
     $arrCountries = self::getArray($count, null, $limit, \Paging::getPosition(), $objSorting->getOrder());
     if ($arrCountries === false) {
         return \Message::error($_CORELANG['TXT_CORE_COUNTRY_ERROR_INITIALIZING']);
     }
     $objTemplateCountry->setGlobalVariable($_CORELANG + array('CORE_COUNTRY' => $_CORELANG['TXT_CORE_COUNTRY'] . ' ' . sprintf($_CORELANG['TXT_CORE_TOTAL'], $count), 'HEAD_SETTINGS_COUNTRY_ID' => $objSorting->getHeaderForField('id'), 'HEAD_SETTINGS_COUNTRY_ACTIVE' => $objSorting->getHeaderForField('active'), 'HEAD_SETTINGS_COUNTRY_ORD' => $objSorting->getHeaderForField('ord'), 'HEAD_SETTINGS_COUNTRY_NAME' => $objSorting->getHeaderForField('name'), 'HEAD_SETTINGS_COUNTRY_ISO2' => $objSorting->getHeaderForField('alpha2'), 'HEAD_SETTINGS_COUNTRY_ISO3' => $objSorting->getHeaderForField('alpha3'), 'CORE_SETTING_TAB_INDEX' => \Cx\Core\Setting\Controller\Setting::tab_index(), 'SETTINGS_COUNTRY_PAGING' => \Paging::get($uri_paging, '', $count, $limit, true)));
     // Note:  Optionally disable the block 'settings_country_submit'
     // to disable storing changes
     $i = 0;
     foreach ($arrCountries as $country_id => $arrCountry) {
         $objTemplateCountry->setVariable(array('SETTINGS_COUNTRY_ROWCLASS' => ++$i % 2 + 1, 'SETTINGS_COUNTRY_ID' => $country_id, 'SETTINGS_COUNTRY_ACTIVE' => $arrCountry['active'] ? \Html::ATTRIBUTE_CHECKED : '', 'SETTINGS_COUNTRY_ORD' => $arrCountry['ord'], 'SETTINGS_COUNTRY_NAME' => $arrCountry['name'], 'SETTINGS_COUNTRY_ISO2' => $arrCountry['alpha2'], 'SETTINGS_COUNTRY_ISO3' => $arrCountry['alpha3'], 'SETTINGS_FUNCTIONS' => \Html::getBackendFunctions(array('delete' => 'delete_country_id=' . $country_id), array('delete' => $_CORELANG['TXT_CORE_COUNTRY_CONFIRM_DELETE'] . "\\n" . $_CORELANG['TXT_ACTION_IS_IRREVERSIBLE']))));
         $objTemplateCountry->parse('settings_country_row');
     }
     $objTemplateSetting = null;
     \Cx\Core\Setting\Controller\Setting::show_external($objTemplateSetting, $_CORELANG['TXT_CORE_COUNTRY_EDIT'], $objTemplateCountry->get());
     \Cx\Core\Setting\Controller\Setting::show($objTemplateSetting, $uri, $_CORELANG['TXT_CORE_COUNTRY_SETTINGS'], $_CORELANG['TXT_CORE_COUNTRY_SETTINGS']);
     return $objTemplateSetting->get();
 }
Ejemplo n.º 4
0
 /**
  * settings for mail tempalte design
  *
  * @global <type> $objDatabase
  * @global <type> $_ARRAYLANG
  * @return true
  */
 function mailTemplates()
 {
     global $_CORELANG, $_ARRAYLANG;
     $_REQUEST['active_tab'] = 1;
     if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'mailtemplate_edit') {
         $_REQUEST['active_tab'] = 2;
     }
     \Cx\Core\MailTemplate\Controller\MailTemplate::deleteTemplate('Crm');
     // If there is anything to be stored, and if that fails, return to
     // the edit view in order to save the posted form content
     $result_store = \Cx\Core\MailTemplate\Controller\MailTemplate::storeFromPost('Crm');
     if ($result_store === false) {
         $_REQUEST['active_tab'] = 2;
     }
     $objTemplate = null;
     $result &= \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, $_CORELANG['TXT_CORE_MAILTEMPLATES'], \Cx\Core\MailTemplate\Controller\MailTemplate::overview('Crm', 'config', \Cx\Core\Setting\Controller\Setting::getValue('numof_mailtemplate_per_page_backend', 'Crm'))->get());
     $result &= \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, empty($_REQUEST['key']) ? $_CORELANG['TXT_CORE_MAILTEMPLATE_ADD'] : $_CORELANG['TXT_CORE_MAILTEMPLATE_EDIT'], \Cx\Core\MailTemplate\Controller\MailTemplate::edit('Crm')->get());
     $result &= \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, $_ARRAYLANG['TXT_CRM_PLACEHOLDERS'], $this->getCrmModulePlaceHolders());
     $this->_objTpl->addBlock('CRM_MAIL_SETTINGS_FILE', 'settings_block', $objTemplate->get());
     $this->_objTpl->touchBlock('settings_block');
 }
Ejemplo n.º 5
0
 /**
  * The mailtemplate settings view
  *
  * Stores MailTemplates posted from the {@see MailTemplate::edit()} view.
  * Deletes a MailTemplate on request from the
  * {@see MailTemplate::overview()} view.
  * Includes both the overview and the edit view, activates one depending
  * on the outcome of the call to {@see MailTemplate::storeFromPost()}
  * or the current active_tab.
  * @return  boolean               True on success, false otherwise
  */
 static function view_settings_mail()
 {
     global $_CORELANG;
     // TODO: TEMPORARY.  Remove when a proper update is available.
     $template = \Cx\Core\MailTemplate\Controller\MailTemplate::get('Shop', 'order_confirmation');
     //die(var_export($template, true));
     if (!$template) {
         ShopMail::errorHandler();
     }
     $result = true;
     $_REQUEST['active_tab'] = 1;
     if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'mailtemplate_edit') {
         $_REQUEST['active_tab'] = 2;
     }
     \Cx\Core\MailTemplate\Controller\MailTemplate::deleteTemplate('Shop');
     // If there is anything to be stored, and if that fails, return to
     // the edit view in order to save the posted form content
     $result_store = \Cx\Core\MailTemplate\Controller\MailTemplate::storeFromPost('Shop');
     if ($result_store === false) {
         $_REQUEST['active_tab'] = 2;
     }
     $objTemplate = null;
     $result &= \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, $_CORELANG['TXT_CORE_MAILTEMPLATES'], \Cx\Core\MailTemplate\Controller\MailTemplate::overview('Shop', 'config', \Cx\Core\Setting\Controller\Setting::getValue('numof_mailtemplate_per_page_backend', 'Shop'))->get());
     $result &= \Cx\Core\Setting\Controller\Setting::show_external($objTemplate, empty($_REQUEST['key']) ? $_CORELANG['TXT_CORE_MAILTEMPLATE_ADD'] : $_CORELANG['TXT_CORE_MAILTEMPLATE_EDIT'], \Cx\Core\MailTemplate\Controller\MailTemplate::edit('Shop')->get());
     self::$objTemplate->addBlock('SHOP_SETTINGS_FILE', 'settings_block', $objTemplate->get());
     self::$objTemplate->touchBlock('settings_block');
     return $result;
 }