예제 #1
0
파일: module.php 프로젝트: phpsa/CoreCMS
 public function delete()
 {
     $this->load->language('extension/module');
     $this->document->setTitle($this->language->get('heading_title'));
     $this->load->model('extension/extension');
     $this->load->model('extension/module');
     if (isset($this->request->get['module_id']) && $this->validateDelete()) {
         $this->model_extension_module->deleteModule($this->request->get['module_id']);
         $this->session->data['success'] = $this->language->get('text_success');
         $this->redirect(fixajaxurl($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')));
     }
     $this->getList();
 }
예제 #2
0
파일: html.php 프로젝트: phpsa/CoreCMS
 public function index()
 {
     $this->load->language('module/html');
     $this->document->setTitle($this->language->get('heading_title'));
     $this->load->model('extension/module');
     if ($this->request->server['REQUEST_METHOD'] == 'POST' && $this->validate()) {
         if (!isset($this->request->get['module_id'])) {
             $this->model_extension_module->addModule('html', $this->request->post);
         } else {
             $this->model_extension_module->editModule($this->request->get['module_id'], $this->request->post);
         }
         $this->session->data['success'] = $this->language->get('text_success');
         $this->response->redirect(fixajaxurl($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL')));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_edit'] = $this->language->get('text_edit');
     $data['text_enabled'] = $this->language->get('text_enabled');
     $data['text_disabled'] = $this->language->get('text_disabled');
     $data['entry_name'] = $this->language->get('entry_name');
     $data['entry_title'] = $this->language->get('entry_title');
     $data['entry_description'] = $this->language->get('entry_description');
     $data['entry_status'] = $this->language->get('entry_status');
     $data['button_save'] = $this->language->get('button_save');
     $data['button_cancel'] = $this->language->get('button_cancel');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->error['name'])) {
         $data['error_name'] = $this->error['name'];
     } else {
         $data['error_name'] = '';
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_module'), 'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));
     if (!isset($this->request->get['module_id'])) {
         $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('module/html', 'token=' . $this->session->data['token'], 'SSL'));
     } else {
         $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('module/html', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL'));
     }
     if (!isset($this->request->get['module_id'])) {
         $data['action'] = $this->url->link('module/html', 'token=' . $this->session->data['token'], 'SSL');
     } else {
         $data['action'] = $this->url->link('module/html', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL');
     }
     $data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL');
     if (isset($this->request->get['module_id']) && $this->request->server['REQUEST_METHOD'] != 'POST') {
         $module_info = $this->model_extension_module->getModule($this->request->get['module_id']);
     }
     if (isset($this->request->post['name'])) {
         $data['name'] = $this->request->post['name'];
     } elseif (!empty($module_info)) {
         $data['name'] = $module_info['name'];
     } else {
         $data['name'] = '';
     }
     if (isset($this->request->post['title'])) {
         $data['title'] = $this->request->post['name'];
     } elseif (!empty($module_info)) {
         $data['title'] = $module_info['title'];
     } else {
         $data['title'] = '';
     }
     if (isset($this->request->post['module_description'])) {
         $data['module_description'] = $this->request->post['module_description'];
     } elseif (!empty($module_info)) {
         $data['module_description'] = $module_info['module_description'];
     } else {
         $data['module_description'] = '';
     }
     if (isset($this->request->post['status'])) {
         $data['status'] = $this->request->post['status'];
     } elseif (!empty($module_info)) {
         $data['status'] = $module_info['status'];
     } else {
         $data['status'] = '';
     }
     init_wysiwyg();
     $this->data = $data;
     $this->template = 'module/html.phtml';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
     //$this->response->setOutput($this->load->view('module/html.tpl', $data));
 }
예제 #3
0
파일: setting.php 프로젝트: phpsa/CoreCMS
 public function index()
 {
     $this->load->language('setting/setting');
     $this->document->setTitle($this->language->get('heading_title'));
     $this->load->model('setting/setting');
     if ($this->request->server['REQUEST_METHOD'] == 'POST' && $this->validate()) {
         if ($this->config->get('config_currency_auto')) {
             $this->load->model('localisation/currency');
             $this->model_localisation_currency->refresh();
         }
         $this->model_setting_setting->editSetting('config', $this->request->post);
         $this->event->trigger('admin.settings.save');
         $this->session->data['success'] = $this->language->get('text_success');
         $this->response->redirect(fixajaxurl($this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL')));
     }
     $data['heading_title'] = $this->language->get('heading_title');
     $data['text_edit'] = $this->language->get('text_edit');
     $data['text_enabled'] = $this->language->get('text_enabled');
     $data['text_disabled'] = $this->language->get('text_disabled');
     $data['text_select'] = $this->language->get('text_select');
     $data['text_none'] = $this->language->get('text_none');
     $data['text_yes'] = $this->language->get('text_yes');
     $data['text_no'] = $this->language->get('text_no');
     $data['tab_general'] = $this->language->get('tab_general');
     $data['tab_server'] = $this->language->get('tab_server');
     $data['tab_google'] = $this->language->get('tab_google');
     $data['entry_name'] = $this->language->get('entry_name');
     $data['entry_email'] = $this->language->get('entry_email');
     $data['entry_meta_title'] = $this->language->get('entry_meta_title');
     $data['entry_meta_description'] = $this->language->get('entry_meta_description');
     $data['entry_meta_keyword'] = $this->language->get('entry_meta_keyword');
     $data['entry_layout'] = $this->language->get('entry_layout');
     $data['entry_template'] = $this->language->get('entry_template');
     $data['text_mail'] = $this->language->get('text_mail');
     $data['text_smtp'] = $this->language->get('text_smtp');
     $data['text_google_analytics'] = $this->language->get('text_google_analytics');
     $data['text_google_captcha'] = $this->language->get('text_google_captcha');
     $data['entry_limit_admin'] = $this->language->get('entry_limit_admin');
     $data['entry_logo'] = $this->language->get('entry_logo');
     $data['entry_icon'] = $this->language->get('entry_icon');
     $data['entry_mail_protocol'] = $this->language->get('entry_mail_protocol');
     $data['entry_mail_parameter'] = $this->language->get('entry_mail_parameter');
     $data['entry_mail_smtp_hostname'] = $this->language->get('entry_mail_smtp_hostname');
     $data['entry_mail_smtp_username'] = $this->language->get('entry_mail_smtp_username');
     $data['entry_mail_smtp_password'] = $this->language->get('entry_mail_smtp_password');
     $data['entry_mail_smtp_port'] = $this->language->get('entry_mail_smtp_port');
     $data['entry_mail_smtp_timeout'] = $this->language->get('entry_mail_smtp_timeout');
     $data['entry_mail_alert'] = $this->language->get('entry_mail_alert');
     $data['entry_maintenance'] = $this->language->get('entry_maintenance');
     $data['entry_secure'] = $this->language->get('entry_secure');
     $data['entry_encryption'] = $this->language->get('entry_encryption');
     $data['entry_compression'] = $this->language->get('entry_compression');
     $data['entry_error_display'] = $this->language->get('entry_error_display');
     $data['entry_error_log'] = $this->language->get('entry_error_log');
     $data['entry_google_analytics'] = $this->language->get('entry_google_analytics');
     $data['entry_google_captcha_public'] = $this->language->get('entry_google_captcha_public');
     $data['entry_google_captcha_secret'] = $this->language->get('entry_google_captcha_secret');
     $data['entry_status'] = $this->language->get('entry_status');
     $data['help_limit_admin'] = $this->language->get('help_limit_admin');
     $data['help_icon'] = $this->language->get('help_icon');
     $data['help_mail_protocol'] = $this->language->get('help_mail_protocol');
     $data['help_mail_parameter'] = $this->language->get('help_mail_parameter');
     $data['help_mail_smtp_hostname'] = $this->language->get('help_mail_smtp_hostname');
     $data['help_mail_alert'] = $this->language->get('help_mail_alert');
     $data['help_secure'] = $this->language->get('help_secure');
     $data['entry_currency'] = $this->language->get('entry_currency');
     $data['help_currency'] = $this->language->get('help_currency');
     $data['entry_currency_auto'] = $this->language->get('entry_currency_auto');
     $data['help_currency_auto'] = $this->language->get('help_currency_auto');
     $data['entry_robots'] = $this->language->get('entry_robots');
     $data['help_maintenance'] = $this->language->get('help_maintenance');
     $data['help_encryption'] = $this->language->get('help_encryption');
     $data['help_compression'] = $this->language->get('help_compression');
     $data['help_google_analytics'] = $this->language->get('help_google_analytics');
     $data['help_google_captcha'] = $this->language->get('help_google_captcha');
     $data['help_file_max_size'] = $this->language->get('help_file_max_size');
     $data['help_file_ext_allowed'] = $this->language->get('help_file_ext_allowed');
     $data['help_file_mime_allowed'] = $this->language->get('help_file_mime_allowed');
     $data['entry_file_max_size'] = $this->language->get('entry_file_max_size');
     $data['entry_file_ext_allowed'] = $this->language->get('entry_file_ext_allowed');
     $data['entry_file_mime_allowed'] = $this->language->get('entry_file_mime_allowed');
     $data['entry_ftp_hostname'] = $this->language->get('entry_ftp_hostname');
     $data['entry_ftp_port'] = $this->language->get('entry_ftp_port');
     $data['entry_ftp_username'] = $this->language->get('entry_ftp_username');
     $data['entry_ftp_password'] = $this->language->get('entry_ftp_password');
     $data['entry_ftp_root'] = $this->language->get('entry_ftp_root');
     $data['entry_ftp_status'] = $this->language->get('entry_ftp_status');
     $data['help_ftp_root'] = $this->language->get('help_ftp_root');
     $data['tab_ftp'] = $this->language->get('tab_ftp');
     $data['entry_country'] = $this->language->get('entry_country');
     $data['entry_width'] = $this->language->get('entry_width');
     $data['entry_height'] = $this->language->get('entry_height');
     $data['text_autosave'] = $this->language->get('text_autosave');
     $data['help_autosave'] = $this->language->get('help_autosave');
     $data['entry_autosave'] = $this->language->get('entry_autosave');
     $data['help_autosave_time'] = $this->language->get('help_autosave_time');
     $data['entry_autosave_time'] = $this->language->get('entry_autosave_time');
     if (isset($this->error['warning'])) {
         $data['error_warning'] = $this->error['warning'];
     } else {
         $data['error_warning'] = '';
     }
     if (isset($this->error['name'])) {
         $data['error_name'] = $this->error['name'];
     } else {
         $data['error_name'] = '';
     }
     if (isset($this->error['email'])) {
         $data['error_email'] = $this->error['email'];
     } else {
         $data['error_email'] = '';
     }
     if (isset($this->error['meta_title'])) {
         $data['error_meta_title'] = $this->error['meta_title'];
     } else {
         $data['error_meta_title'] = '';
     }
     if (isset($this->error['limit_admin'])) {
         $data['error_limit_admin'] = $this->error['limit_admin'];
     } else {
         $data['error_limit_admin'] = '';
     }
     if (isset($this->error['encryption'])) {
         $data['error_encryption'] = $this->error['encryption'];
     } else {
         $data['error_encryption'] = '';
     }
     if (isset($this->error['ftp_hostname'])) {
         $data['error_ftp_hostname'] = $this->error['ftp_hostname'];
     } else {
         $data['error_ftp_hostname'] = '';
     }
     if (isset($this->error['ftp_port'])) {
         $data['error_ftp_port'] = $this->error['ftp_port'];
     } else {
         $data['error_ftp_port'] = '';
     }
     if (isset($this->error['ftp_username'])) {
         $data['error_ftp_username'] = $this->error['ftp_username'];
     } else {
         $data['error_ftp_username'] = '';
     }
     if (isset($this->error['ftp_password'])) {
         $data['error_ftp_password'] = $this->error['ftp_password'];
     } else {
         $data['error_ftp_password'] = '';
     }
     if (isset($this->error['product_limit'])) {
         $data['error_product_limit'] = $this->error['product_limit'];
     } else {
         $data['error_product_limit'] = '';
     }
     if (isset($this->error['blog_limit'])) {
         $data['error_blog_limit'] = $this->error['blog_limit'];
     } else {
         $data['error_blog_limit'] = '';
     }
     if (isset($this->error['image_thumb'])) {
         $data['error_image_thumb'] = $this->error['image_thumb'];
     } else {
         $data['error_image_thumb'] = '';
     }
     if (isset($this->error['image_popup'])) {
         $data['error_image_popup'] = $this->error['image_popup'];
     } else {
         $data['error_image_popup'] = '';
     }
     if (isset($this->error['image_blogcat'])) {
         $data['error_image_blogcat'] = $this->error['image_blogcat'];
     } else {
         $data['error_image_blogcat'] = '';
     }
     if (isset($this->error['customer_group_display'])) {
         $data['error_customer_group_display'] = $this->error['customer_group_display'];
     } else {
         $data['error_customer_group_display'] = '';
     }
     if (isset($this->error['login_attempts'])) {
         $data['error_login_attempts'] = $this->error['login_attempts'];
     } else {
         $data['error_login_attempts'] = '';
     }
     if (isset($this->error['product_limit'])) {
         $data['error_product_limit'] = $this->error['product_limit'];
     } else {
         $data['error_product_limit'] = '';
     }
     if (isset($this->error['blog_limit'])) {
         $data['error_blog_limit'] = $this->error['blog_limit'];
     } else {
         $data['error_blog_limit'] = '';
     }
     if (isset($this->error['image_thumb'])) {
         $data['error_image_thumb'] = $this->error['image_thumb'];
     } else {
         $data['error_image_thumb'] = '';
     }
     if (isset($this->error['image_popup'])) {
         $data['error_image_popup'] = $this->error['image_popup'];
     } else {
         $data['error_image_popup'] = '';
     }
     if (isset($this->error['image_blogcat'])) {
         $data['error_image_blogcat'] = $this->error['image_blogcat'];
     } else {
         $data['error_image_blogcat'] = '';
     }
     if (isset($this->error['customer_group_display'])) {
         $data['error_customer_group_display'] = $this->error['customer_group_display'];
     } else {
         $data['error_customer_group_display'] = '';
     }
     if (isset($this->error['login_attempts'])) {
         $data['error_login_attempts'] = $this->error['login_attempts'];
     } else {
         $data['error_login_attempts'] = '';
     }
     if (isset($this->error['autosave_time'])) {
         $data['error_autosave_time'] = $this->error['autosave_time'];
     } else {
         $data['error_autosave_time'] = '';
     }
     //error_autosave_time
     if (isset($this->request->post['config_file_max_size'])) {
         $data['config_file_max_size'] = $this->request->post['config_file_max_size'];
     } elseif ($this->config->get('config_file_max_size')) {
         $data['config_file_max_size'] = $this->config->get('config_file_max_size');
     } else {
         $data['config_file_max_size'] = 300000;
     }
     if (isset($this->request->post['config_file_ext_allowed'])) {
         $data['config_file_ext_allowed'] = $this->request->post['config_file_ext_allowed'];
     } else {
         $data['config_file_ext_allowed'] = $this->config->get('config_file_ext_allowed');
     }
     if (isset($this->request->post['config_file_mime_allowed'])) {
         $data['config_file_mime_allowed'] = $this->request->post['config_file_mime_allowed'];
     } else {
         $data['config_file_mime_allowed'] = $this->config->get('config_file_mime_allowed');
     }
     $data['breadcrumbs'] = array();
     $data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL'));
     $data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL'));
     if (isset($this->session->data['success'])) {
         $data['success'] = $this->session->data['success'];
         unset($this->session->data['success']);
     } else {
         $data['success'] = '';
     }
     $data['action'] = $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL');
     $data['token'] = $this->session->data['token'];
     foreach ($this->config->keys() as $cfgk) {
         if (isset($this->request->post[$cfgk])) {
             $data[$cfgk] = $this->request->post[$cfgk];
         } else {
             $data[$cfgk] = $this->config->get($cfgk);
         }
     }
     $this->load->model('design/layout');
     $data['layouts'] = $this->model_design_layout->getLayouts();
     $data['templates'] = array();
     $directories = glob(DIR_ROOT . 'view/template/*', GLOB_ONLYDIR);
     foreach ($directories as $directory) {
         $data['templates'][] = basename($directory);
     }
     $this->load->model('tool/image');
     if (isset($this->request->post['config_logo']) && is_file(DIR_IMAGE . $this->request->post['config_logo'])) {
         $data['logo'] = $this->model_tool_image->resize($this->request->post['config_logo'], 100, 100);
     } elseif ($this->config->get('config_logo') && is_file(DIR_IMAGE . $this->config->get('config_logo'))) {
         $data['logo'] = $this->model_tool_image->resize($this->config->get('config_logo'), 100, 100);
     } else {
         $data['logo'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
     }
     if (isset($this->request->post['config_icon']) && is_file(DIR_IMAGE . $this->request->post['config_icon'])) {
         $data['icon'] = $this->model_tool_image->resize($this->request->post['config_logo'], 100, 100);
     } elseif ($this->config->get('config_icon') && is_file(DIR_IMAGE . $this->config->get('config_icon'))) {
         $data['icon'] = $this->model_tool_image->resize($this->config->get('config_icon'), 100, 100);
     } else {
         $data['icon'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
     }
     if (isset($this->request->post['config_country_id'])) {
         $data['config_country_id'] = $this->request->post['config_country_id'];
     } else {
         $data['config_country_id'] = $this->config->get('config_country_id');
     }
     if (isset($this->request->post['config_facebook_ogimage']) && is_file(DIR_IMAGE . $this->request->post['config_facebook_ogimage'])) {
         $data['config_facebook_ogimage'] = $this->model_tool_image->resize($this->request->post['config_facebook_ogimage'], 100, 100);
     } elseif ($this->config->get('config_logo') && is_file(DIR_IMAGE . $this->config->get('config_facebook_ogimage'))) {
         $data['config_facebook_ogimage'] = $this->model_tool_image->resize($this->config->get('config_facebook_ogimage'), 100, 100);
     } else {
         $data['config_facebook_ogimage'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
     }
     $this->load->model('localisation/country');
     $data['countries'] = $this->model_localisation_country->getCountries();
     if (isset($this->request->post['config_currency'])) {
         $data['config_currency'] = $this->request->post['config_currency'];
     } else {
         $data['config_currency'] = $this->config->get('config_currency');
     }
     $this->load->model('localisation/currency');
     $data['currencies'] = $this->model_localisation_currency->getCurrencies();
     if (isset($this->request->post['config_currency_auto'])) {
         $data['config_currency_auto'] = $this->request->post['config_currency_auto'];
     } else {
         $data['config_currency_auto'] = $this->config->get('config_currency_auto');
     }
     if (isset($this->request->post['config_mail_smtp_port'])) {
         $data['config_mail_smtp_port'] = $this->request->post['config_mail_smtp_port'];
     } elseif ($this->config->has('config_mail_smtp_port')) {
         $data['config_mail_smtp_port'] = $this->config->get('config_mail_smtp_port');
     } else {
         $data['config_mail_smtp_port'] = 25;
     }
     if (isset($this->request->post['config_mandrill_key'])) {
         $data['config_mandrill_key'] = $this->request->post['config_mandrill_key'];
     } elseif ($this->config->has('config_mandrill_key')) {
         $data['config_mandrill_key'] = $this->config->get('config_mandrill_key');
     } else {
         $data['config_mandrill_key'] = '';
     }
     //config_mandrill_key
     if (isset($this->request->post['config_mail_smtp_timeout'])) {
         $data['config_mail_smtp_timeout'] = $this->request->post['config_mail_smtp_timeout'];
     } elseif ($this->config->has('config_mail_smtp_timeout')) {
         $data['config_mail_smtp_timeout'] = $this->config->get('config_mail_smtp_timeout');
     } else {
         $data['config_mail_smtp_timeout'] = 5;
     }
     if (isset($this->request->post['config_ftp_hostname'])) {
         $data['config_ftp_hostname'] = $this->request->post['config_ftp_hostname'];
     } elseif ($this->config->get('config_ftp_hostname')) {
         $data['config_ftp_hostname'] = $this->config->get('config_ftp_hostname');
     } else {
         $data['config_ftp_hostname'] = str_replace('www.', '', $this->request->server['HTTP_HOST']);
     }
     if (isset($this->request->post['config_ftp_port'])) {
         $data['config_ftp_port'] = $this->request->post['config_ftp_port'];
     } elseif ($this->config->get('config_ftp_port')) {
         $data['config_ftp_port'] = $this->config->get('config_ftp_port');
     } else {
         $data['config_ftp_port'] = 21;
     }
     if (isset($this->request->post['config_autosave_status'])) {
         $data['config_autosave_status'] = (int) $this->request->post['config_autosave_status'];
     } elseif ($this->config->get('config_autosave_status')) {
         $data['config_autosave_status'] = $this->config->get('config_autosave_status');
     } else {
         $data['config_autosave_status'] = '0';
     }
     if (isset($this->request->post['config_autosave_time'])) {
         $data['config_autosave_time'] = (int) $this->request->post['config_autosave_time'];
     } elseif ($this->config->get('config_autosave_time')) {
         $data['config_autosave_time'] = $this->config->get('config_autosave_time');
     } else {
         $data['config_autosave_time'] = '120';
     }
     $this->load->model('sale/customer_group');
     $filter_data = array('filter_system' => 1);
     $data['customer_groups'] = $this->model_sale_customer_group->getCustomerGroups($filter_data);
     if (isset($this->request->post['config_customer_group_display'])) {
         $data['config_customer_group_display'] = $this->request->post['config_customer_group_display'];
     } elseif ($this->config->get('config_customer_group_display')) {
         $data['config_customer_group_display'] = $this->config->get('config_customer_group_display');
     } else {
         $data['config_customer_group_display'] = array();
     }
     if (isset($this->request->post['config_login_attempts'])) {
         $data['config_login_attempts'] = $this->request->post['config_login_attempts'];
     } elseif ($this->config->has('config_login_attempts')) {
         $data['config_login_attempts'] = $this->config->get('config_login_attempts');
     } else {
         $data['config_login_attempts'] = 5;
     }
     $this->load->model('cms/page');
     $data['informations'] = $this->model_cms_page->getPages()->rows;
     $data['tabs'] = array();
     $data['placeholder'] = $this->model_tool_image->resize('no_image.jpg', 100, 100);
     $this->event->trigger('admin.settings.settings', $data['tabs']);
     ksort($data['tabs']);
     $this->data = $data;
     $this->template = 'setting/setting.phtml';
     $this->children = array('common/header', 'common/footer');
     $this->response->setOutput($this->render());
 }
예제 #4
0
 public function clearlog()
 {
     $this->load->language('extension/modification');
     if ($this->validate()) {
         $handle = fopen(DIR_LOGS . 'cmsmods.log', 'w+');
         fclose($handle);
         $this->session->data['success'] = $this->language->get('text_success');
         $url = '';
         if (isset($this->request->get['sort'])) {
             $url .= '&sort=' . $this->request->get['sort'];
         }
         if (isset($this->request->get['order'])) {
             $url .= '&order=' . $this->request->get['order'];
         }
         if (isset($this->request->get['page'])) {
             $url .= '&page=' . $this->request->get['page'];
         }
         $this->response->redirect(fixajaxurl($this->url->link('extension/modification', 'token=' . $this->session->data['token'] . $url, 'SSL')));
     }
     $this->getList();
 }
예제 #5
0
파일: Base.php 프로젝트: phpsa/CoreCMS
 public function delete()
 {
     $this->language->load($this->_namespace);
     $this->document->setTitle($this->language->get('heading_title'));
     $this->load->model($this->_namespace);
     $this->load->model('tool/seo');
     $_model = 'model_' . str_replace('/', '_', $this->_namespace);
     $this->_pageModel = \Core\Core::$registry->get($_model);
     if (isset($this->request->post['selected']) && $this->validateDelete()) {
         foreach ($this->request->post['selected'] as $ams_page_id) {
             try {
                 $this->_pageModel->loadPageObject($ams_page_id)->delete();
                 $this->model_tool_seo->deleteUrl('ams_page_id=' . $ams_page_id);
             } catch (Core\Exception $e) {
                 //is ok.
             }
         }
         $this->session->data['success'] = $this->language->get('text_success');
         $url = '';
         if (isset($this->request->get['sort'])) {
             $url .= '&sort=' . $this->request->get['sort'];
         }
         if (isset($this->request->get['order'])) {
             $url .= '&order=' . $this->request->get['order'];
         }
         if (isset($this->request->get['page'])) {
             $url .= '&page=' . $this->request->get['page'];
         }
         $this->redirect(fixajaxurl($this->url->link($this->_namespace, 'token=' . $this->session->data['token'] . $url, 'SSL')));
     }
     $this->getList();
 }