Commit afb7eca8 by rongjun

init

parents
Pipeline #363 skipped

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

ThinkCMF软件使用协议
版权所有(c)2012-2013,ThinkCMF开源社区
感谢您选择 ThinkCMF内容管理框架, 希望我们的产品能够帮您把网站发展的更快、更好、更强!
ThinkCMF遵循Apache2开源协议发布,并提供免费使用。
ThinkCMF建站系统由简约风网络科技(以下简称简约风,官网http://www.simplewind.net)发起并开源发布。
简约风网络科技包含以下网站:
ThinkCMF官网: http://www.thinkcmf.com
简约风官网:http://www.simplewind.net
程序模板交流网站:http://www.44ui.com
Apache Licence是著名的非盈利开源组织Apache采用的协议。
该协议鼓励代码共享和尊重原作者的著作权,允许代码修改,再作为开源或商业软件发布。需要满足的条件:
1. 需要给代码的用户一份Apache Licence ;
2. 如果你修改了代码,需要在被修改的文件中说明;
3. 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议,商标,专利声明和其他原来作者规定需要包含的说明;
4. 如果再发布的产品中包含一个Notice文件,则在Notice文件中需要带有本协议内容。你可以在Notice中增加自己的许可,但不可以表现为对Apache Licence构成更改。
具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
ThinkCMF 免责声明
1、利用 ThinkCMF 构建的网站的任何信息内容以及导致的任何版权纠纷和法律争议及后果,ThinkCMF 官方不承担任何责任。
2、您一旦安装使用ThinkCMF,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。
接 受
location / { // …..省略部分代码
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
## 修改说明
本修改版本对ThinkCMFX核心文件有改动,如果你已经在使用ThinkCMFX,请核对好之后再进行覆盖。
本仓库的内容会提交到官方仓库,但不保证内容会被官方采用,并且该版本的更新将滞后于官方的更新,如果在意这些,并且你自己有动手能力,还是推荐自己根据我给出的文件位置做修改,并做好记录。避免未来更新出现问题。
### 2016.4.22
* 添加阿里云OSS存储方式
### 添加的文件
simplewind/Core/Library/Think/Upload/Driver目录下添加了Aliyun.class.php及Aliyun目录,主要为阿里云OSS的THINKPHP驱动文件。
### 修改的文件
1. admin/themes/simplebootx/Admin/Storage/index.html
2. application/Admin/Controller/StorageController.class.php
3. application/Admin/Lang/zh-cn/storage.php
4. application/Admin/Lang/en-us/storage.php
以下为THINKCMF官方信息
## README
ThinkCMF是一款基于PHP+MYSQL开发的中文内容管理框架。ThinkCMF提出灵活的应用机制,框架自身提供基础的管理功能,而开发者可以根据自身的需求以应用的形式进行扩展。每个应用都能独立的完成自己的任务,也可通过系统调用其他应用进行协同工作。在这种运行机制下,开发商场应用的用户无需关心开发SNS应用时如何工作的,但他们之间又可通过系统本身进行协调,大大的降低了开发成本和沟通成本。
官网:http://www.thinkcmf.com
文档:http://www.thinkcmf.com/document
## UPDATE
X2.1.0
* 修复前台导航缓存问题
* 修复个人中心mysql5.7下保存失败
* 文章评论插件化
* 增加系统评论插件
* 修复simplebootx模板config文件变量不对应
* 优化用户激活流程,防止已激活用户和被禁用用户两次发送激活邮件
* 更正数据库前台导航分类active注释
* 修复手机模板开启时跳转页面模板路径判断错误
* 修复重置密码后,重置密码链接仍可打开问题
* 增加后台评论管理查看原文功能
* 增强后台登录接口安全性
* 修复前台分页当前页选中问题
* 增加全局路由,强化URL美化功能
* 修复导航添加时导航分类选择问题
祝新年愉快,合家欢乐!
X2.0.0
* 更改HomeBaseController.class.php文件名为HomebaseController.class.php
* 移动Common里的Portal model到Portal下;
* 规范前后台模板目录,themes ,admin/themes;
* **注意以上升级,有助于您升级到最新版本**
* 增加对PHP7的支持
* 增强验证码易识别性;
* 增加后台从菜单栏点击立即刷新选项卡功能;
* 增加前台模板多语言,插件多语言;
* 增加后台多语言基础功能,语言包稍后升级完善;
* 优化后台模板文件;
* 优化后台登录界面;
* 优化前台登录、注册、找回密码界面;
* 优化common.js,frontend.js,规范一系列js-xxx-xxx命名和功能实现;
* 优化文章编辑页布局和css;
* 修复模板中U方法大小写错误;
* 修复ip获取,防止代理访问;
* 修复success,error跳转页无手机模板问题;
* 升级百度编辑器;
* 去除前台各处同意网站条款;
* 去除文章访问次数统计的ip限制;
X1.6.1
* 修复登录时仍然可以打开登录和注册界面
* 修复后台文章分类列表,点添加子类到添加分类界面父级分类选择错误
* 修复后台文章分类模板修复后不更新问题
* 修复编辑器里图片上传, 在文件存储选择七牛时,图片title,alt属性不对
* 增加对php格式模板文件的支持
* 优化sp_get_menu方法,id为空时,默认为主菜单
* 修复后台模板缺失</head>问题
* 修复Portal应用下文章,页面,和分类不存在时,无404状态码
* 增加对模板继承标签tc_extend的支持
* 优化会员的拉黑起用功能,改为实时验证
* 增加url模式更改后出现不能访问问题的提示和解决方法
* 修复文章,幻灯片添加重复提交问题
X1.6.0
* 增加静态缓存
* 增加form提交状态判断,防止连续提交
* 增加后台被禁用角色和用户登录提示
* 增加文章可以添加到多个分类
* 增加管理员停用启用功能
* 增加文章来源版权申明
* 增加文章内容页面二维码
* 增加验证码统一判断方法
* 优化验证码自动刷新
* 优化后台样式
* 修复邮件配置更新时,不会立刻更新问题
* 修复后台手动新加的菜单时没有同步到auth_rule表
* 修复角色禁止后登陆报错
* 修复角色无法删除问题
* 修复后台视频上传出错!请注意上传大小限制,php.ini post_max_size,upload_max_filesize
* 修复后台菜单过多不显示
* 修复后台管理登录可能会被暴力破解
* 修复后台菜单列表层级问题
* 修复启用后被删除的插件执行报错
X1.5.0
* 增加插件机制
* 增加编辑器附件上传功能
* 核心升级至thinkphp 3.2.3,必须开启php_pdo_mysql扩展
* 优化系统权限管理,增加auth+rbac混合认证模式
* 增加文件存储扩展支持,默认支持本地和七牛云存储
* 增加手机模板支持
* 增加手机模板侦测后台开启关闭功能,默认关闭手机模板侦测
* 增加MUI手机开发框架
* 增加评论时间间隔设置
* 增加视频插入
* 增加去除模板文件里面的html空格与换行
* 增加后台管理员列表分页
* 增加文章页上一篇、下一篇功能
* 优化菜单管理方式,采用增加文件方式菜单管理,方便程序升级
* 优化导航鼠标划过下拉菜单
* 优化管理员信息编辑,增加字段过滤
* 优化非后台入口登录跳转到首页
* 修复simplebootx搜索链接错误
* 修复ucenter各种问题
* 修复后台邮件发件人无法设置
* 修复入口文件SITE_PATH常量部分服务器异常
* 修复sae头像裁剪
* 修复分类编辑时层级出错
* 修复备份还原数据为空
* 统一所有模块模板路径分割符为/
* 删除thinkphp Vendor目录第三方类库
* 移除SendMail方法
* 替换scandir方法为sp_scan_dir
* 统一SAE判断方法
* 统一ajaxReturn为thinkphp 3.2.*以后用法,如果一直用thinkphp 3.0以前的用法,扩展时注意用sp_ajax_return()做一下升级
注:后台模板分割符已经统一为/,原来的类似Admin/Main.index.html文件已经改为Admin/Main/index.html请后台开发时注意
ThinkCMF全体贡献者祝大家2015年大吉大利,开心幸福!《给你一个吻》
X1.3.0
* 统一Action为Controller
* 增加文章搜索功能
* 增加前台编辑器
* 增加模板常量__STATICS__
* 增加最后评论时间写入
* 修复leuu bug
* CommonModel _before_write 数据过滤bug
* 后台评论管理,默认所有评论
* 文章分类path更新优化
* simplebootx模板文章页css样式优化
* 修复分页类bug
* 后台文章编辑所有文章链接错误
* 修复bug#4验证码不显示
* 优化bug#3页面使用LEUU函数后每个页面都查询
* 优化公共模型的调用方法,以兼容php5.3.0-5.3.2
* 修复sp_sql_posts_bycatid和sp_sql_posts_paged_bycatid两个方法where语句问题
* 修复bluesky主题分页样式问题
* 修复文章推荐,置顶bug
X1.2.0
* url美化
* 特殊用户名过滤
* 增加推荐,置顶功能
* 幻灯片隐藏显示功能
* 广告隐藏显示功能
* 友情链接隐藏显示功能
* 评论计数
X1.1.0
全新的ThinkPHP 3.2.2架构,使用php命名空间,让开发快起来吧!
* 统一Member应用为User,合并前台会员和后台管理员
* 完善用户中心,会员登录注册
* 增加编辑头像,绑定账号,我的评论,我的收藏
* 增加文章点赞,收藏,查看功能,可与其它应用共用
* 增强文章评论功能,方便多应用共用
* 优化留言功能,增强安全性
* 优化前台模板,增加多个实用组件,方便以后复用
* 增加后台风格切换功能;
* 增加后台风格bluesky
* 优化后台菜单使用方式
* 优化数据库中一些不规范字段
* 增加前台标签库TagLibHome,统一include标签为tc_include
X1.0.0
全新的ThinkPHP 3.2.2架构,使用php命名空间,让开发快起来吧!
* 统一前后台UI框架为simpleboot(bootstrap 2.3.2 ThinkCMF优化版)
* 集成Ucenter
* 增加文章评论功能
* 增加留言功能
* 全面支持SAE云平台
* 增加文章内分页功能
* 升级后台编辑器到Ueditor最新版本
* 优化后台ajax提交,未登陆时自动退出
* 优化后台所有文章按发布时间递减排序
* 修复后台密码会偶然不对的错误
* 修复SAE,linux下类库加载失败
* 修复ueditor chrome模板功能bug
* 修复文件上传bug
X1.0.0 alpha2
* 修复SAE,linux下类库加载失败
* 修复ueditor chrome模板功能bug
* 修复文件上传bug
X1.0.0 alpha
全新的ThinkPHP 3.2.2架构,使用php命名空间,让开发快起来吧!
* 集成Ucenter
* 增加文章评论功能
* 增加留言功能
* 全面支持SAE云平台
* 增加文章内分页功能
* 升级后台编辑器到Ueditor最新版本
* 优化后台ajax提交,未登陆时自动退出
* 优化后台所有文章按发布时间递减排序
* 修复后台密码会偶然不对的错误
## INSTALL
安装请执行http://yourdomain/install/index.php
安装完成后请删除或改名install/index.php
## ThinkCMF 免责声明
1、利用 ThinkCMF 构建的网站的任何信息内容以及导致的任何版权纠纷和法律争议及后果,ThinkCMF 官方不承担任何责任。
2、您一旦安装使用ThinkCMF,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。
## ThinkCMF 使用建议
请在您的网站首页加上ThinkCMF相关链接,O(∩_∩)O~ !
## 捐赠ThinkCMF
http://www.thinkcmf.com/donate/index.html
您的每一份帮助都将支持ThinkCMF做的更好,走的更远!
ThinkCMF 正在为你开放更多....
<Files *.html>
Order Allow,Deny
Deny from all
</Files>
<?php
/**
* 后台入口文件
*/
$upw =empty($_GET['upw'])?"":'&upw='.$_GET['upw'];
header("Location: ../index.php?g=admin&m=public&a=login".$upw );
<admintpl file="header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('Admin/backup/index')}">{:L('ADMIN_BACKUP_INDEX')}</a></li>
</ul>
<div class="common-form">
<form action="{:U('Admin/backup/index_post')}" method="post">
<div class="table_list">
<table width="100%" cellspacing="0" class="table_form">
<tr>
<td width="150" align="right">{:L('VOLUME_SIZE')}</td>
<td>
<input type="text" name="sizelimit" value="{$sizelimit}" size="10"> K
&nbsp;&nbsp;({:L('VOLUME_SIZE_HELP_TEXT')})
</td>
</tr>
<tr>
<td align="right">{:L('NAME')}</td>
<td><input type="text" name="backup_name" value="{$backup_name}"></td>
</tr>
<tr>
<td align="right">{:L('BACKUP_TYPE')}</td>
<td>
<label><input type="radio" checked="checked" value="full" name="backup_type" onclick="javascript:$('#js-showtables').hide();"> {:L('BACKUP_ALL')} &nbsp;&nbsp;</label>
<label><input type="radio" value="custom" name="backup_type" onclick="javascript:$('#js-showtables').show();"> {:L('CUSTOM_BACKUP')}</label>
</td>
</tr>
<tr id="js-showtables">
<td align="right">
<label><input name="selectall" type="checkbox" checked="checked" value="" onclick="javascript:$('.js-checkitem').attr('checked', this.checked);" /> {:L('SELECT_ALL')}</label>
</td>
<td colspan="2">
<volist name="tables" id="val">
<label class="checkbox inline" style="width:200px;"><input name="backup_tables[{$val}]" type="checkbox" value="-1" checked="checked" class="js-checkitem" />&nbsp;&nbsp;{$val}</label>
</volist>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="dosubmit" value="{:L('START_BACKUP')}" class="btn btn-primary" style="margin-top: 10px;"></td>
</tr>
</table>
</div>
</form>
</div>
</div>
<style type="text/css">
#js-showtables{display:none;}
.checkbox.inline{
margin-left: 10px;
}
</style>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('Admin/backup/restore')}">{:L('ADMIN_BACKUP_RESTORE')}</a></li>
</ul>
<div class="common-form">
<form action="{:U('Admin/backup/import')}" method="post">
<div class="table_list">
<table width="100%" cellspacing="0" class="table table-hover table-bordered">
<thead>
<tr>
<th align="left">{:L('NAME')}</th>
<th>{:L('FILE_SIZE')}</th>
<th>{:L('BACKUP_TIME')}</th>
<th>{:L('ACTIONS')}</th>
</tr>
</thead>
<tbody>
<volist name="backups" id="val">
<tr class="collapsed">
<td>
<span style="padding-left: 20px" name="{$val.name}" class="expander"></span>
{$val.name}
</td>
<td>{$val.total_size}kb</td>
<td>{$val.date_str}</td>
<td>
<a href="{:U('Admin/backup/del_backup', array('backup'=>$val['name']))}" class="js-ajax-delete">{:L('DELETE')}</a> |
<a href="{:U('Admin/backup/import', array('backup'=>$val['name']))}" class="js-ajax-dialog-btn" data-msg="确定恢复吗?">{:L('RESTORE')}</a>
</td>
</tr>
<volist name="val['vols']" id="vol">
<tr parent="{$val.name}" class="hide">
<td>{$vol.file}</td>
<td>{$vol.size}kb</td>
<td>{$val.date_str}</td>
<td>
<a href="{:U('Admin/backup/download', array('backup'=>$val['name'], 'file'=>$vol['file']))}">{:L('DOWNLOAD')}</a>
</td>
</tr>
</volist>
</volist>
</tbody>
</table>
</div>
</form>
</div>
</div>
<style type="text/css">
.hide{display:none;}
.table_list tr.expanded td .expander{
background: url(__TMPL__Public/assets/images/tv-collapsable.gif) center center no-repeat;
}
.table_list tr.collapsed td .expander{
background: url(__TMPL__Public/assets/images/tv-expandable.gif) center center no-repeat;
}
</style>
<script src="__PUBLIC__/js/common.js"></script>
<script>
$(function(){
$(".show_sub").click(function(){
$(this).attr("src",function(){
if(this.src == '__TMPL__Public/assets/images/tv-expandable.gif'){
return '__TMPL__Public/assets/images/tv-collapsable.gif';
} else {
return '__TMPL__Public/assets/images/tv-expandable.gif';
}
});
var sub_id = $(this).attr('sub');
$("tr[parent='"+sub_id+"']").toggle();
});
$('.expander').toggle(function(){
$(this).parent().parent().removeClass('collapsed').addClass('expanded');
$('tr[parent="'+$(this).attr('name')+'"]').show();
},function(){
$(this).parent().parent().removeClass('expanded').addClass('collapsed');
$('tr[parent="'+$(this).attr('name')+'"]').hide();
});
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="boot/index"/>
\ No newline at end of file
<admintpl file="header" />
<style>
.home_info li em {
float: left;
width: 120px;
font-style: normal;
}
li {
list-style: none;
}
</style>
</head>
<body>
<div class="wrap">
<h4 class="well">{:L('SYSTEM_INFORMATIONS')}</h4>
<div class="home_info">
<ul>
<volist name="server_info" id="vo">
<li><em>{$key}</em> <span>{$vo}</span></li>
</volist>
</ul>
</div>
</div>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('menu/index')}">{:L('ADMIN_MENU_INDEX')}</a></li>
<li class="active"><a href="{:U('menu/add')}">{:L('ADMIN_MENU_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('Menu/add_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">上级:</label>
<div class="controls">
<select name="parentid">
<option value="0">作为一级菜单</option>
{$select_categorys}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">名称:</label>
<div class="controls">
<input type="text" name="name">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">应用:</label>
<div class="controls">
<input type="text" name="app" id="app">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">控制器:</label>
<div class="controls">
<input type="text" name="model" id="model">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">方法:</label>
<div class="controls">
<input type="text" name="action" id="action">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">参数:</label>
<div class="controls">
<input type="text" name="data">
例:id=3&amp;p=3
</div>
</div>
<div class="control-group">
<label class="control-label">图标:</label>
<div class="controls">
<input type="text" name="icon" id="action">
<a href="http://www.thinkcmf.com/font/icons" target="_blank">选择图标</a> 不带前缀fa-,如fa-user => user
</div>
</div>
<div class="control-group">
<label class="control-label">备注:</label>
<div class="controls">
<textarea name="remark" rows="5" cols="57" style="width: 500px;"></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">状态:</label>
<div class="controls">
<select name="status">
<option value="1">显示</option>
<option value="0">隐藏</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">类型:</label>
<div class="controls">
<select name="type">
<option value="1" selected>权限认证+菜单</option>
<option value="0">只作为菜单</option>
</select>
注意:“权限认证+菜单”表示加入后台权限管理,纯碎是菜单项请不要选择此项。
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('ADD')}</button>
<a class="btn" href="{:U('menu/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<div id="error_tips">
<h2>菜单已同步!</h2>
<div class="error_cont">
<ul>
<li>菜单已同步!</li>
</ul>
<div class="error_return">
<a href="{:U('menu/index')}" class="btn">关闭</a>
</div>
</div>
</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
var close_timeout = setTimeout(function() {
location.href = "{:U('menu/index')}";
}, 2000);
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('menu/index')}">{:L('ADMIN_MENU_INDEX')}</a></li>
<li><a href="{:U('menu/add')}">{:L('ADMIN_MENU_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('Menu/edit_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">上级:</label>
<div class="controls">
<select name="parentid">
<option value="0">作为一级菜单</option>{$select_categorys}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">名称:</label>
<div class="controls">
<input type="text" name="name" value="{$data.name}">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">应用:</label>
<div class="controls">
<input type="text" name="app" value="{$data.app}">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">控制器:</label>
<div class="controls">
<input type="text" name="model" value="{$data.model}">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">方法:</label>
<div class="controls">
<input type="text" name="action" value="{$data.action}">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">参数:</label>
<div class="controls">
<input type="text" name="data" value="{$data.data}"> 例:id=3&amp;p=3
</div>
</div>
<div class="control-group">
<label class="control-label">图标:</label>
<div class="controls">
<input type="text" name="icon" value="{$data.icon}">
<a href="http://www.thinkcmf.com/font/icons" target="_blank">选择图标</a> 不带前缀fa-,如fa-user => user
</div>
</div>
<div class="control-group">
<label class="control-label">备注:</label>
<div class="controls">
<textarea name="remark" rows="5" cols="57" style="width: 500px;">{$data.remark}</textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">状态:</label>
<div class="controls">
<select name="status">
<option value="1">显示</option>
<php>$status_selected=empty($data['status'])?"selected":"";</php>
<option value="0" {$status_selected}>隐藏</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">类型:</label>
<div class="controls">
<select name="type">
<option value="1">权限认证+菜单</option>
<php>$type_selected=empty($data['type'])?"selected":"";</php>
<option value="0" {$type_selected}>只作为菜单</option>
</select>
注意:“权限认证+菜单”表示加入后台权限管理,纯碎是菜单项请不要选择此项。
</div>
</div>
</fieldset>
<div class="form-actions">
<input type="hidden" name="id" value="{$data.id}" />
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
<button class="btn js-ajax-close-btn" type="submit">{:L('CLOSE')}</button>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
$(function() {
$(".js-ajax-close-btn").on('click', function(e) {
e.preventDefault();
Wind.use("artDialog", function() {
art.dialog({
id : "question",
icon : "question",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : "您确定需要关闭当前页面嘛?",
ok : function() {
setCookie('refersh_time_admin_menu_index', 1);
window.close();
return true;
}
});
});
});
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<div id="error_tips">
<h2>菜单备份成功!</h2>
<div class="error_cont">
<ul>
<li>菜单备份成功!</li>
</ul>
<div class="error_return">
<a href="{:U('menu/index')}" class="btn">关闭</a>
</div>
</div>
</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
var close_timeout = setTimeout(function() {
location.href = "{:U('menu/index')}";
}, 2000);
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<div id="error_tips">
<h2>应用{$app}菜单导入成功!</h2>
<div class="error_cont">
<ul>
<if condition="!empty($newmenus)">
<foreach name="newmenus" item="vo">
<li>{$vo}</li>
</foreach>
<else />
<li>应用{$app}没有新菜单导入!</li>
</if>
</ul>
<if condition="!empty($nextapp)">
<script>
setTimeout(function() {
location.href = "{:U('admin/menu/spmy_getactions',array('app'=>$nextapp))}";
}, 1000);
</script>
<div class="error_return">
<a href="{:U('admin/menu/spmy_getactions',array('app'=>$nextapp))}" class="btn btn-primary">下一个应用</a>
<a href="{:U('admin/menu/lists')}" class="btn" style="margin-left: 10px;">返回</a>
</div>
<else />
<div>全部导入成功!</div>
<div class="error_return">
<a href="{:U('menu/lists')}" class="btn">返回</a>
</div>
</if>
</div>
</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<div id="error_tips">
<h2>
<if condition="empty($errormenus)">
菜单导入成功!
<else />
菜单导入失败!
</if>
</h2>
<div class="error_cont">
<ul>
<if condition="empty($errormenus)">
菜单导入成功!
<else />
<foreach name="errormenus" item="vo">
<li>{$vo}导入失败!</li>
</foreach>
</if>
</ul>
<div class="error_return">
<a href="{:U('menu/index')}" class="btn">返回</a>
</div>
</div>
</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<if condition="empty($errormenus)">
<script>
var close_timeout = setTimeout(function() {
location.href = "{:U('menu/index')}";
}, 2000);
</script>
</if>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('menu/index')}">{:L('ADMIN_MENU_INDEX')}</a></li>
<li><a href="{:U('menu/add')}">{:L('ADMIN_MENU_ADD')}</a></li>
<li><a href="{:U('menu/spmy_import_menu')}">{:L('ADMIN_MENU_SPMY_IMPORT_MENU')}</a></li>
<if condition="APP_DEBUG">
<li><a href="{:U('menu/lists')}">{:L('ADMIN_MENU_LISTS')}</a></li>
<li><a href="{:U('menu/spmy_export_menu')}">备份菜单</a></li>
<li><a href="{:U('menu/spmy_export_menu_lang')}">生成菜单多语言包</a></li>
</if>
</ul>
<form class="js-ajax-form" action="{:U('Menu/listorders')}" method="post">
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit">{:L('SORT')}</button>
</div>
<table class="table table-hover table-bordered table-list" id="menus-table">
<thead>
<tr>
<th width="80">{:L('SORT')}</th>
<th width="50">ID</th>
<th>{:L('APP')}</th>
<th>{:L('NAME')}</th>
<th width="80">{:L('STATUS')}</th>
<th width="180">{:L('ACTIONS')}</th>
</tr>
</thead>
<tbody>
{$categorys}
</tbody>
<tfoot>
<tr>
<th width="80">{:L('SORT')}</th>
<th width="50">ID</th>
<th>{:L('APP')}</th>
<th>{:L('NAME')}</th>
<th width="80">{:L('STATUS')}</th>
<th width="180">{:L('ACTIONS')}</th>
</tr>
</tfoot>
</table>
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit">{:L('SORT')}</button>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
$(document).ready(function() {
Wind.css('treeTable');
Wind.use('treeTable', function() {
$("#menus-table").treeTable({
indent : 20
});
});
});
setInterval(function() {
var refersh_time = getCookie('refersh_time_admin_menu_index');
if (refersh_time == 1) {
reloadPage(window);
}
}, 1000);
setCookie('refersh_time_admin_menu_index', 0);
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('menu/index')}">后台菜单</a></li>
<li><a href="{:U('menu/add')}">添加菜单</a></li>
<if condition="APP_DEBUG">
<li><a href="{:U('menu/spmy_import_menu')}">导入菜单</a></li>
<li class="active"><a href="{:U('menu/lists')}">所有菜单</a></li>
<li><a href="{:U('menu/spmy_export_menu')}">备份菜单</a></li>
</if>
</ul>
<form class="form-horizontal js-ajax-form" action="{:U('Menu/listorders')}" method="post">
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit">排序</button>
<a class="btn btn-primary btn-small" type="submit" href="{:U('menu/spmy_getactions')}">导入新菜单</a>
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="50">排序</th>
<th width="50">ID</th>
<th>菜单英文名称</th>
<th width="40">状态</th>
<th width="80">管理操作</th>
</tr>
</thead>
<foreach name="menus" item="vo">
<tr>
<td><input name="listorders[{$vo.id}]" type="text" size="3" value="{$vo.listorder}" class="input input-order"></td>
<td>{$vo.id}</td>
<td>{$vo.name}:{$vo.app}/{$vo.model}/{$vo.action}</td>
<td>
<if condition="$vo['status'] eq 1">
显示
<else />
隐藏
</if>
</td>
<td>
<a href="{:U('menu/edit',array('id'=>$vo['id']))}">修改</a> |
<a class="js-ajax-delete" href="{:U('menu/delete',array('id'=>$vo['id']))}">删除</a>
</td>
</tr>
</foreach>
<tfoot>
<tr>
<th width="50">排序</th>
<th width="50">ID</th>
<th>菜单英文名称</th>
<th width="40">状态</th>
<th width="80">管理操作</th>
</tr>
</tfoot>
</table>
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit">排序</button>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('nav/index')}">{:L('ADMIN_NAV_INDEX')}</a></li>
<li class="active"><a href="{:U('nav/add')}">{:L('ADMIN_NAV_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('nav/add_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('NAVIGATION_CATEGORY')}</label>
<div class="controls">
<select name="cid" id="navcid_select">
<foreach name="navcats" item="vo">
<php>$navcid_selected=$navcid==$vo['navcid']?"selected":"";</php>
<option value="{$vo.navcid}" {$navcid_selected}>{$vo.name}</option>
</foreach>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('PARENT')}</label>
<div class="controls">
<select name="parentid">
<option value="0">/</option>
{$nav_trees}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('LABEL')}</label>
<div class="controls">
<input type="text" name="label" value=""><span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('HREF')}</label>
<div class="controls">
<input type="radio" name="nav" id="outlink">
<input type="text" name="href" id="outlink_input" value="http://">
<input type="radio" name="nav" id="selecturl">
<select name="href" id="selecthref">
<option value="home">{:L('HOME')}</option>
<foreach name="navs" item="vo">
<option disabled>{$vo.name}</option>
<foreach name="vo['items']" item="voo">
<option value='{$voo.rule}'>{$voo.label}</option>
</foreach>
</foreach>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('TARGET')}</label>
<div class="controls">
<select name="target">
<option value="">{:L('TARGET_DEFAULT')}</option>
<option value="_blank">{:L('TARGET_BLANK')}</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('ICON')}</label>
<div class="controls">
<div>
<input type="hidden" name="icon" id="thumb" value="">
<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb_preview" width="95" style="cursor: hand" />
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb_preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('STATUS')}</label>
<div class="controls">
<select name="status">
<option value="1">{:L('DISPLAY')}</option>
<option value="0">{:L('HIDDEN')}</option>
</select>
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('ADD')}</button>
<a class="btn" href="{:U('nav/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
<script>
$(function() {
$("#navcid_select").change(function() {
if(location.search.indexOf("?")>=0){
location.href = location.href + "&cid=" + $(this).val();
}else{
location.href = location.href + "?cid=" + $(this).val();
}
});
$("#selecthref").click(function() {
$('#outlink_input').removeAttr('name');
$('#selecturl').attr({
'checked' : 'checked',
'name' : 'href'
});
});
$("input[name='href']").click(function() {
$('#selecthref').removeAttr('name');
$('#outlink').attr({
'checked' : 'checked',
'name' : 'href'
});
});
/*
Wind.use('ajaxForm','artDialog','iframeTools', function () {
$("#href_input").click(function(){
art.dialog.open("{:U('nav/select')}", {
title: "选择链接地址",
close: function () {
var checked_v = art.dialog.data('checked_v');
if (checked_v !== undefined) $('#href_input').val(checked_v);
var checked_u = art.dialog.data('checked_u');
if (checked_u !== undefined) $('#u_input').val(checked_u);
}
},false);
});
});
*/
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<div class="common-form">
<form method="post" class="form-horizontal js-ajax-form" action="{:U('nav/edit_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('NAVIGATION_CATEGORY')}</label>
<div class="controls">
<select name="cid" id="navcid_select">
<foreach name="navcats" item="vo">
<php>$navcid_selected=$navcid==$vo['navcid']?"selected":"";</php>
<option value="{$vo.navcid}" {$navcid_selected}>{$vo.name}</option>
</foreach>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('PARENT')}</label>
<div class="controls">
<select name="parentid">
<option value="0">/</option>
{$nav_trees}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('LABEL')}</label>
<div class="controls">
<input type="text" name="label" value="{$label}"><span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('HREF')}</label>
<div class="controls">
<input type="radio" name="nav" id="outlink">
<input type="text" name="href" id="outlink_input" value="http://">
<input type="radio" name="nav" id="selecturl">
<select name="href" id="selecthref">
<option value="home">{:L('HOME')}</option>
<foreach name="navs" item="vo">
<option disabled>{$vo.name}</option>
<foreach name="vo['items']" item="voo">
<option value='{$voo.rule}'>{$voo.label}</option>
</foreach>
</foreach>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('TARGET')}</label>
<div class="controls">
<select name="target">
<option value="">{:L('TARGET_DEFAULT')}</option>
<option value="_blank">{:L('TARGET_BLANK')}</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('ICON')}</label>
<div class="controls">
<div>
<input type="hidden" name="icon" id="thumb" value="{$icon}">
<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
<if condition="empty($icon)">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb_preview" width="95" style="cursor: hand"/>
<else />
<img src="{:sp_get_asset_upload_path($icon)}" id="thumb_preview" width="95" style="cursor: hand"/>
</if>
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb_preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('STATUS')}</label>
<div class="controls">
<select name="status">
<option value="1">{:L('DISPLAY')}</option>
<php>$status_selected=empty($status)?"selected":"";</php>
<option value="0" {$status_selected}>{:L('HIDDEN')}</option>
</select>
</div>
</div>
</fieldset>
<div class="form-actions">
<input type="hidden" name="id" value="{$id}">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
<a class="btn" href="{:U('nav/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
<script>
$(function() {
$("#navcid_select").change(function() {
if(location.search.indexOf("?")>=0){
location.href = location.href + "&cid=" + $(this).val();
}else{
location.href = location.href + "?cid=" + $(this).val();
}
});
$("#selecthref").click(function() {
checkChange(2);
});
$("input[name='href']").click(function() {
checkChange(1);
});
var opt = $("#selecthref option[value='" + '{$hrefold}' + "']");
if (opt.length > 0) {
opt.attr('selected', 'selected');
checkChange(2);
} else {
checkChange(1);
$('#outlink_input').val('{$hrefold}');
}
function checkChange(i) {
if (i == 1) {
//自动输入url
$('#outlink_input').attr('name', 'href');
$('#selecthref').removeAttr('name');
$('#outlink').attr({
'checked' : 'checked',
'name' : 'nav'
});
} else {
//选择链接url
$('#selecthref').attr('name', 'href');
$('#outlink_input').removeAttr('name');
$('#selecturl').attr({
'checked' : 'checked',
'name' : 'nav'
});
}
}
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('nav/index')}">{:L('ADMIN_NAV_INDEX')}</a></li>
<li><a href="{:U('nav/add',array('cid'=>$navcid))}">{:L('ADMIN_NAV_ADD')}</a></li>
</ul>
<form class="well form-search" id="mainform" action="{:U('nav/index')}" method="post">
<select id="navcid_select" name="cid">
<foreach name="navcats" item="vo"> <php>$navcid_selected=$navcid==$vo['navcid']?"selected":"";</php>
<option value="{$vo.navcid}"{$navcid_selected}>{$vo.name}</option>
</foreach>
</select>
</form>
<form class="js-ajax-form" action="{:U('nav/listorders')}" method="post">
<div class="table-actions">
<button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="50">{:L('SORT')}</th>
<th width="50">ID</th>
<th>{:L('NAVIGATION_NAME')}</th>
<th width="80">{:L('STATUS')}</th>
<th width="180">{:L('ACTIONS')}</th>
</tr>
</thead>
<tbody>
{$categorys}
</tbody>
<tfoot>
<tr>
<th width="50">{:L('SORT')}</th>
<th width="50">ID</th>
<th>{:L('NAVIGATION_NAME')}</th>
<th width="80">{:L('STATUS')}</th>
<th width="180">{:L('ACTIONS')}</th>
</tr>
</tfoot>
</table>
<div class="table-actions">
<button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
$(function() {
$("#navcid_select").change(function() {
$("#mainform").submit();
});
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('navcat/index')}">{:L('ADMIN_NAVCAT_INDEX')}</a></li>
<li class="active"><a href="{:U('navcat/add')}">{:L('ADMIN_NAVCAT_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('navcat/add_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('CATEGORY_NAME')}</label>
<div class="controls">
<input type="text" name="name">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('DESCRIPTION')}</label>
<div class="controls">
<textarea name="remark" rows="5" cols="57"></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">标识</label>
<div class="controls">
<input type="text" name="code" required/>
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('MAIN_NAVCAT')}</label>
<div class="controls">
<input type="checkbox" name="active" value="0">
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('ADD')}</button>
<a class="btn" href="{:U('navcat/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('navcat/index')}">{:L('ADMIN_NAVCAT_INDEX')}</a></li>
<li><a href="{:U('navcat/add')}">{:L('ADMIN_NAVCAT_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('navcat/edit_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('CATEGORY_NAME')}</label>
<div class="controls">
<input type="hidden" name="navcid" value="{$navcid}">
<input type="text" name="name" value="{$name}">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('DESCRIPTION')}</label>
<div class="controls">
<textarea name="remark" rows="5" cols="57">{$remark}</textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">标识</label>
<div class="controls">
<input type="text" name="code" value="{$code}" required/>
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('MAIN_NAVCAT')}</label>
<div class="controls">
<php>$mainmenu_checked=$active?"checked":"";</php>
<input type="checkbox" name="active" value="1" {$mainmenu_checked}>
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
<a class="btn" href="{:U('navcat/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('navcat/index')}">{:L('ADMIN_NAVCAT_INDEX')}</a></li>
<li><a href="{:U('navcat/add')}">{:L('ADMIN_NAVCAT_ADD')}</a></li>
</ul>
<form class="form-horizontal js-ajax-form" method="post">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="100">ID</th>
<th>{:L('NAME')}</th>
<th>标识</th>
<th>{:L('DESCRIPTION')}</th>
<th width="120">{:L('MAIN_NAVCAT')}</th>
<th width="120">{:L('ACTIONS')}</th>
</tr>
</thead>
<foreach name="navcats" item="vo">
<tr>
<td>{$vo.navcid}</td>
<td>{$vo.name}</td>
<td>{$vo.code}</td>
<td>{$vo.remark}</td>
<td><php>$mainmenu=$vo['active']?L('YES'):L('NO');</php> {$mainmenu}</td>
<td>
<a href="{:U('navcat/edit',array('id'=>$vo['navcid']))}">{:L('EDIT')}</a>|
<a href="{:U('navcat/delete',array('id'=>$vo['navcid']))}" class="js-ajax-delete">{:L('DELETE')}</a>
</td>
</tr>
</foreach>
</table>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header"/>
<style>.expander{margin-left: -20px;}</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">{:L('ADMIN_RBAC_AUTHORIZE')}</a></li>
</ul>
<form class="js-ajax-form" action="{:U('rbac/authorize_post')}" method="post">
<div class="table_full">
<table width="100%" cellspacing="0" id="dnd-example">
<tbody>
{$categorys}
</tbody>
</table>
</div>
<div class="form-actions">
<input type="hidden" name="roleid" value="{$roleid}" />
<button class="btn btn-primary js-ajax-submit" type="submit">{:L('SAVE')}</button>
<a class="btn" href="{:U('rbac/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script type="text/javascript">
var ajaxForm_list = $('form.js-ajax-form');
if (ajaxForm_list.length) {
Wind.use('ajaxForm', 'artDialog', function () {
if ($.browser.msie) {
//ie8及以下,表单中只有一个可见的input:text时,会整个页面会跳转提交
ajaxForm_list.on('submit', function (e) {
//表单中只有一个可见的input:text时,enter提交无效
e.preventDefault();
});
}
$('button.js-ajax-submit').bind('click', function (e) {
e.preventDefault();
/*var btn = $(this).find('button.js-ajax-submit'),
form = $(this);*/
var btn = $(this),
form = btn.parents('form.js-ajax-form');
//批量操作 判断选项
if (btn.data('subcheck')) {
btn.parent().find('span').remove();
if (form.find('input.js-check:checked').length) {
var msg = btn.data('msg');
if (msg) {
art.dialog({
id: 'warning',
icon: 'warning',
content: btn.data('msg'),
cancelVal: "{:L('CLOSE')}",
cancel: function () {
btn.data('subcheck', false);
btn.click();
}
});
} else {
btn.data('subcheck', false);
btn.click();
}
} else {
$('<span class="tips_error">请至少选择一项</span>').appendTo(btn.parent()).fadeIn('fast');
}
return false;
}
//ie处理placeholder提交问题
if ($.browser.msie) {
form.find('[placeholder]').each(function () {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
});
}
form.ajaxSubmit({
url: btn.data('action') ? btn.data('action') : form.attr('action'),
//按钮上是否自定义提交地址(多按钮情况)
dataType: 'json',
beforeSubmit: function (arr, $form, options) {
var text = btn.text();
//按钮文案、状态修改
btn.text(text + '中...').attr('disabled', true).addClass('disabled');
},
success: function (data, statusText, xhr, $form) {
var text = btn.text();
//按钮文案、状态修改
btn.removeClass('disabled').text(text.replace('中...', '')).parent().find('span').remove();
if (data.state === 'success') {
$('<span class="tips_success">' + data.info + '</span>').appendTo(btn.parent()).fadeIn('slow').delay(1000).fadeOut(function () {
if (data.referer) {
//返回带跳转地址
if (window.parent.art) {
//iframe弹出页
window.parent.location.href = data.referer;
} else {
window.location.href = data.referer;
}
} else {
if (window.parent.art) {
reloadPage(window.parent);
} else {
//刷新当前页
reloadPage(window);
}
}
});
} else if (data.state === 'fail') {
$('<span class="tips_error">' + data.info + '</span>').appendTo(btn.parent()).fadeIn('fast');
btn.removeProp('disabled').removeClass('disabled');
}
}
});
});
});
}
$(document).ready(function () {
Wind.css('treeTable');
Wind.use('treeTable', function () {
$("#dnd-example").treeTable({
indent: 20
});
});
});
function checknode(obj) {
var chk = $("input[type='checkbox']");
var count = chk.length;
var num = chk.index(obj);
var level_top = level_bottom = chk.eq(num).attr('level');
for (var i = num; i >= 0; i--) {
var le = chk.eq(i).attr('level');
if (eval(le) < eval(level_top)) {
chk.eq(i).attr("checked", true);
var level_top = level_top - 1;
}
}
for (var j = num + 1; j < count; j++) {
var le = chk.eq(j).attr('level');
if (chk.eq(num).attr("checked") == "checked") {
if (eval(le) > eval(level_bottom)){
chk.eq(j).attr("checked", true);
}
else if (eval(le) == eval(level_bottom)){
break;
}
} else {
if (eval(le) > eval(level_bottom)){
chk.eq(j).attr("checked", false);
}else if(eval(le) == eval(level_bottom)){
break;
}
}
}
}
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('rbac/index')}">{:L('ADMIN_RBAC_INDEX')}</a></li>
<li><a href="{:U('rbac/roleadd')}">{:L('ADMIN_RBAC_ROLEADD')}</a></li>
</ul>
<form action="{:U('Rbac/listorders')}" method="post">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="30">ID</th>
<th align="left">{:L('ROLE_NAME')}</th>
<th align="left">{:L('ROLE_DESCRIPTION')}</th>
<th width="40" align="left">{:L('STATUS')}</th>
<th width="120">{:L('ACTIONS')}</th>
</tr>
</thead>
<tbody>
<foreach name="roles" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.name}</td>
<td>{$vo.remark}</td>
<td>
<if condition="$vo['status'] eq 1">
<font color="red"></font>
<else />
<font color="red"></font>
</if>
</td>
<td>
<if condition="$vo['id'] eq 1">
<font color="#cccccc">{:L('ROLE_SETTING')}</font>|<!-- <a href="javascript:open_iframe_dialog('{:U('rbac/member',array('id'=>$vo['id']))}','成员管理');">成员管理</a> | -->
<font color="#cccccc">{:L('EDIT')}</font> | <font color="#cccccc">{:L('DELETE')}</font>
<else />
<a href="{:U('Rbac/authorize',array('id'=>$vo['id']))}">{:L('ROLE_SETTING')}</a>|
<!-- <a href="javascript:open_iframe_dialog('{:U('rbac/member',array('id'=>$vo['id']))}','成员管理');">成员管理</a>| -->
<a href="{:U('Rbac/roleedit',array('id'=>$vo['id']))}">{:L('EDIT')}</a>|
<a class="js-ajax-delete" href="{:U('Rbac/roledelete',array('id'=>$vo['id']))}">{:L('DELETE')}</a>
</if>
</td>
</tr>
</foreach>
</tbody>
</table>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body style="min-width: 600px;">
<div class="wrap">
<form method="post" class="js-ajax-form">
<table class="table table-hover">
<thead>
<tr>
<th align="center">ID</th>
<th>用户名</th>
<th>昵称</th>
<th>E-mail</th>
<th>角色名称</th>
<th align='center'>操作</th>
</tr>
</thead>
<tbody>
<foreach name="lists" item="vo">
<tr>
<td align="center">{$vo.id}</td>
<td>{$vo.user_login}</td>
<td>{$vo.user_nicename}</td>
<td>{$vo.user_email}</td>
<!-- <td>{:date('Y-m-d H:i:s', $vo['create_time'])}</td> -->
<td>{$vo.name}</td>
<td align="center">
<a href="{:U('user/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a>
</td>
</tr>
</foreach>
</tbody>
</table>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('rbac/index')}">{:L('ADMIN_RBAC_INDEX')}</a></li>
<li class="active"><a href="{:U('rbac/roleadd')}">{:L('ADMIN_RBAC_ROLEADD')}</a></li>
</ul>
<form class="form-horizontal js-ajax-form" action="{:U('Rbac/roleadd_post')}" method="post">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('ROLE_NAME')}</label>
<div class="controls">
<input type="text" name="name" value="" id="rolename"/>
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('ROLE_DESCRIPTION')}</label>
<div class="controls">
<textarea name="remark" rows="2" cols="20" id="remark" class="inputtext" style="height: 100px; width: 500px;"></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('STATUS')}</label>
<div class="controls">
<label class="radio inline" for="active_true"><input type="radio" name="status" value="1" checked id="active_true" />{:L('ENABLED')}</label>
<label class="radio inline" for="active_false"><input type="radio" name="status" value="0" id="active_false">{:L('DISABLED')}</label>
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('ADD')}</button>
<a class="btn" href="{:U('rbac/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('rbac/index')}">{:L('ADMIN_RBAC_INDEX')}</a></li>
<li><a href="{:U('rbac/roleadd')}">{:L('ADMIN_RBAC_ROLEADD')}</a></li>
</ul>
<form class="form-horizontal js-ajax-form" action="{:U('Rbac/roleedit_post')}" method="post">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('ROLE_NAME')}</label>
<div class="controls">
<input type="text" name="name" value="{$data.name}">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('ROLE_DESCRIPTION')}</label>
<div class="controls">
<textarea name="remark" rows="2" cols="20" style="height: 100px; width: 500px;">{$data.remark}</textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('STATUS')}</label>
<div class="controls">
<php>$active_true_checked=($data['status']==1)?"checked":"";</php>
<label class="radio inline" for="active_true">
<input type="radio" name="status" value="1" {$active_true_checked} id="active_true"/>{:L('ENABLED')}
</label>
<php>$active_false_checked=($data['status']==0)?"checked":"";</php>
<label class="radio inline" for="active_false">
<input type="radio" name="status" value="0" id="active_false"{$active_false_checked}>{:L('DISABLED')}
</label>
</div>
</div>
</fieldset>
<div class="form-actions">
<input type="hidden" name="id" value="{$data.id}"/>
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
<a class="btn" href="{:U('rbac/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('setting/site')}">网站信息</a></li>
<li><a href="{:U('route/index')}">URL美化</a></li>
<li class="active"><a href="{:U('route/add')}">添加URL规则</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('route/add_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">原始网址:</label>
<div class="controls">
<input type="text" name="full_url" value=""><span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">显示网址:</label>
<div class="controls">
<input type="text" name="url" value=""><span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">是否启用:</label>
<div class="controls">
<select name="status">
<option value="1">启用</option>
<option value="0">禁用</option>
</select>
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">添加</button>
<a class="btn" href="{:U('route/index')}">返回</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('setting/site')}">网站信息</a></li>
<li><a href="{:U('route/index')}">URL美化</a></li>
<li><a href="{:U('route/add')}">添加URL规则</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('route/edit_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">原始网址:</label>
<div class="controls">
<input type="text" name="full_url" value="{$full_url}"><span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">显示网址:</label>
<div class="controls">
<input type="text" name="url" value="{$url}"><span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">是否启用:</label>
<div class="controls">
<select name="status">
<option value="1">启用</option>
<php>$status_selected=$status?"":"selected";</php>
<option value="0" {$status_selected}>禁用</option>
</select>
</div>
</div>
</fieldset>
<div class="form-actions">
<input type="hidden" name="id" value="{$id}">
<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
<a class="btn" href="{:U('route/index')}">返回</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('setting/site')}">网站信息</a></li>
<li class="active"><a href="{:U('route/index')}">URL美化</a></li>
<li><a href="{:U('route/add')}">添加URL规则</a></li>
</ul>
<form class="js-ajax-form" action="{:U('route/listorders')}" method="post">
<div class="table-actions">
<button type="submit" class="btn btn-primary btn-small js-ajax-submit">排序</button>
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="50">排序</th>
<th width="50">ID</th>
<th>原始网址</th>
<th>显示网址</th>
<th>状态</th>
<th width="120">操作</th>
</tr>
</thead>
<tbody>
<php>$statuses=array('0'=>"已禁用","1"=>"已启用");</php>
<foreach name="routes" item="vo">
<tr>
<td><input name='listorders[{$vo.id}]'
class="input input-order mr5" type='text' size='3'
value='{$vo.listorder}'></td>
<td>{$vo.id}</td>
<td>{$vo.full_url}</td>
<td>{$vo.url}</td>
<td>{$statuses[$vo['status']]}</td>
<td>
<a href="{:U('route/edit',array('id'=>$vo['id']))}">修改</a>|
<a href="{:U('route/open',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确定启用吗?">启用</a>|
<a href="{:U('route/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确定禁用吗?">禁用</a>|
<a href="{:U('route/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">删除</a>
</td>
</tr>
</foreach>
</tbody>
<tfoot>
<tr>
<th width="50">排序</th>
<th width="50">ID</th>
<th>原始网址</th>
<th>显示网址</th>
<th>状态</th>
<th width="120">操作</th>
</tr>
</tfoot>
</table>
<div class="table-actions">
<button type="submit" class="btn btn-primary btn-small js-ajax-submit">排序</button>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
<style>
li {
list-style: none;
}
</style>
</head>
<body>
<div class="wrap">
<div id="error_tips">
<h2>{:L('CACHE_CLEARED')}</h2>
<div class="error_cont">
<ul>
<li>{:L('CACHE_CLEARED')}</li>
</ul>
<div class="error_return">
<a href="javascript:close_app();" class="btn">{:L('CLOSE')}</a>
</div>
</div>
</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
var close_timeout = setTimeout(function() {
parent.close_current_app();
}, 3000);
function close_app() {
clearTimeout(close_timeout);
parent.close_current_app();
}
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('User/userinfo')}">{:L('ADMIN_USER_USERINFO')}</a></li>
<li class="active"><a href="{:U('setting/password')}">{:L('ADMIN_SETTING_PASSWORD')}</a></li>
</ul>
<form class="form-horizontal js-ajax-form" method="post" action="{:U('setting/password_post')}">
<fieldset>
<div class="control-group">
<label class="control-label" for="input-old-password">{:L('OLD_PASSWORD')}</label>
<div class="controls">
<input type="password" class="input-xlarge" id="input-old-password" name="old_password">
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-password">{:L('NEW_PASSWORD')}</label>
<div class="controls">
<input type="password" class="input-xlarge" id="input-password" name="password">
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-repassword">{:L('CONFIRM_PASSWORD')}</label>
<div class="controls">
<input type="password" class="input-xlarge" id="input-repassword" name="repassword">
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
</div>
</fieldset>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('slide/index')}">{:L('ADMIN_SLIDE_INDEX')}</a></li>
<li class="active"><a href="{:U('slide/add')}">{:L('ADMIN_SLIDE_ADD')}</a></li>
</ul>
<form action="{:U('slide/add_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
<div class="span9">
<table class="table table-bordered">
<tr>
<th width="80">分类</th>
<td>
<select name="slide_cid">
<option value="0">默认分类</option>
<foreach name="categorys" item="vo">
<option value="{$vo.cid}">{$vo.cat_name}</option>
</foreach>
</select>
</td>
</tr>
<tr>
<th>{:L('TITLE')}</th>
<td>
<input type="text" style="width: 400px;" name="slide_name" value="" placeholder="请输入幻灯片名称"/>
<span class="form-required">*</span>
</td>
</tr>
<tr>
<th>{:L('LINK')}</th>
<td><input type="text" name="slide_url" value="" style="width: 400px"></td>
</tr>
<tr>
<th>{:L('DESCRIPTION')}</th>
<td><input type="text" name="slide_des" value="" style="width: 400px"></td>
</tr>
<tr>
<th>幻灯片内容</th>
<td><textarea name="slide_content" style="width: 98%; height: 200px;"></textarea></td>
</tr>
</table>
</div>
<div class="span3">
<table class="table table-bordered">
<tr>
<th>缩略图</th>
</tr>
<tr>
<td>
<div style="text-align: center;">
<input type="hidden" name="slide_pic" id="thumb" value="">
<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb_preview" width="135" style="cursor: hand" />
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb_preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">{:L("ADD")}</button>
<a class="btn" href="{:U('slide/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
<script type="text/javascript">
$(function() {
$(".js-ajax-close-btn").on('click', function(e) {
e.preventDefault();
Wind.use("artDialog", function() {
art.dialog({
id : "question",
icon : "question",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : "您确定需要关闭当前页面嘛?",
ok : function() {
setCookie("refersh_time", 1);
window.close();
return true;
}
});
});
});
/////---------------------
Wind.use('validate', 'ajaxForm', 'artDialog', function() {
//javascript
var form = $('form.js-ajax-forms');
//ie处理placeholder提交问题
if ($.browser.msie) {
form.find('[placeholder]').each(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
});
}
var formloading = false;
//表单验证开始
form.validate({
//是否在获取焦点时验证
onfocusout : false,
//是否在敲击键盘时验证
onkeyup : false,
//当鼠标掉级时验证
onclick : false,
//验证错误
showErrors : function(errorMap, errorArr) {
//errorMap {'name':'错误信息'}
//errorArr [{'message':'错误信息',element:({})}]
try {
$(errorArr[0].element).focus();
art.dialog({
id : 'error',
icon : 'error',
lock : true,
fixed : true,
background : "#CCCCCC",
opacity : 0,
content : errorArr[0].message,
cancelVal : '确定',
cancel : function() {
$(errorArr[0].element).focus();
}
});
} catch (err) {
}
},
//验证规则
rules : {
'slide_name' : {
required : 1
}
},
//验证未通过提示消息
messages : {
'slide_name' : {
required : '请输入名称'
}
},
//给未通过验证的元素加效果,闪烁等
highlight : false,
//是否在获取焦点时验证
onfocusout : false,
//验证通过,提交表单
submitHandler : function(forms) {
if (formloading)
return;
$(forms).ajaxSubmit({
url : form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
dataType : 'json',
beforeSubmit : function(arr, $form, options) {
formloading = true;
},
success : function(data, statusText, xhr, $form) {
formloading = false;
if (data.status) {
setCookie("refersh_time", 1);
//添加成功
Wind.use("artDialog", function() {
art.dialog({
id : "succeed",
icon : "succeed",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : data.info,
button : [ {
name : '继续添加?',
callback : function() {
reloadPage(window);
return true;
},
focus : true
}, {
name : '返回列表',
callback : function() {
location.href = "{:U('slide/index')}";
return true;
}
} ]
});
});
} else {
isalert(data.info);
}
}
});
}
});
});
////-------------------------
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<form action="{:U('slide/edit_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
<div class="span9">
<table class="table table-bordered">
<tr>
<th width="80">栏目</th>
<td>
<select name="slide_cid">
<option value="0">默认分类</option>
<foreach name="categorys" item="vo">
<php>$cid_selected=$slide_cid==$vo['cid']?"selected":"";</php>
<option value="{$vo.cid}"{$cid_selected}>{$vo.cat_name}</option>
</foreach>
</select>
</td>
</tr>
<tr>
<th width="80">幻灯片名称</th>
<td>
<input type="text" style="width: 400px;" name="slide_name" value="{$slide_name}" placeholder="请输入幻灯片名称"/>
<span class="form-required">*</span>
<input type="hidden" name="slide_id" value="{$slide_id}"/>
</td>
</tr>
<tr>
<th width="80">链接地址:</th>
<td><input type="text" name="slide_url" value="{$slide_url}" style="width: 400px"></td>
</tr>
<tr>
<th width="80">描述</th>
<td><input type="text" name="slide_des" value="{$slide_des}" style="width: 400px"></td>
</tr>
<tr>
<th width="80">幻灯片内容</th>
<td><textarea name="slide_content" id="description" style="width: 98%; height: 200px;">{$slide_content}</textarea></td>
</tr>
</table>
</div>
<div class="span3">
<table class="table table-bordered">
<tr>
<td><b>缩略图</b></td>
</tr>
<tr>
<td>
<div style="text-align: center;">
<input type="hidden" name="slide_pic" id="thumb" value="{$slide_pic}"> <a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
<if condition="empty($slide_pic)">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb_preview" width="135" style="cursor: hand"/>
<else />
<img src="{:sp_get_asset_upload_path($slide_pic)}" id="thumb_preview" width="135" style="cursor: hand; height: 113px;"/>
</if>
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb_preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
<a class="btn" href="{:U('slide/index')}">返回</a>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
<script type="text/javascript">
$(function() {
$(".js-ajax-close-btn").on('click', function(e) {
e.preventDefault();
Wind.use("artDialog", function() {
art.dialog({
id : "question",
icon : "question",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : "您确定需要关闭当前页面嘛?",
ok : function() {
setCookie("refersh_time", 1);
window.close();
return true;
}
});
});
});
/////---------------------
Wind.use('validate', 'ajaxForm', 'artDialog', function() {
//javascript
var form = $('form.js-ajax-forms');
//ie处理placeholder提交问题
if ($.browser.msie) {
form.find('[placeholder]').each(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
});
}
//表单验证开始
form.validate({
//是否在获取焦点时验证
onfocusout : false,
//是否在敲击键盘时验证
onkeyup : false,
//当鼠标掉级时验证
onclick : false,
//验证错误
showErrors : function(errorMap, errorArr) {
//errorMap {'name':'错误信息'}
//errorArr [{'message':'错误信息',element:({})}]
try {
$(errorArr[0].element).focus();
art.dialog({
id : 'error',
icon : 'error',
lock : true,
fixed : true,
background : "#CCCCCC",
opacity : 0,
content : errorArr[0].message,
cancelVal : '确定',
cancel : function() {
$(errorArr[0].element).focus();
}
});
} catch (err) {
}
},
//验证规则
rules : {
'slide_name' : {
required : 1
}
},
//验证未通过提示消息
messages : {
'slide_name' : {
required : '请输入名称'
}
},
//给未通过验证的元素加效果,闪烁等
highlight : false,
//是否在获取焦点时验证
onfocusout : false,
//验证通过,提交表单
submitHandler : function(forms) {
$(forms).ajaxSubmit({
url : form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
dataType : 'json',
beforeSubmit : function(arr, $form, options) {
},
success : function(data, statusText, xhr, $form) {
if (data.status) {
setCookie("refersh_time", 1);
//添加成功
Wind.use("artDialog", function() {
art.dialog({
id : "succeed",
icon : "succeed",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : data.info,
button : [ {
name : '继续编辑?',
callback : function() {
reloadPage(window);
return true;
},
focus : true
}, {
name : '返回列表',
callback : function() {
location.href = "{:U('slide/index')}";
return true;
}
} ]
});
});
} else {
isalert(data.info);
}
}
});
}
});
});
////-------------------------
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('slide/index')}">{:L('ADMIN_SLIDE_INDEX')}</a></li>
<li><a href="{:U('slide/add')}">{:L('ADMIN_SLIDE_ADD')}</a></li>
</ul>
<form class="well form-search" method="post" id="cid-form">
<select class="select_2" name="cid" style="width: 100px;" id="selected-cid">
<option value=''>{:L('ALL')}</option>
<foreach name="categorys" item="vo">
<php>$cid_select=$vo['cid']===$slide_cid?"selected":"";</php>
<option value="{$vo.cid}"{$cid_select}>{$vo.cat_name}</option>
</foreach>
</select>
</form>
<form class="js-ajax-form" method="post">
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('slide/listorders')}">{:L('SORT')}</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('slide/toggle',array('display'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('slide/toggle',array('hide'=>1))}" data-subcheck="true">{:L('HIDDEN')}</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('slide/delete')}" data-subcheck="true">{:L('DELETE')}</button>
</div>
<php> $status=array("1"=>L('DISPLAY'),"0"=>L('HIDDEN')); </php>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
<th width="50">{:L('SORT')}</th>
<th width="50">ID</th>
<th width="200">{:L('TITLE')}</th>
<th width="200">{:L('DESCRIPTION')}</th>
<th width="100">{:L('LINK')}</th>
<th width="50">{:L('IMAGE')}</th>
<th width="50">{:L('STATUS')}</th>
<th width="100">{:L('ACTIONS')}</th>
</tr>
</thead>
<foreach name="slides" item="vo">
<tr>
<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.slide_id}"></td>
<td><input name='listorders[{$vo.slide_id}]' class="input input-order mr5" type='text' size='3' value='{$vo.listorder}'></td>
<td>{$vo.slide_id}</td>
<td>{$vo.slide_name}</td>
<td>{$slide_des = mb_substr($vo['slide_des'], 0, 48,'utf-8')}</td>
<td>{$vo.slide_url}</td>
<td>
<if condition="!empty($vo['slide_pic'])">
<a href="{:sp_get_asset_upload_path($vo['slide_pic'])}" target="_blank">{:L('VIEW')}</a>
</if>
</td>
<td>{$status[$vo['slide_status']]}</td>
<td>
<a href="{:U('slide/edit',array('id'=>$vo['slide_id']))}">{:L('EDIT')}</a>
<a href="{:U('slide/delete',array('id'=>$vo['slide_id']))}" class="js-ajax-delete">{:L('DELETE')}</a>
<if condition="empty($vo['slide_status']) eq 1">
<a href="{:U('slide/cancelban',array('id'=>$vo['slide_id']))}" class="js-ajax-dialog-btn" data-msg="确定显示此幻灯片吗?">{:L('DISPLAY')}</a>
<else />
<a href="{:U('slide/ban',array('id'=>$vo['slide_id']))}" class="js-ajax-dialog-btn" data-msg="确定隐藏此幻灯片吗?">{:L('HIDE')}</a>
</if>
</td>
</tr>
</foreach>
<tfoot>
<tr>
<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
<th width="50">{:L('SORT')}</th>
<th width="50">ID</th>
<th width="200">{:L('TITLE')}</th>
<th width="200">{:L('DESCRIPTION')}</th>
<th width="100">{:L('LINK')}</th>
<th width="50">{:L('IMAGE')}</th>
<th width="50">{:L('STATUS')}</th>
<th width="100">{:L('ACTIONS')}</th>
</tr>
</tfoot>
</table>
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('slide/listorders')}">{:L('SORT')}</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('slide/toggle',array('display'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('slide/toggle',array('hide'=>1))}" data-subcheck="true">{:L('HIDDEN')}</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('slide/delete')}" data-subcheck="true">{:L('DELETE')}</button>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
setCookie('refersh_time', 0);
function refersh_window() {
var refersh_time = getCookie('refersh_time');
if (refersh_time == 1) {
window.location.reload();
}
}
setInterval(function() {
refersh_window()
}, 3000);
$(function() {
$("#selected-cid").change(function() {
$("#cid-form").submit();
});
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('slidecat/index')}">{:L('ADMIN_SLIDECAT_INDEX')}</a></li>
<li class="active"><a href="{:U('slidecat/add')}">{:L('ADMIN_SLIDECAT_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('slidecat/add_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('NAME')}</label>
<div class="controls">
<input type="text" name="cat_name">
<span class="form-required">*</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('CATEGORY_KEY')}</label>
<div class="controls">
<input type="text" name="cat_idname">
<span class="form-required">*</span>
<span style="margin-left: 15px;">{:L('CATEGORY_KEY_HELP_TEXT')}</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('DESCRIPTION')}</label>
<div class="controls">
<textarea name="cat_remark" rows="5" cols="57">{$remark}</textarea>
</div>
</div>
</fieldset>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">{:L('ADD')}</button>
<a class="btn" href="{:U('slidecat/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('slidecat/index')}">{:L('ADMIN_SLIDECAT_INDEX')}</a></li>
<li class="active"><a href="{:U('slidecat/add')}">{:L('ADMIN_SLIDECAT_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('slidecat/edit_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('NAME')}</label>
<div class="controls">
<input type="text" name="cat_name" value="{$cat_name}">
<span class="form-required">*</span>
<input type="hidden" name="cid" value="{$cid}">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('CATEGORY_KEY')}</label>
<div class="controls">
<input type="text" name="cat_idname" value="{$cat_idname}">
<span class="form-required">*</span>
<span style="margin-left: 15px;">{:L('CATEGORY_KEY_HELP_TEXT')}</span>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('DESCRIPTION')}</label>
<div class="controls">
<textarea name="cat_remark" rows="5" cols="57">{$cat_remark}</textarea>
</div>
</div>
</fieldset>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">{:L('SAVE')}</button>
<a class="btn" href="{:U('slidecat/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('slidecat/index')}">{:L('ADMIN_SLIDECAT_INDEX')}</a></li>
<li><a href="{:U('slidecat/add')}">{:L('ADMIN_SLIDECAT_ADD')}</a></li>
</ul>
<form method="post" class="js-ajax-form" action="{:U('term/listorders')}">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="50">ID</th>
<th>{:L('NAME')}</th>
<th>{:L('CATEGORY_KEY')}</th>
<th>{:L('DESCRIPTION')}</th>
<th width="120">{:L('ACTIONS')}</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>{:L('DEFAULT_CATEGORY')}</td>
<td></td>
<td>{:L('DEFAULT_CATEGORY')}</td>
<td>{:L('NOT_ALLOWED_EDIT')}</td>
</tr>
<foreach name="slidecats" item="vo">
<tr>
<td>{$vo.cid}</td>
<td>{$vo.cat_name}</td>
<td>{$vo.cat_idname}</td>
<td>{$vo.cat_remark}</td>
<td>
<a href="{:U('slidecat/edit',array('id'=>$vo['cid']))}">{:L('EDIT')}</a>|
<a href="{:U('slidecat/delete',array('id'=>$vo['cid']))}" class="js-ajax-delete">{:L('DELETE')}</a>
</td>
</tr>
</foreach>
</tbody>
</table>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('storage/index')}">{:L('ADMIN_STORAGE_INDEX')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('storage/setting_post')}">
<php>$support_storages=array("Local"=>L('DEFAULT'),"Qiniu"=>L('QINIU'),"Aliyun"=>L('ALIYUN'));</php>
<select name="type">
<foreach name="support_storages" item="vo"> <php>$type_selected=$type==$key?"selected":"";</php>
<option value="{$key}"{$type_selected}>{$vo}</option>
</foreach>
</select>
<div style="margin-top: 10px;">
<ul class="nav nav-tabs">
<li class="active"><a href="#A" data-toggle="tab">{:L('QINIU')}</a></li>
<li class=""><a href="#B" data-toggle="tab">{:L('ALIYUN')}</a></li>
</ul>
<fieldset>
<div class="tabbable">
<div class="tab-content">
<div id="A" class="tab-pane active">
<div class="control-group">
<label class="control-label">AccessKey</label>
<div class="controls">
<input type="text" class="input mr5" name="Qiniu[accessKey]" value="{$Qiniu.accessKey}">
</div>
</div>
<div class="control-group">
<label class="control-label">SecretKey</label>
<div class="controls">
<input type="text" class="input mr5" name="Qiniu[secretKey]" value="{$Qiniu.secretKey}">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('DOMAIN')}</label>
<div class="controls">
<input type="text" class="input mr5" name="Qiniu[domain]" value="{$Qiniu.domain}">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('BUCKET')}</label>
<div class="controls">
<input type="text" class="input mr5" name="Qiniu[bucket]" value="{$Qiniu.bucket}">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('GET_ACCESS_KEY')}</label>
<div class="controls">
<a href="https://portal.qiniu.com/signup?code=3lfihpz361o42" target="_blank">{:L('GET_IT_NOW')}</a>
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('QINIU_PROMOTION_CODE')}</label>
<div class="controls">
<a href="http://www.thinkcmf.com/topic/topic/index/id/103.html" target="_blank">507670e8</a>
</div>
</div>
</div>
<div id="B" class="tab-pane">
<div class="control-group">
<label class="control-label">Access Key ID</label>
<div class="controls">
<input type="text" class="input mr5" name="Aliyun[accessKey]" value="{$Aliyun.AccessKeyId}">
</div>
</div>
<div class="control-group">
<label class="control-label">Access Key Secret</label>
<div class="controls">
<input type="text" class="input mr5" name="Aliyun[secretKey]" value="{$Aliyun.AccessKeySecret}">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('DOMAIN')}</label>
<div class="controls">
<input type="text" class="input mr5" name="Aliyun[domain]" value="{$Aliyun.domain}">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('BUCKET')}</label>
<div class="controls">
<input type="text" class="input mr5" name="Aliyun[bucket]" value="{$Aliyun.Bucket}">
</div>
</div>
<div class="control-group">
<label class="control-label">超时时间</label>
<div class="controls">
<input type="text" class="input mr5" name="Aliyun[Endpoint]" value="{$Aliyun.Endpoint}">
</div>
</div>
</div>
</div>
</div>
</fieldset>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('user/index')}">{:L('ADMIN_USER_INDEX')}</a></li>
<li class="active"><a href="{:U('user/add')}">{:L('ADMIN_USER_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('User/add_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('USERNAME')}</label>
<div class="controls">
<input type="text" name="user_login">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('PASSWORD')}</label>
<div class="controls">
<input type="password" name="user_pass">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('EMAIL')}</label>
<div class="controls">
<input type="text" name="user_email">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('ROLE')}</label>
<div class="controls">
<foreach name="roles" item="vo">
<label class="checkbox inline"><input value="{$vo.id}" type="checkbox" name="role_id[]">{$vo.name}</label>
</foreach>
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('ADD')}</button>
<a class="btn" href="{:U('user/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('user/index')}">{:L('ADMIN_USER_INDEX')}</a></li>
<li><a href="{:U('user/add')}">{:L('ADMIN_USER_ADD')}</a></li>
</ul>
<form method="post" class="form-horizontal js-ajax-form" action="{:U('User/edit_post')}">
<fieldset>
<div class="control-group">
<label class="control-label">{:L('USERNAME')}</label>
<div class="controls">
<input type="text" name="user_login" value="{$user_login}">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('PASSWORD')}</label>
<div class="controls">
<input type="password" name="user_pass" value="" placeholder="******">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('EMAIL')}</label>
<div class="controls">
<input type="text" name="user_email" value="{$user_email}">
</div>
</div>
<div class="control-group">
<label class="control-label">{:L('ROLE')}</label>
<div class="controls">
<foreach name="roles" item="vo">
<label class="checkbox inline">
<php>$role_id_checked=in_array($vo['id'],$role_ids)?"checked":"";</php>
<input value="{$vo.id}" type="checkbox" name="role_id[]" {$role_id_checked}>{$vo.name}
</label>
</foreach>
</div>
</div>
</fieldset>
<div class="form-actions">
<input type="hidden" name="id" value="{$id}" />
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
<a class="btn" href="{:U('user/index')}">{:L('BACK')}</a>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('user/index')}">{:L('ADMIN_USER_INDEX')}</a></li>
<li><a href="{:U('user/add')}">{:L('ADMIN_USER_ADD')}</a></li>
</ul>
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="50">ID</th>
<th>{:L('USERNAME')}</th>
<th>{:L('LAST_LOGIN_IP')}</th>
<th>{:L('LAST_LOGIN_TIME')}</th>
<th>{:L('EMAIL')}</th>
<th>{:L('STATUS')}</th>
<th width="120">{:L('ACTIONS')}</th>
</tr>
</thead>
<tbody>
<php>$user_statuses=array("0"=>L('USER_STATUS_BLOCKED'),"1"=>L('USER_STATUS_ACTIVATED'),"2"=>L('USER_STATUS_UNVERIFIED'));</php>
<foreach name="users" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.user_login}</td>
<td>{$vo.last_login_ip}</td>
<td>
<if condition="$vo['last_login_time'] eq 0">
{:L('USER_HAVENOT_LOGIN')}
<else />
{$vo.last_login_time}
</if>
</td>
<td>{$vo.user_email}</td>
<td>{$user_statuses[$vo['user_status']]}</td>
<td>
<if condition="$vo['id'] eq 1">
<font color="#cccccc">{:L('EDIT')}</font> | <font color="#cccccc">{:L('DELETE')}</font> |
<if condition="$vo['user_status'] eq 1">
<font color="#cccccc">{:L('BLOCK_USER')}</font>
<else />
<font color="#cccccc">{:L('ACTIVATE_USER')}</font>
</if>
<else />
<a href='{:U("user/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
<a class="js-ajax-delete" href="{:U('user/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a> |
<if condition="$vo['user_status'] eq 1">
<a href="{:U('user/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="{:L('BLOCK_USER_CONFIRM_MESSAGE')}">{:L('BLOCK_USER')}</a>
<else />
<a href="{:U('user/cancelban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="{:L('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:L('ACTIVATE_USER')}</a>
</if>
</if>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('User/userinfo')}">{:L('ADMIN_USER_USERINFO')}</a></li>
<li><a href="{:U('setting/password')}">{:L('ADMIN_SETTING_PASSWORD')}</a></li>
</ul>
<form class="form-horizontal js-ajax-form" method="post" action="{:U('User/userinfo_post')}">
<fieldset>
<div class="control-group">
<label class="control-label" for="input-user_nicename">{:L('NICENAME')}</label>
<div class="controls">
<input type="hidden" name="id" value="{$id}">
<input type="text" id="input-user_nicename" name="user_nicename" value="{$user_nicename}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-gender">{:L('GENDER')}</label>
<div class="controls">
<select name="sex" id="input-gender">
<php>$sexs=array("0"=>L('GENDER_SECRECY'),"1"=>L('MALE'),"2"=>L('FEMALE'));</php>
<foreach name="sexs" item="vo">
<php>$sexselected=$key==$sex?"selected":"";</php>
<option value="{$key}"{$sexselected}>{$vo}</option>
</foreach>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-birthday">{:L('BIRTHDAY')}</label>
<div class="controls">
<input class="js-date" type="text" id="input-birthday" placeholder="2013-01-04" name="birthday" value="{$birthday}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-user_url">{:L('WEBSITE')}</label>
<div class="controls">
<input type="text" id="input-user_url" placeholder="http://thinkcmf.com" name="user_url" value="{$user_url}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-signature">{:L('SIGNATURE')}</label>
<div class="controls">
<textarea id="input-signature" placeholder="{:L('SIGNATURE')}" name="signature">{$signature}</textarea>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SAVE')}</button>
</div>
</fieldset>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh_CN" style="overflow: hidden;">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Set render engine for 360 browser -->
<meta name="renderer" content="webkit">
<meta charset="utf-8">
<title>{:L('ADMIN_CENTER')}</title>
<meta name="description" content="This is page-header (.page-header &gt; h1)">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="__PUBLIC__/simpleboot/themes/{:C('SP_ADMIN_STYLE')}/theme.min.css" rel="stylesheet">
<link href="__PUBLIC__/simpleboot/css/simplebootadmin.css" rel="stylesheet">
<link href="__PUBLIC__/simpleboot/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!--[if IE 7]>
<link rel="stylesheet" href="__PUBLIC__/simpleboot/font-awesome/4.4.0/css/font-awesome-ie7.min.css">
<![endif]-->
<link rel="stylesheet" href="__PUBLIC__/simpleboot/themes/{:C('SP_ADMIN_STYLE')}/simplebootadminindex.min.css?">
<!--[if lte IE 8]>
<link rel="stylesheet" href="__PUBLIC__/simpleboot/css/simplebootadminindex-ie.css?" />
<![endif]-->
<link href="__PUBLIC__/simpleboot/themes/{:C('SP_ADMIN_STYLE')}/me.css" rel="stylesheet" >
<style>
.navbar .nav_shortcuts .btn{margin-top: 5px;}
.macro-component-tabitem{width:101px;}
/*-----------------导航hack--------------------*/
.nav-list>li.open{position: relative;}
.nav-list>li.open .back {display: none;}
.nav-list>li.open .normal {display: inline-block !important;}
.nav-list>li.open a {padding-left: 7px;}
.nav-list>li .submenu>li>a {background: #fff;}
.nav-list>li .submenu>li a>[class*="fa-"]:first-child{left:20px;}
.nav-list>li ul.submenu ul.submenu>li a>[class*="fa-"]:first-child{left:30px;}
/*----------------导航hack--------------------*/
</style>
<script>
//全局变量
var GV = {
HOST:"{$_SERVER['HTTP_HOST']}",
DIMAUB: "",
JS_ROOT: "__PUBLIC__/js/",
TOKEN: ""
};
</script>
<php>$submenus=$SUBMENU_CONFIG;</php>
<php>function getsubmenu($submenus){</php>
<php>foreach($submenus as $menu){ </php>
<li>
<php>
$menu_name=L($menu['lang']);
$menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
</php>
<php>if(empty($menu['items'])){</php>
<a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);">
<i class="fa fa-{$menu.icon|default='desktop'}"></i>
<span class="menu-text">
{$menu_name}
</span>
</a>
<php>}else{</php>
<a href="#" class="dropdown-toggle">
<i class="fa fa-{$menu.icon|default='desktop'} normal"></i>
<span class="menu-text normal">
{$menu_name}
</span>
<b class="arrow fa fa-angle-right normal"></b>
<i class="fa fa-reply back"></i>
<span class="menu-text back">返回</span>
</a>
<ul class="submenu">
<php>getsubmenu1($menu['items'])</php>
</ul>
<php>}</php>
</li>
<php>}</php>
<php>}</php>
<php>function getsubmenu1($submenus){</php>
<php>foreach($submenus as $menu){</php>
<li>
<php>
$menu_name=L($menu['lang']);
$menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
</php>
<php>if(empty($menu['items'])){</php>
<a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);">
<span class="menu-text">
{$menu_name}
</span>
</a>
<php>}else{</php>
<a href="#" class="dropdown-toggle">
<i class="fa fa-caret-right"></i>
<span class="menu-text">
{$menu_name}
</span>
<b class="arrow fa fa-angle-right"></b>
</a>
<ul class="submenu">
<php>getsubmenu2($menu['items'])</php>
</ul>
<php>}</php>
</li>
<php>}</php>
<php>}</php>
<php>function getsubmenu2($submenus){</php>
<php>foreach($submenus as $menu){</php>
<li>
<php>
$menu_name=L($menu['lang']);
$menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
</php>
<a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);">
&nbsp;<i class="fa fa-angle-double-right"></i>
<span class="menu-text">
{$menu_name}
</span>
</a>
</li>
<php>}</php>
<php>}</php>
<if condition="APP_DEBUG">
<style>
#think_page_trace_open{left: 0 !important;
right: initial !important;}
</style>
</if>
</head>
<body style="min-width:900px;" screen_capture_injected="true">
<div id="loading"><i class="loadingicon"></i><span>{:L('LOADING')}</span></div>
<div id="right_tools_wrapper">
<!--<span id="right_tools_clearcache" title="清除缓存" onclick="javascript:openapp('{:U('admin/setting/clearcache')}','right_tool_clearcache','清除缓存');"><i class="fa fa-trash-o right_tool_icon"></i></span>-->
<span id="refresh_wrapper" title="{:L('REFRESH_CURRENT_PAGE')}" ><i class="fa fa-refresh right_tool_icon"></i></span>
</div>
<div class="navbar">
<div class="navbar-inner">
<div class="container-fluid">
<a href="{:U('index/index')}" class="brand"><small>
{:L('ADMIN_CENTER')}
</small>
</a>
<div class="pull-left nav_shortcuts" >
<a class="btn btn-small btn-warning" href="__ROOT__/" title="{:L('WEBSITE_HOME_PAGE')}" target="_blank">
<i class="fa fa-home"></i>
</a>
<if condition="sp_auth_check(sp_get_current_admin_id(),'admin/setting/clearcache')">
<a class="btn btn-small btn-danger" href="javascript:openapp('{:U('admin/setting/clearcache')}','index_clearcache','{:L('ADMIN_SETTING_CLEARCACHE')}');" title="{:L('ADMIN_SETTING_CLEARCACHE')}">
<i class="fa fa-trash-o"></i>
</a>
</if>
</div>
<ul class="nav simplewind-nav pull-right">
<li class="light-blue">
<a data-toggle="dropdown" href="#" class="dropdown-toggle">
<if condition="$admin['avatar']">
<img class="nav-user-photo" width="30" height="30" src="{:sp_get_user_avatar_url($admin['avatar'])}" alt="{$admin.user_login}">
<else />
<img class="nav-user-photo" width="30" height="30" src="__TMPL__Public/assets/images/logo-18.png" alt="{$admin.user_login}">
</if>
<span class="user-info">
{:L('WELCOME_USER',array('username'=>empty($admin['user_nicename'])?$admin['user_login']:$admin['user_nicename']))}
</span>
<i class="fa fa-caret-down"></i>
</a>
<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-closer">
<if condition="sp_auth_check(sp_get_current_admin_id(),'admin/setting/site')">
<li><a href="javascript:openapp('{:U('setting/site')}','index_site','{:L('ADMIN_SETTING_SITE')}');"><i class="fa fa-cog"></i> {:L('ADMIN_SETTING_SITE')}</a></li>
</if>
<if condition="sp_auth_check(sp_get_current_admin_id(),'admin/user/userinfo')">
<li><a href="javascript:openapp('{:U('user/userinfo')}','index_userinfo','{:L('ADMIN_USER_USERINFO')}');"><i class="fa fa-user"></i> {:L('ADMIN_USER_USERINFO')}</a></li>
</if>
<li><a href="{:U('Public/logout')}"><i class="fa fa-sign-out"></i> {:L('LOGOUT')}</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="main-container container-fluid">
<div class="sidebar" id="sidebar">
<!-- <div class="sidebar-shortcuts" id="sidebar-shortcuts">
</div> -->
<div id="nav_wraper">
<ul class="nav nav-list">
{:getsubmenu($submenus)}
</ul>
</div>
</div>
<div class="main-content">
<div class="breadcrumbs" id="breadcrumbs">
<a id="task-pre" class="task-changebt"></a>
<div id="task-content">
<ul class="macro-component-tab" id="task-content-inner">
<li class="macro-component-tabitem noclose" app-id="0" app-url="{:U('main/index')}" app-name="首页">
<span class="macro-tabs-item-text">{:L('HOME')}</span>
</li>
</ul>
<div style="clear:both;"></div>
</div>
<a id="task-next" class="task-changebt"></a>
</div>
<div class="page-content" id="content">
<iframe src="{:U('Main/index')}" style="width:100%;height: 100%;" frameborder="0" id="appiframe-0" class="appiframe"></iframe>
</div>
</div>
</div>
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<script>
var ismenumin = $("#sidebar").hasClass("menu-min");
$(".nav-list").on( "click",function(event) {
var closest_a = $(event.target).closest("a");
if (!closest_a || closest_a.length == 0) {
return
}
if (!closest_a.hasClass("dropdown-toggle")) {
if (ismenumin && "click" == "tap" && closest_a.get(0).parentNode.parentNode == this) {
var closest_a_menu_text = closest_a.find(".menu-text").get(0);
if (event.target != closest_a_menu_text && !$.contains(closest_a_menu_text, event.target)) {
return false
}
}
return
}
var closest_a_next = closest_a.next().get(0);
if (!$(closest_a_next).is(":visible")) {
var closest_ul = $(closest_a_next.parentNode).closest("ul");
if (ismenumin && closest_ul.hasClass("nav-list")) {
return
}
closest_ul.find("> .open > .submenu").each(function() {
if (this != closest_a_next && !$(this.parentNode).hasClass("active")) {
$(this).slideUp(150).parent().removeClass("open")
}
});
}
if (ismenumin && $(closest_a_next.parentNode.parentNode).hasClass("nav-list")) {
return false;
}
$(closest_a_next).slideToggle(150).parent().toggleClass("open");
return false;
});
</script>
<script src="__TMPL__Public/assets/js/index.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
<style>
li {
list-style: none;
}
</style>
</head>
<body>
<div class="wrap">
<div id="error_tips">
<h2>{$msgTitle}</h2>
<div class="error_cont">
<ul>
<li>{$error}</li>
</ul>
<div class="error_return">
<a href="{$jumpUrl}" class="btn">返回</a>
</div>
</div>
</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
setTimeout(function() {
location.href = '{$jumpUrl}';
}, 3000);
</script>
</body>
</html>
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!-- Set render engine for 360 browser -->
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- HTML5 shim for IE8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<![endif]-->
<link href="__PUBLIC__/simpleboot/themes/{:C('SP_ADMIN_STYLE')}/theme.min.css" rel="stylesheet">
<link href="__PUBLIC__/simpleboot/css/simplebootadmin.css" rel="stylesheet">
<link href="__PUBLIC__/js/artDialog/skins/default.css" rel="stylesheet" />
<link href="__PUBLIC__/simpleboot/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<style>
.length_3{width: 180px;}
form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;}
.table-list{margin-bottom: 0px;}
a { color: #2d80fd; }
a:hover { color: #2d80fd; }
</style>
<!--[if IE 7]>
<link rel="stylesheet" href="__PUBLIC__/simpleboot/font-awesome/4.4.0/css/font-awesome-ie7.min.css">
<![endif]-->
<script type="text/javascript">
//全局变量
var GV = {
DIMAUB: "__ROOT__/",
JS_ROOT: "public/js/",
TOKEN: ""
};
</script>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/wind.js"></script>
<script src="__PUBLIC__/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<if condition="APP_DEBUG">
<style>
#think_page_trace_open{
z-index:9999;
}
</style>
</if>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<link rel="shortcut icon" href="__TMPL__Public/assets/images/favicon.ico" type="image/x-icon">
<title>掌贝后台登录</title>
</head>
<style>
*{ margin: 0px; padding: 0px; }
html{ position: relative; height: 100%; }
body{ background-color: #f4f2f4; color: #717379; }
li { list-style: none; }
#login-page{ width: 384px; margin: 50px auto; text-align: center; }
#logo{ height: 68px; }
#login-page h1{ margin-top: 20px; font-size: 30px; color: #2d80fd; }
#login-form{ position: relative; margin-top: 30px; background-color: #FFF; text-align: left; border: 1px solid #dfdddf; border-radius: 3px; }
#login-form label{ font-size: 13px; }
#login-form ul{ padding: 32px; color: #747474; }
#login-form li{ padding-top: 16px; position: relative;}
#login-form input{ margin-top: 5px; padding: 10px 0px; width: 100%; font-size: 18px; border: 1px solid #dfdddf; border-radius: 3px; text-indent:10px; }
#login-form input[type='checkbox']{ width: 20px; }
#login-form input[type='submit']{ margin-bottom: 20px; color: #fff; background-color: #2d80fd; border: 0px; text-indent:0px; cursor: pointer; }
#msg{ position: absolute; top: 30%; left: 14%; display: none; color: #fff; background: rgba(0,0,0,0.5); padding: 20px; border-radius: 4px; }
#footer{ font-size: 14px; text-align: center; }
#login-form #milkcaptcha-input{ width: 59%;}
#verify-img { border: 1px solid #ddd; width: 100px; height: 40px; }
</style>
<body>
<div class="page">
<div id="login-page">
<img id="logo" alt="" src="__TMPL__Public/assets/images/logo.png">
<h1>后台登录</h1>
<form method="post" name="login" action="{:U('public/dologin')}" autoComplete="off" class="js-ajax-form" id="login-form">
<ul>
<li>
<label>用户名或电子邮箱</label><br>
<input type="text" name="username" required="">
</li>
<li>
<label>密码</label><br>
<input type="password" name="password" required="">
</li>
<li>
<label>验证码</label><br>
<input type="text" name="verify" required="" id="milkcaptcha-input">
{:sp_verifycode_img('length=4&font_size=18&width=120&height=40&use_noise=1&use_curve=0','style="cursor: pointer; position: absolute; right: 0; bottom: 1px;" title="点击获取"')}
</li>
<li>
<input type="submit" name="submit" class="js-ajax-submit" value="登&#12288;录">
</li>
</ul>
</form>
</div>
<div id="footer">
<p>无法登陆? 推荐浏览器 Chrome 或 FireFox</p>
</div>
</div>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
<style>
li {
list-style: none;
}
</style>
</head>
<body>
<div class="wrap">
<div id="error_tips">
<h2>{$msgTitle}</h2>
<div class="error_cont">
<ul>
<li>{$message}</li>
</ul>
<div class="error_return">
<a href="{$jumpUrl}" class="btn">返回</a>
</div>
</div>
</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
setTimeout(function() {
location.href = '{$jumpUrl}';
}, 3000);
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body style="min-width:800px;">
<div class="wrap js-check-wrap">
<form class="js-ajax-form" action="" method="post">
<div class="table_list">
<table width="100%">
<thead>
<tr>
<td width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></td>
<td width="50">ID</td>
<td>省/直辖市</td>
<td>城市名称</td>
<td width="50"><span>状态</span></td>
</tr>
</thead>
<php>$status=array("1"=>"显示","0"=>"隐藏");</php>
<foreach name="citys" item="vo">
<tr>
<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.city_id}" ></td>
<td>{$vo.city_id}</td>
<td>{$vo.province}</td>
<td>{$vo.city}</td>
<td>{$status[$vo['status']]}</td>
</tr>
</foreach>
</table>
<div class="p10"><div class="pages"> {$Page} </div> </div>
</div>
<div>
<div class="btn_wrap_pd">
<label class="mr20"><input type="checkbox" class="js-check-all" data-direction="y" data-checklist="js-check-y">全选</label>
<button class="btn js-ajax-submit" type="submit" data-action="{:U('Locationadmin/city_show',array('show'=>1))}" data-subcheck="true">显示</button>
<button class="btn js-ajax-submit" type="submit" data-action="{:U('Locationadmin/city_show',array('unshow'=>1))}" data-subcheck="true">隐藏</button>
</div>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js{$js_debug}"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body style="min-width:800px;">
<div class="wrap js-check-wrap">
<form class="js-ajax-form" action="" method="post">
<div class="table_list">
<table width="100%">
<thead>
<tr>
<td width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></td>
<td width="50">ID</td>
<td>省/直辖市</td>
<td>城市名称</td>
<td>县/区</td>
<td width="50"><span>状态</span></td>
</tr>
</thead>
<php>$status=array("1"=>"显示","0"=>"隐藏");</php>
<foreach name="districts" item="vo">
<tr>
<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.district_id}" ></td>
<td>{$vo.district_id}</td>
<td>{$vo.province}</td>
<td>{$vo.city}</td>
<td>{$vo.district}</td>
<td>{$status[$vo['status']]}</td>
</tr>
</foreach>
</table>
<div class="p10"><div class="pages"> {$Page} </div> </div>
</div>
<div>
<div class="btn_wrap_pd">
<label class="mr20"><input type="checkbox" class="js-check-all" data-direction="y" data-checklist="js-check-y">全选</label>
<button class="btn js-ajax-submit" type="submit" data-action="{:U('Locationadmin/district_show',array('show'=>1))}" data-subcheck="true">显示</button>
<button class="btn js-ajax-submit" type="submit" data-action="{:U('Locationadmin/district_show',array('unshow'=>1))}" data-subcheck="true">隐藏</button>
</div>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js{$js_debug}"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body style="min-width:800px;">
<div class="wrap js-check-wrap">
<form class="js-ajax-form" action="" method="post">
<div class="table_list">
<table width="100%" class="table table-hover">
<thead>
<tr>
<td width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></td>
<th width="50">排序</th>
<td width="50">ID</td>
<td>名称</td>
<td width="50"><span>状态</span></td>
</tr>
</thead>
<php>$status=array("1"=>"显示","0"=>"隐藏");</php>
<foreach name="provinces" item="vo">
<tr>
<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.province_id}" ></td>
<td><input name='listorders[{$vo.province_id}]' class="input input-order" type='text' size='3' value='{$vo.listorder}'></td>
<td>{$vo.province_id}</td>
<td>{$vo.province}</td>
<td>{$status[$vo['status']]}</td>
</tr>
</foreach>
</table>
<div class="p10"><div class="pages"> {$Page} </div> </div>
</div>
<div>
<div class="btn_wrap_pd">
<label class="mr20"><input type="checkbox" class="js-check-all" data-direction="y" data-checklist="js-check-y">全选</label>
<button class="btn btn-primary js-ajax-submit" type="submit" data-action="{:U('Locationadmin/listorders')}">排序</button>
<button class="btn js-ajax-submit" type="submit" data-action="{:U('Locationadmin/province_show',array('show'=>1))}" data-subcheck="true">显示</button>
<button class="btn js-ajax-submit" type="submit" data-action="{:U('Locationadmin/province_show',array('unshow'=>1))}" data-subcheck="true">隐藏</button>
</div>
</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js{$js_debug}"></script>
</body>
</html>
\ No newline at end of file
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width:100%;height: 100%;overflow: hidden;margin:0;}
#suggestId{position: absolute;z-index: 9999;right:20px;top:20px;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=KxkuAcGBup6sD1XxaDW85KBG"></script>
<title>点击地图获取当前经纬度</title>
</head>
<body>
<input id="lng_input" type="hidden" value="{$lng}"/>
<input id="lat_input" type="hidden" value="{$lat}"/>
<input id="address_input" type="hidden"/>
<input id="city_input" type="hidden"/>
<input id="province_input" type="hidden"/>
<input id="district_input" type="hidden"/>
<div style="position: relative;">
<input id="suggestId" type="text" placeholder="请输入地址"/>
<div id="allmap"></div>
</div>
<script type="text/javascript">
// 百度地图API功能
var center=new BMap.Point({$lng}, {$lat});
var map = new BMap.Map("allmap");
map.centerAndZoom(new BMap.Point(116.404, 39.915), 8);
map.enableScrollWheelZoom(); //启用滚轮放大缩小,默认禁用
map.enableContinuousZoom();
var map_ac = new BMap.Autocomplete( //建立一个自动完成的对象
{"input" : "suggestId"
,"location" : map
});
var marker = new BMap.Marker(center); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.enableDragging(); //可拖拽
marker.setAnimation(BMAP_ANIMATION_BOUNCE);
map_ac.addEventListener("onconfirm", function(e) { //鼠标点击下拉列表后的事件
var _value = e.item.value;
function myFun(){
var pp = local.getResults().getPoi(0).point; //获取第一个智能搜索的结果
map.centerAndZoom(pp, 8);
marker.setPosition(pp);
mgetLocation(pp);
}
myValue = _value.province + _value.city + _value.district + _value.street + _value.business;
var local = new BMap.LocalSearch(map, { //智能搜索
onSearchComplete: myFun
});
local.search(myValue);
});
var opts = {
width : 200, // 信息窗口宽度
height: 30, // 信息窗口高度
title : "" , // 信息窗口标题
enableMessage:false,//设置允许信息窗发送短息
}
var infoWindow = new BMap.InfoWindow("拖动我设置你的位置", opts); // 创建信息窗口对象
marker.openInfoWindow(infoWindow);
var gc = new BMap.Geocoder();
function msetpoint(e){
document.getElementById("lng_input").value=e.point.lng;
document.getElementById("lat_input").value=e.point.lat;
marker.setPosition(new BMap.Point(e.point.lng, e.point.lat));
mgetLocation(e.point);
}
function mgetLocation(point){
gc.getLocation(point, function(rs){
var addComp = rs.addressComponents;
marker.openInfoWindow(new BMap.InfoWindow(rs.address, opts));
document.getElementById("address_input").value=rs.address;
document.getElementById("city_input").value=addComp.city;
document.getElementById("province_input").value=addComp.province;
document.getElementById("district_input").value=addComp.district;
//alert(addComp.province + ", " + addComp.city + ", " + addComp.district + ", " + addComp.street + ", " + addComp.streetNumber);
});
}
marker.addEventListener("dragend",msetpoint)
map.addEventListener("click", msetpoint);
function tilesloaded(){
map.setCenter(center); //设置地图中心点。center除了可以为坐标点以外,还支持城市名
mgetLocation(center);
// map.setZoom(8); //将视图切换到指定的缩放等级,中心点坐标不变
map.removeEventListener("tilesloaded",tilesloaded);
}
map.addEventListener("tilesloaded",tilesloaded);
</script>
</body>
</html>
<admintpl file="header"/>
</head>
<body class="body_none">
<style>
/*设置tab*/
.pop_nav {
padding:10px 15px 0;
margin-bottom:10px;
}
.pop_nav ul{
border-bottom:1px solid #e3e3e3;
padding:0 5px;
height:25px;
clear:both;
}
.pop_nav ul li{
float:left;
margin-right:10px;
}
.pop_nav ul li a{
float:left;
display:block;
padding:0 10px;
height:25px;
line-height:23px;
}
.pop_nav ul li.current a{
border:1px solid #e3e3e3;
border-bottom:0 none;
color:#333;
font-weight:700;
background:#fff;
position:relative;
border-radius:2px;
margin-bottom:-1px;
}
.pop_cont{
padding:0 15px;
}
/*上传*/
.edit_menu_cont {
padding: 10px 15px;
}
.edit_uping {
height: 30px;
margin-bottom: 10px;
}
.edit_uping .num {
color: #999999;
float: right;
margin-top: 5px;
}
.edit_uping .num em {
color: #FF5500;
font-style: normal;
}
.eidt_uphoto {
border: 1px solid #CCCCCC;
}
.eidt_uphoto ul {
height: 280px;
overflow-y: scroll;
padding-bottom: 10px;
position: relative;
}
.eidt_uphoto li {
display: inline;
float: left;
height: 100px;
margin: 10px 0 0 10px;
width: 87px;
}
.eidt_uphoto .invalid {
background: none repeat scroll 0 0 #FBFBFB;
border: 1px solid #CCCCCC;
height: 98px;
position: relative;
width: 78px;
}
.eidt_uphoto .invalid .error {
padding: 30px 1px;
text-align: center;
}
.eidt_uphoto .no {
background: url("__TMPL__Public/assets/images/upload_pic.jpg") no-repeat scroll center center #FBFBFB;
border: 1px solid #CCCCCC;
height: 98px;
overflow: hidden;
text-indent: -2000em;
}
.eidt_uphoto .nouplode {
background: #FBFBFB;
border: 1px solid #CCCCCC;
height: 98px;
overflow: hidden;
text-align: center;
padding: 0px 5px 0px 5px;
}
.eidt_uphoto .schedule {
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #CCCCCC;
height: 98px;
line-height: 98px;
position: relative;
text-align: center;
}
.eidt_uphoto .schedule span {
background: none repeat scroll 0 0 #F0F5F9;
height: 98px;
left: 0;
position: absolute;
top: 0;
}
.eidt_uphoto .schedule em {
left: 0;
position: absolute;
text-align: center;
top: 0;
width: 78px;
z-index: 1;
}
.eidt_uphoto .get{
background:#ffffff;
border:1px solid #cccccc;
position:relative;
overflow:hidden;
}
.eidt_uphoto .selected{
border:2px solid #1D76B7;
}
.eidt_uphoto .get img{
cursor:pointer;
}
.eidt_uphoto .del{
position:absolute;
width:15px;
height:15px;
background:url("__TMPL__Public/assets/images/upload_del.png") no-repeat;
right:1px;
top:1px;
overflow:hidden;
text-indent:-2000em;
display:none;
}
.eidt_uphoto .del:hover{
background-position:-20px 0;
}
.eidt_uphoto .get img{
vertical-align:top;
width:87px;
height:75px;
border-bottom:1px solid #ccc;
}
.eidt_uphoto .get input{
border:0;
outline:0 none;
margin-left:3px;
}
.eidt_uphoto .get .edit{
position:absolute;
height:22px;
line-height:22px;
text-align:center;
width:78px;
bottom:0;
left:0;
background:#e5e5e5;
color:#333;
filter:alpha(opacity=70);
-moz-opacity:0.7;
opacity:0.7;
display:none;
}
.eidt_uphoto li:hover .edit,
.eidt_uphoto li:hover .del{
/*text-decoration:none;
display:block;*/
}
/*上传选择按钮*/
#btupload,.addnew{
background: url("__PUBLIC__/js/swfupload/images/swfBnt.png") no-repeat; float:left; margin-right:10px;width:75px; height:28px; line-height:28px;font-weight:700; color:#fff;
}
#btupload{
vertical-align:middle;border:none;cursor: hand;!important;cursor: pointer;
}
.addnew{
background: url("__PUBLIC__/js/swfupload/images/swfBnt.png") no-repeat; float:left; margin-right:10px;width:75px; height:28px; line-height:28px;font-weight:700; color:#fff;
}
.addnew{
background-position: left bottom;
}
</style>
<script>
//用于图库加载
function set_iframe(id,src){
if($("#"+id).attr("src") == ""){
$("#"+id).attr("src",src);
}
}
//网络地址
function addonlinefile(obj) {
var strs = $(obj).val() ? '|'+ $(obj).val() :'';
$('#att-status').html(strs);
}
//是否添加水印设置
function change_params(){
if($('#watermark_enable').attr('checked')) {
swfu.addPostParam('watermark_enable', '1');
} else {
swfu.removePostParam('watermark_enable');
}
}
//图片选择处理回调
function album_cancel(obj,id,source){
//图片地址
var src = $(obj).attr("data-path");
//上传图片文件名
var filename = $(obj).attr("title");
//选择状态中的数据对象
var selected = $("#fsUploadProgress .selected");
if($("#aid-"+id).hasClass('selected')){
$("#aid-"+id).removeClass("selected");
selected = $("#fsUploadProgress .selected");
var imgstr = $("#att-status").html();
var length = selected.children("img").length;
var strs = filenames = '';
for(var i=0;i<length;i++){
strs += '|'+selected.children("img").eq(i).attr('path');
filenames += '|'+selected.children("img").eq(i).attr('title');
}
$('#att-status').html(strs);
$('#att-status').html(filenames);
} else {
var num = $('#att-status').html().split('|').length;
var file_upload_limit = '1';
if(num > file_upload_limit) {alert('不能选择超过'+file_upload_limit+'个附件'); return false;}
$("#aid-"+id).addClass("selected");
$('#att-status').append('|'+src);
$('#att-name').append('|'+filename);
}
}
</script>
<script type="text/javascript">
var swfu = '';
$(document).ready(function(){
Wind.use("swfupload",GV.DIMAUB+"public/js/swfupload/handlers.js",function(){
swfu = new SWFUpload({
flash_url:"__PUBLIC__/js/swfupload/swfupload.swf",
upload_url:"{:U('asset/swfupload')}",
file_post_name : "Filedata",
post_params:{
"{:C('VAR_SESSION_ID')}":"{:session_id()}",
"thumb_width":"0",
"thumb_height":"0",
"watermark_enable":"1",
"filetype_post":"jpg|jpeg|gif|png|bmp|zip"
},
file_size_limit:"20240KB",
file_types:"*.jpg;*.jpeg;*.gif;*.png;*.bmp;*.zip",
file_types_description:"All Files",
file_upload_limit:"1",
custom_settings : {progressTarget : "fsUploadProgress",cancelButtonId : "btnCancel"},
button_image_url: "",
button_width: 75,
button_height: 28,
button_placeholder_id: "buttonPlaceHolder",
button_text_style: "",
button_text_top_padding: 3,
button_text_left_padding: 12,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
file_dialog_start_handler : fileDialogStart,
file_queued_handler : fileQueued,
file_queue_error_handler:fileQueueError,
file_dialog_complete_handler:fileDialogComplete,
upload_progress_handler:uploadProgress,
upload_error_handler:uploadError,
upload_success_handler:uploadSuccess,
upload_complete_handler:uploadComplete
});
});
})</script>
<div class="wrap" style="padding:5px;">
<div class="pop_nav">
<ul class="js-tabs-nav unstyled">
<li class="current"><a href="javascript:;;">上传附件</a></li>
<li class=""><a href="javascript:;;">网络文件</a></li>
</ul>
</div>
<div class="js-tabs-content">
<div class="pop_cont">
<div class="">
<div class="edit_uping">
<!--选择按钮-->
<div class="addnew"><span id="buttonPlaceHolder"></span></div>
<span class="num">最多上传<em> 1</em> 个附件,单文件最大 <em>20240 KB</em><em style="cursor: help;" title="可上传格式:jpg,jpeg,gif,png,bmp">支持格式?</em></span>
</div>
<div class="eidt_uphoto">
<ul id="fsUploadProgress" class="cc">
<!--<li class="J_empty"><div class="no">暂无</div></li>-->
</ul>
</div>
</div>
</div>
<div class="pop_cont"> 请输入网络地址
<div class="bk3"></div>
<input type="text" name="info[filename]" class="input" value="" style="width:600px;" placeholder="http://" onblur="addonlinefile(this)">
</div>
<div class="pop_cont">
<iframe name="album-list" src="" frameborder="false" scrolling="no" style="overflow-x:hidden;border:none" width="100%" height="350" allowtransparency="true" id="album_list"></iframe>
</div>
</div>
</div>
<div id="att-status" style="display:none"></div>
<div id="att-status-del" style="display:none"></div>
<div id="att-name" style="display:none"></div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
$(function(){
$("#att-status").html("");
$("#att-status-del").html("");
$("#att-name").html("");
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('AdminCase/index')}">{:L('PORTAL_ADMINPOST_INDEX')}</a></li>
<li class="active"><a href="{:U('AdminCase/add',array('term'=>empty($term['term_id'])?'':$term['term_id']))}" target="_self">{:L('PORTAL_ADMINPOST_ADD')}</a></li>
</ul>
<form action="{:U('AdminCase/add_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
<div class="span9">
<table class="table table-bordered">
<tr>
<th width="80">栏目</th>
<td>
<select multiple="multiple" style="max-height: 100px;" name="term[]">{$taxonomys}</select>
<div>windows:按住 Ctrl 按钮来选择多个选项,Mac:按住 command 按钮来选择多个选项</div>
</td>
</tr>
<tr>
<th>标题</th>
<td>
<input type="text" style="width:400px;" name="post[post_title]" id="title" required value="" placeholder="请输入标题"/>
<span class="form-required">*</span>
</td>
</tr>
<tr>
<th>关键词</th>
<td><input type="text" name="post[post_keywords]" id="keywords" value="" style="width: 400px" placeholder="请输入关键字"> 多关键词之间用空格或者英文逗号隔开</td>
</tr>
<tr>
<th>文章来源</th>
<td><input type="text" name="post[post_source]" id="source" value="" style="width: 400px" placeholder="请输入文章来源"></td>
</tr>
<tr>
<th>摘要</th>
<td>
<textarea name="post[post_excerpt]" id="description" required style="width: 98%; height: 50px;" placeholder="请填写摘要"></textarea>
</td>
</tr>
<tr>
<th>内容</th>
<td>
<script type="text/plain" id="content" name="post[post_content]"></script>
</td>
</tr>
</table>
</div>
<div class="span3">
<table class="table table-bordered">
<tr>
<th><b>缩略图</b></th>
</tr>
<tr>
<td>
<div style="text-align: center;">
<input type="hidden" name="smeta[thumb]" id="thumb" value="">
<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb_preview" width="135" style="cursor: hand" />
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb_preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</td>
</tr>
<tr>
<th><b>发布时间</b></th>
</tr>
<tr>
<td><input type="text" name="post[post_modified]" value="{:date('Y-m-d H:i:s',time())}" class="js-datetime" style="width: 160px;"></td>
</tr>
<tr>
<th><b>状态</b></th>
</tr>
<tr>
<td>
<label class="radio"><input type="radio" name="post[post_status]" value="1" checked>发布</label>
<label class="radio"><input type="radio" name="post[post_status]" value="0">待发布</label>
</td>
</tr>
<tr>
<td>
<label class="radio"><input type="radio" name="post[istop]" value="1">置顶</label>
<label class="radio"><input type="radio" name="post[istop]" value="0" checked>未置顶</label>
</td>
</tr>
<tr>
<td>
<label class="radio"><input type="radio" name="post[recommended]" value="1">热门</label>
<label class="radio"><input type="radio" name="post[recommended]" value="0" checked>非热门</label>
</td>
</tr>
</table>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
<a class="btn" href="{:U('AdminCase/index')}">返回</a>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
<script type="text/javascript">
//编辑器路径定义
var editorURL = GV.DIMAUB;
</script>
<script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function() {
$(".js-ajax-close-btn").on('click', function(e) {
e.preventDefault();
Wind.use("artDialog", function() {
art.dialog({
id : "question",
icon : "question",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : "您确定需要关闭当前页面嘛?",
ok : function() {
setCookie("refersh_time", 1);
window.close();
return true;
}
});
});
});
/////---------------------
Wind.use('validate', 'ajaxForm', 'artDialog', function() {
//javascript
//编辑器
editorcontent = new baidu.editor.ui.Editor();
editorcontent.render('content');
try {
editorcontent.sync();
} catch (err) {
}
//增加编辑器验证规则
jQuery.validator.addMethod('editorcontent', function() {
try {
editorcontent.sync();
} catch (err) {
}
return editorcontent.hasContents();
});
var form = $('form.js-ajax-forms');
//ie处理placeholder提交问题
if ($.browser.msie) {
form.find('[placeholder]').each(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
});
}
var formloading = false;
//表单验证开始
form.validate({
//是否在获取焦点时验证
onfocusout : false,
//是否在敲击键盘时验证
onkeyup : false,
//当鼠标掉级时验证
onclick : false,
//验证错误
showErrors : function(errorMap, errorArr) {
//errorMap {'name':'错误信息'}
//errorArr [{'message':'错误信息',element:({})}]
try {
$(errorArr[0].element).focus();
art.dialog({
id : 'error',
icon : 'error',
lock : true,
fixed : true,
background : "#CCCCCC",
opacity : 0,
content : errorArr[0].message,
cancelVal : '确定',
cancel : function() {
$(errorArr[0].element).focus();
}
});
} catch (err) {
}
},
//验证规则
rules : {
'post[post_title]' : {
required : 1
},
'post[post_content]' : {
editorcontent : true
}
},
//验证未通过提示消息
messages : {
'post[post_title]' : {
required : '请输入标题'
},
'post[post_content]' : {
editorcontent : '内容不能为空'
}
},
//给未通过验证的元素加效果,闪烁等
highlight : false,
//是否在获取焦点时验证
onfocusout : false,
//验证通过,提交表单
submitHandler : function(forms) {
if (formloading)
return;
$(forms).ajaxSubmit({
url : form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
dataType : 'json',
beforeSubmit : function(arr, $form, options) {
formloading = true;
},
success : function(data, statusText, xhr, $form) {
formloading = false;
if (data.status) {
setCookie("refersh_time", 1);
//添加成功
Wind.use("artDialog", function() {
art.dialog({
id : "succeed",
icon : "succeed",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : data.info,
button : [ {
name : '继续添加?',
callback : function() {
reloadPage(window);
return true;
},
focus : true
}, {
name : '返回列表页',
callback : function() {
location = "{:U('AdminCase/index')}";
return true;
}
} ]
});
});
} else {
isalert(data.info);
}
}
});
}
});
});
////-------------------------
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:U('AdminCase/index')}">{:L('PORTAL_ADMINPOST_INDEX')}</a></li>
<li class="active"><a href="javascript:;">{:L('PORTAL_ADMINPOST_EDIT')}</a></li>
</ul>
<form action="{:U('AdminCase/edit_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
<div class="row-fluid">
<div class="span9">
<table class="table table-bordered">
<tr>
<th width="80">栏目</th>
<td>
<select multiple="multiple" style="max-height: 100px;"name="term[]">{$taxonomys}</select>
<div>windows:按住 Ctrl 按钮来选择多个选项,Mac:按住 command 按钮来选择多个选项</div>
</td>
</tr>
<tr>
<th>标题</th>
<td>
<input type="hidden" name="post[id]" value="{$post.id}">
<input type="text" style="width: 400px;" name="post[post_title]" required value="{$post.post_title}" placeholder="请输入标题"/>
<span class="form-required">*</span>
</td>
</tr>
<tr>
<th>关键词</th>
<td>
<input type="text" name="post[post_keywords]" style="width: 400px" value="{$post['post_keywords']}" placeholder="请输入关键字">
多关键词之间用空格或者英文逗号隔开
</td>
</tr>
<tr>
<th>文章来源</th>
<td>
<input type="text" name="post[post_source]" value="{$post['post_source']}" style="width: 400px" placeholder="请输入文章来源">
</td>
</tr>
<tr>
<th>摘要</th>
<td>
<textarea name="post[post_excerpt]" required style="width: 98%; height: 50px;" placeholder="请填写摘要">{$post.post_excerpt}</textarea>
<span class="form-required">*</span>
</td>
</tr>
<tr>
<th>内容</th>
<td>
<script type="text/plain" id="content" name="post[post_content]">{$post.post_content}</script>
</td>
</tr>
</table>
</div>
<div class="span3">
<table class="table table-bordered">
<tr>
<td><b>缩略图</b></td>
</tr>
<tr>
<td>
<div style="text-align: center;">
<input type="hidden" name="smeta[thumb]" id="thumb" value="{$smeta.thumb|default=''}">
<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
<if condition="empty($smeta['thumb'])">
<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb_preview" width="135" style="cursor: hand"/>
<else />
<img src="{:sp_get_asset_upload_path($smeta['thumb'])}" id="thumb_preview" width="135" style="cursor: hand"/>
</if>
</a>
<input type="button" class="btn btn-small" onclick="$('#thumb_preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</td>
</tr>
<tr>
<th>发布时间</th>
</tr>
<tr>
<td><input type="text" name="post[post_modified]" value="{$post.post_modified}" class="js-datetime" style="width: 160px;"></td>
</tr>
<tr>
<th>状态</th>
</tr>
<tr>
<td>
<php>
$status_yes=$post['post_status']==1?"checked":"";
$status_no=$post['post_status']==0?"checked":"";
$istop_yes=$post['istop']==1?"checked":"";
$istop_no=$post['istop']==0?"checked":"";
$recommended_yes=$post['recommended']==1?"checked":"";
$recommended_no=$post['recommended']==0?"checked":"";
</php>
<label class="radio"><input type="radio" name="post[post_status]" value="1" {$status_yes}>已发布</label>
<label class="radio"><input type="radio" name="post[post_status]" value="1" {$status_no}>已下线</label>
</td>
</tr>
<tr>
<td>
<label class="radio"><input type="radio" name="post[istop]" value="1" {$istop_yes}>置顶</label>
<label class="radio"><input type="radio" name="post[istop]" value="0" {$istop_no}>未置顶</label>
</td>
</tr>
<tr>
<td>
<label class="radio"><input type="radio" name="post[recommended]" value="1" {$recommended_yes}>热门</label>
<label class="radio"><input type="radio" name="post[recommended]" value="0" {$recommended_no}>非热门</label>
</td>
</tr>
</table>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
<a class="btn" href="{:U('AdminCase/index')}">返回</a>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js?t={:time()}"></script>
<script type="text/javascript">
//编辑器路径定义
var editorURL = GV.DIMAUB;
</script>
<script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function() {
//setInterval(function(){public_lock_renewal();}, 10000);
$(".js-ajax-close-btn").on('click', function(e) {
e.preventDefault();
Wind.use("artDialog", function() {
art.dialog({
id : "question",
icon : "question",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : "您确定需要关闭当前页面嘛?",
ok : function() {
setCookie("refersh_time", 1);
window.close();
return true;
}
});
});
});
/////---------------------
Wind.use('validate', 'ajaxForm', 'artDialog', function() {
//javascript
//编辑器
editorcontent = new baidu.editor.ui.Editor();
editorcontent.render('content');
try {
editorcontent.sync();
} catch (err) {
}
//增加编辑器验证规则
jQuery.validator.addMethod('editorcontent', function() {
try {
editorcontent.sync();
} catch (err) {
}
;
return editorcontent.hasContents();
});
var form = $('form.js-ajax-forms');
//ie处理placeholder提交问题
if ($.browser.msie) {
form.find('[placeholder]').each(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
}
});
}
//表单验证开始
form.validate({
//是否在获取焦点时验证
onfocusout : false,
//是否在敲击键盘时验证
onkeyup : false,
//当鼠标掉级时验证
onclick : false,
//验证错误
showErrors : function(errorMap, errorArr) {
//errorMap {'name':'错误信息'}
//errorArr [{'message':'错误信息',element:({})}]
try {
$(errorArr[0].element).focus();
art.dialog({
id : 'error',
icon : 'error',
lock : true,
fixed : true,
background : "#CCCCCC",
opacity : 0,
content : errorArr[0].message,
cancelVal : '确定',
cancel : function() {
$(errorArr[0].element).focus();
}
});
} catch (err) {
}
},
//验证规则
rules : {
'post[post_title]' : {
required : 1
},
'post[post_content]' : {
editorcontent : true
}
},
//验证未通过提示消息
messages : {
'post[post_title]' : {
required : '请输入标题'
},
'post[post_content]' : {
editorcontent : '内容不能为空'
}
},
//给未通过验证的元素加效果,闪烁等
highlight : false,
//是否在获取焦点时验证
onfocusout : false,
//验证通过,提交表单
submitHandler : function(forms) {
$(forms).ajaxSubmit({
url : form.attr('action'), //按钮上是否自定义提交地址(多按钮情况)
dataType : 'json',
beforeSubmit : function(arr, $form, options) {
},
success : function(data, statusText, xhr, $form) {
if (data.status) {
setCookie("refersh_time", 1);
//添加成功
Wind.use("artDialog", function() {
art.dialog({
id : "succeed",
icon : "succeed",
fixed : true,
lock : true,
background : "#CCCCCC",
opacity : 0,
content : data.info,
button : [ {
name : '继续编辑?',
callback : function() {
//reloadPage(window);
return true;
},
focus : true
}, {
name : '返回列表页',
callback : function() {
location = "{:U('AdminCase/index')}";
return true;
}
} ]
});
});
} else {
isalert(data.info);
}
}
});
}
});
});
////-------------------------
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">{:L('PORTAL_ADMINPOST_INDEX')}</a></li>
</ul>
<form class="well form-search" method="post" action="{:U('AdminCase/index')}">
分类:
<select class="select_2" name="term">
<option value='0'>全部</option>{$taxonomys}
</select> &nbsp;&nbsp;
时间:
<input type="text" name="start_time" class="js-date" value="{$formget.start_time|default=''}" style="width: 80px;" autocomplete="off">-
<input type="text" class="js-date" name="end_time" value="{$formget.end_time}" style="width: 80px;" autocomplete="off"> &nbsp; &nbsp;
关键字:
<input type="text" name="keyword" style="width: 200px;" value="{$formget.keyword}" placeholder="请输入关键字...">
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-primary" href="{:U('AdminCase/add',array('term'=>empty($term['term_id'])?'':$term['term_id']))}" target="_self">{:L('PORTAL_ADMINPOST_ADD')}</a>
</form>
<form class="js-ajax-form" action="" method="post">
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/listorders')}">{:L('SORT')}</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/check',array('check'=>1))}" data-subcheck="true">审核</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/check',array('uncheck'=>1))}" data-subcheck="true">取消审核</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/top',array('top'=>1))}" data-subcheck="true">置顶</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/top',array('untop'=>1))}" data-subcheck="true">取消置顶</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/recommend',array('recommend'=>1))}" data-subcheck="true">推荐</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/recommend',array('unrecommend'=>1))}" data-subcheck="true">取消推荐</button>
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/delete')}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button>
<button class="btn btn-primary btn-small js-articles-move" type="button">批量移动</button>
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
<th width="50">{:L('SORT')}</th>
<th>{:L('TITLE')}</th>
<th>{:L('CATEGORY')}</th>
<th width="50">{:L('HITS')}</th>
<!--<th width="50">{:L('COMMENT_COUNT')}</th>-->
<!--<th width="50">{:L('KEYWORDS')}</th>-->
<!--<th width="50">{:L('SOURCE')}</th>-->
<!--<th width="50">{:L('ABSTRACT')}</th>-->
<!--<th width="50">{:L('THUMBNAIL')}</th>-->
<th width="80">{:L('AUTHOR')}</th>
<th width="70">{:L('PUBLISH_DATE')}</th>
<th width="50">{:L('STATUS')}</th>
<th width="70">{:L('ACTIONS')}</th>
</tr>
</thead>
<php>
$status=array("1"=>"已上线","0"=>"已下线");
$top_status=array("1"=>"已置顶","0"=>"未置顶");
$recommend_status=array("1"=>"热门","0"=>"非热门");
</php>
<foreach name="posts" item="vo">
<tr>
<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.tid}" title="ID:{$vo.tid}"></td>
<td><input name="listorders[{$vo.tid}]" class="input input-order" type="text" size="5" value="{$vo.listorder}" title="ID:{$vo.tid}"></td>
<td><a href="{:U('cases/article/index',array('id'=>$vo['tid']))}" target="_blank"> <span>{$vo.post_title}</span></a></td>
<td>{$terms[$vo['term_id']]}</td>
<td>{$vo.post_hits}</td>
<!--<td><a href="javascript:open_iframe_dialog('{:U('comment/commentadmin/index',array('post_id'=>$vo['id']))}','评论列表')">{$vo.comment_count}</a></td>-->
<!--<td>{$excerpt_keywords = empty($vo['post_keywords'])?"":'已填写'}</td>-->
<!--<td>{$excerpt_source = empty($vo['post_source'])?" ":'已填写'}</td>-->
<!--<td>{$excerpt_excerpt = empty($vo['post_excerpt'])?" ":'已填写'}</td>-->
<!--<td>-->
<!--<php>$smeta=json_decode($vo['smeta'],true);</php>-->
<!--<if condition="!empty($smeta['thumb'])">-->
<!--<a href="{:sp_get_asset_upload_path($smeta['thumb'])}" target='_blank'>查看</a>-->
<!--</if>-->
<!--</td>-->
<td>{$users[$vo['post_author']]['user_login']}</td>
<td>{$vo.post_date}</td>
<td>{$status[$vo['post_status']]}<br>{$top_status[$vo['istop']]}<br>{$recommend_status[$vo['recommended']]}
</td>
<td>
<a href="{:U('AdminCase/edit',array('term'=>empty($term['term_id'])?'':$term['term_id'],'id'=>$vo['id']))}">{:L('EDIT')}</a> |
<a href="{:U('AdminCase/delete',array('term'=>empty($term['term_id'])?'':$term['term_id'],'tid'=>$vo['tid']))}" class="js-ajax-delete">{:L('DELETE')}</a></td>
</tr>
</foreach>
<tfoot>
<tr>
<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
<th width="50">{:L('SORT')}</th>
<th>{:L('TITLE')}</th>
<th>{:L('CATEGORY')}</th>
<th width="50">{:L('HITS')}</th>
<!--<th width="50">{:L('COMMENT_COUNT')}</th>-->
<!--<th width="50">{:L('KEYWORDS')}</th>-->
<!--<th width="50">{:L('SOURCE')}</th>-->
<!--<th width="50">{:L('ABSTRACT')}</th>-->
<!--<th width="50">{:L('THUMBNAIL')}</th>-->
<th width="80">{:L('AUTHOR')}</th>
<th width="70">{:L('PUBLISH_DATE')}</th>
<th width="50">{:L('STATUS')}</th>
<th width="70">{:L('ACTIONS')}</th>
</tr>
</tfoot>
</table>
<!--<div class="table-actions">-->
<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/listorders')}">{:L('SORT')}</button>-->
<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/check',array('check'=>1))}" data-subcheck="true">审核</button>-->
<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/check',array('uncheck'=>1))}" data-subcheck="true">取消审核</button>-->
<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/top',array('top'=>1))}" data-subcheck="true">置顶</button>-->
<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/top',array('untop'=>1))}" data-subcheck="true">取消置顶</button>-->
<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/recommend',array('recommend'=>1))}" data-subcheck="true">推荐</button>-->
<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/recommend',array('unrecommend'=>1))}" data-subcheck="true">取消推荐</button>-->
<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminCase/delete')}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button>-->
<!--<button class="btn btn-primary btn-small js-articles-move" type="button">批量移动</button>-->
<!--</div>-->
<div class="pagination">{$Page}</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
function refersh_window() {
var refersh_time = getCookie('refersh_time');
if (refersh_time == 1) {
window.location = "{:U('AdminCase/index',$formget)}";
}
}
setInterval(function() {
refersh_window();
}, 2000);
$(function() {
setCookie("refersh_time", 0);
Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
//批量移动
$('.js-articles-move').click(function(e) {
var str = 0;
var id = tag = '';
$("input[name='ids[]']").each(function() {
if ($(this).attr('checked')) {
str = 1;
id += tag + $(this).val();
tag = ',';
}
});
if (str == 0) {
art.dialog.through({
id : 'error',
icon : 'error',
content : '您没有勾选信息,无法进行操作!',
cancelVal : '关闭',
cancel : true
});
return false;
}
var $this = $(this);
art.dialog.open("__ROOT__/index.php?g=cases&m=AdminCase&a=move&ids="+ id, {
title : "批量移动",
width : "80%"
});
});
});
});
</script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap">
<form method="post" class="js-ajax-form">
<table cellpadding="2" cellspacing="2" width="100%">
<tbody>
<tr>
<td width="140">上级:</td>
<td>
<select name="term_id">
{$terms_tree}
</select>
</td>
</tr>
<tr>
<td colspan="2">
<button class="btn btn-primary js-ajax-submit" type="submit">移动</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('AdminPost/recyclebin')}">{:L('PORTAL_ADMINPOST_RECYCLEBIN')}</a></li>
</ul>
<form class="well form-search" method="post" action="{:U('AdminPost/recyclebin')}">
分类:
<select class="select_2" name="term">
<option value='0'>全部</option>{$taxonomys}
</select> &nbsp;&nbsp;
时间:
<input type="text" name="start_time" class="js-date" value="{$formget.start_time}" style="width: 80px;" autocomplete="off">-
<input type="text" class="js-date" name="end_time" value="{$formget.end_time}" style="width: 80px;" autocomplete="off"> &nbsp; &nbsp;
关键字:
<input type="text" name="keyword" style="width: 200px;" value="{$formget.keyword}" placeholder="请输入关键字...">
<input type="submit" class="btn btn-primary" value="搜索" />
</form>
<form class="js-ajax-form" method="post">
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminPost/clean')}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button>
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
<th width="50">ID</th>
<th>标题</th>
<th>栏目</th>
<th width="50">点击量</th>
<th width="50">评论量</th>
<th width="50">关键字</th>
<th width="50">来源</th>
<th width="50">摘要</th>
<th width="50">缩略图</th>
<th width="80">发布人</th>
<th width="70">发布时间</th>
<th width="50">{:L('STATUS')}</th>
<th width="60">{:L('ACTIONS')}</th>
</tr>
</thead>
<php>
$status=array("1"=>"已审核","0"=>"未审核");
$top_status=array("1"=>"已置顶","0"=>"未置顶");
$recommend_status=array("1"=>"已推荐","0"=>"未推荐");
</php>
<foreach name="posts" item="vo">
<tr>
<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[{$vo.tid}]" value="{$vo.id}"></td>
<td><a>{$vo.tid}</a></td>
<td><a>{$vo.post_title}</a></td>
<td>{$terms[$vo['term_id']]}</td>
<td>{$vo.post_hits}</td>
<td>{$vo.comment_count}</td>
<td>{$excerpt_keywords = empty($vo['post_keywords'])?"":'已填写'}</td>
<td>{$excerpt_source = empty($vo['post_source'])?" ":'已填写'}</td>
<td>{$excerpt_excerpt = empty($vo['post_excerpt'])?" ":'已填写'}</td>
<td>
<php>$smeta=json_decode($vo['smeta'],true);</php>
<if condition="!empty($smeta['thumb'])">
<a href="{:sp_get_asset_upload_path($smeta['thumb'])}" target='_blank'>查看</a>
</if>
</td>
<td>{$users[$vo['post_author']]['user_login']}</td>
<td>{$vo.post_date}</td>
<td>{$status[$vo['post_status']]}<br>{$top_status[$vo['istop']]}<br>{$recommend_status[$vo['recommended']]}
</td>
<td>
<a href="{:U('AdminPost/restore',array('term'=>empty($term['term_id'])?'':$term['term_id'],'id'=>$vo['tid']))}" class="js-ajax-dialog-btn" data-msg="确定还原吗?">还原</a>|
<a href="{:U('AdminPost/clean',array('term'=>empty($term['term_id'])?'':$term['term_id'],'tid'=>$vo['tid'],'id'=>$vo['id']))}" class="js-ajax-delete">删除</a>
</td>
</tr>
</foreach>
<tfoot>
<tr>
<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
<th width="50">ID</th>
<th>标题</th>
<th>栏目</th>
<th width="50">点击量</th>
<th width="50">评论量</th>
<th width="50">关键字</th>
<th width="50">来源</th>
<th width="50">摘要</th>
<th width="50">缩略图</th>
<th width="80">发布人</th>
<th width="70">发布时间</th>
<th width="50">{:L('STATUS')}</th>
<th width="60">{:L('ACTIONS')}</th>
</tr>
</tfoot>
</table>
<div class="table-actions">
<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminPost/clean')}" data-subcheck="true" data-msg="你确定删除吗?">{:L('DELETE')}</button>
</div>
<div class="pagination">{$Page}</div>
</form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
\ No newline at end of file
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment