<?php
class ControllerModuleCustomBanner extends Controller {
private $error = array();
public function index() {
$this->load->language('module/banner');
$this->document->setTitle($this->language->get('heading_title'));
$this->load->model('setting/setting');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$this->model_setting_setting->editSetting('custom_banner', $this->request->post);
$this->session->data['success'] = $this->language->get('text_success');
$this->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));
}
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['text_enabled'] = $this->language->get('text_enabled');
$this->data['text_disabled'] = $this->language->get('text_disabled');
$this->data['text_content_top'] = $this->language->get('text_content_top');
$this->data['text_content_bottom'] = $this->language->get('text_content_bottom');
$this->data['text_column_left'] = $this->language->get('text_column_left');
$this->data['text_column_right'] = $this->language->get('text_column_right');
$this->data['entry_banner'] = $this->language->get('entry_banner');
$this->data['entry_dimension'] = $this->language->get('entry_dimension');
$this->data['entry_layout'] = $this->language->get('entry_layout');
$this->data['entry_position'] = $this->language->get('entry_position');
$this->data['entry_status'] = $this->language->get('entry_status');
$this->data['entry_sort_order'] = $this->language->get('entry_sort_order');
$this->data['button_save'] = $this->language->get('button_save');
$this->data['button_cancel'] = $this->language->get('button_cancel');
$this->data['button_add_module'] = $this->language->get('button_add_module');
$this->data['button_remove'] = $this->language->get('button_remove');
if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}
if (isset($this->error['dimension'])) {
$this->data['error_dimension'] = $this->error['dimension'];
} else {
$this->data['error_dimension'] = array();
}
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => false
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: '
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('module/custom_banner', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: '
);
$this->data['action'] = $this->url->link('module/custom_banner', 'token=' . $this->session->data['token'], 'SSL');
$this->data['cancel'] = $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL');
$this->data['modules'] = array();
if (isset($this->request->post['custom_banner_module'])) {
$this->data['modules'] = $this->request->post['custom_banner_module'];
} elseif ($this->config->get('custom_banner_module')) {
$this->data['modules'] = $this->config->get('custom_banner_module');
}
$this->load->model('design/layout');
$this->data['layouts'] = $this->model_design_layout->getLayouts();
$this->load->model('design/banner');
$this->data['banners'] = $this->model_design_banner->getBanners();
$this->template = 'module/custom_banner.tpl';
$this->children = array(
'common/header',
'common/footer',
);
$this->response->setOutput($this->render());
}
private function validate() {
if (!$this->user->hasPermission('modify', 'module/custom_banner')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (isset($this->request->post['custom_banner_module'])) {
foreach ($this->request->post['custom_banner_module'] as $key => $value) {
if (!$value['width'] || !$value['height']) {
$this->error['dimension'][$key] = $this->language->get('error_dimension');
}
}
}
if (!$this->error) {
return true;
} else {
return false;
}
}
}
?>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
aquaa.net_BootstrapWordpress前端源码模板_网站UI界面主题.zip (528个子文件)
psd.7z 8.1MB
stylesheet.css 74KB
stylesheet.css 74KB
rtl_stylesheet.css 24KB
rtl_stylesheet.css 24KB
screen.css 12KB
camera.css 11KB
camera.css 11KB
carousel.css 4KB
carousel.css 4KB
layout.css 4KB
layout.css 4KB
ie6.css 4KB
ie6.css 4KB
colorpicker.css 3KB
colorpicker.css 3KB
slideshow.css 3KB
slideshow.css 3KB
ie7.css 2KB
ie7.css 2KB
ie8.css 176B
ie8.css 176B
Thumbs.db 712KB
Thumbs.db 712KB
Thumbs.db 135KB
Thumbs.db 135KB
Thumbs.db 51KB
Thumbs.db 36KB
Thumbs.db 36KB
Thumbs.db 20KB
Thumbs.db 20KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 6KB
Thumbs.db 6KB
camera-loader.gif 9KB
camera-loader.gif 9KB
loading.gif 2KB
loading.gif 2KB
loading.gif 2KB
loading.gif 2KB
colorpicker_indic.gif 86B
custom_indic.gif 86B
colorpicker_indic.gif 86B
custom_indic.gif 86B
colorpicker_select.gif 78B
colorpicker_select.gif 78B
blank.gif 49B
blank.gif 49B
index.html 24KB
index.html 8KB
index.html 8KB
banner4.jpg 253KB
banner4.jpg 253KB
banner2.jpg 121KB
banner2.jpg 121KB
banner3.jpg 87KB
banner3.jpg 87KB
banner1.jpg 85KB
banner1.jpg 85KB
banner_bg_1.jpg 19KB
banner_bg_1.jpg 19KB
banner_bg_2.jpg 19KB
banner_bg_2.jpg 19KB
banner_sm_2.jpg 12KB
banner_sm_2.jpg 12KB
banner_sm_1.jpg 12KB
banner_sm_1.jpg 12KB
banner_sm_3.jpg 12KB
banner_sm_3.jpg 12KB
jquery.js 122KB
jquery.js 122KB
camera.js 67KB
camera.js 67KB
colorpicker.js 17KB
colorpicker.js 17KB
cloud_zoom.js 15KB
cloud_zoom.js 15KB
jquery.easing.1.3.js 8KB
jquery.easing.1.3.js 8KB
utils.js 7KB
utils.js 7KB
aquacart_custom.js 3KB
aquacart_custom.js 3KB
layout.js 2KB
layout.js 2KB
eye.js 604B
eye.js 604B
custom_banner.php 5KB
custom_banner.php 5KB
custom_slideshow.php 4KB
custom_slideshow.php 4KB
settings.php 3KB
settings.php 3KB
styler.php 3KB
styler.php 3KB
custom_slideshow.php 2KB
custom_slideshow.php 2KB
custom_banner.php 1KB
custom_banner.php 1KB
共 528 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
dunming_6725413
- 粉丝: 16
- 资源: 6950
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功