导航管理
parent
77687251a9
commit
8a4c86665e
|
|
@ -50,7 +50,7 @@ return array(
|
|||
'imageUrlPrefix' => '',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'imagePathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'Other').'/image/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'imagePathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'other').'/image/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
|
||||
// 涂鸦图片上传配置项
|
||||
|
|
@ -61,7 +61,7 @@ return array(
|
|||
'scrawlFieldName' => 'upfile',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'scrawlPathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'Other').'/scrawl/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'scrawlPathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'other').'/scrawl/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 上传大小限制,单位B
|
||||
'scrawlMaxSize' => MyC('home_max_limit_image', 2048000, true),
|
||||
|
|
@ -78,7 +78,7 @@ return array(
|
|||
'snapscreenActionName' => 'uploadimage',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'snapscreenPathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'Other').'/screenshot/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'snapscreenPathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'other').'/screenshot/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 图片访问路径前缀
|
||||
'snapscreenUrlPrefix' => '',
|
||||
|
|
@ -98,7 +98,7 @@ return array(
|
|||
'catcherFieldName' => 'source',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'catcherPathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'Other').'/catchimage/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'catcherPathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'other').'/catchimage/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 图片访问路径前缀
|
||||
'catcherUrlPrefix' => '',
|
||||
|
|
@ -118,7 +118,7 @@ return array(
|
|||
'videoFieldName' => 'upfile',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'videoPathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'Other').'/video/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'videoPathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'other').'/video/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 视频访问路径前缀
|
||||
'videoUrlPrefix' => '',
|
||||
|
|
@ -138,7 +138,7 @@ return array(
|
|||
'fileFieldName' => 'upfile',
|
||||
|
||||
// 上传保存路径,可以自定义保存路径和文件名格式
|
||||
'filePathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'Other').'/file/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
'filePathFormat' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'other').'/file/{yyyy}/{mm}/{dd}/{time}{rand:6}',
|
||||
|
||||
// 文件访问路径前缀
|
||||
'fileUrlPrefix' => '',
|
||||
|
|
@ -155,7 +155,7 @@ return array(
|
|||
'imageManagerActionName'=> 'listimage',
|
||||
|
||||
// 指定要列出图片的目录
|
||||
'imageManagerListPath' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'Other').'/image/',
|
||||
'imageManagerListPath' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'other').'/image/',
|
||||
|
||||
// 每次列出文件数量
|
||||
'imageManagerListSize' => 20,
|
||||
|
|
@ -175,7 +175,7 @@ return array(
|
|||
'fileManagerActionName' => 'listfile',
|
||||
|
||||
// 指定要列出文件的目录
|
||||
'fileManagerListPath' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'Other').'/file/',
|
||||
'fileManagerListPath' => __ROOT__.'/Public/Upload/'.I('get.path_type', 'other').'/file/',
|
||||
|
||||
// 文件访问路径前缀
|
||||
'fileManagerUrlPrefix' => '',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,379 @@
|
|||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 自定义页面管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class CustomViewController extends CommonController
|
||||
{
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 文章列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 参数
|
||||
$param = array_merge($_POST, $_GET);
|
||||
|
||||
// 模型对象
|
||||
$m = M('CustomView');
|
||||
|
||||
// 条件
|
||||
$where = $this->GetIndexWhere();
|
||||
|
||||
// 分页
|
||||
$number = MyC('admin_page_number');
|
||||
$page_param = array(
|
||||
'number' => $number,
|
||||
'total' => $m->where($where)->count(),
|
||||
'where' => $param,
|
||||
'url' => U('Admin/CustomView/Index'),
|
||||
);
|
||||
$page = new \Library\Page($page_param);
|
||||
|
||||
// 获取列表
|
||||
$list = $this->SetDataHandle($m->where($where)->limit($page->GetPageStarNumber(), $number)->order('id desc')->select());
|
||||
|
||||
// 是否启用
|
||||
$this->assign('common_is_enable_list', L('common_is_enable_list'));
|
||||
|
||||
// 是否包含头部
|
||||
$this->assign('common_is_header_list', L('common_is_header_list'));
|
||||
|
||||
// 是否包含尾部
|
||||
$this->assign('common_is_footer_list', L('common_is_footer_list'));
|
||||
|
||||
// 是否满屏
|
||||
$this->assign('common_is_full_screen_list', L('common_is_full_screen_list'));
|
||||
|
||||
// 参数
|
||||
$this->assign('param', $param);
|
||||
|
||||
// 分页
|
||||
$this->assign('page_html', $page->GetPageHtml());
|
||||
|
||||
// 数据列表
|
||||
$this->assign('list', $list);
|
||||
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
/**
|
||||
* [SetDataHandle 数据处理]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-29T21:27:15+0800
|
||||
* @param [array] $data [文章数据]
|
||||
* @return [array] [处理好的数据]
|
||||
*/
|
||||
private function SetDataHandle($data)
|
||||
{
|
||||
if(!empty($data))
|
||||
{
|
||||
foreach($data as $k=>$v)
|
||||
{
|
||||
// 时间
|
||||
$data[$k]['add_time'] = date('Y-m-d H:i:s', $v['add_time']);
|
||||
$data[$k]['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']);
|
||||
|
||||
// 是否启用
|
||||
$data[$k]['is_enable_text'] = L('common_is_enable_list')[$v['is_enable']]['name'];
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* [GetIndexWhere 文章列表条件]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-10T22:16:29+0800
|
||||
*/
|
||||
private function GetIndexWhere()
|
||||
{
|
||||
$where = array();
|
||||
|
||||
// 模糊
|
||||
if(!empty($_REQUEST['keyword']))
|
||||
{
|
||||
$where[] = array(
|
||||
'title' => array('like', '%'.I('keyword').'%'),
|
||||
);
|
||||
}
|
||||
|
||||
// 是否更多条件
|
||||
if(I('is_more', 0) == 1)
|
||||
{
|
||||
// 等值
|
||||
if(I('is_enable', -1) > -1)
|
||||
{
|
||||
$where['is_enable'] = intval(I('is_enable', 1));
|
||||
}
|
||||
if(I('is_header', -1) > -1)
|
||||
{
|
||||
$where['is_header'] = intval(I('is_header'));
|
||||
}
|
||||
if(I('is_footer', -1) > -1)
|
||||
{
|
||||
$where['is_footer'] = intval(I('is_footer'));
|
||||
}
|
||||
|
||||
// 表达式
|
||||
if(!empty($_REQUEST['time_start']))
|
||||
{
|
||||
$where['add_time'][] = array('gt', strtotime(I('time_start')));
|
||||
}
|
||||
if(!empty($_REQUEST['time_end']))
|
||||
{
|
||||
$where['add_time'][] = array('lt', strtotime(I('time_end')));
|
||||
}
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
* [SaveInfo 添加/编辑页面]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-14T21:37:02+0800
|
||||
*/
|
||||
public function SaveInfo()
|
||||
{
|
||||
// 数据
|
||||
if(empty($_REQUEST['id']))
|
||||
{
|
||||
$data = array();
|
||||
} else {
|
||||
$data = M('CustomView')->find(I('id'));
|
||||
if(!empty($data['content']))
|
||||
{
|
||||
// 静态资源地址处理
|
||||
$data['content'] = ContentStaticReplace($data['content'], 'get');
|
||||
}
|
||||
}
|
||||
$this->assign('data', $data);
|
||||
|
||||
// 是否启用
|
||||
$this->assign('common_is_enable_list', L('common_is_enable_list'));
|
||||
|
||||
// 是否包含头部
|
||||
$this->assign('common_is_header_list', L('common_is_header_list'));
|
||||
|
||||
// 是否包含尾部
|
||||
$this->assign('common_is_footer_list', L('common_is_footer_list'));
|
||||
|
||||
// 是否满屏
|
||||
$this->assign('common_is_full_screen_list', L('common_is_full_screen_list'));
|
||||
|
||||
$this->display('SaveInfo');
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 添加/编辑]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-14T21:37:02+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 添加
|
||||
if(empty($_POST['id']))
|
||||
{
|
||||
$this->Add();
|
||||
|
||||
// 编辑
|
||||
} else {
|
||||
$this->Edit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Add 添加]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-18T16:20:59+0800
|
||||
*/
|
||||
private function Add()
|
||||
{
|
||||
// 模型
|
||||
$m = D('CustomView');
|
||||
|
||||
// 数据自动校验
|
||||
if($m->create($_POST, 1))
|
||||
{
|
||||
// 额外数据处理
|
||||
$m->add_time = time();
|
||||
$m->upd_time = time();
|
||||
$m->title = I('title');
|
||||
|
||||
// 静态资源地址处理
|
||||
$m->content = ContentStaticReplace($m->content, 'add');
|
||||
|
||||
// 正则匹配文章图片
|
||||
$temp_image = $this->MatchContentImage($m->content);
|
||||
$m->image = serialize($temp_image);
|
||||
$m->image_count = count($temp_image);
|
||||
|
||||
// 数据添加
|
||||
if($m->add())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_add_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_add_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Edit 编辑]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-17T22:13:40+0800
|
||||
*/
|
||||
private function Edit()
|
||||
{
|
||||
// 模型
|
||||
$m = D('CustomView');
|
||||
|
||||
// 数据自动校验
|
||||
if($m->create($_POST, 2))
|
||||
{
|
||||
// 静态资源地址处理
|
||||
$m->content = ContentStaticReplace($m->content, 'add');
|
||||
|
||||
// 正则匹配文章图片
|
||||
$temp_image = $this->MatchContentImage($m->content);
|
||||
$m->image = serialize($temp_image);
|
||||
$m->image_count = count($temp_image);
|
||||
$m->upd_time = time();
|
||||
$m->title = I('title');
|
||||
|
||||
// 数据更新
|
||||
if($m->where(array('id'=>I('id')))->save())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [MatchContentImage 正则匹配文章图片]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-22T18:06:53+0800
|
||||
* @param [string] $content [文章内容]
|
||||
* @return [array] [文章图片数组(一维)]
|
||||
*/
|
||||
private function MatchContentImage($content)
|
||||
{
|
||||
if(!empty($content))
|
||||
{
|
||||
$pattern = '/<img.*?src=[\'|\"](\/Public\/Upload\/Article\/image\/.*?[\.gif|\.jpg|\.jpeg|\.png|\.bmp])[\'|\"].*?[\/]?>/';
|
||||
preg_match_all($pattern, $content, $match);
|
||||
return empty($match[1]) ? array() : $match[1];
|
||||
}
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-15T11:03:30+0800
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 删除数据
|
||||
if(!empty($_POST['id']))
|
||||
{
|
||||
// 更新
|
||||
if(M('CustomView')->delete(I('id')))
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [StatusUpdate 状态更新]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-12T22:23:06+0800
|
||||
*/
|
||||
public function StatusUpdate()
|
||||
{
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
{
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
$field = i('field', 'is_enable');
|
||||
|
||||
// 数据更新
|
||||
if(M('CustomView')->where(['id'=>I('id')])->save([$field=>intval(I('state'))]))
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 友情链接
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class LinkController extends CommonController
|
||||
{
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 获取导航列表
|
||||
$list = M('Link')->field(array('id', 'name', 'url', 'describe', 'sort', 'is_enable', 'is_new_window_open'))->order('sort')->select();
|
||||
$this->assign('list', $list);
|
||||
|
||||
// 是否新窗口打开
|
||||
$this->assign('common_is_new_window_open_list', L('common_is_new_window_open_list'));
|
||||
|
||||
// 是否启用
|
||||
$this->assign('common_is_enable_list', L('common_is_enable_list'));
|
||||
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 数据保存]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-02-05T20:12:30+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// id为空则表示是新增
|
||||
$m = D('Link');
|
||||
|
||||
// 公共额外数据处理
|
||||
$m->sort = intval(I('sort'));
|
||||
$m->describe = I('describe');
|
||||
|
||||
// 添加
|
||||
if(empty($_POST['id']))
|
||||
{
|
||||
if($m->create($_POST, 1))
|
||||
{
|
||||
// 额外数据处理
|
||||
$m->add_time = time();
|
||||
$m->name = I('name');
|
||||
$m->describe = I('describe');
|
||||
|
||||
// 写入数据库
|
||||
if($m->add())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_add_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_add_error'), -100);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 编辑
|
||||
if($m->create($_POST, 2))
|
||||
{
|
||||
// 额外数据处理
|
||||
$m->name = I('name');
|
||||
$m->describe = I('describe');
|
||||
|
||||
// 移除 id
|
||||
unset($m->id);
|
||||
|
||||
// 更新数据库
|
||||
if($m->where(array('id'=>I('id')))->save())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-09T21:13:47+0800
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
$m = D('Link');
|
||||
if($m->create($_POST, 4))
|
||||
{
|
||||
if($m->delete($id))
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [StatusUpdate 状态更新]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-12T22:23:06+0800
|
||||
*/
|
||||
public function StatusUpdate()
|
||||
{
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
{
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
|
||||
// 数据更新
|
||||
if(M('Link')->where(array('id'=>I('id')))->save(array('is_enable'=>I('state'))))
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 底部导航
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class NavFooterController extends CommonController
|
||||
{
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 导航列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 获取导航列表
|
||||
$this->assign('list', $this->GetNavList());
|
||||
|
||||
// 文章分类
|
||||
$this->assign('article_category_list', M('ArticleCategory')->field(array('id', 'name'))->where(array('is_enable'=>1))->select());
|
||||
|
||||
// 自定义页面
|
||||
$this->assign('customview_list', M('CustomView')->field(array('id', 'title'))->where(array('is_enable'=>1))->select());
|
||||
|
||||
// 是否新窗口打开
|
||||
$this->assign('common_is_new_window_open_list', L('common_is_new_window_open_list'));
|
||||
|
||||
// 是否显示
|
||||
$this->assign('common_is_show_list', L('common_is_show_list'));
|
||||
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
/**
|
||||
* [GetNavList 获取数据列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-10T22:16:29+0800
|
||||
*/
|
||||
private function GetNavList()
|
||||
{
|
||||
$m = M('Navigation');
|
||||
$field = array('id', 'name', 'url', 'value', 'data_type', 'sort', 'is_show', 'is_new_window_open');
|
||||
return NavDataDealWith($m->field($field)->where(array('nav_type'=>'footer'))->order('sort')->select());
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 添加/编辑]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-07T21:58:19+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 请求类型
|
||||
switch(I('data_type'))
|
||||
{
|
||||
// 自定义导航
|
||||
case 'custom':
|
||||
$this->DataSave(5);
|
||||
break;
|
||||
|
||||
// 文章分类导航
|
||||
case 'article_category':
|
||||
$this->DataSave(6);
|
||||
break;
|
||||
|
||||
// 自定义页面导航
|
||||
case 'customview':
|
||||
$this->DataSave(7);
|
||||
break;
|
||||
}
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* [DataSave 导航数据保存]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-02-05T20:12:30+0800
|
||||
* @param [int] $check_type [校验类型]
|
||||
*/
|
||||
private function DataSave($check_type)
|
||||
{
|
||||
$m = D('Navigation');
|
||||
|
||||
// 数据校验
|
||||
if($m->create($_POST, $check_type))
|
||||
{
|
||||
// 非自定义导航数据处理
|
||||
if(empty($_POST['name']))
|
||||
{
|
||||
switch(I('data_type'))
|
||||
{
|
||||
// 文章分类导航
|
||||
case 'article_category':
|
||||
$temp_name = M('ArticleCategory')->where(array('id'=>I('value')))->getField('name');
|
||||
break;
|
||||
|
||||
// 自定义页面导航
|
||||
case 'customview':
|
||||
$temp_name = M('CustomView')->where(array('id'=>I('value')))->getField('title');
|
||||
break;
|
||||
}
|
||||
// 只截取16个字符
|
||||
$m->name = mb_substr($temp_name, 0, 16, C('DEFAULT_CHARSET'));
|
||||
} else {
|
||||
$m->name = I('name');
|
||||
}
|
||||
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_footer_key'), null);
|
||||
|
||||
// id为空则表示是新增
|
||||
if(empty($_POST['id']))
|
||||
{
|
||||
// 额外数据处理
|
||||
$m->add_time = time();
|
||||
$m->nav_type = 'footer';
|
||||
|
||||
// 写入数据库
|
||||
if($m->add())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_add_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_add_error'), -100);
|
||||
}
|
||||
} else {
|
||||
// 数据编辑
|
||||
if($m->where(array('id'=>I('id')))->save())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-09T21:13:47+0800
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
$m = D('Navigation');
|
||||
if($m->create($_POST, 4))
|
||||
{
|
||||
if($m->delete($id))
|
||||
{
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_footer_key'), null);
|
||||
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [StatusUpdate 状态更新]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-12T22:23:06+0800
|
||||
*/
|
||||
public function StatusUpdate()
|
||||
{
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
{
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
|
||||
// 数据更新
|
||||
if(M('Navigation')->where(array('id'=>I('id')))->save(array('is_show'=>I('state'))))
|
||||
{
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_footer_key'), null);
|
||||
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,269 @@
|
|||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 导航管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class NavHeaderController extends CommonController
|
||||
{
|
||||
private $nav_type;
|
||||
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
|
||||
// 导航类型
|
||||
$this->nav_type = I('nav_type', 'header');
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 导航列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 获取导航列表
|
||||
$this->assign('list', $this->GetNavList());
|
||||
|
||||
// 一级分类
|
||||
$this->assign('nav_header_pid_list', M('Navigation')->field(array('id', 'name'))->where(array('is_show'=>1, 'pid'=>0, 'nav_type'=>$this->nav_type))->select());
|
||||
|
||||
// 文章分类
|
||||
$this->assign('article_category_list', M('ArticleCategory')->field(array('id', 'name'))->where(array('is_enable'=>1))->select());
|
||||
|
||||
// 商品分类
|
||||
$this->assign('goods_category_list', M('GoodsCategory')->field(array('id', 'name'))->where(array('is_enable'=>1))->select());
|
||||
|
||||
// 自定义页面
|
||||
$this->assign('customview_list', M('CustomView')->field(array('id', 'title'))->where(array('is_enable'=>1))->select());
|
||||
|
||||
// 是否新窗口打开
|
||||
$this->assign('common_is_new_window_open_list', L('common_is_new_window_open_list'));
|
||||
|
||||
// 是否显示
|
||||
$this->assign('common_is_show_list', L('common_is_show_list'));
|
||||
|
||||
$this->assign('nav_type', $this->nav_type);
|
||||
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
/**
|
||||
* [GetNavList 获取数据列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-10T22:16:29+0800
|
||||
*/
|
||||
private function GetNavList()
|
||||
{
|
||||
$m = M('Navigation');
|
||||
$field = array('id', 'pid', 'name', 'url', 'value', 'data_type', 'sort', 'is_show', 'is_new_window_open');
|
||||
$data = NavDataDealWith($m->field($field)->where(array('nav_type'=>$this->nav_type, 'pid'=>0))->order('sort')->select());
|
||||
if(!empty($data))
|
||||
{
|
||||
foreach($data as $k=>$v)
|
||||
{
|
||||
$data[$k]['item'] = NavDataDealWith($m->field($field)->where(array('nav_type'=>$this->nav_type, 'pid'=>$v['id']))->order('sort')->select());
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 添加/编辑]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-07T21:58:19+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 请求类型
|
||||
switch(I('data_type'))
|
||||
{
|
||||
// 自定义导航
|
||||
case 'custom':
|
||||
$this->DataSave(5);
|
||||
break;
|
||||
|
||||
// 文章分类导航
|
||||
case 'article_category':
|
||||
$this->DataSave(6);
|
||||
break;
|
||||
|
||||
// 自定义页面导航
|
||||
case 'customview':
|
||||
$this->DataSave(7);
|
||||
break;
|
||||
|
||||
// 商品分类导航
|
||||
case 'goods_category':
|
||||
$this->DataSave(8);
|
||||
break;
|
||||
}
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* [DataSave 导航数据保存]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-02-05T20:12:30+0800
|
||||
* @param [int] $check_type [校验类型]
|
||||
*/
|
||||
private function DataSave($check_type)
|
||||
{
|
||||
$m = D('Navigation');
|
||||
|
||||
// 数据校验
|
||||
if($m->create($_POST, $check_type))
|
||||
{
|
||||
// 非自定义导航数据处理
|
||||
if(empty($_POST['name']))
|
||||
{
|
||||
switch(I('data_type'))
|
||||
{
|
||||
// 文章分类导航
|
||||
case 'article_category':
|
||||
$temp_name = M('ArticleCategory')->where(array('id'=>I('value')))->getField('name');
|
||||
break;
|
||||
|
||||
// 自定义页面导航
|
||||
case 'customview':
|
||||
$temp_name = M('CustomView')->where(array('id'=>I('value')))->getField('title');
|
||||
break;
|
||||
|
||||
// 商品分类导航
|
||||
case 'goods_category':
|
||||
$temp_name = M('GoodsCategory')->where(array('id'=>I('value')))->getField('name');
|
||||
break;
|
||||
}
|
||||
// 只截取16个字符
|
||||
$m->name = mb_substr($temp_name, 0, 16, C('DEFAULT_CHARSET'));
|
||||
} else {
|
||||
$m->name = I('name');
|
||||
}
|
||||
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_header_key'), null);
|
||||
|
||||
// id为空则表示是新增
|
||||
if(empty($_POST['id']))
|
||||
{
|
||||
// 额外数据处理
|
||||
$m->add_time = time();
|
||||
$m->nav_type = $this->nav_type;
|
||||
|
||||
// 写入数据库
|
||||
if($m->add())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_add_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_add_error'), -100);
|
||||
}
|
||||
} else {
|
||||
// 额外数据处理
|
||||
$m->upd_time = time();
|
||||
|
||||
// 数据编辑
|
||||
if($m->where(array('id'=>I('id')))->save())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-09T21:13:47+0800
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
$m = D('Navigation');
|
||||
if($m->create($_POST, 4))
|
||||
{
|
||||
if($m->delete($id))
|
||||
{
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_header_key'), null);
|
||||
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [StatusUpdate 状态更新]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-12T22:23:06+0800
|
||||
*/
|
||||
public function StatusUpdate()
|
||||
{
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
{
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
|
||||
// 数据更新
|
||||
if(M('Navigation')->where(array('id'=>I('id')))->save(array('is_show'=>I('state'))))
|
||||
{
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_header_key'), null);
|
||||
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,256 @@
|
|||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 主题管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class ThemeController extends CommonController
|
||||
{
|
||||
private $html_path;
|
||||
private $static_path;
|
||||
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
|
||||
// 静态目录和html目录
|
||||
$this->html_path = 'Application'.DS.'Home'.DS.'View'.DS;
|
||||
$this->static_path = 'Public'.DS.'Home'.DS;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 导航参数
|
||||
$view_type = I('view_type', 'home');
|
||||
$this->assign('view_type', $view_type);
|
||||
|
||||
// 模板
|
||||
switch($view_type)
|
||||
{
|
||||
// 模板安装
|
||||
case 'upload':
|
||||
$this->display('Upload');
|
||||
break;
|
||||
|
||||
// 当前模板
|
||||
default:
|
||||
// 模板列表
|
||||
$this->assign('data', $this->GetThemeList());
|
||||
|
||||
// 默认主题
|
||||
$theme = S('cache_common_default_theme_data');
|
||||
$this->assign('theme', empty($theme) ? 'Default' : $theme);
|
||||
|
||||
$this->display('Index');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [GetThemeList 获取模板列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-05-10T10:24:40+0800
|
||||
* @return [array] [模板列表]
|
||||
*/
|
||||
private function GetThemeList()
|
||||
{
|
||||
$result = array();
|
||||
$dir = 'Application'.DS.'Home'.DS.'View'.DS;
|
||||
if(is_dir($dir))
|
||||
{
|
||||
if($dh = opendir($dir))
|
||||
{
|
||||
$default_preview = 'Public'.DS.'Common'.DS.'Images'.DS.'default-preview.jpg';
|
||||
while(($temp_file = readdir($dh)) !== false)
|
||||
{
|
||||
$config = $dir.$temp_file.DS.'config.json';
|
||||
if(!file_exists($config))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// 读取配置文件
|
||||
$data = json_decode(file_get_contents($config), true);
|
||||
if(!empty($data) && is_array($data))
|
||||
{
|
||||
if(empty($data['name']) || empty($data['ver']) || empty($data['author']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$result[] = array(
|
||||
'theme' => $temp_file,
|
||||
'name' => I('data.name', '', '',$data),
|
||||
'ver' => str_replace(array(',',','), ', ', I('data.ver', '', '',$data)),
|
||||
'author' => I('data.author', '', '',$data),
|
||||
'home' => I('data.home', '', '',$data),
|
||||
'preview' => file_exists($dir.$temp_file.DS.'preview.jpg') ? $dir.$temp_file.DS.'preview.jpg' : $default_preview,
|
||||
);
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 数据保存]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-02-05T20:12:30+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
// 配置更新
|
||||
$this->MyConfigSave();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-09T21:13:47+0800
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
// 是否ajax
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 主题
|
||||
$id = str_replace(array('.', '/', '\\'), '', strip_tags(I('id')));
|
||||
if(empty($id))
|
||||
{
|
||||
$this->error(L('theme_empty_error'));
|
||||
}
|
||||
|
||||
// 默认主题
|
||||
$theme = S('cache_common_default_theme_data');
|
||||
$theme = empty($theme) ? 'Default' : $theme;
|
||||
|
||||
// 不能删除正在使用的主题
|
||||
if($theme == $id)
|
||||
{
|
||||
$this->ajaxReturn(L('theme_delete_error'), -2);
|
||||
}
|
||||
|
||||
// 开始删除主题
|
||||
if(DelDirFile($this->html_path.$id, true) && DelDirFile($this->static_path.$id, true))
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Upload 模板上传安装]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-05-10T16:27:09+0800
|
||||
*/
|
||||
public function Upload()
|
||||
{
|
||||
// 是否ajax
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 文件上传校验
|
||||
$error = FileUploadError('theme');
|
||||
if($error !== true)
|
||||
{
|
||||
$this->ajaxReturn($error, -1);
|
||||
}
|
||||
|
||||
// 文件格式化校验
|
||||
$type = array('application/zip', 'application/octet-stream');
|
||||
if(!in_array($_FILES['theme']['type'], $type))
|
||||
{
|
||||
$this->ajaxReturn(L('theme_upload_error'), -2);
|
||||
}
|
||||
|
||||
// 开始解压文件
|
||||
$resource = zip_open($_FILES['theme']['tmp_name']);
|
||||
while(($temp_resource = zip_read($resource)) !== false)
|
||||
{
|
||||
if(zip_entry_open($resource, $temp_resource))
|
||||
{
|
||||
// 当前压缩包中项目名称
|
||||
$file = zip_entry_name($temp_resource);
|
||||
|
||||
// 排除临时文件和临时目录
|
||||
if(strpos($file, '/.') === false && strpos($file, '__') === false)
|
||||
{
|
||||
// 拼接路径
|
||||
if(strpos($file, '_Html') !== false)
|
||||
{
|
||||
$file = $this->html_path.$file;
|
||||
} else if(strpos($file, '_Static') !== false)
|
||||
{
|
||||
$file = $this->static_path.$file;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
$file = str_replace(array('_Static/', '_Html/'), '', $file);
|
||||
|
||||
// 截取文件路径
|
||||
$file_path = substr($file, 0, strrpos($file, '/'));
|
||||
|
||||
// 路径不存在则创建
|
||||
if(!is_dir($file_path))
|
||||
{
|
||||
mkdir($file_path, 0777, true);
|
||||
}
|
||||
|
||||
// 如果不是目录则写入文件
|
||||
if(!is_dir($file))
|
||||
{
|
||||
// 读取这个文件
|
||||
$file_size = zip_entry_filesize($temp_resource);
|
||||
$file_content = zip_entry_read($temp_resource, $file_size);
|
||||
file_put_contents($file, $file_content);
|
||||
}
|
||||
// 关闭目录项
|
||||
zip_entry_close($temp_resource);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$this->ajaxReturn(L('common_operation_success'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-自定义页面
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 添加/编辑
|
||||
'customview_add_name' => '自定义页面添加',
|
||||
'customview_edit_name' => '自定义页面编辑',
|
||||
'customview_title_text' => '标题',
|
||||
'customview_content_text' => '内容',
|
||||
'customview_title_format' => '标题长度 3~60 个字符',
|
||||
'customview_content_format' => '内容长度最少 50~105000 个字符',
|
||||
'customview_content_format_mobile' => '更多编辑功能请使用电脑访问',
|
||||
'customview_so_keyword_tips' => '标题关键字',
|
||||
);
|
||||
?>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-友情链接
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 公共
|
||||
'link_add_name' => '友情链接添加',
|
||||
'link_edit_name' => '友情链接编辑',
|
||||
|
||||
// 自定义导航
|
||||
'link_name_text' => '名称',
|
||||
'link_name_format' => '名称格式 2~16 个字符',
|
||||
'link_describe_text' => '描述',
|
||||
'link_describe_format' => '描述不能大于60个字符',
|
||||
'link_url_text' => '链接地址',
|
||||
'link_url_text_tips' => '带http://',
|
||||
'link_url_format' => '链接地址格式有误',
|
||||
);
|
||||
?>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-底部导航
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 公共
|
||||
'navheader_add_name' => '导航添加',
|
||||
'navheader_edit_name' => '导航编辑',
|
||||
'navheader_custom_operation_add' => '自定义',
|
||||
'navheader_article_category_operation_add' => '分类',
|
||||
'navheader_customview_operation_add' => '页面',
|
||||
'navheader_article_category_name_format' => '默认文章分类名称',
|
||||
'navheader_customview_name_format' => '默认自定义页面名称',
|
||||
|
||||
// 自定义导航
|
||||
'navheader_level_text' => '导航级别',
|
||||
'navheader_level_format' => '导航级别选择错误',
|
||||
'navheader_name_text' => '导航名称',
|
||||
'navheader_name_format' => '导航名称格式 2~16 个字符',
|
||||
'navheader_url_text' => 'url地址',
|
||||
'navheader_url_text_tips' => '带http://',
|
||||
'navheader_url_format' => 'url格式有误',
|
||||
|
||||
// 文章分类导航
|
||||
'navheader_article_category_id_text' => '文章分类',
|
||||
'navheader_article_category_id_format' => '文章分类选择有误',
|
||||
|
||||
// 自定义页面导航
|
||||
'navheader_customview_id_text' => '自定义页面',
|
||||
'navheader_customview_id_format' => '自定义页面选择有误',
|
||||
);
|
||||
?>
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-顶部导航
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 公共
|
||||
'navheader_add_name' => '导航添加',
|
||||
'navheader_edit_name' => '导航编辑',
|
||||
'navheader_custom_operation_add' => '自定义',
|
||||
'navheader_article_category_operation_add' => '文字分类',
|
||||
'navheader_customview_operation_add' => '自定义页面',
|
||||
'navheader_goods_category_operation_add' => '商品分类页面',
|
||||
'navheader_article_category_name_format' => '默认文章分类名称',
|
||||
'navheader_customview_name_format' => '默认自定义页面名称',
|
||||
'navheader_goods_category_name_format' => '默认商品分类名称',
|
||||
|
||||
// 自定义导航
|
||||
'navheader_level_text' => '导航级别',
|
||||
'navheader_level_format' => '导航级别选择错误',
|
||||
'navheader_name_text' => '导航名称',
|
||||
'navheader_name_format' => '导航名称格式 2~16 个字符',
|
||||
'navheader_url_text' => 'url地址',
|
||||
'navheader_url_text_tips' => '带http://',
|
||||
'navheader_url_format' => 'url格式有误',
|
||||
|
||||
// 文章分类导航
|
||||
'navheader_article_category_id_text' => '文章分类',
|
||||
'navheader_article_category_id_format' => '文章分类选择有误',
|
||||
|
||||
// 自定义页面导航
|
||||
'navheader_customview_id_text' => '自定义页面',
|
||||
'navheader_customview_id_format' => '自定义页面选择有误',
|
||||
|
||||
// 商品分类导航
|
||||
'navheader_goods_category_id_text' => '商品分类',
|
||||
'navheader_goods_category_id_format' => '商品分类选择有误',
|
||||
|
||||
'navheader_nav_header_name' => '中间导航',
|
||||
'navheader_nav_footer_name' => '底部导航',
|
||||
);
|
||||
?>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-主题管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
'theme_nav_home' => '当前主题',
|
||||
'theme_nav_upload' => '主题安装',
|
||||
'theme_upload_tips' => '上传一个zip压缩格式的主题安装包',
|
||||
'theme_upload_error' => '文件格式有误,请上传zip压缩包',
|
||||
'theme_delete_error' => '不能删除正在使用的主题',
|
||||
'theme_author_text' => '作者:',
|
||||
'theme_ver_text' => '适用版本:',
|
||||
'theme_empty_error' => '主题名称有误',
|
||||
);
|
||||
?>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
namespace Admin\Model;
|
||||
use Think\Model;
|
||||
|
||||
/**
|
||||
* 友情链接模型
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class LinkModel extends CommonModel
|
||||
{
|
||||
// 数据自动校验
|
||||
protected $_validate = array(
|
||||
// 自定义
|
||||
array('name', 'CheckName', '{%link_name_format}', 1, 'callback', 3),
|
||||
array('describe', 'CheckDescribe', '{%link_describe_format}', 2, 'callback', 3),
|
||||
array('url', 'CheckUrl', '{%link_url_format}', 1, 'callback', 3),
|
||||
array('is_new_window_open', array(0,1), '{%common_new_window_open_tips}', 1, 'in', 3),
|
||||
array('is_enable', array(0,1), '{%common_enable_tips}', 1, 'in', 3),
|
||||
);
|
||||
|
||||
/**
|
||||
* [CheckName 名称校验]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-13T19:29:30+0800
|
||||
*/
|
||||
public function CheckName()
|
||||
{
|
||||
$len = Utf8Strlen(I('name'));
|
||||
return ($len >= 2 && $len <= 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* [CheckDescribe 描述校验]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-13T19:29:30+0800
|
||||
*/
|
||||
public function CheckDescribe()
|
||||
{
|
||||
$len = Utf8Strlen(I('describe'));
|
||||
return ($len <= 60);
|
||||
}
|
||||
|
||||
/**
|
||||
* [CheckUrl url地址校验]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-13T15:12:32+0800
|
||||
*/
|
||||
public function CheckUrl()
|
||||
{
|
||||
return (preg_match('/'.L('common_regex_url').'/', I('url')) == 1) ? true : false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
<?php
|
||||
|
||||
namespace Admin\Model;
|
||||
use Think\Model;
|
||||
|
||||
/**
|
||||
* 导航模型
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class NavigationModel extends CommonModel
|
||||
{
|
||||
// 数据自动校验
|
||||
protected $_validate = array(
|
||||
// 自定义导航
|
||||
array('name', 'CheckName', '{%navheader_name_format}', 1, 'callback', 5),
|
||||
array('url', 'CheckUrl', '{%navheader_url_format}', 1, 'callback', 5),
|
||||
array('is_show', array(0,1), '{%common_show_tips}', 1, 'in', 5),
|
||||
array('is_new_window_open', array(0,1), '{%common_new_window_open_tips}', 1, 'in', 5),
|
||||
|
||||
// 文章分类导航
|
||||
array('value', 'CheckArticleCategoryValue', '{%navheader_article_category_id_format}', 1, 'callback', 6),
|
||||
array('is_show', array(0,1), '{%common_show_tips}', 1, 'in', 6),
|
||||
array('is_new_window_open', array(0,1), '{%common_new_window_open_tips}', 1, 'in', 6),
|
||||
|
||||
// 自定义页面导航
|
||||
array('value', 'CheckCustomViewValue', '{%navheader_customview_id_format}', 1, 'callback', 7),
|
||||
array('is_show', array(0,1), '{%common_show_tips}', 1, 'in', 7),
|
||||
array('is_new_window_open', array(0,1), '{%common_new_window_open_tips}', 1, 'in', 7),
|
||||
|
||||
// 商品分类导航
|
||||
array('value', 'CheckGoodsCategoryValue', '{%navheader_goods_category_id_format}', 1, 'callback', 8),
|
||||
array('is_show', array(0,1), '{%common_show_tips}', 1, 'in', 8),
|
||||
array('is_new_window_open', array(0,1), '{%common_new_window_open_tips}', 1, 'in', 8),
|
||||
|
||||
|
||||
// 删除校验是否存在子级
|
||||
array('id', 'IsExistSon', '{%common_is_exist_son_error}', 1, 'callback', 4),
|
||||
);
|
||||
|
||||
/**
|
||||
* [CheckName 导航名称校验]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-13T19:29:30+0800
|
||||
*/
|
||||
public function CheckName()
|
||||
{
|
||||
$len = Utf8Strlen(I('name'));
|
||||
return ($len >= 2 && $len <= 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* [CheckUrl url地址校验]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-13T15:12:32+0800
|
||||
*/
|
||||
public function CheckUrl()
|
||||
{
|
||||
return (preg_match('/'.L('common_regex_url').'/', I('url')) == 1) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* [CheckArticleCategoryValue 文章分类id校验]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-13T15:12:32+0800
|
||||
*/
|
||||
public function CheckArticleCategoryValue()
|
||||
{
|
||||
return ($this->db(0)->table('__ARTICLE_CATEGORY__')->where(array('id'=>I('value')))->count() == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* [CheckCustomViewValue 自定义页面id校验]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-13T15:12:32+0800
|
||||
*/
|
||||
public function CheckCustomViewValue()
|
||||
{
|
||||
return ($this->db(0)->table('__CUSTOM_VIEW__')->where(array('id'=>I('value')))->count() == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* [IsExistSon 校验节点下是否存在子级数据]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-10T14:09:40+0800
|
||||
*/
|
||||
public function IsExistSon()
|
||||
{
|
||||
return ($this->db(0)->where(array('pid'=>I('id')))->count() == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* [CheckGoodsCategoryValue 商品分类id校验]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-13T15:12:32+0800
|
||||
*/
|
||||
public function CheckGoodsCategoryValue()
|
||||
{
|
||||
return ($this->db(0)->table('__GOODS_CATEGORY__')->where(array('id'=>I('value')))->count() == 1);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form view-list" action="{{:U('Admin/CustomView/Index')}}" method="POST">
|
||||
<div class="am-g">
|
||||
<input type="text" class="am-radius form-keyword" placeholder="{{:L('customview_so_keyword_tips')}}" name="keyword" <present name="param['keyword']"> value="{{$param.keyword}}"</present> />
|
||||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">{{:L('common_operation_query')}}</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
{{:L('common_more_screening')}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" <if condition="isset($param['is_more']) and $param['is_more'] eq 1">checked</if> />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
</label>
|
||||
|
||||
<div class="more-where <if condition="!isset($param['is_more']) or $param['is_more'] neq 1">none</if>">
|
||||
<select name="is_header" class="am-radius c-p m-t-10 param-where">
|
||||
<option value="-1">{{:L('common_view_is_header_text')}}</option>
|
||||
<foreach name="common_is_header_list" item="v">
|
||||
<option value="{{$v.id}}" <if condition="isset($param['is_header']) and $param['is_header'] eq $v['id']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
<select name="is_footer" class="am-radius c-p m-t-10 m-l-5 param-where">
|
||||
<option value="-1">{{:L('common_view_is_footer_text')}}</option>
|
||||
<foreach name="common_is_footer_list" item="v">
|
||||
<option value="{{$v.id}}" <if condition="isset($param['is_footer']) and $param['is_footer'] eq $v['id']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
<select name="is_enable" class="am-radius c-p m-t-10 m-l-5 param-where">
|
||||
<option value="-1">{{:L('common_view_enable_title')}}</option>
|
||||
<foreach name="common_is_enable_list" item="v">
|
||||
<option value="{{$v.id}}" <if condition="isset($param['is_enable']) and $param['is_enable'] eq $v['id']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
<div class="param-date param-where m-l-5">
|
||||
<input type="text" name="time_start" class="Wdate am-radius m-t-10" placeholder="{{:L('common_time_start_name')}}" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <if condition="isset($param['time_start'])">value="{{$param.time_start}}"</if>/>
|
||||
<span>~</span>
|
||||
<input type="text" class="Wdate am-radius m-t-10" placeholder="{{:L('common_time_end_name')}}" name="time_end" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <if condition="isset($param['time_end'])">value="{{$param.time_end}}"</if>/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
|
||||
<!-- operation start -->
|
||||
<div class="am-g m-t-15">
|
||||
<a href="{{:U('Admin/CustomView/SaveInfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> {{:L('common_operation_add')}}</a>
|
||||
</div>
|
||||
<!-- operation end -->
|
||||
|
||||
<!-- list start -->
|
||||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:L('customview_title_text')}}</th>
|
||||
<th>{{:L('common_view_status_title')}}</th>
|
||||
<th class="am-hide-sm-only">{{:L('common_view_is_header_text')}}</th>
|
||||
<th class="am-hide-sm-only">{{:L('common_view_is_footer_text')}}</th>
|
||||
<th class="am-hide-sm-only">{{:L('common_view_is_full_screen_text')}}</th>
|
||||
<th class="am-hide-sm-only">{{:L('common_view_access_count_text')}}</th>
|
||||
<th>{{:L('common_more_name')}}</th>
|
||||
<th>{{:L('common_operation_name')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<if condition="!empty($list)">
|
||||
<foreach name="list" item="v">
|
||||
<tr id="data-list-{{$v.id}}" <if condition="$v['is_enable'] eq 0">class="am-active"</if>>
|
||||
<td class="td-title">
|
||||
<a href="{{:str_replace('admin.php', 'index.php', U('Home/CustomView/Index', array('id'=>$v['id'])))}}" target="_blank" title="{{$v.title}}">{{$v.title}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_enable'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/CustomView/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-field="is_enable" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_header'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/CustomView/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_header']}}" data-field="is_header"></a>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_footer'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/CustomView/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_footer']}}" data-field="is_footer"></a>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_full_screen'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/CustomView/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_full_screen']}}" data-field="is_full_screen"></a>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">{{$v.access_count}}</td>
|
||||
<td>
|
||||
<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$v.id}}'}"> {{:L('common_see_more_name')}}</span>
|
||||
<div class="am-popup am-radius" id="my-popup{{$v.id}}">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title">{{:L('common_detail_content')}}</h4>
|
||||
<span data-am-modal-close
|
||||
class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<dl class="dl-content">
|
||||
<dt>{{:L('customview_title_text')}}</dt>
|
||||
<dd>{{$v.title}}</dd>
|
||||
|
||||
<dt>{{:L('common_view_enable_title')}}</dt>
|
||||
<dd>{{$v.is_enable_text}}</dd>
|
||||
|
||||
<dt>{{:L('common_view_is_header_text')}}</dt>
|
||||
<dd>{{:L('common_is_header_list')[$v['is_header']]['name']}}</dd>
|
||||
|
||||
<dt>{{:L('common_view_is_footer_text')}}</dt>
|
||||
<dd>{{:L('common_is_footer_list')[$v['is_footer']]['name']}}</dd>
|
||||
|
||||
<dt>{{:L('common_view_is_full_screen_text')}}</dt>
|
||||
<dd>{{:L('common_is_full_screen_list')[$v['is_full_screen']]['name']}}</dd>
|
||||
|
||||
<dt>{{:L('common_view_access_count_text')}}</dt>
|
||||
<dd>{{$v.access_count}}</dd>
|
||||
|
||||
<dt>{{:L('common_create_time_name')}}</dt>
|
||||
<dd>{{$v.add_time}}</dd>
|
||||
|
||||
<dt>{{:L('common_upd_time_name')}}</dt>
|
||||
<dd>{{$v.upd_time}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="view-operation">
|
||||
<a href="{{:U('Admin/CustomView/SaveInfo', array('id'=>$v['id']))}}">
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}"></button>
|
||||
</a>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/CustomView/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
<else />
|
||||
<tr><td colspan="10" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
|
||||
<!-- page start -->
|
||||
<if condition="!empty($list)">
|
||||
{{$page_html}}
|
||||
</if>
|
||||
<!-- page end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save" action="{{:U('Admin/CustomView/Save')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/CustomView/Index')}}">
|
||||
<legend>
|
||||
<span class="fs-16">
|
||||
<if condition="empty($data['id'])">
|
||||
{{:L('customview_add_name')}}
|
||||
<else />
|
||||
{{:L('customview_edit_name')}}
|
||||
</if>
|
||||
</span>
|
||||
<a href="{{:U('Admin/CustomView/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
|
||||
</legend>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('customview_title_text')}}</label>
|
||||
<input type="text" name="title" placeholder="{{:L('customview_title_text')}}" minlength="3" maxlength="60" data-validation-message="{{:L('customview_title_format')}}" class="am-radius" <notempty name="data"> value="{{$data.title}}" </notempty> required />
|
||||
</div>
|
||||
<include file="Lib/Enable" />
|
||||
<include file="Lib/IsHeader" />
|
||||
<include file="Lib/IsFooter" />
|
||||
<include file="Lib/IsFullScreen" />
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('customview_content_text')}}<if condition="IsMobile()"><span class="fs-12 fw-100 cr-999">({{:L('customview_content_format_mobile')}})</span></if></label>
|
||||
<textarea class="am-radius am-validate" name="content" rows="5" minlength="50" maxlength="105000" <if condition="!IsMobile()">id="editor-tag" data-url="{{:U('Admin/Ueditor/Index', ['path_type'=>'customview'])}}" placeholder="{{:L('customview_content_format')}}" <else /> placeholder="{{:L('customview_content_format')}}{{:L('customview_content_format_mobile')}}" </if> data-validation-message="{{:L('customview_content_format')}}" required><notempty name="data">{{$data.content}}</notempty></textarea>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" <notempty name="data"> value="{{$data.id}}"</notempty>" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- operation start -->
|
||||
<div class="am-g">
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#data-save-win'}"> {{:L('common_operation_add')}}</button>
|
||||
</div>
|
||||
<!-- operation end -->
|
||||
|
||||
<!-- save win start -->
|
||||
<div class="am-popup am-radius" id="data-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('link_add_name')}}" data-edit-title="{{:L('link_edit_name')}}">{{:L('link_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation" action="{{:U('Admin/Link/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('link_name_text')}}</label>
|
||||
<input type="text" placeholder="{{:L('link_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('link_name_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('link_url_text')}}<span class="fs-12 fw-100 cr-999">({{:L('link_url_text_tips')}})</span></label>
|
||||
<input type="url" placeholder="{{:L('link_url_text')}}" name="url" data-validation-message="{{:L('link_url_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<include file="Lib/Enable" />
|
||||
<div class="am-form-group am-form-success">
|
||||
<label>{{:L('link_describe_text')}}</label>
|
||||
<textarea rows="3" maxlength="60" name="describe" class="am-radius" placeholder="{{:L('link_describe_text')}}" data-validation-message="{{:L('link_describe_format')}}"></textarea>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- save win end -->
|
||||
|
||||
<!-- list start -->
|
||||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:L('link_name_text')}}</th>
|
||||
<th class="am-hide-sm-only">{{:L('link_describe_text')}}</th>
|
||||
<th>{{:L('common_view_status_title')}}</th>
|
||||
<th>{{:L('common_operation_name')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<if condition="!empty($list)">
|
||||
<foreach name="list" item="v">
|
||||
<tr id="data-list-{{$v.id}}" <if condition="$v['is_enable'] eq 0">class="am-active"</if>>
|
||||
<td>{{$v.name}}
|
||||
<a href="{{$v.url}}" target="_blank">
|
||||
<i class="am-icon-external-link"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">{{$v.describe}}</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_enable'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Link/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}"></a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#data-save-win'}" data-json='{{:json_encode($v)}}'></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/Link/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
<else />
|
||||
<tr><td colspan="5" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- operation start -->
|
||||
<div class="am-g">
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-custom-save-win'}" data-tag="nav-custom-save-win"> {{:L('navheader_custom_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-article_category-save-win'}" data-tag="nav-article_category-save-win"> {{:L('navheader_article_category_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-customview-save-win'}" data-tag="nav-customview-save-win"> {{:L('navheader_customview_operation_add')}}</button>
|
||||
</div>
|
||||
<!-- operation end -->
|
||||
|
||||
<!-- custom save win start -->
|
||||
<div class="am-popup am-radius" id="nav-custom-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation" action="{{:U('Admin/NavFooter/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}</label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_url_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_url_text_tips')}})</span></label>
|
||||
<input type="url" placeholder="{{:L('navheader_url_text')}}" name="url" data-validation-message="{{:L('navheader_url_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="custom" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- custom save win end -->
|
||||
|
||||
<!-- article_category save win start -->
|
||||
<div class="am-popup am-radius" id="nav-article_category-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_article_category_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_article_category_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_article_category_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-article_category" action="{{:U('Admin/NavFooter/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_article_category_id_text')}}</label>
|
||||
<select class="am-radius c-p" name="value" data-validation-message="{{:L('navheader_article_category_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="article_category_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_article_category_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="article_category" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- article_category save win end -->
|
||||
|
||||
<!-- customview save win start -->
|
||||
<div class="am-popup am-radius" id="nav-customview-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-customview" action="{{:U('Admin/NavFooter/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_customview_id_text')}}</label>
|
||||
<select class="am-radius c-p" name="value" data-validation-message="{{:L('navheader_customview_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="customview_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.title}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_customview_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="customview" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- customview save win end -->
|
||||
|
||||
<!-- list start -->
|
||||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:L('navheader_name_text')}}</th>
|
||||
<th>{{:L('common_nav_type_name')}}</th>
|
||||
<th>{{:L('common_view_status_title')}}</th>
|
||||
<th>{{:L('common_operation_name')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<if condition="!empty($list)">
|
||||
<foreach name="list" item="v">
|
||||
<tr id="data-list-{{$v.id}}" <if condition="$v['is_show'] eq 0">class="am-active"</if>>
|
||||
<td>{{$v.name}}
|
||||
<a href="{{$v.url}}" target="_blank">
|
||||
<i class="am-icon-external-link"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{:L('common_nav_type_list')[$v['data_type']]}}</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/NavFooter/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_show']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#nav-{{$v.data_type}}-save-win'}" data-json='{{:json_encode($v)}}' data-tag="nav-{{$v.data_type}}-save-win"></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/NavFooter/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
<else />
|
||||
<tr><td colspan="5" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -0,0 +1,279 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- table nav start -->
|
||||
<include file="Nav" />
|
||||
<!-- table nav end -->
|
||||
|
||||
<!-- operation start -->
|
||||
<div class="am-g">
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-custom-save-win'}" data-tag="nav-custom-save-win"> {{:L('navheader_custom_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-article_category-save-win'}" data-tag="nav-article_category-save-win"> {{:L('navheader_article_category_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-customview-save-win'}" data-tag="nav-customview-save-win"> {{:L('navheader_customview_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-goods_category-save-win'}" data-tag="nav-goods_category-save-win"> {{:L('navheader_goods_category_operation_add')}}</button>
|
||||
</div>
|
||||
<!-- operation end -->
|
||||
|
||||
<!-- custom save win start -->
|
||||
<div class="am-popup am-radius" id="nav-custom-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_level_text')}}</label>
|
||||
<select class="am-radius c-p" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
|
||||
<option value="0">{{:L('common_select_level_one_choice')}}</option>
|
||||
<foreach name="nav_header_pid_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}</label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_url_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_url_text_tips')}})</span></label>
|
||||
<input type="url" placeholder="{{:L('navheader_url_text')}}" name="url" data-validation-message="{{:L('navheader_url_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="custom" />
|
||||
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- custom save win end -->
|
||||
|
||||
<!-- article_category save win start -->
|
||||
<div class="am-popup am-radius" id="nav-article_category-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_article_category_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_article_category_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_article_category_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-article_category" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
|
||||
<option value="0">{{:L('common_select_level_one_choice')}}</option>
|
||||
<foreach name="nav_header_pid_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_article_category_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navheader_article_category_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="article_category_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_article_category_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="article_category" />
|
||||
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- article_category save win end -->
|
||||
|
||||
<!-- customview save win start -->
|
||||
<div class="am-popup am-radius" id="nav-customview-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close
|
||||
class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-customview" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
|
||||
<option value="0">{{:L('common_select_level_one_choice')}}</option>
|
||||
<foreach name="nav_header_pid_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_customview_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navheader_customview_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="customview_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.title}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_customview_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="customview" />
|
||||
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- customview save win end -->
|
||||
|
||||
<!-- goods_category save win start -->
|
||||
<div class="am-popup am-radius" id="nav-goods_category-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_goods_category_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_goods_category_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_goods_category_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-goods_category" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
|
||||
<option value="0">{{:L('common_select_level_one_choice')}}</option>
|
||||
<foreach name="nav_header_pid_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_goods_category_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navheader_goods_category_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="goods_category_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_goods_category_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="goods_category" />
|
||||
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- goods_category save win end -->
|
||||
|
||||
<!-- list start -->
|
||||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:L('navheader_name_text')}}</th>
|
||||
<th>{{:L('common_nav_type_name')}}</th>
|
||||
<th>{{:L('common_view_status_title')}}</th>
|
||||
<th>{{:L('common_operation_name')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<if condition="!empty($list)">
|
||||
<foreach name="list" item="v">
|
||||
<tr id="data-list-{{$v.id}}" <if condition="$v['is_show'] eq 0">class="am-active"</if>>
|
||||
<td>{{$v.name}}
|
||||
<a href="{{$v.url}}" target="_blank">
|
||||
<i class="am-icon-external-link"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{:L('common_nav_type_list')[$v['data_type']]}}</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/NavHeader/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_show']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#nav-{{$v.data_type}}-save-win'}" data-json='{{:json_encode($v)}}' data-tag="nav-{{$v.data_type}}-save-win"></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/NavHeader/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
<if condition="!empty($list)">
|
||||
<foreach name="v.item" item="vs">
|
||||
<tr id="data-list-{{$vs.id}}" <if condition="$vs['is_show'] eq 0">class="am-active"</if>>
|
||||
<td class="p-l-30">{{$vs.name}}
|
||||
<a href="{{$vs.url}}" target="_blank">
|
||||
<i class="am-icon-external-link"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{:L('common_nav_type_list')[$vs['data_type']]}}</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$vs['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/NavHeader/StatusUpdate')}}" data-id="{{$vs.id}}" data-state="{{$vs['is_show']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#nav-{{$vs.data_type}}-save-win'}" data-json='{{:json_encode($vs)}}' data-tag="nav-{{$vs.data_type}}-save-win"></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/NavHeader/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$vs.id}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
</if>
|
||||
</foreach>
|
||||
<else />
|
||||
<tr><td colspan="5" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ul class="am-nav am-nav-pills table-nav m-b-10">
|
||||
<li <if condition="$nav_type eq 'header'">class="am-active"</if> data-type="header">
|
||||
<a href="{{:U('Admin/NavHeader/Index', ['nav_type'=>'header'])}}">{{:L('navheader_nav_header_name')}}</a>
|
||||
</li>
|
||||
<li <if condition="$nav_type eq 'footer'">class="am-active"</if> data-type="footer">
|
||||
<a href="{{:U('Admin/NavHeader/Index', ['nav_type'=>'footer'])}}">{{:L('navheader_nav_footer_name')}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- nav start -->
|
||||
<include file="Nav" />
|
||||
<!-- nav end -->
|
||||
|
||||
<!-- list start -->
|
||||
<notempty name="data">
|
||||
<ul data-am-widget="gallery" class="am-gallery am-avg-sm-2 am-avg-md-3 am-avg-lg-4 am-gallery-bordered data-list" data-am-gallery="{}" data-select-url="{{:U('Admin/Theme/Save')}}">
|
||||
<foreach name="data" item="v">
|
||||
<li id="data-list-{{$v.theme}}">
|
||||
<div class="am-gallery-item am-radius <if condition="$v['theme'] eq $theme">theme-active</if>">
|
||||
<a href="javascript:;" class="select-theme" data-theme="{{$v.theme}}">
|
||||
<img src="{{$v.preview}}" alt="{{$v.name}}" />
|
||||
</a>
|
||||
<div class="am-gallery-item-bottom">
|
||||
<h3 class="am-gallery-title">
|
||||
{{$v.name}}
|
||||
<a href="javascript:;" class="am-icon-trash-o fr submit-delete" data-url="{{:U('Admin/Theme/Delete')}}" data-id="{{$v.theme}}"></a>
|
||||
</h3>
|
||||
<div class="am-gallery-desc">{{:L('theme_author_text')}}
|
||||
<if condition="empty($v['home'])">
|
||||
{{$v.author}}
|
||||
<else />
|
||||
<a href="{{$v.home}}" target="_blank">{{$v.author}}</a>
|
||||
</if>
|
||||
</div>
|
||||
<div class="am-gallery-desc">{{:L('theme_ver_text')}}{{$v.ver}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</foreach>
|
||||
<ul>
|
||||
<else />
|
||||
null---
|
||||
</notempty>
|
||||
<!-- lis end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ul class="am-nav am-nav-pills table-nav">
|
||||
<li <if condition="$view_type eq 'home'">class="am-active"</if>>
|
||||
<a href="{{:U('Admin/Theme/Index', ['view_type'=>'home'])}}">{{:L('theme_nav_home')}}</a>
|
||||
</li>
|
||||
<li <if condition="$view_type eq 'upload'">class="am-active"</if>>
|
||||
<a href="{{:U('Admin/Theme/Index', ['view_type'=>'upload'])}}">{{:L('theme_nav_upload')}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- nav start -->
|
||||
<include file="Nav" />
|
||||
<!-- nav end -->
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save m-t-10" action="{{:U('Admin/Theme/Upload')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/Theme/Index')}}" enctype="multipart/form-data">
|
||||
<input type="hidden" name="max_file_size" value="{{:MyC('home_max_limit_file', 51200000, true)}}" />
|
||||
<div class="am-form-group am-form-file">
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
|
||||
<i class="am-icon-cloud-upload"></i> {{:L('common_select_file_text')}}</button>
|
||||
<input type="file" name="theme" multiple data-validation-message="{{:L('common_select_file_tips')}}" required />
|
||||
<span class="tips fs-12">{{:L('theme_upload_tips')}}</span>
|
||||
<div id="form-theme-tips"></div>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm" data-am-loading="{loadingText:'{{:L('common_upload_loading_tips')}}'}">{{:L('common_operation_upload')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -433,6 +433,31 @@ return array(
|
|||
1 => array('id' => 1, 'name' => '是'),
|
||||
),
|
||||
|
||||
// 是否新窗口打开
|
||||
'common_is_new_window_open_list' => array(
|
||||
0 => array('id' => 0, 'name' => '否', 'checked' => true),
|
||||
1 => array('id' => 1, 'name' => '是'),
|
||||
),
|
||||
|
||||
// 导航数据类型
|
||||
'common_nav_type_list' => array(
|
||||
'custom' => '自定义',
|
||||
'article_category' => '文章分类',
|
||||
'customview' => '自定义页面',
|
||||
),
|
||||
|
||||
// 是否含头部
|
||||
'common_is_header_list' => array(
|
||||
0 => array('id' => 0, 'name' => '否'),
|
||||
1 => array('id' => 1, 'name' => '是', 'checked' => true),
|
||||
),
|
||||
|
||||
// 是否含尾部
|
||||
'common_is_footer_list' => array(
|
||||
0 => array('id' => 0, 'name' => '否'),
|
||||
1 => array('id' => 1, 'name' => '是', 'checked' => true),
|
||||
),
|
||||
|
||||
|
||||
// 色彩值
|
||||
'common_color_list' => array(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
//000000000000a:95:{i:41;s:12:"config_index";i:42;s:11:"config_save";i:81;s:10:"site_index";i:103;s:10:"site_index";i:105;s:9:"site_save";i:104;s:9:"sms_index";i:107;s:8:"sms_save";i:219;s:11:"email_index";i:220;s:10:"email_save";i:221;s:15:"email_emailtest";i:199;s:9:"seo_index";i:200;s:8:"seo_save";i:1;s:11:"power_index";i:22;s:11:"admin_index";i:19;s:14:"admin_saveinfo";i:20;s:10:"admin_save";i:21;s:12:"admin_delete";i:4;s:10:"power_role";i:17;s:18:"power_rolesaveinfo";i:18;s:14:"power_rolesave";i:23;s:16:"power_roledelete";i:13;s:11:"power_index";i:15;s:15:"power_powersave";i:16;s:17:"power_powerdelete";i:126;s:10:"user_index";i:127;s:10:"user_index";i:128;s:13:"user_saveinfo";i:129;s:9:"user_save";i:130;s:11:"user_delete";i:146;s:16:"user_excelexport";i:38;s:11:"goods_index";i:39;s:11:"goods_index";i:57;s:14:"goods_saveinfo";i:58;s:10:"goods_save";i:59;s:12:"goods_delete";i:181;s:19:"goods_statusshelves";i:218;s:27:"goods_statushomerecommended";i:201;s:19:"goodscategory_index";i:202;s:18:"goodscategory_save";i:203;s:20:"goodscategory_delete";i:177;s:11:"order_index";i:178;s:11:"order_index";i:179;s:12:"order_delete";i:180;s:12:"order_cancel";i:213;s:12:"answer_index";i:214;s:12:"answer_index";i:215;s:11:"answer_save";i:216;s:13:"answer_delete";i:217;s:19:"answer_statusupdate";i:204;s:13:"article_index";i:205;s:13:"article_index";i:206;s:16:"article_saveinfo";i:207;s:12:"article_save";i:208;s:14:"article_delete";i:209;s:20:"article_statusupdate";i:210;s:21:"articlecategory_index";i:211;s:20:"articlecategory_save";i:212;s:22:"articlecategory_delete";i:162;s:15:"marketing_index";i:163;s:12:"coupon_index";i:164;s:18:"coupon_stateupdate";i:165;s:15:"coupon_saveinfo";i:166;s:11:"coupon_save";i:167;s:11:"coupon_user";i:168;s:13:"coupon_delete";i:169;s:15:"coupon_sendinfo";i:170;s:11:"coupon_send";i:171;s:16:"coupon_userquery";i:182;s:10:"data_index";i:183;s:13:"message_index";i:184;s:14:"message_delete";i:185;s:12:"paylog_index";i:186;s:21:"userintegrallog_index";i:187;s:15:"complaint_index";i:188;s:14:"complaint_save";i:189;s:16:"complaint_delete";i:152;s:15:"resources_index";i:153;s:12:"region_index";i:154;s:11:"region_save";i:155;s:13:"region_delete";i:156;s:13:"express_index";i:157;s:12:"express_save";i:158;s:14:"express_delete";i:172;s:11:"slide_index";i:173;s:14:"slide_saveinfo";i:174;s:10:"slide_save";i:175;s:17:"slide_stateupdate";i:176;s:12:"slide_delete";i:193;s:15:"agreement_index";i:194;s:14:"agreement_save";i:118;s:10:"tool_index";i:119;s:11:"cache_index";i:120;s:16:"cache_siteupdate";i:121;s:20:"cache_templateupdate";i:122;s:18:"cache_moduleupdate";}
|
||||
//000000000000a:120:{i:41;s:12:"config_index";i:42;s:11:"config_save";i:81;s:10:"site_index";i:103;s:10:"site_index";i:105;s:9:"site_save";i:104;s:9:"sms_index";i:107;s:8:"sms_save";i:219;s:11:"email_index";i:220;s:10:"email_save";i:221;s:15:"email_emailtest";i:199;s:9:"seo_index";i:200;s:8:"seo_save";i:1;s:11:"power_index";i:22;s:11:"admin_index";i:19;s:14:"admin_saveinfo";i:20;s:10:"admin_save";i:21;s:12:"admin_delete";i:4;s:10:"power_role";i:17;s:18:"power_rolesaveinfo";i:18;s:14:"power_rolesave";i:23;s:16:"power_roledelete";i:13;s:11:"power_index";i:15;s:15:"power_powersave";i:16;s:17:"power_powerdelete";i:126;s:10:"user_index";i:127;s:10:"user_index";i:128;s:13:"user_saveinfo";i:129;s:9:"user_save";i:130;s:11:"user_delete";i:146;s:16:"user_excelexport";i:38;s:11:"goods_index";i:39;s:11:"goods_index";i:57;s:14:"goods_saveinfo";i:58;s:10:"goods_save";i:59;s:12:"goods_delete";i:181;s:19:"goods_statusshelves";i:218;s:27:"goods_statushomerecommended";i:201;s:19:"goodscategory_index";i:202;s:18:"goodscategory_save";i:203;s:20:"goodscategory_delete";i:177;s:11:"order_index";i:178;s:11:"order_index";i:179;s:12:"order_delete";i:180;s:12:"order_cancel";i:213;s:12:"answer_index";i:214;s:12:"answer_index";i:215;s:11:"answer_save";i:216;s:13:"answer_delete";i:217;s:19:"answer_statusupdate";i:222;s:15:"navheader_index";i:223;s:15:"navheader_index";i:225;s:18:"navheader_saveinfo";i:226;s:14:"navheader_save";i:227;s:16:"navheader_delete";i:228;s:22:"navheader_statusupdate";i:224;s:15:"navfooter_index";i:229;s:18:"navfooter_saveinfo";i:230;s:14:"navfooter_save";i:231;s:16:"navfooter_delete";i:232;s:22:"navfooter_statusupdate";i:234;s:16:"customview_index";i:235;s:19:"customview_saveinfo";i:236;s:15:"customview_save";i:237;s:17:"customview_delete";i:238;s:23:"customview_statusupdate";i:239;s:10:"link_index";i:240;s:13:"link_saveinfo";i:241;s:9:"link_save";i:242;s:11:"link_delete";i:243;s:17:"link_statusupdate";i:244;s:11:"theme_index";i:245;s:10:"theme_save";i:246;s:12:"theme_upload";i:247;s:12:"theme_delete";i:204;s:13:"article_index";i:205;s:13:"article_index";i:206;s:16:"article_saveinfo";i:207;s:12:"article_save";i:208;s:14:"article_delete";i:209;s:20:"article_statusupdate";i:210;s:21:"articlecategory_index";i:211;s:20:"articlecategory_save";i:212;s:22:"articlecategory_delete";i:162;s:15:"marketing_index";i:163;s:12:"coupon_index";i:164;s:18:"coupon_stateupdate";i:165;s:15:"coupon_saveinfo";i:166;s:11:"coupon_save";i:167;s:11:"coupon_user";i:168;s:13:"coupon_delete";i:169;s:15:"coupon_sendinfo";i:170;s:11:"coupon_send";i:171;s:16:"coupon_userquery";i:182;s:10:"data_index";i:183;s:13:"message_index";i:184;s:14:"message_delete";i:185;s:12:"paylog_index";i:186;s:21:"userintegrallog_index";i:187;s:15:"complaint_index";i:188;s:14:"complaint_save";i:189;s:16:"complaint_delete";i:152;s:15:"resources_index";i:153;s:12:"region_index";i:154;s:11:"region_save";i:155;s:13:"region_delete";i:156;s:13:"express_index";i:157;s:12:"express_save";i:158;s:14:"express_delete";i:172;s:11:"slide_index";i:173;s:14:"slide_saveinfo";i:174;s:10:"slide_save";i:175;s:17:"slide_stateupdate";i:176;s:12:"slide_delete";i:193;s:15:"agreement_index";i:194;s:14:"agreement_save";i:118;s:10:"tool_index";i:119;s:11:"cache_index";i:120;s:16:"cache_siteupdate";i:121;s:20:"cache_templateupdate";i:122;s:18:"cache_moduleupdate";}
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* 列表
|
||||
*/
|
||||
.form-keyword { width: 55% !important; display: initial !important; }
|
||||
.more-submit input { display: none; }
|
||||
.param-where, .param-date input { display: initial !important; }
|
||||
@media only screen and (max-width: 641px) {
|
||||
.param-where { width: 100% !important; margin-left: 0px !important; }
|
||||
.param-date input { width: 47% !important; }
|
||||
.view-operation button { margin: 2px 0px; }
|
||||
}
|
||||
@media only screen and (min-width: 641px) {
|
||||
.param-where { width: 22% !important; float: left; }
|
||||
.param-date input { width: 43% !important; }
|
||||
}
|
||||
.td-title { width: 30%; }
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
.am-gallery-item-bottom { background: #f7f7f7; padding: 0px 8px 5px 8px; }
|
||||
.am-gallery-desc * { font-size: 12px; }
|
||||
.am-gallery-item:hover { border: 1px solid #f60; }
|
||||
.theme-active { border: 3px solid #5eb95e !important; }
|
||||
#form-theme-tips { }
|
||||
input[name="theme"] { width: 105px !important; height: 32px; }
|
||||
.am-gallery-title .submit-delete { color:#C13932 !important; }
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* 添加
|
||||
*/
|
||||
$('.submit-add').on('click', function()
|
||||
{
|
||||
// 更改窗口名称
|
||||
$title = $('#data-save-win').find('.am-popup-title');
|
||||
$title.text($title.data('add-title'));
|
||||
|
||||
// 清空表单
|
||||
FormDataFill({"id":"", "name":"", "url":"", "describe":"", "sort":0, "is_enable":1});
|
||||
|
||||
// 校验成功状态增加失去焦点
|
||||
$('form.form-validation').find('.am-field-valid').each(function()
|
||||
{
|
||||
$(this).blur();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
// 表单初始化
|
||||
FromInit('form.form-validation-article_category');
|
||||
FromInit('form.form-validation-customview');
|
||||
FromInit('form.form-validation-goods_category');
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
$('.submit-add').on('click', function()
|
||||
{
|
||||
// 获取标签
|
||||
var tag = $(this).data('tag');
|
||||
|
||||
// 更改窗口名称
|
||||
$title = $('#'+tag).find('.am-popup-title');
|
||||
$title.text($title.data('add-title'));
|
||||
|
||||
// 清空表单
|
||||
FormDataFill({"id":"", "name":"", "url":"", "value":"", "sort":0, "is_show":1, "is_new_window_open":0}, '#'+tag);
|
||||
|
||||
// 校验成功状态增加失去焦点
|
||||
$('#'+tag).find('form').find('.am-field-valid').each(function()
|
||||
{
|
||||
$(this).blur();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
// 表单初始化
|
||||
FromInit('form.form-validation-article_category');
|
||||
FromInit('form.form-validation-customview');
|
||||
FromInit('form.form-validation-goods_category');
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
$('.submit-add').on('click', function()
|
||||
{
|
||||
// 获取标签
|
||||
var tag = $(this).data('tag');
|
||||
|
||||
// 更改窗口名称
|
||||
$title = $('#'+tag).find('.am-popup-title');
|
||||
$title.text($title.data('add-title'));
|
||||
|
||||
// 清空表单
|
||||
FormDataFill({"id":"", "pid":0, "name":"", "url":"", "value":"", "sort":0, "is_show":1, "is_new_window_open":0}, '#'+tag);
|
||||
|
||||
// 校验成功状态增加失去焦点
|
||||
$('#'+tag).find('form').find('.am-field-valid').each(function()
|
||||
{
|
||||
$(this).blur();
|
||||
});
|
||||
});
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
$(function()
|
||||
{
|
||||
// 模板切换
|
||||
$('.select-theme').on('click', function()
|
||||
{
|
||||
var theme = $(this).data('theme');
|
||||
if(!$(this).parent().hasClass('theme-active'))
|
||||
{
|
||||
var $this = $(this);
|
||||
if(theme != undefined)
|
||||
{
|
||||
// ajax请求
|
||||
$.ajax({
|
||||
url:$('.data-list').data('select-url'),
|
||||
type:'POST',
|
||||
dataType:"json",
|
||||
timeout:10000,
|
||||
data:{"common_default_theme":theme},
|
||||
success:function(result)
|
||||
{
|
||||
if(result.code == 0)
|
||||
{
|
||||
$('.am-gallery-item').removeClass('theme-active');
|
||||
$this.parent().addClass('theme-active');
|
||||
Prompt(result.msg, 'success');
|
||||
} else {
|
||||
Prompt(result.msg);
|
||||
}
|
||||
},
|
||||
error:function()
|
||||
{
|
||||
Prompt('网络异常错误');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 模板上传选择名称展示
|
||||
$('input[name="theme"]').on('change', function()
|
||||
{
|
||||
var fileNames = '';
|
||||
$.each(this.files, function()
|
||||
{
|
||||
fileNames += '<span class="am-badge">' + this.name + '</span> ';
|
||||
});
|
||||
$('#form-theme-tips').html(fileNames);
|
||||
});
|
||||
});
|
||||
|
|
@ -646,6 +646,7 @@ $(function()
|
|||
var id = $tag.data('id');
|
||||
var state = ($tag.data('state') == 1) ? 0 : 1;
|
||||
var url = $tag.data('url');
|
||||
var field = $tag.data('field') || '';
|
||||
var is_update_status = $tag.data('is-update-status') || 0;
|
||||
if(id == undefined || url == undefined)
|
||||
{
|
||||
|
|
@ -659,7 +660,7 @@ $(function()
|
|||
type:'POST',
|
||||
dataType:"json",
|
||||
timeout:10000,
|
||||
data:{"id":id, "state":state},
|
||||
data:{"id":id, "state":state, "field":field},
|
||||
success:function(result)
|
||||
{
|
||||
if(result.code == 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue