更新至V2.3.2版本,离线升级的用户需要执行升级程序 (#278)

* 优化百度编辑器,修复编辑器插入的图片不能预览问题

* 处理系统异常时登录无反应问题

* 更新至V2.3.1版本,离线升级的用户需要执行升级程序
This commit is contained in:
小胡 2025-01-16 21:17:09 +08:00 committed by GitHub
parent e3e46ac76f
commit 77979b6ed5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1541 changed files with 248453 additions and 5387 deletions

View File

@ -35,34 +35,21 @@
除了以上自己开发了一些工具,套件里还集成了大量的其他开源工具,如网盘里用到的在线压缩、解压,各类媒体文件预览,各类文档预览与编辑的支持,是各类开源程序的综合利用。
### DzzOffice在线更新方法
### DzzOffice 在线更新方法
1. 进入您原来的系统,关闭您的站点。进行数据备份;
2. 备份文件(如果有程序文件或风格文件的改动);
3. 进入 管理 -> 系统工具 -> 在线更新,按提示完成更新任务;
4. 系统工具 -> 更新系统缓存;
5. 系统设置 -> 打开站点。
### DzzOffice离线更新方法仅支持从2.0beta版升级)
### DzzOffice 离线更新方法仅支持从2.0 beta版升级
1. 进入您原来的系统,关闭您的站点。进行数据备份;
2. 备份文件(如果有程序文件或风格文件的改动);
3. 下载并解压缩最新版的程序包;
4. 程序包解压缩后,并且将文件上传到网站根目录覆盖;
5. 访问 http://您的域名/install/update.php。
6. 按照程序提示直至所有升级完毕。删除install/update.php 程序,以免被恶意利用。
7. 进入管理员桌面,更新缓存。
8. 系统设置 -> 打开站点。
7. 管理员登录后,系统工具 -> 更新系统缓存。
8. 系统设置 -> 打开站点。

View File

@ -4,6 +4,35 @@
2. github地址https://github.com/zyx0814/dzzoffice
3. 码云地址: https://gitee.com/zyx0814/dzzoffice
### DzzOffice2.3.2主要更新内容
### 网盘功能优化
- SQL语法错误修复解决了SQL语法报错的问题提升了系统的稳定性。
- 语言翻译完善:修复了取消收藏功能中语言未翻译的问题,提升了用户体验。
- 分享权限设置:新增分享文件时设置分享权限的功能,包括禁用下载、仅登录使用、可编辑以及禁用预览权限,还支持未登录用户编辑保存分享文件。
### 应用管理功能增强
- 离线升级支持:在应用管理界面增加了本地升级按钮,支持离线升级,简化了操作流程。
- 版本限制检测:导入应用时新增版本限制检测功能,确保应用与系统兼容。
- 用户体验提升:将分享管理、文件管理、机构用户应用由管理员应用转变为成员应用,提升了用户体验。
### 系统优化与安全性提升
- 提示页面改进:提示页面增加返回首页选项,解决了重复跳转问题。
- 默认首页设置:网盘应用在首次安装时自动设置为默认首页,方便用户快速访问。
- 默认内置应用网盘、pdf阅读器、图片预览、DPlayer等应用被设置为默认内置应用随系统安装无需单独安装。
- 评论管理页面:新增评论管理页面,便于管理员或成员管理评论内容。
- 短连接管理:在分享管理的类别选项中增加了短连接,管理员可以方便地查看和管理所有的短连接。
- layui数据表格系统日志、文件管理、评论管理、分享管理采用layui数据表格重构页面使界面更加友好、便捷。
- 站点关闭处理:优化站点关闭时已登录用户的跳转逻辑,避免重复登录提示。
- 新增前端UI前端UI模板新增光年模板5系统及部分应用市场应用已适配。用户可在系统设置中切换模板未适配的应用不受影响。
- 浏览器消息提醒加入了调用浏览器消息提醒接口函数dzzNotification提高了用户交互的及时性。
- 应用权限检测插件中加入appperm函数文件开发者可以调用该文件实现应用权限检测提升了管理的灵活性。
- 升级提醒:新增升级提醒开关功能,用户可自由选择系统或插件升级提醒,或全部不提醒。
- 移除插件:移除应用库插件,简化系统结构。
- 编辑器更新UEditorPlus编辑器更新到4.2.0并支持插入iframe框架内容。
- 安全与稳定性修复了其他已知bug和安全问题提升系统的稳定性和安全性。
### 注意事项
- 离线升级:本次离线升级的用户需执行升级程序,以确保系统的正常运行。
- PHP版本仅支持php7.0~php8.0之间的PHP版本使用。
### DzzOffice2.3.0主要更新内容
**一、功能优化**

View File

@ -12,5 +12,5 @@ define('ADMINSCRIPT', basename(__FILE__));
define('BASESCRIPT', basename(__FILE__));
define('CURSCRIPT', 'admin');
define('APPTYPEID', 0);
define('DZZSCRIPT', 'index.php');
require './core/adminstart.php';

View File

@ -11,7 +11,7 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
}
$navtitle=lang('upgrade').' - '.lang('appname');
include libfile('function/organization');
$op=$_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
//获取所有标签top50
//$tags = DB::fetch_all("SELECT * FROM %t WHERE hot>0 ORDER BY HOT DESC limit 50", array('app_tag'),'appid');
@ -24,7 +24,6 @@ $perpage = 20;
$gets = array('mod' => 'appmarket', 'keyword' => $keyword, 'tagid' => $tagid, 'group' => $group);
$theurl = BASESCRIPT . "?" . url_implode($gets);
$refer = urlencode($theurl . '&page=' . $page);
$order = 'ORDER BY disp';
$start = ($page - 1) * $perpage;
$apps = array();

View File

@ -21,48 +21,54 @@ $applist =DB::fetch_all("select * from %t where `available`>0",array('app_market
$return = array("sum"=>0);
$num=0;
if( $applist ){
$dzz_upgrade = new dzz_upgrade_app();
$appinfo=array();
$appinfo["mysqlversion"] = helper_dbtool::dbversion();
$appinfo["phpversion"] = PHP_VERSION ;
$appinfo["dzzversion"] = CORE_VERSION;
foreach($applist as $k=>$v ){
if(empty($v['app_path'])) $v['app_path']='dzz';
$savedata=array();
if( $v["mid"]>0){//云端检测
if( $v["upgrade_version"] ){
$num++;
}else{
//if( $v["mid"]==80 ){
//根据当前版本查询是否需要更新
$info=array_merge($v,$appinfo);
$response = $dzz_upgrade->check_upgrade_byversion( $info );
if($response && $response["status"]==1 ) {
$map=array(
"upgrade_version"=>serialize($response["data"]),
"check_upgrade_time"=>dgmdate(TIMESTAMP,'Ymd')
);
$re=C::t('app_market')->update($v['appid'],$map);//C::tp_t('app_market')->where("appid=".$v['appid'])->save( $map );
$num++;
}
//}
}
}else{//本地检测
$file = DZZ_ROOT . './'.$v['app_path'].'/' . $v['identifier'] . '/dzz_app_' . $v['identifier'] . '.xml';
if ( file_exists($file) ) {
if ($applist) {
$dzz_upgrade = new dzz_upgrade_app();
$appinfo = array();
$appinfo["mysqlversion"] = helper_dbtool::dbversion();
$appinfo["phpversion"] = PHP_VERSION;
$appinfo["dzzversion"] = CORE_VERSION;
foreach ($applist as $k => $v) {
if (empty($v['app_path'])) $v['app_path'] = 'dzz';
$savedata = array();
if ($v["mid"] > 0) {//云端检测
$info = array_merge($v, $appinfo);
$response = $dzz_upgrade->check_upgrade_byversion($info);
$map = array(
"upgrade_version" => '',
"check_upgrade_time" => ''
);
if ($response && $response["status"] == 1) {
$map = array(
"upgrade_version" => serialize($response["data"]),
"check_upgrade_time" => dgmdate(TIMESTAMP, 'Ymd')
);
}
$re = C::t('app_market')->update($v['appid'], $map);
$num++;
} else {//本地检测
$file = DZZ_ROOT . './' . $v['app_path'] . '/' . $v['identifier'] . '/dzz_app_' . $v['identifier'] . '.xml';
if (file_exists($file)) {
$importtxt = @implode('', file($file));
$apparray = getimportdata('Dzz! app',0,0,$importtxt);
if($apparray["app"]["version"]>$v["version"]){
$apparray = getimportdata('Dzz! app', 0, 0, $importtxt);
if ($apparray["app"]["version"] > $v["version"]) {
$num++;
$savedata=array( "upgrade_version"=>serialize($apparray["app"]), "check_upgrade_time"=>$today );
$re=C::t('app_market')->update($v['appid'],$savedata);
//$re= C::tp_t('app_market')->where("appid=".$v["appid"])->save( $savedata );
$savedata = array(
"upgrade_version" => serialize($apparray["app"]),
"check_upgrade_time" => dgmdate(TIMESTAMP, 'Ymd')
);
$re = C::t('app_market')->update($v['appid'], $savedata);
} else {
$savedata = array(
"upgrade_version" => '',
"check_upgrade_time" => dgmdate(TIMESTAMP, 'Ymd')
);
$re = C::t('app_market')->update($v['appid'], $savedata);
}
}
}
}
}
}
}
}
$return["sum"]=$num;
exit( json_encode( $return ) );
$return["sum"] = $num;
exit(json_encode($return));
?>

View File

@ -29,9 +29,8 @@ if( $json["status"]==1){
$list = $json["data"]["list"];
$total = $json["data"]["total"];
$perpage = $json["data"]["perpage"];
//$perpage =1;
$theurl = BASESCRIPT."?mod=".MOD_NAME."&op=cloudappmarket";
$multi=multi($total, $perpage, $page, $theurl);
$theurl = MOD_URL."&op=cloudappmarket";
$multi=multi($total, $perpage, $page, $theurl,'pull-right');
}
//print_r($list);exit;
$local_applist=DB::fetch_all("select * from %t where 1",array('app_market'));//C::tp_t("app_market")->select();

View File

@ -10,8 +10,9 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
require_once libfile('function/admin');
$do = trim($_GET['do']);
$op=$_GET['op'];
$do = isset($_GET['do']) ? $_GET['do'] : '';
$op = isset($_GET['op']) ? $_GET['op'] : '';
$navtitle=lang('appname');
if ($do == 'export') {//应用导出
$appid = intval($_GET['appid']);
$app = C::t('app_market') -> fetch($appid);
@ -80,8 +81,11 @@ elseif ($do == 'import') {//导入应用
if (!is_dir(DZZ_ROOT . './'.$apparray['app']['app_path'].'/' . $apparray['app']['identifier'])) {
showmessage(lang('list_cp_Application_directory_exist',array('app_path'=>$app['app_path'],'identifier'=>$app['identifier'])));
}
if($apparray['version'] && empty($_GET['ignoreversion']) && (version_compare($apparray['version'], $_G['setting']['version'])>0)) {
showmessage(lang('application_import_version_invalid'), '', array('cur_version' => $apparray['version'], 'set_version' => $_G['setting']['version']));
}
$extra = $apparray['app']['extra'];
$filename = $extra['installfile'];
$filename = isset($extra['installfile']) ? $extra['installfile'] : '';
if (!empty($filename) && preg_match('/^[\w\.]+$/', $filename)) {
$filename = DZZ_ROOT . './'.$apparray['app']['app_path'].'/' . $apparray['app']['identifier'] . '/' . $filename;
if (file_exists($filename)) {
@ -281,6 +285,7 @@ elseif ($do == 'uninstall') {//卸载应用
}
}
elseif ($do == 'uninstall_confirm') {//卸载应用
$navtitle='卸载应用 - '.lang('appname');
$refer = $_GET['refer'];
$appid=intval($_GET['appid']);
if(!$app=C::t('app_market')->fetch($appid)){
@ -291,6 +296,7 @@ elseif ($do == 'uninstall_confirm') {//卸载应用
exit;
}
elseif ($do == 'upgrade') {//本地升级应用
$navtitle='升级应用 - '.lang('appname');
$appid = intval($_GET['appid']);
if (!$app = C::t('app_market') -> fetch($appid)) {
showmessage('list_cp_Application_delete');
@ -305,7 +311,9 @@ elseif ($do == 'upgrade') {//本地升级应用
}
$importtxt = @implode('', file($file));
$apparray = getimportdata('Dzz! app', 0, 0, $importtxt);
if($apparray['version'] && empty($_GET['ignoreversion']) && (version_compare($apparray['version'], $_G['setting']['version'])>0)) {
showmessage(lang('application_upgrade_version_invalid'), '', array('cur_version' => $apparray['version'], 'set_version' => $_G['setting']['version'], 'url' => MOD_URL.'&op=cp&do=upgrade&ignoreversion=1&appid='.$appid));
}
$filename = $apparray['app']['extra']['upgradefile'];
$toversion = $apparray['app']['version'];
if (!empty($apparray['app']['extra']['upgradefile']) && preg_match('/^[\w\.]+$/', $apparray['app']['extra']['upgradefile'])) {
@ -322,6 +330,5 @@ elseif ($do == 'upgrade') {//本地升级应用
C::t('app_market') -> update($appid, array('version' => $toversion));
showmessage('application_upgrade_successful', MOD_URL, array(), array('alert' => 'right'));
}
}
?>

View File

@ -10,7 +10,7 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$navtitle=lang('permission_management').' - '.lang('appname');
$op=$_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
if ($_GET['do'] == 'clear') {
$i = intval($_GET['i']);
$appid = intval($_GET['appid']);

View File

@ -12,11 +12,11 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
include_once DZZ_ROOT . './data/extdata/exts.php';
require_once libfile('function/user', '', 'user');
$grouptitle = array('0' => lang('all'), '-1' => lang('visitors_visible'), '1' => lang('members_available'), '2' => lang('section_administrators_available'), '3' => lang('system_administrators_available'));
$do = trim($_GET['do']);
$navtitle=lang('编辑应用').' - '.lang('appname');
$do = isset($_GET['do']) ? $_GET['do'] : '';
$appid = intval($_GET['appid']);
$refer = dreferer();
$op = $_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
if (submitcheck('appsubmit')) {
$appurl = addslashes(trim($_GET['appurl']));
$appadminurl = addslashes(trim($_GET['appadminurl']));
@ -136,6 +136,11 @@ if (submitcheck('appsubmit')) {
echo "</script>";
exit();
} else {
if (!$appid) {
$navtitle=lang('add_app').' - '.lang('appname');
}else{
$navtitle=lang('edit_app').' - '.lang('appname');
}
include_once libfile('function/organization');
$sexts = array();
foreach ($exts as $ext) {

View File

@ -11,7 +11,7 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
}
$navtitle=lang('open_way').' - '.lang('appname');
$op='extopen';
$do=$_GET['do'];
$do = isset($_GET['do']) ? $_GET['do'] : '';
if ( $do =="setdefault" ) {
$extid = intval( $_GET["extid"] );
@ -81,7 +81,7 @@ if($count){
}
$count = count($newlist);
}
$multi = multi($count, $perpage, $page, $theurl );
$multi = multi($count, $perpage, $page, $theurl, 'pull-right');
//根据分页截取数组
ksort($newlist,SORT_STRING );
$list = array_slice($newlist,$start,$perpage);

View File

@ -0,0 +1,262 @@
@charset "utf-8";
/* CSS Document */
.market-container .appitem{
background:#FFF;
width:236px;
height:330px;
box-shadow:0 1px 3px rgba(0,0,0,.3);
position:relative;
border-radius:2px;
margin:8px;
}
.img_236 {
max-width: 236px;
max-height: 136px;
}
.ie8 .market-container .appitem{
border:1px solid #D9D9D7;
}
.img-container {
width:236px;
height:136px;
padding:0;
text-align:center;
position:relative;
overflow:hidden;
display:block;
border-radius:2px 2px 0 0;
}
.ie8 .img-container {
width:234px;
height:135px;
}
.appitem-desc{
padding:10px 0;
height:84px;
line-height:1.5;
overflow:hidden;
color:#808080;
}
.appitem-footer{
line-height:35px;
}
.appitem-title a{
font-size:14px;font-weight:bold;color:#333;
text-shadow:1px 1px 1px #FFF;
}
.appitem .appmeta{
color: #353535;
padding: 15px 15px 0 15px;
background: #fff;
}
.appmeta a {
color: #333;
font-weight: bold;
display: block;
text-decoration: none;
}
.appmeta a h3 {
display: block;
font-size: 14px;
line-height: 14px;
margin: 0 0 10px 0;
height:14px;
text-overflow: ellipsis;
overflow: hidden;font-weight: bold;
}
.appmeta h4 {
font-size: 11px;
color: #808080;
margin:0;
/*margin-top: -8px;*/
padding-bottom: 8px;
border-bottom: 1px solid #eee;
}
.price-container p{ margin:0 0 5px 0}
.document-header{
padding:0;
position:relative;
margin:0;
background-color: rgba(var(--bs-light-rgb), 1);
border:1px solid #dee2e6;
border-radius:.3rem;
}
.price-container .label-success{
font-weight:300;
border-radius:var(--radius);
background-color:rgba(var(--bs-primary-rgb), 1);
display: inline-block;
padding: 0.35em 0.65em;
font-size: .75em;
font-weight: 700;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
}
.document-header .img-container{
border-radius:2px 0 0 0;
position:absolute;
left:0;top:0;
}
.document-header .header-info{
padding: 0px 0 10px 246px;
line-height:30px;
min-width:500px;
display: flex;
flex-wrap:wrap;
}
.ie8 .document-header .header-info{
min-width:150px;
}
.document-header .header-info .appname{
font-size:16px;
line-height:35px;
}
.download-container{
position:absolute;
right:10px;top:10px;
z-index:100;
}
.document-container {
width:100%;
margin:0;
border:none;
box-shadow:none;
overflow-x:hidden;
}
.document-container .document-body {
padding: 20px 0 0 0;
margin: 0 20px 0 20px;
overflow-x:hidden;
position:relative;
line-height:2;
}
.document-container .document-body img.dzz-image{
max-width: 100%;
}
.document-container .document-Carousel {
padding: 20px 0 0 0;
margin: 0 20px 0 20px;
min-height:200px;
overflow-x:hidden;
position:relative;
}
.document-container .document-comment {
padding: 20px 0 0 0;
margin: 0 20px;
}
.document-comment .attach-item{
height:20px;
line-height:20px;
padding:0 10px;
}
span.attach-item{
line-height:24px;
display:inline-block;
height:24px;
padding-right:8px;
}
span.attach-item img{
max-height:100%;
padding-right:5px;
}
.carousel-inner>.item>img, .carousel-inner>.item>a>img{
margin:0 auto;
}
.bs-navbar-default .navbar-nav li{
overflow:hidden;
}
.bs-navbar-default .navbar-nav>li>a{
padding:15px;
}
.bs-navbar-default .navbar-toggle{
margin-top:8px
}
.bs-navbar-default .navbar-form{
margin-top:8px
}
.bs-navbar-default .container-fluid>.navbar-header{
margin-right:0;
margin-left:0;
}
/*12.12修改*/
.group-td-wrapper{
max-width:120px;
white-space:normal;
overflow: hidden;
text-overflow: ellipsis;
}
.group-td-wrapper>span {
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.group-td-wrapper>span>img {
margin:0;
vertical-align: text-bottom;
}
.tag-td-wrapper{
max-width:120px;
height: 20px;
white-space:normal;
overflow: hidden;
text-overflow: ellipsis;
}
.tag-td-wrapper a{
color:#666;
display:inline-block;
padding:0 2px;
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
span.num {
color:#4A89FD;
font-weight:700;
padding:0 2px;
margin:0;
}
.appname{
margin:0;
line-height:25px;
}
.appname a{
color:#333;
font-weight:600;
font-size:14px;
}
.appdesc{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor:default;
font-size: 14px;
max-width:300px;
}
.btn-top{
margin-left: 30px;
}
.btn-top a{
margin-right: 10px;
}
/*结束*/

View File

@ -12,6 +12,7 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
include libfile('function/admin');
include libfile('function/organization');
$do = empty($_GET['do']) ? 'available' : trim($_GET['do']);
$op = isset($_GET['op']) ? $_GET['op'] : '';
$navtitle=lang('import_type_app').' - '.lang('appname');
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
$perpage = 20;

View File

@ -16,7 +16,7 @@ include_once libfile('function/admin');
include_once libfile('function/cache');
include_once libfile('function/appmarket');
$step = intval($_GET['step']);
$op = $_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
$step = $step ? $step : 1;
$operation = $_GET['operation'] ? trim($_GET['operation']) : 'upgrade';
header('Content-type:text/json');
@ -380,7 +380,7 @@ elseif($operation == 'cross' || $operation == 'patch'){
}
$importtxt = @implode('', file($importfile));
$apparray = getimportdata('Dzz! app');
$filename = $apparray['app']['extra']['installfile'];
$filename = isset($apparray['app']['extra']['installfile']) ? $apparray['app']['extra']['installfile'] : '';
if (!empty($filename) && preg_match('/^[\w\.]+$/', $filename)) {
$filename = DZZ_ROOT . './'.$dir.'/' . $appname . '/' . $filename;
if (file_exists($filename)) {

View File

@ -1,6 +1,7 @@
<?php
$lang = array (
'appmarket' => '应用市场',
'appmarketedit' => '应用管理',
'installed' => '已安装',
'upgrade' => '升级',
'open_way'=>'打开方式',
@ -26,7 +27,6 @@ $lang = array (
'app_upgrade_installed' => '已安装该应用',
'app_upgrade_installed_local' => '已安装本地应用与该应用冲突',
'app_upgrade_identifier_error' => '应用标识为空',
'app_upgrade_dzzversion_error' => 'Dzzoffice版本要求: {version}',
'app_upgrade_phpversion_error' => 'php版本要求: {version}',
'app_upgrade_mysqlversion_error' => 'Mysql版本要求: {version}',
'app_upgrade_newversion_will_start'=>'升级即将开始',
@ -82,6 +82,6 @@ $lang = array (
'buy'=>'购买',
'view_detail'=>'查看详细',
'buy_contract'=>'联系购买',
'manual_install_tip'=>'注:如不能在线安装,请通过 <a class="num" href="http://www.dzzoffice.com/index.php?mod=dzzmarket" target="_blank">官方应用市场</a> 下载应用安装包手动下载'
'manual_install_tip'=>'注:如不能在线安装,请通过 <a class="num" href="http://www.dzzoffice.com/index.php?mod=dzzmarket" target="_blank">官方应用市场</a> 下载应用安装包手动安装'
);
?>

View File

@ -150,7 +150,7 @@
<!--{/loop}-->
</div>
</div>
<div id="pageinfo" style="text-align:center;padding:10px;">$multi</div>
<div id="pageinfo" style="padding:10px;display: flex;justify-content: center;">$multi</div>
</div>
</div>
<div class="modal in">

View File

@ -2,7 +2,7 @@
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<link href="static/select2/select2.css?{VERHASH}" rel="stylesheet" media="all">
<link href="static/select2/select2-bootstrap.css?{VERHASH}" rel="stylesheet" media="all">
<link rel="stylesheet" href="static/switchery/switchery.min.css">
<link rel="stylesheet" href="static/css/checkbox.css">
<link href="static/css/app_manage.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
@ -47,6 +47,10 @@
<dt>{lang import_paste_data}</dt>
<dd class="clearfix"><textarea type="textarea" class="form-control" style="width:80%;" name="importtxt" rows="5"></textarea></dd>
</dl>
<dl>
<dt>忽略版本限制</dt>
<dd class="clearfix"><input type="checkbox" class="js-switch" name="ignoreversion"/> </dd>
</dl>
<input type="submit" class="btn btn-primary" value="{lang submit}" style="padding:6px 25px" />
</form>
@ -73,6 +77,13 @@
}
});
//开关样式
jQuery.getScript('static/switchery/switchery.min.js',function(){
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
elems.forEach(function (html) {
var switchery = new Switchery(html);
});
});
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->

View File

@ -214,6 +214,7 @@
<a class="btn btn-small btn-success-outline" href="{MOD_URL}&op=cp&do=enable&appid=$value[appid]&refer=$refer" title="{lang enable}">{lang enable}</a>
<!--{/if}-->
<!--{/if}-->
<a class="btn btn-primary-outline btn-small" href="{MOD_URL}&op=cp&do=upgrade&appid=$value[appid]&refer=$refer">本地升级</a>
<a class="btn btn-primary-outline btn-small" href="{MOD_URL}&op=cp&do=export&appid=$value[appid]&refer=$refer" title="{lang export}" target="_blank">{lang export}</a>
</td>
</tr>

View File

@ -0,0 +1,115 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link <!--{if $group=='0' && !$org}-->active<!--{/if}-->" href="{MOD_URL}&op=default&group=0">{lang universal_application}</a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $group=='-1' && !$org}-->active<!--{/if}-->" href="{MOD_URL}&op=default&group=-1">{lang tourist_application}</a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $group=='1'}-->active<!--{/if}-->" href="{MOD_URL}&op=default&group=1">{lang rank_file_application}</a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $group=='3' && !$org}-->active<!--{/if}-->" href="{MOD_URL}&op=default&group=3">{lang system_administrator_application}</a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $group=='2' && !$org}-->active<!--{/if}-->" href="{MOD_URL}&op=default&group=2">{lang section_administrator_application}</a>
</li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}&op=default" method="post">
<input type="hidden" name="appsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<th style="min-width: 40px">{lang sort}</th>
<th style="min-width: 120px">{lang application_name}</th>
<th style="min-width: 120px">{lang default_location}</th>
<!--{if $group==1}--><th style="min-width: 180px">{lang allow_department}<small style="display:block;font-size:12px;">{lang allow_department_tip}</small></th><!--{/if}-->
<th style="min-width: 120px">{lang force_installed}<small style="display:block;font-size:12px;">{lang force_installed_tip}</small></th>
<th style="min-width: 120px">{lang clear}<small style="display:block;font-size:12px;">{lang clear_application_install}</small></th>
</thead>
<!--{loop $list $value}-->
<tr>
<td width="40"><input type="text" class="form-control" name="disp[{$value[appid]}]" value="$value[disp]" /></td>
<td>
<a href="$value[appurl]" class="dcolor"><img src="$value[appico]" />$value[appname]</a>
</td>
<td>
<select name="position[{$value[appid]}]" class="form-select">
<!--{loop $positionarr $key $value1}-->
<option value="$key" <!--{if $value[position]==$key}-->selected="selected"<!--{/if}-->>$value1</option>
<!--{/loop}-->
</select>
</td>
<!--{if $group==1}-->
<td>
<!--{loop $value[orgs] $value1}-->
<span class=" btn-sorg">
{eval echo avatar_group($value1['orgid']);}
</span>
<!--{/loop}-->
</td>
<!--{/if}-->
<td>
<div class="form-check form-switch">
<input type="checkbox" class="form-check-input" name="notdelete[{$value[appid]}]" value="1" <!--{if $value[notdelete]>0}-->checked<!--{/if}--> />
</div>
</td>
<td>
<button id="clear_{$value['appid']}" class="btn btn-round btn-outline-primary btn-sm" data-loading-text="{lang in_clear}" type="button" title="{lang clear_application_install}" onclick="clearAppFromUser('$value[appid]');return false">{lang clear}</button>
</td>
</tr>
<!--{/loop}-->
<tr>
<th valign="middle" style="border-bottom:none"><input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang save_set}" /></th>
<th colspan="5" style="border-bottom:none"> $multi</th>
</tr>
</table>
</div>
</form>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang board_message}</strong> {lang appdefault_board_message_text}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
</div>
</div>
</main>
<script type="text/javascript">
var selorg = {};
function clearAppFromUser(appid, i) {
if(!i) i = 0;
var el = jQuery('#clear_' + appid);
if(i == 0) el.button('loading');
jQuery.getJSON('{MOD_URL}&op=default&do=clear&appid=' + appid + '&i=' + i, function(json) {
if(json.error) {
el.html(json.error);
window.setTimeout(function() {
el.html('{lang clear}');
el.button('reset');
}, 1000);
} else if(json.msg == 'continue') {
clearAppFromUser(appid, json.start);
} else if(json.msg == 'success') {
window.setTimeout(function() { el.html('{lang clear_success}'); }, 1000);
window.setTimeout(function() {
el.html('{lang clear}');
el.button('reset');
}, 2000);
}
});
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,388 @@
<!--{template lyear:header_simple_start}-->
<link href="{MOD_PATH}/images/market1.css?{VERHASH}" rel="stylesheet" media="all">
<style>
.app_upgradelist{
margin: auto;
position: relative;
}
.app_upgradelist .upgrade_progess{
position: absolute;
bottom:0;
left: 0;
width:0%;
height: 10%;
}
.app_upgradelist .appicon img{
padding: var(--radius);
margin: 0;
float: left;
max-width: 45px;
max-height: 45px;
}
.app-info .select-info {
display: none;
background-color: #FFF;
padding: 5px 10px;
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<header class="card-header">
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang board_message}</strong>
{lang manual_install_tip}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<div class="app-info float-start"> <a href="{MOD_URL}" class="dcolor">{lang total}<span class="num">$total</span>{lang ge}{lang app}</a> </div>
</header>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover align-middle" id="loopcontent">
<thead>
<tr>
<th>{lang application_name}</th>
<th>{lang version}</th>
<th>{lang label}</th>
<th>{lang big_small}</th>
<th>{lang operation}</th>
</tr>
</thead>
<tbody>
<!--{loop $list $value}-->
<tr id="app_div_{$value[mid]}" class="app_upgradelist">
<td>
<a href="javascript:;" data-href="{$cloudurl}?mod=dzzmarket&op=ajax&do=view&mid=$value[mid]&refer=$refer" class="appicon view-detail" title="$value[name]"><img src="$value[coverimg]" style="margin:0;float: left;" /></a>
<a href="javascript:;" data-href="{$cloudurl}?mod=dzzmarket&op=ajax&do=view&mid=$value[mid]&refer=$refer" target="_blank" class="dcolor view-detail" title="$value[name]">$value[name]</a>
<div class="appdesc form-text" title="$value['appdesc']">{eval echo $value['desc_short']?$value['desc_short']:lang('none');}</div>
<div id="progess_{$value[mid]}">
<span id="upgrade_progess_{$value[mid]}" class="progress-bar progress-bar-striped progress-bar-animated upgrade_progess"></span>
</div>
</td>
<td>$value[version]</td>
<td><div class="appdesc form-text">{$value['classid_name']}</div></td>
<td>{eval echo formatsize($value['packagesize']);}</td>
<td>
<!--{if $value[price]>0}-->
<button class="btn btn-outline-secondary" onclick="showBuyInfo(this,'$value[mid]')" data-href="$cloudurl?mod=dzzmarket&op=ajax&do=getBuyInfo&mid=$value[mid]" title="{lang buy_contract}">{lang buy}</button>
<!--{else}-->
<!--{if $value[package]}-->
<!--{if $value["local_appinfo"]}-->
<button class="btn btn-round btn-secondary btn-sm" disabled data-mid="$value['mid']" title="{lang installed}">
{lang installed}
</button>
<!--{else}-->
<button class="btn btn-round btn-primary btn-sm" style="white-space: inherit;" onclick="start_check_install('{MOD_URL}&op=install_app_ajax&operation=check_install&appid=$value[identifier]','{$value[mid]}','{$value[baseinfo]}');" id="upgrade_info_{$value[mid]}">{lang install_onekey}</button>
<!--{/if}-->
<!--{else}-->
<a class="btn btn-round btn-primary btn-sm view-detail" title="$value[name]" href="javascript:;" data-href="{$cloudurl}?mod=dzzmarket&op=ajax&do=view&mid=$value[mid]" >{lang view_detail}</a>
<!--{/if}-->
<!--{/if}-->
</td>
</tr>
<!--{/loop}-->
</tbody>
</table>
</div>
<!--{if $multi}-->
$multi
<!--{/if}-->
</div>
</div>
</div>
</main>
<div class="modal fade">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="return_create_newdir"></h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body"> </div>
<div class="modal-footer">
<button type="button" class="btn btn-dark" data-bs-dismiss="modal" aria-label="Close">{lang close}</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<script type="text/javascript">
jQuery('.view-detail').on('click',function(){
showBuyInfo(this,'modal-lg');
return false;
});
var ajaxurl='{$cloudurl}';
function showBuyInfo(obj,size){
var url=jQuery(obj).data('href');
var title=jQuery(obj).attr('title');
if(size){
jQuery('.modal .modal-dialog').addClass(size);
}
jQuery.get(url,function(html){
html=html.replace(/src=\"index\.php/ig,'src="$cloudurl');
jQuery('.modal .modal-body').html(html);
});
jQuery('.modal .modal-title').html(title);
jQuery('.modal').modal('show');
}
function getNext(url){
jQuery.get(url,function(html){
var li=jQuery('.appitem-next');
li.replaceWith(html);
});
}
function start_check_install(url,mid,data){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{"baseinfo":data },
success:function(json){
//jQuery('#install_button_'+mid).html("&nbsp;");
if(json.status==0){
jQuery('#upgrade_info_'+mid).show().addClass("btn-warning").html(json.msg);
}else if(json.status==1){
jQuery('#upgrade_info_'+mid).show().text(json.msg);
jQuery('#upgrade_progess_'+mid).show().animate({width:json.percent+"%"},json.second,function(){
startinstsallapp(json.url,mid,data);
});
}else{
window.location.reload();
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startinstsallapp(url,mid,data){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{"baseinfo":data},
success:function(json){
if(json.status==0){
jQuery('#upgrade_info_'+mid).addClass("btn-warning").html(json.msg);
}else{
jQuery('#upgrade_info_'+mid).text(json.msg);
jQuery('#upgrade_progess_'+mid).animate({width:json.percent+"%"},json.second,function(){
startgetinstallcrossorpatchfile(json.url,mid,data);
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startgetinstallcrossorpatchfile(url,mid,data){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{"baseinfo":data},
success:function(json){
if(json.status==0){
jQuery('#upgrade_info_'+mid).addClass("btn-warning").html(json.msg);
}else{
jQuery('#upgrade_info_'+mid).text(json.msg);
jQuery('#upgrade_progess_'+mid).animate({width:json.percent+"%"},json.second,function(){
if(json.step==2){
startgetinstallcrossorpatchfile(json.url,mid,data);
}else{
startinstallfile(json.url,mid,data);
}
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startinstallfile(url,mid,data){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{"baseinfo":data},
success:function(json){
if(json.status==0){
jQuery('#upgrade_info_'+mid).addClass("btn-warning").html(json.msg);
}else{
jQuery('#upgrade_info_'+mid).text(json.msg);
jQuery('#upgrade_progess_'+mid).animate({width:json.percent+"%"},json.second,function(){
if(json.step!=5){
startinstallfile(json.url,mid,data);
}else{
installover(json.url,mid,data);
}
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function installover(url,mid,data){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{"baseinfo":data},
success:function(json){
if(json.status==0){
jQuery('#upgrade_info_'+mid).addClass("btn-warning").html(json.msg);
}else{
jQuery('#upgrade_info_'+mid).text(json.msg);
jQuery('#upgrade_progess_'+mid).css("width","100%");
}
}
,
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function start_check_upgrade(url,mid){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{},
success:function(json){
jQuery('#upgrade_button_'+mid).html("&nbsp;");
if(json.status==0){
jQuery('#upgrade_info_'+mid).show().text(json.msg);
}else{
jQuery('#upgrade_info_'+mid).show().text(json.msg);
jQuery('#upgrade_progess_'+mid).show().animate({width:json.percent+"%"},json.second,function(){
startupgrade(json.url,mid);
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startupgrade(url,mid){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{},
success:function(json){
if(json.status==0){
jQuery('#upgrade_info_'+mid).text(json.msg);
}else{
jQuery('#upgrade_info_'+mid).text(json.msg);
jQuery('#upgrade_progess_'+mid).animate({width:json.percent+"%"},json.second,function(){
startgetcrossorpatchfile(json.url,mid);
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startgetcrossorpatchfile(url,mid){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{},
success:function(json){
if(json.status==0){
alert( json.msg);
}else{
jQuery('#upgrade_info_'+mid).text(json.msg);
jQuery('#upgrade_progess_'+mid).animate({width:json.percent+"%"},json.second,function(){
if(json.step==2){
startgetcrossorpatchfile(json.url,mid);
}else{
startupgradefile(json.url,mid);
}
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startupgradefile(url,mid){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{},
success:function(json){
if(json.status==0){
alert( json.msg);
}else{
jQuery('#upgrade_info_'+mid).text(json.msg);
jQuery('#upgrade_progess_'+mid).animate({width:json.percent+"%"},json.second,function(){
if(json.step!=5){
startupgradefile(json.url,mid);
}else{
upgradeover(json.url,mid);
}
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function upgradeover(url,mid){
jQuery.ajax({
type:'post',
async: true,
url:url,
data:{},
success:function(json){
if(json.status==0){
alert( json.msg);
}else{
jQuery('#upgrade_progess_'+mid).animate({width:"100%"},300,function(){
jQuery('#upgrade_progess_'+mid).hide().css("width","0");
start_check_upgrade(json.url,mid);
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,413 @@
<!--{template lyear:header_simple_start}-->
<link rel="stylesheet" type="text/css" href="static/lyear/js/jquery-tagsinput/jquery.tagsinput.min.css">
<script src="static/tagsinput/jquery.tagsinput.js"></script>
<script type="text/javascript" src="dzz/system/scripts/selorg.js?{VERHASH}"></script>
<script type="text/javascript">
<!--{if $openarr}-->
selorg.openarr = $openarr;
<!--{/if}-->
</script>
<style>
.img_128_128 {
max-width: 128px;
max-height: 128px;
border: 1px solid #CCC;
padding: 2px;
}
.btn-sorg {
margin: 5px;
}
* html .img_128_128 {
width: expression(this.width > 128 && this.width>=this.height ? 128: true);
height: expression(this.height > 128 && this.width<=this.height ? 128: true);
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}">{lang installed}</a>
</li>
<li class="nav-item">
<!--{if !$appid}-->
<a class="nav-link active" href="{MOD_URL}&op=edit&do=add">{lang add_app}</a>
<!--{else}-->
<a class="nav-link active" href="{MOD_URL}&op=edit&do=edit&appid=$appid">{lang edit_app}</a>
<!--{/if}-->
</li>
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}&op=cp&do=import">{lang import_type_app}</a>
</li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}&op=edit&appid=$appid" method="post" enctype="multipart/form-data" onsubmit="return validate(this)">
<input type="hidden" name="appsubmit" value="true" />
<input type="hidden" name="appid" value="$appid" />
<input type="hidden" name="refer" value="$refer" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="row mb-3">
<label for="appname" class="col-sm-2">{lang application_name}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="appname" name="appname" autocomplete="off" value="$app[appname]">
</div>
<span class="form-text"></span>
</div>
<div class="row mb-3">
<label for="identifier" class="col-sm-2">{lang application_identifier}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="identifier" name="identifier" autocomplete="off" value="$app[identifier]">
<ul class="form-text">
{lang app_application_identifier_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label for="app_path" class="col-sm-2">{lang application_app_path}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="app_path" name="app_path" autocomplete="off" value="$app[app_path]">
<ul class="form-text">
{lang app_application_app_path_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label for="appurl" class="col-sm-2">{lang application_site}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="appurl" name="appurl" autocomplete="off" value="$app[appurl]">
<ul class="form-text">
{lang app_application_site_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label for="appadminurl" class="col-sm-2">{lang application_appadminurl}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="appadminurl" name="appadminurl" autocomplete="off" value="$app[appadminurl]">
<ul class="form-text">
{lang app_application_appadminurl_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label for="vendor" class="col-sm-2">{lang supplier}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="vendor" name="vendor" autocomplete="off" value="$app[vendor]">
<span class="form-text">{lang application_provider_name}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang application_ico}</label>
<div class="col-sm-10">
<!--{if $appid>0}-->
<input id="fileiz_0" class="form-control" name="TMPiconnew" value="" style="display: none;" type="file">
<input id="fileiz_1" class="form-control" style="" name="iconnew" value="$app[appico]" type="text">
<a id="fileiz_0a" style="" href="javascript:;" onclick="document.getElementById('fileiz_1a').style.fontWeight = '';this.style.fontWeight = 'bold';document.getElementById('fileiz_1').name = 'TMPiconnew';document.getElementById('fileiz_0').name = 'iconnew';document.getElementById('fileiz_0').style.display = '';document.getElementById('fileiz_1').style.display = 'none'">{lang uploading}</a>&nbsp;
<a id="fileiz_1a" style="font-weight: bold;" href="javascript:;" onclick="document.getElementById('fileiz_0a').style.fontWeight = '';this.style.fontWeight = 'bold';document.getElementById('fileiz_0').name = 'TMPiconnew';document.getElementById('fileiz_1').name = 'iconnew';document.getElementById('fileiz_1').style.display = '';document.getElementById('fileiz_0').style.display = 'none'">{lang type_link}</a>
<!--{else}-->
<input id="fileiz_0" class="form-control" name="iconnew" value="" type="file">
<input id="fileiz_1" class="form-control" style="display: none;" name="TMPiconnew" value="$app[appico]" type="text">
<p>
<a id="fileiz_0a" style="font-weight: bold;" href="javascript:;" onclick="document.getElementById('fileiz_1a').style.fontWeight = '';this.style.fontWeight = 'bold';document.getElementById('fileiz_1').name = 'TMPiconnew';document.getElementById('fileiz_0').name = 'iconnew';document.getElementById('fileiz_0').style.display = '';document.getElementById('fileiz_1').style.display = 'none'">{lang uploading}</a>&nbsp;
<a id="fileiz_1a" style="" href="javascript:;" onclick="document.getElementById('fileiz_0a').style.fontWeight = '';this.style.fontWeight = 'bold';document.getElementById('fileiz_0').name = 'TMPiconnew';document.getElementById('fileiz_1').name = 'iconnew';document.getElementById('fileiz_1').style.display = '';document.getElementById('fileiz_0').style.display = 'none'">{lang type_link}</a>
</p>
<!--{/if}-->
<span class="form-text">{lang suggest_image_size}128X128 px</span>
<span class="form-text">
<!--{if $appid}--><img class="img_128_128" src="$app[appico]?t=$_G[timestamp]" >
<!--{else}--> <img class="img_128_128" src="dzz/images/default/icodefault.png" >
<!--{/if}-->
</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang group_permissions}</label>
<div class="col-sm-10">
<!--{loop $grouptitle $key $value}-->
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" class="form-check-input" id="group$key" name="group" value="$key" <!--{if $app[group]==$key}-->checked<!--{/if}--> onclick="{if $key==1}jQuery('#perm_depart').show();{else}jQuery('#perm_depart').hide();{/if}">
<label class="form-check-label" for="group$key">$value</label>
</div>
<!--{/loop}-->
<span class="form-text">{lang app_group_permissions}</span>
</div>
</div>
<div class="row mb-3" id="perm_depart" <!--{if $app[ 'group']!=1}-->style="display:none"<!--{/if}-->>
<label class="col-sm-2">{lang department_permissions}</label>
<div class="col-sm-10">
<div id="orgids" class="d-flex flex-wrap">
<!--{loop $sel_org $value}-->
<button id="orgids_sl_$value[orgid]" type="button" class="btn btn-outline-secondary btn-sorg" data-val="$value['orgid']">
{eval echo avatar_group($value['orgid']);} $value[orgname]
<a href="javascript:;" class="ibtn mdi mdi-close-circle lead" title="{lang delete}" onclick="selorg.remove('orgids',this);"></a>
</button>
<!--{/loop}-->
</div>
<div class="dropdown controls_adapt">
<button class="btn btn-primary dropdown-toggle" type="button" id="orgids_Menu" data-bs-toggle="dropdown" aria-expanded="false">{lang please_select_a_organization_or_department}</button>
<div id="orgids_dropdown_menu" class="dropdown-menu org-sel-box" role="menu" aria-labelledby="orgids_Menu">
<iframe name="orgids_iframe" class="org-sel-box-iframe" src="index.php?mod=system&op=orgtree&template=1&ctrlid=orgids&multiple=1&nouser=1&stype=1" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" allowtransparency="true"></iframe>
</div>
</div>
<input id="sel_orgids" name="orgids" type="hidden" value="$sel" />
<span class="form-text">{lang app_set_application_jurisdiction}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="tag">{lang application_label}</label>
<div class="col-sm-10">
<div class="input-group mb-3">
<input class="form-control" type="text" name="tag" id="tag" autocomplete="off" data-source="$tag_source" data-items="5" value="$app[tags]">
</div>
<ul class="form-text">
<li>{lang app_number_fields}</li>
<li>{lang app_clear_label}</li>
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="fileext">{lang app_support_extension}</label>
<div class="col-sm-10">
<div class="input-group mb-3">
<input class="form-control" type="text" name="fileext" id="fileext" autocomplete="off" data-source="$fileext_source" value="$app[fileext]">
</div>
<ul class="form-text">
{lang app_not_allowed_open_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang open_mode}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"id="open1" name="open" value="0" <!--{if $app[open]<1}-->checked<!--{/if}--> onclick="jQuery('#feature').show();">
<label class="form-check-label" for="open1">{lang app_internal_frame}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"id="open2" name="open" value="1" <!--{if $app[open]>0}-->checked<!--{/if}--> onclick="jQuery('#feature').hide();">
<label class="form-check-label" for="open2">{lang new_Window}</label>
</div>
<ul class="form-text">
{lang app_internal_frame_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang app_application_library}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"id="hideInMarket1" name="hideInMarket" value="0" <!--{if $app[hideInMarket]<1}-->checked<!--{/if}-->>
<label class="form-check-label" for="hideInMarket1">{lang show}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"id="hideInMarket2" name="hideInMarket" value="1" <!--{if $app[hideInMarket]>0}-->checked<!--{/if}-->>
<label class="form-check-label" for="hideInMarket2">{lang hide}</label>
</div>
<span class="form-text">{lang app_application_library_text}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang show_ico}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"id="isshow1" name="isshow" value="1" <!--{if $app[isshow]>0}-->checked<!--{/if}-->>
<label class="form-check-label" for="isshow1">{lang show}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"id="isshow2" name="isshow" value="0" <!--{if $app[isshow]<1}-->checked<!--{/if}-->>
<label class="form-check-label" for="isshow2">{lang hide}</label>
</div>
<span class="form-text">{lang app_show_ico_text}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="appdesc">{lang application_introduce}</label>
<div class="col-sm-10">
<textarea type="textarea" rows="3" class="form-control" name="appdesc" id="appdesc">$app[appdesc]</textarea>
</div>
</div>
<div id="pic_delete"></div>
<input id="editbutton" name="appbutton" value="{lang submit}" onclick="validate(this);" style="display: none;" type="button" />
</form>
<div class="form-horizontal">
<div class="row mb-3">
<label class="col-sm-2">{lang application_introduce_img}</label>
<div class="col-sm-10">
<!--{if $piclist}-->
<ul id="pic_container" class="thumbnails list-unstyled ml20">
<!--{loop $piclist $key $value}-->
<li class="wd120" style="margin:10px;width:90px;" id="pic_{$value[picid]}">
<div class="thumbnail text-center" style="margin-bottom:10px;">
<img data_src="$value[pic]" src="$value[pic]" />
</div>
<p class="text-center">
<a class="btn btn-primary" href="javascript:;" onclick="delete_pic(this,{$value[picid]})">{lang delete}</a>
</p>
</li>
<!--{/loop}-->
</ul>
<!--{/if}-->
<table class="tb tb2 ">
<tbody id="attachbodyhidden" style="display:none">
<tr class="noborder">
<td class="tb27">
<form method="post" autocomplete="off" id="upload" action="{MOD_URL}&op=$op&do=upload" enctype="multipart/form-data" target="uploadframe">
<input type="file" name="attach" class="pf form-control" size="0" />
<span id="localfile"></span>
<input type="hidden" name="uploadsubmit" id="uploadsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
</form>
</td>
</tr>
</tbody>
<tbody id="attachbody"></tbody>
</table>
<script src="admin/scripts/uploadpic.js?{VERHASH}" type="text/javascript"></script>
<iframe id="uploadframe" name="uploadframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
</div>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" id="submit_editsubmit" name="appsubmit" value="{lang submit}" type="button" onclick="document.getElementById('editbutton').click();">
</dl>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function screen_app(tagid,group){
var url = '{MOD_URL}';
if(tagid){
url += '&tagid='+tagid;
}
if(group){
url += '&group='+group;
}
var inputval = jQuery('#screen_keyword').val();
if(inputval){
url += '&keyword='+inputval;
}
console.log(url);
// return false;
window.location.href =url;
}
jQuery('#button_add').click(function(){
if(jQuery("#button_add1").hasClass('hide')){
jQuery("#button_add").html("×");
jQuery("#button_add1").removeClass("hide");
jQuery("#button_add2").removeClass("hide");
jQuery("#button_add1").stop().animate({top:"-124px"},500);
jQuery("#button_add2").stop().animate({top:"-62px"},500);
}else{
jQuery("#button_add").html("");
jQuery("#button_add1").stop().animate({top:"0px"},500);
jQuery("#button_add2").stop().animate({top:"0px"},500);
setTimeout(function(){
jQuery("#button_add1").addClass("hide");
jQuery("#button_add2").addClass("hide");
},500)
}
});
jQuery(document).ready(function(e) {
jQuery('#fileext').tagsInput({
'height': 'auto',
'width': 'auto',
'interactive': true,
'defaultText': '',
'removeWithBackspace': true,
'minChars': 0,
'maxChars': 0,
'placeholderColor': '#666666',
'typeahead': {
source: jQuery('#fileext').data('source')
}
});
jQuery('#tag').tagsInput({
'height': 'auto',
'width': 'auto',
'interactive': true,
'defaultText': '',
'removeWithBackspace': true,
'minChars': 0,
'maxChars': 0,
'placeholderColor': '#666666',
'typeahead': {
source: jQuery('#tag').data('source')
}
});
});
jQuery('#un_selector_tag,#un_selector_fileext').on('click', function(e) {
document.getElementById(this.id.replace('un_selector_', '')).focus();
});
function addtaginput(key, id) {
var html = '<span>';
html += '<button data-bs-dismiss="alert" class="btn-close" type="button"></button>';
html += '<em title="' + key + '" class="float-start">' + key + '</em><input type="hidden" value="' + key + '" name="' + id + '[]">';
html += '</span>';
jQuery('#' + id).val('').before(html).focus();
}
function validate(obj) {
//获取用户部门 并添加到form中
var appname = document.getElementById('appname');
var appurl = document.getElementById('appurl');
var identifier = document.getElementById('identifier');
var app_path = document.getElementById('app_path');
var notempty = '{lang not_empty}';
if(appname) {
var slen = strlen(appname.value);
if(slen < 1 || slen > 80) {
showmessage('{lang application_name}'+notempty, 'danger', 3000, 1);
appname.focus();
return false;
}
}
if(strlen(appurl.value) < 1) {
showmessage('{lang application_site}'+notempty, 'danger', 3000, 1);
appurl.focus();
return false;
}
if(strlen(identifier.value) < 1) {
showmessage('{lang application_identifier}'+notempty, 'danger', 3000, 1);
appurl.focus();
return false;
}
if(strlen(app_path.value) < 1) {
showmessage('{lang application_app_path}'+notempty, 'danger', 3000, 1);
appurl.focus();
return false;
}
uploadSubmit(obj);
return true;
}
jQuery('input[name="fileext"]').click(function(){
var val = $(this).val();
if(val == 0){
jQuery('#fileext').addClass('hide');
}else{
jQuery('#fileext').removeClass('hide');
}
})
jQuery('input[name="tag"]').click(function(){
var val = $(this).val();
if(val == 0){
jQuery('#tag').addClass('hide');
}else{
jQuery('#tag').removeClass('hide');
}
})
</script>
<script src="static/bootstrap/js/bootstrap-typeahead.js?{VERHASH}"></script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,133 @@
<!--{template lyear:header_simple_start}-->
<style>
.app_default_list{
padding:0;
margin:0;
}
.app_default_list li{
margin: 5px;
list-style: none;
float: left;
padding: 2px;
vertical-align: middle;
cursor: pointer;
position: relative;
width:150px;
height:38px;
line-height: 30px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border:1px solid transparent;
}
.app_default_list li a{padding:2px;}
.app_default_list li.isdefault1 a{color:rgba(76, 137, 251, 1)}
.app_default_list li .label-rightimg{margin:auto;display: none;position:absolute;right:3px;top:3px}
.app_default_list li.isdefault1 .label-rightimg{display: inline-block;width: auto}
.app_default_list li.isdefault,.app_default_list li.isdefault1{
border: 1px solid rgba(76, 137, 251, 1);
border-radius: var(--radius);
}
.table td img{max-height: 32px;max-width: 32px;}
.app_default_list li.ui-state-default{width: 150px;height: 38px;border: 1px solid #e1e1e1;display: block;background:#FFF }
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th width="100">{lang default}</th>
<th>{lang application_name}</th>
</tr>
</thead>
<!--{loop $list $key $value}-->
<tr>
<td width="100" >
<a class="btn btn-outline-success" href="{MOD_URL}&op=extopen&ext=$key">$key</a>
</td>
<td>
<form name="appform" class="form-horizontal form-horizontal-left" action="{MOD_URL}&op=extopen" method="post">
<input type="hidden" name="do" value="setorder" />
<ul class="app_default_list clearfix">
<!--{loop $value $key2 $value2}-->
<li class="default_li isdefault{$value2[isdefault]}" title="{lang drag_can_be_sorted}" onclick="setdefault(this, '{$value2[extid]}' )">
<input class="form-control" name="extid[]" type="hidden" value="{$value2[extid]}" />
<img class="default_li_icon" src="$value2[appdata][appico]" /><a href="javascript:;" title="{lang set_default}">$value2[appdata][appname]</a>
<img src="static/image/common/ic-filtrate.png" class="label-rightimg">
</li>
<!--{/loop}-->
</ul>
</form>
</td>
</tr>
<!--{/loop}-->
<thead>
<tr>
<td colspan="2" align="center" style="border:none">$multi </td>
</tr>
</thead>
</table>
</div>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang board_message}</strong> {lang extopen_board_message_text}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
</div>
</div>
</main>
<script type="text/javascript" src="{MOD_PATH}/scripts/jquery-ui.js?{VERHASH}"></script>
<script type="text/javascript">
jQuery('.app_default_list li').hover(function(){
jQuery(this).addClass("isdefault");
},function(){
jQuery(this).removeClass("isdefault");
});
$( ".app_default_list" ).sortable({
items: ".default_li ",
placeholder: "ui-state-default",
update: function(event, ui) {
var form = jQuery(this).parent();
jQuery.post(form.action, jQuery(form).serialize(), function(json) {
if(json.status==1){
showmessage( json.info,'success',1000,1);
} else{
showmessage(json.info,'error',1000,1);
}
});
}
});
function setdefault(obj,extid ){
if( jQuery(obj).hasClass("isdefault1") ){
return false;
}
jQuery.ajax({
type:'post',
url:'{MOD_URL}&op=extopen',
data:{'extid':extid ,'do':'setdefault'},
success:function(json){
if(json.status==1){
showmessage( json.info,'success',1000,1);
jQuery(obj).siblings().removeClass("isdefault1");
jQuery(obj).addClass("isdefault1");
} else{
showmessage(json.info,'error',1000,1);
}
}
});
}
function check_default(obj) {
if(jQuery(obj).prop('checked')) {
jQuery('input[data-ext=' + jQuery(obj).data('ext') + ']').not(obj).prop('checked', false);
}
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,84 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}">{lang installed}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}&op=edit&do=add">{lang add_app}</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{MOD_URL}&op=cp&do=import">{lang import_type_app}</a>
</li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form id="importform" name="importform" class="form-horizontal" action="{MOD_URL}&op=cp&do=import" method="post" enctype="multipart/form-data">
<input type="hidden" name="importsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="row mb-3">
<label class="col-sm-2">{lang choose_import_way}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"id="importtype1" name="importtype" value="file" checked="checked" onclick="document.getElementById('importfile').style.display='';document.getElementById('importtxt').style.display='none';">
<label class="form-check-label" for="importtype1">{lang uploading_files}</label>
</div>
<input class="form-check-input" type="radio"id="importtype1" name="importtype" value="txt" onclick="document.getElementById('importfile').style.display='none';document.getElementById('importtxt').style.display='';">
<label class="form-check-label" for="importtype1">{lang import_paste_text}</label>
</div>
</div>
<div class="row mb-3" id="importfile">
<label class="col-sm-2">{lang import_upload}</label>
<div class="col-sm-10">
<input type="file" class="form-control" name="importfile" style="padding:5px;" />
</div>
</div>
<div class="row mb-3" id="importtxt" style="display:none">
<label class="col-sm-2" for="importtxt">{lang import_paste_data}</label>
<div class="col-sm-10">
<textarea type="textarea" class="form-control" id="importtxt" name="importtxt" rows="5"></textarea>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="ignoreversion">忽略版本限制</label>
<div class="col-sm-10">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="ignoreversion" name="ignoreversion">
</div>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang submit}"/>
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
jQuery('#button_add').click(function(){
if(jQuery("#button_add1").hasClass('hide')){
jQuery("#button_add").html("×");
jQuery("#button_add1").removeClass("hide");
jQuery("#button_add2").removeClass("hide");
jQuery("#button_add1").stop().animate({top:"-124px"},500);
jQuery("#button_add2").stop().animate({top:"-62px"},500);
}else{
jQuery("#button_add").html("");
jQuery("#button_add1").stop().animate({top:"0px"},500);
jQuery("#button_add2").stop().animate({top:"0px"},500);
setTimeout(function(){
jQuery("#button_add1").addClass("hide");
jQuery("#button_add2").addClass("hide");
},500)
}
});
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,225 @@
<!--{template lyear:header_simple_start}-->
<link href="{MOD_PATH}/images/market1.css?{VERHASH}" rel="stylesheet" media="all">
<style>
.app-name-wrapper .appicon {
position: absolute;
left: 0;
top: 2px;
}
.app-name-wrapper .appicon img {
max-width: 45px;
max-height: 45px;
margin: 0;
}
.app-name-wrapper .appname a{
color:#000;
font-weight:500;
font-size:14px;
}
.app-name-wrapper .appdesc{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size:13px;
cursor:default;
}
.group-td-wrapper{
max-width:120px;
white-space:normal;
overflow: hidden;
text-overflow: ellipsis;
}
.group-td-wrapper>span {
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.group-td-wrapper>span>img {
margin:0;
vertical-align: text-bottom;
}
.tag-td-wrapper{
max-width:120px;
white-space:normal;
overflow: hidden;
text-overflow: ellipsis;
}
.tag-td-wrapper a{
display:inline-block;
padding:0 2px;
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.table td img {
max-width: 45px;
max-height: 45px;
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link active" href="{MOD_URL}">{lang installed}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}&op=edit&do=add">{lang add_app}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}&op=cp&do=import">{lang import_type_app}</a>
</li>
</ul>
</div>
</div>
<div class="card">
<header class="card-header">
<div class="float-start">
<a href="{MOD_URL}" class="dcolor">{lang total}<span class="num">$count</span>{lang ge}{lang app}</a>
</div>
<div class="tag-filter dropdown float-end">
<a href="javascript:;" data-bs-toggle="dropdown" role="button" id="tag-drop" class="btn btn-primary dropdown-toggle" aria-expanded="false">{eval echo $tagid?$tags[$tagid]['tagname']:lang('label');}</a>
<ul aria-labelledby="tag-drop" role="menu" class="dropdown-menu" id="tag-drop-menu">
<li>
<a href="javascript:;" class="dropdown-item" onclick="screen_app('0','$_GET[group]')";>{lang all}</a>
</li>
<!--{loop $tags $value}-->
<li>
<a href="javascript:;" class="dropdown-item" onclick="screen_app('$value[tagid]','$_GET[group]')";>$value[tagname]</a>
</li>
<!--{/loop}-->
</ul>
</div>
<div class="dropdown float-end me-2">
<a href="{MOD_URL}&group=$group" data-bs-toggle="dropdown" role="button" id="drop-group" class="btn btn-primary dropdown-toggle" aria-expanded="false">{eval echo $group?$grouptitle[$group]:lang('group_permissions');}
</a>
<ul aria-labelledby="drop-group" role="menu" class="dropdown-menu" id="drop-group-menu">
<!--{loop $grouptitle $key $value}-->
<li role="presentation">
<a href="javascript:;" class="dropdown-item" onclick="screen_app('$_GET[tagid]','$key')"; tabindex="-1" role="menuitem">$value</a>
</li>
<!--{/loop}-->
</ul>
</div>
</header>
<div class="card-body">
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}" method="post">
<input type="hidden" name="appsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<th >{lang application_name}</th>
<th >{lang supplier}</th>
<th >{lang label}</th>
<th >{lang group_permissions}</th>
<th >{lang operation}</th>
</thead>
<!--{loop $list $value}-->
<tr>
<td>
<a href="$value[appurl]" target="_blank" class="appicon" style="float: left;padding-right: 5px;"><img src="$value[appico]" style="margin:0" /></a>
<!--{if $value[appadminurl]}-->
<a href="$value[appadminurl]" target="_blank" class="dcolor">$value[appname]</a>
<!--{else}-->
<a href="$value[appurl]" target="_blank" class="dcolor">$value[appname]</a>
<!--{/if}-->
<small class="text-muted" title="{lang version}">$value[version]</small>
<div class="appdesc form-text" title="$value['appdesc']"> {eval echo $value['appdesc']?$value['appdesc']:lang('none');}</div>
<!-- </div> -->
</td>
<td>$value[vendor]</td>
<td>
<div class="tag-td-wrapper">
<!--{loop $value[tags] $key $value1}-->
<a href="{MOD_URL}&tagid=$value1[tagid]">$value1[tagname]</a>
<!--{/loop}-->
</div>
</td>
<td>
<!--{if $value['department']}-->
<div class="group-td-wrapper">
<!--{loop $value['department'] $key $value1}-->
<span appid="$value[appid]" orgid="$key" class="label label-default " style="display:inline-block"> <img src="dzz/system/images/organization.png" >{eval $i=0;}
<!--{loop $value1 $value2}-->
<!--{if $i>0}-->-<!--{/if}-->$value2[orgname] {eval $i++;}
<!--{/loop}-->
</span>
<!--{/loop}-->
</div>
<!--{else}-->
$value[grouptitle]
<!--{/if}-->
</td>
<td>
<!--{if $value[appadminurl]}-->
<a class="btn btn-outline-success" href="$value[appadminurl]" target="_blank">{lang set}</a>
<!--{/if}-->
<a class="btn btn-outline-primary" href="{MOD_URL}&op=edit&do=edit&appid=$value[appid]&refer=$refer" title="{lang edit}">{lang edit}</a>
<!--{if $value["system"]!=2}-->
<!--{if $value["available"]==1}-->
<a class="btn btn-outline-warning" href="{MOD_URL}&op=cp&do=disable&appid=$value[appid]&refer=$refer" title="{lang close}">{lang close}</a>
<!--{else}-->
<a class="btn btn-outline-success" href="{MOD_URL}&op=cp&do=enable&appid=$value[appid]&refer=$refer" title="{lang enable}">{lang enable}</a>
<a class="btn btn-outline-danger" href="{MOD_URL}&op=cp&do=uninstall&appid=$value[appid]&refer=$refer" title="{lang uninstall}" onclick="if(confirm('{lang list_uninstall_application}'))return true;else return false">{lang uninstall}</a>
<!--{/if}-->
<!--{else}-->
<!--{if $value["available"]!=1}-->
<a class="btn btn-small btn-success-outline" href="{MOD_URL}&op=cp&do=enable&appid=$value[appid]&refer=$refer" title="{lang enable}">{lang enable}</a>
<!--{/if}-->
<!--{/if}-->
<a class="btn btn-outline-primary" href="{MOD_URL}&op=cp&do=upgrade&appid=$value[appid]&refer=$refer">本地升级</a>
<a class="btn btn-outline-primary" href="{MOD_URL}&op=cp&do=export&appid=$value[appid]&refer=$refer" title="{lang export}" target="_blank">{lang export}</a>
</td>
</tr>
<!--{/loop}-->
</table>
</div>
<!--{if $multi}-->
$multi
<!--{/if}-->
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function screen_app(tagid,group){
var url = MOD_URL;
if(tagid){
url += '&tagid='+tagid;
}
if(group){
url += '&group='+group;
}
var inputval = jQuery('#screen_keyword').val();
if(inputval){
url += '&keyword='+inputval;
}
console.log(url);
// return false;
window.location.href =url;
}
jQuery('#button_add').click(function(){
if(jQuery("#button_add1").hasClass('hide')){
jQuery("#button_add").html("×");
jQuery("#button_add1").removeClass("hide");
jQuery("#button_add2").removeClass("hide");
jQuery("#button_add1").stop().animate({top:"-124px"},500);
jQuery("#button_add2").stop().animate({top:"-62px"},500);
}else{
jQuery("#button_add").html("");
jQuery("#button_add1").stop().animate({top:"0px"},500);
jQuery("#button_add2").stop().animate({top:"0px"},500);
setTimeout(function(){
jQuery("#button_add1").addClass("hide");
jQuery("#button_add2").addClass("hide");
},500)
}
});
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,68 @@
<!--{if $_GET['op']=='extopen'}-->
<div class="input-search">
<form name="search" action="{MOD_URL}" method="get">
<input type="hidden" name="mod" value="{MOD_NAME}" />
<input type="hidden" name="op" value="extopen" />
<i class="input-search-icon mdi mdi-magnify" aria-hidden="true" onclick="this.parentNode.submit()"></i>
<input type="text" class="form-control search form-search" name="ext" value="$_GET[ext]" placeholder="{lang extension}" id="searchval">
<span aria-hidden="true" id="emptysearchcondition" class="header-closebutton mdi mdi-close"></span>
</form>
</div>
<!--{elseif empty($_GET['op'])}-->
<div class="input-search">
<form name="search" action="{MOD_URL}" method="get">
<input type="hidden" name="mod" value="{MOD_NAME}" />
<input type="hidden" name="op" value="" />
<input type="hidden" name="tagid" value="$_GET['tagid']" />
<input type="hidden" name="group" value="$_GET['group']" />
<i class="input-search-icon mdi mdi-magnify" aria-hidden="true" onclick="this.parentNode.submit()"></i>
<input type="text" class="form-control search form-search" name="keyword" value="$_GET[keyword]" placeholder="{lang application_name_suppliers}" id="searchval">
<span aria-hidden="true" id="emptysearchcondition" class="header-closebutton mdi mdi-close"></span>
</form>
</div>
<!--{elseif $_GET['op']=='upgrade'}-->
<div class="input-search">
<form name="search" action="{MOD_URL}" method="get">
<input type="hidden" name="mod" value="{MOD_NAME}" />
<input type="hidden" name="op" value="upgrade" />
<i class="input-search-icon mdi mdi-magnify" aria-hidden="true" onclick="this.parentNode.submit()"></i>
<input type="text" class="form-control search form-search" name="keyword" value="$_GET[keyword]" placeholder="{lang appname}" id="searchval">
<span aria-hidden="true" id="emptysearchcondition" class="header-closebutton mdi mdi-close"></span>
</form>
</div>
<!--{elseif $_GET['op']=='default'}-->
<div class="input-search">
<form name="search" action="{MOD_URL}" method="get">
<input type="hidden" name="mod" value="{MOD_NAME}" />
<input type="hidden" name="op" value="$_GET[op]" />
<input type="hidden" name="group" value="$_GET['group']" />
<input type="hidden" name="position" value="$_GET['position']" />
<input type="hidden" name="depid" value="$_GET['depid']" />
<i class="input-search-icon mdi mdi-magnify" aria-hidden="true" onclick="this.parentNode.submit()"></i>
<input type="text" class="form-control search form-search" name="keyword" value="$_GET[keyword]" placeholder="{lang appname}" id="searchval">
<span aria-hidden="true" id="emptysearchcondition" class="header-closebutton mdi mdi-close"></span>
</form>
</div>
<!--{/if}-->
<script type="text/javascript">
jQuery('#searchval').focus(function (e) {//头部搜索框变颜色
jQuery(this).closest('.input-search').addClass('focus');
if(this.value!='') jQuery('#emptysearchcondition').show();
});
jQuery('#searchval').blur(function (e) {//失去焦点时
jQuery(this).closest('.input-search').removeClass('focus');
if(this.value=='') jQuery('#emptysearchcondition').hide();
});
jQuery('#searchval').keyup(function (e) {//失去焦点时
if(this.value!='') jQuery('#emptysearchcondition').show();
});
jQuery('#emptysearchcondition').on('click',function(){
jQuery('#searchval').val('');
jQuery('#searchval').closest('form').submit();
jQuery('#emptysearchcondition').hide();
return false;
});
</script>

View File

@ -0,0 +1,17 @@
<ul class="nav-drawer nav-stacked nav-pills">
<li class="nav-item">
<a class="nav-link <!--{if $op=='index' || $op=='cp' || $op=='edit'}-->active<!--{/if}-->" href="{MOD_URL}"><i class="mdi mdi-clipboard-file"></i><span>{lang appmarketedit}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $op=='upgrade_app' || $op=='appupgrade'}-->active<!--{/if}-->" href="{MOD_URL}&op=appupgrade&refer=$refer"><i class="mdi mdi-shopping-music"></i><span>{lang upgrade} <span id="update_app_num" class="badge bg-danger <!--{if ($upsum=get_update_app_num())<1}-->hide<!--{/if}-->">$upsum</span></span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $op=='cloudappmarket' || $op=='list'}-->active<!--{/if}-->" href="{MOD_URL}&op=cloudappmarket"><i class="mdi mdi-shopping-search"></i><span>{lang appmarket}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $op=='extopen'}-->active<!--{/if}-->" href="{MOD_URL}&op=extopen"><i class="mdi mdi-filter"></i><span>{lang open_way}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $op=='default'}-->active<!--{/if}-->" href="{MOD_URL}&op=default"><i class="mdi mdi-account-cog"></i><span>{lang permission_management}</span></a>
</li>
</ul>

View File

@ -0,0 +1,23 @@
<!--{template lyear:header_simple}-->
<div class="container-fluid">
<div class="card">
<div class="card-header">
<div class="card-title"><strong>{$app['appname']}</strong>卸载</div>
</div>
<div class="card-body">
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<strong>警告</strong>
{$app_delete_confirm}
</div>
<form id="confirm_uninstall_form" name="confirm_uninstall_form" class="form-horizontal" action="{MOD_URL}&op=cp&do=uninstall" method="post" >
<input type="hidden" name="confirmsubmit" value="true" />
<input type="hidden" name="adminurl" value="$_GET['adminurl']" />
<input type="hidden" name="appid" value="$appid" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<p><input id="confirm" type="text" class="form-control" name="confirm" value="" /></p>
<button type="button" class="btn btn-outline-danger me-2" onclick="if(document.getElementById('confirm').value!='DELETE'){document.getElementById('confirm').focus();}else{document.getElementById('confirm_uninstall_form').submit()}">{lang app_sure_delete}</button><button type="button" class="btn btn-outline-primary" onclick="location.href='{$refer}';return false;">{lang app_not_delete}</button>
</form>
</div>
</div>
</div>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,356 @@
<!--{template lyear:header_simple_start}-->
<link href="{MOD_PATH}/images/market1.css?{VERHASH}" rel="stylesheet" media="all">
<style>
.app_upgradelist{
margin: auto;
position: relative;
}
.app_upgradelist .upgrade_progess{
position: absolute;
bottom:0;
left: 0;
width:0%;
height: 10%;
}
.app_upgradelist .appicon {
padding: var(--radius);
float: left;
padding-right: 5px;
}
.app_upgradelist .appicon img {
max-width: 45px;
max-height: 45px;
margin: 0;
}
.app-info{
display:inline-block;
}
.app-info .select-info{
display:none;
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<!--{if $list}-->
<header class="card-header">
<div class="float-start">
<input class="form-check-input" type="checkbox" name="chkall" id="chkall">
<a href="{MOD_URL}" class="dcolor">{lang total}<span class="num">$count</span>{lang ge}{lang app}</a>
<div class="app-info">
<div class="app-info select-info">
{lang selected}<span class="num">0</span>{lang ge}{lang app}
<a class="btn btn-round btn-primary " id="update_selected" title="{lang update_onekey}" href="javascript:;" onclick="upgrade_all();"><i class="glyphicon glyphicon-upload"></i> {lang update_onekey}</a>
</div>
</div>
</div>
<div class="float-end">
<button class="btn btn-round btn-primary" id="update_check" title="{lang app_upgrade_check_need_update}" onclick="upgrade_check(this);" data-loading-text="{lang app_upgrade_check_need_update}">{lang app_upgrade_check_need_update2}</button>
</div>
</header>
<div class="card-body">
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}" method="post">
<input type="hidden" name="appsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th>#</th>
<th>{lang application_name}</th>
<th>{lang installed}</th>
<th>{lang newest}</th>
<th>更新内容</th>
<th>{lang operation}</th>
</tr>
</thead>
<tbody>
<!--{loop $list $value}-->
<tr id="app_div_{$value[appid]}" class="app_upgradelist">
<th scope="row">
<input type="checkbox" name="del[]" class="form-check-input" value="$value[appid]" data-mid="$value[mid]">
<label></label>
<div id="progess_{$value[appid]}">
<span id="upgrade_progess_{$value[appid]}" class="progress-bar progress-bar-striped progress-bar-animated upgrade_progess"></span>
</div>
</th>
<td>
{eval $appadminurl=replace_canshu($value['appadminurl']?$value['appadminurl']:$value['appurl'])}
<a href="$appadminurl" target="_blank" class="appicon"><img src="$value[appico]" style="margin:0" /></a><a class="dcolor" href="$appadminurl" target="_blank">$value[appname]</a>
<div class="appdesc form-text" title="$value['appdesc']">
{eval echo $value['upgrade_version']['desc_short']?$value['upgrade_version']['desc_short']:lang('none');}
</div>
</td>
<td>$value[version]</td>
<td>$value[upgrade_version][version]</td>
<td>$value[upgrade_version][desc]</td>
<td>
<a class="btn btn-round btn-primary btn-sm" id="upgrade_info_{$value[appid]}" href="javascript:;" onclick="start_check_upgrade('$value[appid]',1);" title="{lang update_onekey}">{lang update_onekey}</a>
</td>
</tr>
<!--{/loop}-->
</tbody>
</table>
</div>
<!--{if $multi}-->
$multi
<!--{/if}-->
</form>
</div>
<!--{else}-->
<div class="card-body">
<div class="text-center">
<img src="static/image/common/no_list.png" /><br>
<span class="lead">还没有可以升级的应用…</span><br>
<button class="btn btn-outline-primary btn-round" id="update_check" title="{lang app_upgrade_check_need_update}" onclick="upgrade_check(this);" data-loading-text="{lang app_upgrade_check_need_update}">{lang app_upgrade_check_need_update2}</button>
</div>
</div>
<!--{/if}-->
</div>
</div>
</main>
<script type="text/javascript">
var upgrade=false;
var appids=[];
var mids=[];
var nowupgradeappid=0;
jQuery('input[name="del[]"]').on('change',function(){
//console.log('change==='+this.value);
checkSelected();
});
jQuery('#chkall').on('change',function(){
if(jQuery(this).prop('checked')){
jQuery('input[name="del[]"]').prop('checked',true);
}else{
jQuery('input[name="del[]"]').prop('checked',false);
}
checkSelected();
});
function checkSelected(){
var i=0;
appids=[];
mids=[];
jQuery('input[name="del[]"]').each(function(){
//console.log(this);
if(jQuery(this).prop('checked')){
appids.push(this.value);
mids.push(jQuery(this).data("mid"));
}
i++;
});
var num=appids.length;
//console.log([i,num]);
if(num>0){
jQuery('.select-info').show().find('.num').text(num);
if(i>0 && i==num){//全部选中时
jQuery('#chkall').prop('checked',true);
}else{
jQuery('#chkall').prop('checked',false);
}
}else{
jQuery('.select-info').hide().find('.num').text('0');
}
}
function upgrade_check(obj){//强制检测更新,不受一天一次的限制,一般用于刚上传或修改了应用的配置信息,通过这个按钮可以强制刷新出需要更新的应用
var loader = $('body').lyearloading({
opacity: 0.2,
spinnerSize: 'lg',
spinnerText: '正在检测新版本中',
textColorClass: 'text-info',
spinnerColorClass: 'text-info'
});
jQuery(obj).button('loading');
jQuery.post('{MOD_URL}&op=check_upgrade',function(json){
var oldsum=parseInt(jQuery('#update_app_num').text());
if(json.sum!=oldsum){
window.location.reload();
}else{
loader.destroy();
showmessage('没有检测到新的更新','info',1000,1);
}
jQuery(obj).button('reset');
},'json')
.fail(function (jqXHR, textStatus, errorThrown) {
loader.destroy();
// 这里处理请求失败的情况
showmessage('请求失败: ' + textStatus, 'error', 3000, 1);
});
}
function upgrade_all(){
var num=appids.length;
if( upgrade ){
alert("正在升级,请稍等...");
return false;
}
if(num>0){
start_check_upgrade( 0 ,2);
}
}
function start_check_upgrade(appid,s){
var url="";
var appid = parseInt(appid);
var url_s='{MOD_URL}&op=upgrade_app_ajax&operation=check_upgrade&appid=';
if( upgrade ){
//alert("正在升级,请稍等...");
return false;
}
upgrade=true;
if( s==2 ){
if(nowupgradeappid==0 && appids.length>0 ){
url=url_s+appids[0];
nowupgradeappid=appids[0];
appids.shift();
}else{
url=url_s+nowupgradeappid;
}
}else{
if( appid==0 || isNaN(appid) ){
appid=nowupgradeappid;
}
url=url_s+appid;
nowupgradeappid=appid;
}
jQuery.ajax({
type:'GET',
async: false,
url:url,
data:{},
success:function(json){
if(json.status==0){
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
nowupgradeappid=0;
upgrade=false;
if( appids.length>0 && s==2){
nowupgradeappid=0;
url=url_s+appids[0];
start_check_upgrade(url,s);
}
}else{
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
jQuery('#upgrade_progess_'+nowupgradeappid).animate({width:json.percent+"%"},json.second,function(){
if(json.mid>0){
startupgrade(json.url,s);
}else{
upgradeover(json.url,s);
}
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startupgrade(url,s){
jQuery.ajax({
type:'GET',
async: false,
url:url,
data:{},
success:function(json){
if(json.status==0){
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
upgrade=false;
}else{
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
jQuery('#upgrade_progess_'+nowupgradeappid).animate({width:json.percent+"%"},json.second,function(){
startgetcrossorpatchfile(json.url,s);
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startgetcrossorpatchfile(url,s){
jQuery.ajax({
type:'GET',
async: false,
url:url,
data:{},
success:function(json){
if(json.status==0){
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
upgrade=false;
}else{
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
jQuery('#upgrade_progess_'+nowupgradeappid).animate({width:json.percent+"%"},json.second,function(){
if(json.step==2){
startgetcrossorpatchfile(json.url,s);
}else{
startupgradefile(json.url,s);
}
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function startupgradefile(url,s){
jQuery.ajax({
type:'GET',
async: false,
url:url,
data:{},
success:function(json){
if(json.status==0){
upgrade=false;
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
}else{
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
jQuery('#upgrade_progess_'+nowupgradeappid).animate({width:json.percent+"%"},json.second,function(){
if(json.step!=5){
startupgradefile(json.url,s);
}else{
upgradeover(json.url,s);
}
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
function upgradeover(url,s){
jQuery.ajax({
type:'GET',
async: false,
url:url,
data:{},
success:function(json){
if(json.status==0){
upgrade=false;
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
}else{
jQuery('#upgrade_info_'+nowupgradeappid).html(json.msg);
jQuery('#upgrade_progess_'+nowupgradeappid).animate({width:"100%"},300,function(){
jQuery('#upgrade_progess_'+nowupgradeappid).css("width","0%");
upgrade=false;
start_check_upgrade(json.url,s);
});
}
},
// 添加错误处理
error: function(xhr, status, error) {
showmessage('Request failed:' + status +' ' +error, 'error', 3000, 1);
}
});
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -16,7 +16,7 @@ include_once libfile('function/admin');
include_once libfile('function/cache');
include_once libfile('function/appmarket');
$step = intval($_GET['step']);
$op = $_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
$step = $step ? $step : 1;
$operation = $_GET['operation'] ? trim($_GET['operation']) : 'upgrade';
header('Content-type:text/json');

View File

@ -14,7 +14,7 @@ if(!defined('IN_DZZ') || !defined('IN_ADMIN')) {
if($_GET['do']=='usercloud'){
$bz=trim($_GET['bz']);
$cloud=C::t('connect')->fetch($bz);
$navtitle=$cloud['name'].' - '.lang('using_user');
$navtitle=$cloud['name'].' - '.lang('using_user').' - '.lang('cloud_set');
if(submitcheck('cloudsubmit')){
$dids=$_GET['delete'];
foreach($dids as $id){
@ -68,7 +68,7 @@ if($_GET['do']=='usercloud'){
}else{
$bz=$_GET['bz'];
$cloud=C::t('connect')->fetch($bz);
$navtitle=$cloud['name'].' - '.lang('set');
$navtitle=$cloud['name'].' - '.lang('cloud_set');
if(submitcheck('editsubmit')){
$_GET=dhtmlspecialchars($_GET);
if($cloud['type']=='pan'){

View File

@ -9,7 +9,7 @@
if(!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$navtitle=lang('migration_tool');
$navtitle=lang('dzzpan').' - '.lang('migration_tool').' - '.lang('cloud_set');
if(submitcheck('movesubmit')){
$_GET=dhtmlspecialchars($_GET);
$gets = array(

View File

@ -9,7 +9,7 @@
if(!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$navtitle=lang('routing_management');
$navtitle=lang('dzzpan').' - '.lang('routing_management').' - '.lang('cloud_set');
if(submitcheck('routersubmit')){
$_GET=dhtmlspecialchars($_GET);
$delete=$_GET['delete'];

View File

@ -10,7 +10,7 @@ if(!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$cloud=DB::fetch_first("select * from %t where bz='dzz'",array('connect'));
$navtitle=$cloud['name'].' - '.lang('space_management');
$navtitle=$cloud['name'].' - '.lang('space_management').' - '.lang('cloud_set');
if($_GET['do']=='checkspace'){
$remoteid=intval($_GET['remoteid']);
if($arr=C::t('local_storage')->update_sizecount_by_remoteid($remoteid)){

View File

@ -0,0 +1,64 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}" method="post" >
<input type="hidden" name="cloudsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th width="40">{lang sort}</th>
<th width="150">{lang name}</th>
<th width="90">{lang designator}</th>
<th width="100">{lang type}</th>
<th>{lang available}</th>
<th width="100">{lang set}</th>
</tr>
</thead>
<!--{loop $list $value}-->
<tr>
<td width="40">
<!--{if $value[bz]=='dzz'}-->
<input type="hidden" name="disp[{$value[bz]}]" value="$value[disp]" />
<!--{else}-->
<input type="text" name="disp[{$value[bz]}]" class="form-control" value="$value[disp]" style="width:45px;" />
<!--{/if}-->
</td>
<td width="150">
<input type="text" class="form-control" name="name[{$value[bz]}]" value="$value[name]" style="max-width:150px;" /></td>
<td><strong>$value[bz]</strong></td>
<td>{echo lang('cloud_type_'.$value[type])}</td>
<td>
<!--{if $value[bz]=='dzz'}-->
<input type="hidden" name="available[{$value[bz]}]" value="2" />
<!--{else}-->
<input type="checkbox" class="form-check-input" name="available[{$value[bz]}]" value="{eval echo ($value['available']?$value['available']:1)}" <!--{if $value[available]>0}-->checked<!--{/if}--> <!--{if $value[warning]}-->disabled<!--{/if}--> > <span class="text-danger" style="padding-left:3px">$value[warning]</span>
<!--{/if}-->
</td>
<td width="140"><a class="btn btn-outline-primary btn-sm" href="{MOD_URL}&op=edit&bz=$value[bz]">{lang set}</a>
<!--{if $value[warning]}-->
<!-- <br /> -->
<a class="btn btn-outline-danger btn-sm" href="{MOD_URL}&operation=delete&bz=$value[bz]">{lang delete}</a>
<!--{/if}-->
</td>
</tr>
<!--{/loop}-->
</table>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang save_set}" />
</dl>
</form>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang board_message}</strong> {lang cloud_cloud_board_message_text}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,293 @@
<!--{template lyear:header_simple_start}-->
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<!--{if $cloud['type']=='local'}-->
<!--{template lyear:right_header}-->
<div class="card">
<div class="card-body">
<form id="cpform" action="{MOD_URL}&op=edit&bz=$bz" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="editsubmit" name="true">
<div class="row mb-3">
<label class="col-sm-2">{lang name}:</label>
<div class="col-sm-10">
<input type="text" name="name" class="form-control" value="$cloud[name]">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang designator}:</label>
<div class="col-sm-10">
<input type="text" name="" class="form-control" value="$cloud[bz]" disabled="disabled">
</div>
<div class="col-sm-10">
<ul class="form-text">
{lang cloud_edit_designator_text}
</ul>
</div>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" name="editsubmit" value="{lang save_changes}" type="submit">
</dl>
</form>
</div>
</div>
<!--{elseif $cloud['type']=='pan'}-->
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link <!--{if empty($_GET[do])}-->active<!--{/if}-->" href="{MOD_URL}&op=edit&bz=$bz">{lang set}</a>
</li>
<!--{if $cloud['available']>0}-->
<li class="nav-item"> <a class="nav-link <!--{if $_GET[do]=='usercloud' }-->active<!--{/if}-->" href="{MOD_URL}&op=edit&bz=$bz&do=usercloud">{lang using_user}</a>
</li>
<!--{/if}-->
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<!--{if $_GET[do]=='usercloud'}-->
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}&op=edit&do=usercloud" method="post" >
<input type="hidden" name="cloudsubmit" value="true" />
<input type="hidden" name="bz" value="$bz" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th width="30"></th>
<th>{lang name}</th>
<th>{lang username}</th>
<th>{lang add_time}</th>
</tr>
</thead>
<!--{loop $list $value}-->
<tr>
<td width="40"><input type="checkbox" class="form-check-input" name="delete[]" value="$value[id]" /></td>
<td ><img src="$value[img]" />$value[cloudname]</td>
<td>$value[username]</td>
<td> $value[dateline] </td>
</tr>
<!--{/loop}-->
</table>
</div>
<div class="col-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="chkall" id="chkall" onclick="checkAll('prefix', this.form, 'del')">
<label class="form-check-label" for="chkall">
{lang del}
</label>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang submit}" />
</dl>
$multi
</form>
<!--{else}-->
<form id="cpform" action="{MOD_URL}&op=edit&bz=$bz" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="editsubmit" name="true">
<div class="row mb-3">
<label class="col-sm-2">{lang name}:</label>
<div class="col-sm-10">
<input type="text" name="name" class="form-control" value="$cloud[name]">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang whether_allow_users_add}:</label>
<div class="col-sm-10">
<!--{if $cloud[available]>0}-->
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="available" value="2" <!--{if $cloud[available]>1}-->checked="checked"<!--{/if}--> />
<label class="form-check-label" for="bbrules1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="available" value="1" <!--{if $cloud[available]<2}-->checked="checked"<!--{/if}--> />
<label class="form-check-label" for="bbrules1">{lang no}</label>
</div>
<!--{else}-->
<input type="hidden" name="available" value="$cloud[available]" />
<!--{/if}-->
<ul class="form-text">
<!--{if $cloud[warning]}-->
<li><span class=" text-danger">$cloud[warning]</span></li>
<!--{/if}-->
<!--{if $cloud[available]<1}-->
<li><span class=" text-danger">{lang cloud_edit_enabled_name}</span></li>
<!--{else}-->
<li>{lang cloud_edit_enabled_cloud}</li>
<!--{/if}-->
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang designator}:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="bz" value="$cloud[bz]" disabled="disabled">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang root_directory}:</label>
<div class="col-sm-10">
<input type="text" name="root" class="form-control" value="$cloud[root]" >
<ul class="form-text">
{lang cloud_add_root_directory_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">API Key:</label>
<div class="col-sm-10">
<input type="text" name="key" class="form-control" value="$cloud[key]" >
<ul class="form-text">
{lang cloud_add_API_KEY_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">Secret Key</label>
<div class="col-sm-10">
<input type="text" name="secret" class="form-control" value="$cloud[secret]" class="span4">
<ul class="form-text">
{lang cloud_add_Secret_KEY_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang cloud_add_data_table_name}</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="dname" value="$cloud[dname]" class="span4">
<ul class="form-text">
{lang cloud_add_data_table_name_text}
</ul>
</div>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" name="editsubmit" value="{lang save_changes}" type="submit">
</dl>
</form>
<!--{/if}-->
</div>
</div>
<!--{else}-->
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link <!--{if empty($_GET[do])}-->active<!--{/if}-->" href="{MOD_URL}&op=edit&bz=$bz">{lang set}</a>
</li>
<!--{if $cloud['available']>0}-->
<li class="nav-item"> <a class="nav-link <!--{if $_GET[do]=='usercloud' }-->active<!--{/if}-->" href="{MOD_URL}&op=edit&bz=$bz&do=usercloud">{lang using_user}</a>
</li>
<!--{/if}-->
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<!--{if $_GET[do]=='usercloud'}-->
<!--{if $list}-->
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}&op=edit&do=usercloud" method="post" >
<input type="hidden" name="cloudsubmit" value="true" />
<input type="hidden" name="bz" value="$bz" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th width="30"></th>
<th>{lang name}</th>
<th>{lang username}</th>
<th>{lang add_time}</th>
</tr>
</thead>
<!--{loop $list $value}-->
<tr>
<td width="40"><input type="checkbox" class="form-check-input" name="delete[]" value="$value[id]" /></td>
<td ><img src="$value[img]" />$value[cloudname]</td>
<td>$value[username]</td>
<td> $value[dateline] </td>
</tr>
<!--{/loop}-->
</table>
</div>
<div class="col-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="chkall" id="chkall" onclick="checkAll('prefix', this.form, 'del')">
<label class="form-check-label" for="chkall">
{lang del}
</label>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang submit}" />
</dl>
$multi
</form>
<!--{else}-->
<div class="text-center">
<img src="static/image/common/no_list.png" /><br>
<span class="lead">{lang no_relevant_content}…</span>
</div>
<!--{/if}-->
<!--{else}-->
<form id="cpform" action="{MOD_URL}&op=edit&bz=$bz" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="editsubmit" name="true">
<div class="row mb-3">
<label class="col-sm-2">{lang name}:</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="name" value="$cloud[name]">
<span class="form-text">{lang name} </span> </div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang whether_allow_users_add}:</label>
<div class="col-sm-10">
<!--{if $cloud[available]>0}-->
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="available" value="2" <!--{if $cloud[available]>1}-->checked="checked"<!--{/if}--> />
<label class="form-check-label" for="bbrules1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="available" value="1" <!--{if $cloud[available]<2}-->checked="checked"<!--{/if}--> />
<label class="form-check-label" for="bbrules1">{lang no}</label>
</div>
<!--{else}-->
<input type="hidden" name="available" value="$cloud[available]" />
<!--{/if}-->
<ul class="form-text">
<!--{if $cloud[warning]}-->
<li><span class=" text-danger">$cloud[warning]</span></li>
<!--{/if}-->
<!--{if $cloud[available]<1}-->
<li><span class=" text-danger">{lang cloud_edit_enabled_name}</span></li>
<!--{else}-->
<li>{lang cloud_edit_enabled_cloud}</li>
<!--{/if}-->
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang designator}:</label>
<div class="col-sm-10">
<input type="text" name="bz" class="form-control" value="$cloud[bz]" disabled="disabled">
<ul class="form-text">
{lang cloud_edit_designator_text}
</ul>
</div>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" name="editsubmit" value="{lang save_changes}" type="submit">
</dl>
</form>
<!--{/if}-->
</div>
</div>
<!--{/if}-->
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,10 @@
<!--{eval $bz=$bz?$bz:'dzz';}-->
<!--{eval $clouds=DB::fetch_all("select * from ".DB::table('connect')." where 1 order by disp");}-->
<ul class="nav-drawer nav-stacked nav-pills">
<li class="nav-item"> <a class="nav-link <!--{if $operation=='setting'}-->active<!--{/if}-->" href="{MOD_URL}&operation=setting"><i class="mdi mdi-cog"></i><span>{lang cloud_set}</span></a>
</li>
<!--{loop $clouds $value}-->
<li class="nav-item"><a class="nav-link <!--{if $operation!='setting' && $bz==$value[bz]}-->active<!--{/if}-->" href="{MOD_URL}&op=edit&bz=$value[bz]"><i class="mdi mdi-cloud"></i><span>$value[name]</span></a>
</li>
<!--{/loop}-->
</ul>

View File

@ -0,0 +1,115 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<!--{template lyear:right_header}-->
<div class="card">
<div class="card-body">
<form id="cpform" action="{MOD_URL}&op=movetool" class="form-horizontal" method="post" name="cpform" onsubmit="return validate(this);">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="movesubmit" name="true">
<div class="row mb-3">
<label class="col-sm-2">{lang target_location}</label>
<div class="col-sm-10">
<select name="remoteid" class="form-select">
<!--{loop $spaces $value}-->
<option value="$value[remoteid]" <!--{if $router[remoteid]==$value[remoteid]}-->selected="selected"
<!--{/if}-->>$value[name]($value[fusesize] / $value[ftotalsize])
</option>
<!--{/loop}-->
</select>
<ul class="form-text">
<li>{lang cloud_movetool_designator_text}</li>
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang original_location}</label>
<div class="col-sm-10">
<select name="oremoteid" class="form-select">
<!--{loop $spaces $value}-->
<option value="$value[remoteid]" >$value[name]($value[fusesize] / $value[ftotalsize])</option>
<!--{/loop}-->
</select>
<ul class="form-text">
<li>{lang cloud_movetool_designator_text}</li>
</ul>
</div>
</div>
<a href="javascript:;" onclick="jQuery('#filter').toggle(); document.getElementById('filter_guide').className=(document.getElementById('filter_guide').className=='mdi mdi-menu-down'?'mdi mdi-menu-up':'mdi mdi-menu-down');" class="btn btn-primary m-2">{lang filtrate_condition}&nbsp;<i id="filter_guide" class="mdi mdi-menu-down"></i></a>
<div id="filter" style="display:none;padding-left:50px;">
<div class="row mb-3">
<label class="col-sm-2">{lang file_type}</label>
<div class="col-sm-10">
<textarea type="textarea" id="exts" class="form-control" name="router[exts]" row="6" cols="6"></textarea>
<div class="m-2 p-1">
<a href="javascript:;" class="btn btn-primary" onclick="setExts('jpg,jpeg,png,gif')">{lang photograph_class}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('doc,docx,rtf,odt,htm,html,txt')">word{lang type_attach}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('xls,xlsx,ods,sxc,csv,tsv')">excel{lang type_attach}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('ppt,pptx,pps,ppsx,odp,sxi')">ppt{lang type_attach}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('mp4,avi,wmv,mkv,rmvb,rm,asf,mpg,mpeg,mov')">{lang video_typename_attach}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('txt,ini,conf,log,bat,sql,js,css,htm,html,xml,asp,aspx,php,jsp,json,py,h,c')">{lang text_class}</a>
</div>
<ul class="form-text">
{lang cloud_movetool_file_type_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang file_size}</label>
<div class="col-sm-10">
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="{lang typename_attach_gt}" name="router[size][lt]" value="">
<div class="input-group-text">M</div>
<input type="text" class="form-control" placeholder="{lang typename_attach_lt}" name="router[size][gt]" value="">
<div class="input-group-text">M</div>
</div>
<ul class="form-text">
{lang cloud_movetool_file_size_text}
</ul>
</div>
</div>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" name="movesubmit" value="{lang starting_migration}" type="submit">
</dl>
</form>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang board_message}</strong> {lang cloud_movetool_board_message_text}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
</div>
</div>
</main>
<script type="text/javascript">
var spaces=$spaces_json;
function validate(form) {
//验证原和目标位置
if(form.remoteid.value == form.oremoteid.value) {
showDialog('目标存储位置不能和原存储位置相同');
form.remoteid.focus();
return false;
}
//判断原位置有无数据
if(spaces[form.oremoteid.value].usesize<1){
alert('{lang cloud_movetool_home_position}');
form.oremoteid.focus();
return false;
}
return true;
}
function setExts(str){
var old=trim(document.getElementById('exts').value).replace(/{1,}/g,',').replace(/,{1,}/g,',').replace(/^\,/g,'');
var arr=old?old.split(','):[];
var newarr=str.split(',');
for(var i=0;i<newarr.length;i++){
if(jQuery.inArray(newarr[i],arr)<0){
arr.push(newarr[i]);
}
}
document.getElementById('exts').value=arr.join(',');
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,156 @@
<!--{template lyear:header_simple_start}-->
<style>
.thumbnails li {
float: left;
}
.thumbnail {
border: none;
box-shadow: none;
}
#upload_progress .back {
position: absolute;
width: 200px;
text-align: center;
color: #900;
font-weight: bold;
}
#upload_progress .back span {
padding: 0 5px;
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<!--{template lyear:right_header}-->
<div class="card">
<div class="card-body">
<div class="text-center">
<p id="operation" class="text-center">
<button class="btn btn-outline-primary start" onclick="moveing_start('start')">{lang starting_migration}</button>
&nbsp; &nbsp;
<button class="btn btn-danger stop" onclick="moveing_start('stop')" disabled="disabled">{lang stop}</button>
&nbsp; &nbsp; </p>
<ul class="thumbnails list-unstyled clearfix d-flex justify-content-center">
<li id="source_space" style="width:150px;">
<div class="thumbnail">
<!--{if $sourcedata[bz]=='dzz'}-->
<img src="dzz/images/default/system/home.png" width="100">
<!--{else}-->
<img src="dzz/images/default/system/$sourcedata[bz].png" width="100">
<!--{/if}-->
<h5 class="text-center" style="line-height:20px;margin-bottom:5px"><a href="javascript:;" title="$sourcedata[name]">$sourcedata[name] </a></h5>
</div>
</li>
<li id="moveinfo">
<div id="upload_progress" style="width:200px;overflow:hidden">
<h5 class="progress-subject" style="margin-top:5px"></h5>
<h5 class="progress-title">$first[attachment]</h5>
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 1%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"><div style="display: inline-block;"><span id="moved">$first[fsize]</span>/<span>$fmovesize</span></div></div>
</div>
</div>
</li>
<li id="target_space" style="width:150px;">
<div class="thumbnail">
<!--{if $targetdata[bz]=='dzz'}-->
<img src="dzz/images/default/system/home.png" width="100">
<!--{else}-->
<img src="dzz/images/default/system/$targetdata[bz].png" width="100">
<!--{/if}-->
<h5 class="text-center" style="line-height:20px;margin-bottom:5px"><a href="javascript:;" title="$targetdata[name]">$targetdata[name]</a></h5>
</div>
</li>
</ul>
</div>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<h2>{lang board_message}</h5>{lang cloud_movetool_board_message_text1}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
</div>
</div>
</main>
<iframe id="hideframe" name="hideframe" src="about:blank" frameborder="0" marginheight="0" marginwidth="0" width="0" height="0" allowtransparency="true" style="display:none;z-index:-99999"></iframe>
<script type="text/javascript">
var runurl = '$runurl';
var sizemoved = 0;
var totalsize = parseInt('$movesize');
var ignore = [];
var ignore_attach = {};
var attach = {};
var ignoreTimer = null;
function setProgress(data) {
attach = data;
var el = jQuery('#upload_progress');
if(data.error) {
el.find('.progress-title').html(data.attachment);
var html = '';
html += '<p><span class="text-danger">' + data.error + '</span></p>';
html += '<p><span class="text-info">{lang filename}' + data.attachment + '</span>';
html += '<p><span class="text-info">{lang big_small}' + formatSize(data.filesize) + '</span></p>';
html += '<p><a href="javascript:;" onclick="moveing_start(\'retry\')">{lang founder_upgrade_reset}</a>&nbsp;&nbsp;<a href="javascript:;" onclick="moveing_start(\'ignore\');">{lang ignore_continue}</a></p>';
ignoreTimer = window.setTimeout(function() { moveing_start('ignore'); }, 1000);
el.find('.progress-subject').html(html);
} else {
el.find('.progress-subject').html('{lang moving}');
sizemoved += parseInt(data.filesize);
el.find('.progress-title').html(data.attachment);
el.find('#moved').html(formatSize(sizemoved));
jQuery('#upload_progress .progress-bar').css('width', Math.floor((sizemoved / totalsize) * 100));
}
}
function setComplete() {
var html = '';
html += '<p><span class="text-success">{lang migration_completed}</span></p>';
if(ignore.length > 0) {
html += '<p class="text-warning">' + ignore.length + '{lang cloud_movetool_file_neglect}</p>';
}
jQuery('#upload_progress .progress-bar').css('width', '100%');
jQuery('#upload_progress .progress-subject').html(html);
jQuery('#operation .stop').attr('disabled', true);
jQuery('#operation .start').attr('disabled', true);
}
function moveing_start(op) {
if(ignoreTimer) window.clearTimeout(ignoreTimer);
if(op == 'start') {
jQuery('#operation .stop').removeAttr('disabled');
jQuery('#operation .start').attr('disabled', true);
jQuery('#upload_progress .progress-subject').html('{lang moving}');
jQuery('#upload_progress .progress-bar').css('width', Math.floor((sizemoved / totalsize) * 100));
window.frames['hideframe'].location = runurl ;
} else if(op == 'stop') {
jQuery('#operation .start').removeAttr('disabled');
jQuery('#operation .stop').attr('disabled', true);
window.frames['hideframe'].location = 'about:blank';
jQuery('#upload_progress .progress-subject').html('{lang stopped}');
} else if(op == 'ignore') {
ignore.push(attach.aid);
ignore_attach[attach.aid] = attach;
jQuery('#upload_progress .progress-subject').html('{lang ignored}');
sizemoved += parseInt(attach.filesize);
jQuery('#upload_progress .progress-bar').css('width', Math.floor((sizemoved / totalsize) * 100));
window.frames['hideframe'].location = runurl+'&dateline='+attach.dateline+'&aid1='+attach.aid ;
} else if(op == 'retry') {
jQuery('#upload_progress .progress-subject').html('{lang are_retry}');
jQuery('#upload_progress .progress-bar').css('width', Math.floor((sizemoved / totalsize) * 100));
window.frames['hideframe'].location = runurl ;
} else if(op == 'refresh') {
window.location.reload();
}
}
function formatSize(bytes) {
var i = -1;
do {
bytes = bytes / 1024;
i++;
} while (bytes > 99);
return Math.max(bytes, 0).toFixed(1) + ['kB', 'MB', 'GB', 'TB', 'PB', 'EB'][i];
};
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,133 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=edit&bz=dzz"> {lang set}</a> </li>
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=space">{lang space_management}</a> </li>
<li class="nav-item"> <a class="nav-link active" href="{MOD_URL}&op=oauth&bz=ALIOSS">{lang oauth_ALIOSS_add_ALY}</a> </li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form name="aliform" class="form-horizontal" action="{MOD_URL}&op=oauth" method="post" onsubmit="return validate(this)">
<input type="hidden" name="alisubmit" value="true" />
<input type="hidden" name="bz" value="ALIOSS" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="row mb-3">
<label class="col-sm-2" for="access_id">Access Key ID</label>
<div class="col-sm-10">
<input type="text" id="access_id" class="form-control" name="access_id" autocomplete="off" value="$ali[access_id]" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');getBucket();}">
<span class="form-text">{lang oauth_ALIOSS_ALY_storage}Access Key ID</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="access_key">Access Key Secret</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="access_key" name="access_key" autocomplete="off" value="$ali[access_id]" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');getBucket();}">
<span class="form-text">{lang oauth_ALIOSS_ALY_storage}Access Key Secret</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2"><a href="javascript:;" onclick="getBucket()">{lang oauth_ALIOSS_click_gain}</a></label>
<div class="col-sm-10">
<select id="bucket" name="bucket" class="form-select" onchange="setBucketHost()"></select>
<span class="form-text">{lang oauth_ALIOSS_bucket}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="hostname">
<a id="hostname_dropmenu" role="button" data-bs-toggle="dropdown" href="#" aria-expanded="false" class="btn btn-primary dropdown-toggle">{lang select_node_address} </a>
<ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop6" style="max-height:300px;overflow-y:auto;">
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-hangzhou.aliyuncs.com" onclick="selectHostName(this);return false;">{lang oauth_ALIOSS_node1}</a></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-hangzhou-internal.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node2}</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-qingdao.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node3}</a></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-qingdao-internal.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node4}</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-beijing.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node5}</a></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-beijing-internal.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node6}</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-hongkong.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node7}</a></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-hongkong-internal.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node8}</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-shenzhen.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node9}</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:;" hostname="oss-cn-shenzhen-internal.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node10}</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-shanghai.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node11}</a></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-cn-shanghai-internal.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node12}</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-us-west-1.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node13}</a></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-us-west-1-internal.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node14}</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-ap-southeast-1.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node15}</a></li>
<li role="presentation"><a role="menuitem" class="dropdown-item" tabindex="-1" href="javascript:;" hostname="oss-ap-southeast-1-internal.aliyuncs.com" onclick="document.getElementById('hostname').value=jQuery(this).attr('hostname');return false;">{lang oauth_ALIOSS_node16}</a></li>
</ul>
</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="hostname" name="hostname" autocomplete="off" value="$ali[hostname]" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');}">
<span class="form-text">{lang oauth_ALIOSS_node17}</span>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang add}">
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function setBucketHost() {
jQuery('#hostname').val('');
jQuery("#bucket").parent().parent().removeClass('has-warning');
}
function selectHostName(obj) {
jQuery('#hostname').val(jQuery(obj).attr('hostname'));
jQuery("#hostname").parent().parent().removeClass('has-warning');
jQuery('#hostname_dropmenu').html(jQuery(obj).html() + '');
}
function getBucket() {
var id = jQuery("#access_id").val();
var key = jQuery("#access_key").val();
console.log('aaaaaaaaaaaa');
if(id == '' || key == '') {
return;
}
jQuery.getJSON('{MOD_URL}&op=oauth&do=getBucket', { id: id, key: key }, function(json) {
console.log(json);
if(json.length > 0) {
var html = '';
for(var i in json) {
html += '<option value="' + json[i] + '" >' + json[i] + '</option>';
}
console.log(html);
jQuery('#bucket').html(html);
}
});
}
function validate(form) {
if(jQuery("#access_id").val() == '') {
jQuery("#access_id").parent().parent().addClass('has-warning');
return false;
} else if(jQuery("#access_key").val() == '') {
jQuery("#access_key").parent().parent().addClass('has-warning');
return false;
} else if(jQuery("#bucket").val() == '') {
jQuery("#bucket").parent().parent().addClass('has-warning');
return false;
} else if(jQuery("#hostname").val() == '') {
jQuery("#hostname").parent().parent().addClass('has-warning');
return false;
}
return true;
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,69 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=edit&bz=dzz"> {lang set}</a> </li>
<li class="nav-item" > <a class="nav-link" href="{MOD_URL}&op=space">{lang space_management}</a> </li>
<li class="nav-item"> <a class="nav-link active" href="{MOD_URL}&op=oauth&bz=disk">{lang add}{lang cloud_type_disk}</a> </li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form name="aliform" class="form-horizontal" action="{MOD_URL}&op=oauth" method="post" onsubmit="return validate(this)">
<input type="hidden" name="disksubmit" value="true" />
<input type="hidden" name="bz" value="disk" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="row mb-3">
<label class="col-sm-2">{lang disk_name}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="config[cloudname]" value="" required>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang disk_dir}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="config[attachdir]" value="" required>
<span class="form-text">{lang disk_dir_tip}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang disk_encode}</label>
<div class="col-sm-10">
<select class="form-select" name="config[charset]">
<option value="GBK">GBK</option>
<option value="UTF-8" selected="selected">UTF-8</option>
<option value="BIG5">BIG5</option>
</select>
<span class="form-text">{lang disk_encode_tip}</span>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang add}">
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function validate(form) {
var i = 0;
jQuery("input.required").each(function() {
if(jQuery(this).val() == '') {
jQuery(this).focus();
return false;
}
i++;
});
if(i < jQuery("input.required").length) {
return false;
} else {
return true;
}
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,109 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=edit&bz=dzz"> {lang set}</a> </li>
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=space">{lang space_management}</a> </li>
<li class="nav-item"> <a class="nav-link active" href="{MOD_URL}&op=oauth&bz=ftp">{lang add_FTP_storage}</a> </li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form name="aliform" class="form-horizontal" action="{MOD_URL}&op=oauth" method="post" onsubmit="return validate(this)">
<input type="hidden" name="ftpsubmit" value="true" />
<input type="hidden" name="bz" value="ftp" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="row mb-3">
<label class="col-sm-2">{lang site_name}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="config[cloudname]" value="">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang IP_address}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="config[host]" value="" placeholder="{lang host_IP_address}">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang port}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="config[port]" value="21" placeholder="{lang port}">
<span class="form-text"></span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang username}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="config[username]" value="" placeholder="{lang FTP_account_user_name}">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang password}</label>
<div class="col-sm-10">
<input type="password" class="form-control required" name="config[password]" value="" placeholder="{lang FTP_account_user_password}">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang FTP_encode}</label>
<div class="col-sm-10">
<select class="form-select" name="config[charset]">
<option value="GBK" selected="selected">GBK</option>
<option value="UTF-8">UTF-8</option>
<option value="BIG5">BIG5</option>
</select>
<span class="form-text">{lang oauth_ftp_encode_set}</span>
</div>
</div>
<!--{if function_exists('ssh2_connect')}-->
<div class="row mb-3">
<label class="col-sm-2"></label>
<div class="col-sm-10">
<label class="radio-inline"><input type="radio" class="form-check-input" name="config[ssl]" checked="checked" value="0" onclick="$('#pasv').show();">{lang way_FTP_connection}</label>
<label class="radio-inline"><input type="radio" class="form-check-input" name="config[ssl]" value="2" onclick="$('#pasv').hide();">{lang use_ssh2_sftp}</label>
</div>
</div>
<!--{/if}-->
<div id="pasv" class="row mb-3">
<label class="col-sm-2"></label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="config[pasv]" name="config[pasv]" checked="checked" value="1">
<label class="form-check-label" for="config[pasv]">{lang use_Passive_Mode}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="config[ssl]" name="config[ssl]" value="1">
<label class="form-check-label" for="config[ssl]">{lang enable_secure_link}</label>
</div>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang add}">
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function validate(form) {
var i = 0;
jQuery("input.required").each(function() {
if(jQuery(this).val() == '') {
jQuery(this).focus();
return false;
}
i++;
});
if(i < jQuery("input.required").length) {
return false;
} else {
return true;
}
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,134 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=edit&bz=dzz"> {lang set}</a> </li>
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=space">{lang space_management}</a> </li>
<li class="nav-item"> <a class="nav-link active" href="{MOD_URL}&op=oauth&bz=QCOS">{lang oauth_QCOS_add_ALY}</a> </li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form name="aliform" class="form-horizontal" action="{MOD_URL}&op=oauth" method="post" onsubmit="return validate(this)">
<input type="hidden" name="alisubmit" value="true" />
<input type="hidden" name="bz" id="bz" value="QCOS" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="row mb-3">
<label class="col-sm-2" for="access_id">API SecretId</label>
<div class="col-sm-10">
<input type="text" id="access_id" class="form-control" name="access_id" autocomplete="off" value="$ali[access_id]" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');getBucket();}">
<span class="form-text">{lang oauth_QCOS_ALY_storage}API SecretId</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="access_key">API SecretKey</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="access_key" name="access_key" autocomplete="off" value="$ali[access_id]" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');getBucket();}">
<span class="form-text">{lang oauth_QCOS_ALY_storage}API SecretKey</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="region">{lang oauth_QCOS_region}</label>
<div class="col-sm-10">
<select id="region" name="region" class="form-select">
<option value="ap-beijing" >北京</option>
<option value="ap-beijing-fsi" >北京金融</option>
<option value="ap-nanjing" >南京</option>
<option value="ap-chengdu" >成都</option>
<option value="ap-guangzhou" >广州</option>
<option value="ap-shanghai" >上海</option>
<option value="ap-shanghai-fsi" >上海金融</option>
<option value="ap-chongqing" >重庆</option>
<option value="ap-hongkong" >香港</option>
<option value="ap-qingyuan" >清远</option>
<option value="ap-shenzhen-fsi" >深圳金融</option>
</select>
<span class="form-text">{lang oauth_QCOS_region_tip}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2"><a href="javascript:;" onclick="getBucket()">{lang oauth_QCOS_click_gain}</a></label>
<div class="col-sm-10">
<select id="bucket" name="bucket" class="form-select" onchange="setBucketHost()">
</select>
<span class="form-text">{lang oauth_QCOS_bucket}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="schema">{lang oauth_QCOS_agree}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="schema" name="schema" autocomplete="off" value="{if $ali[agree]}$ali[agree]{else}http{/if}">
<span class="form-text">{lang oauth_QCOS_agree_tip}</span>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang add}">
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function setBucketHost() {
jQuery('#hostname').val('');
jQuery("#bucket").parent().parent().removeClass('has-warning');
}
function selectHostName(obj) {
jQuery('#hostname').val(jQuery(obj).attr('hostname'));
jQuery("#hostname").parent().parent().removeClass('has-warning');
jQuery('#hostname_dropmenu').html(jQuery(obj).html() + '');
}
function getBucket() {
var id = jQuery("#access_id").val();
var key = jQuery("#access_key").val();
var region = jQuery("#region").val();
var bz = jQuery("#bz").val();
if(id == '' || key == '' || region == '') {
return;
}
jQuery.getJSON('{MOD_URL}&op=oauth&do=getBucket', { id: id, key: key,region:region,bz:bz }, function(json) {
if(json.error){
showmessage(json.error,'error','3000',1);
}else{
if(json.length > 0) {
var html = '';
for(var i in json) {
html += '<option value="' + json[i] + '" >' + json[i] + '</option>';
}
jQuery('#bucket').html(html);
}
}
});
}
function validate(form) {
if(jQuery("#access_id").val() == '') {
jQuery("#access_id").parent().parent().addClass('has-warning');
return false;
} else if(jQuery("#access_key").val() == '') {
jQuery("#access_key").parent().parent().addClass('has-warning');
return false;
} else if(jQuery("#bucket").val() == '') {
jQuery("#bucket").parent().parent().addClass('has-warning');
return false;
} else if(jQuery("#hostname").val() == '') {
jQuery("#hostname").parent().parent().addClass('has-warning');
return false;
}else if(jQuery("#region").val() == '') {
jQuery("#region").parent().parent().addClass('has-warning');
return false;
}
return true;
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,82 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=edit&bz=dzz"> {lang set}</a> </li>
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&op=space">{lang space_management}</a> </li>
<li class="nav-item"> <a class="nav-link active" href="{MOD_URL}&op=oauth&bz&bz=qiniu">{lang oauth_qinniu_add}</a> </li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form name="aliform" class="form-horizontal" action="{MOD_URL}&op=oauth" method="post" onsubmit="return validate(this)">
<input type="hidden" name="qiniusubmit" value="true" />
<input type="hidden" name="bz" value="qiniu" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="row mb-3">
<label class="col-sm-2" for="access_id">AK</label>
<div class="col-sm-10">
<input type="text" id="access_id" class="form-control" name="access_id" autocomplete="off" value="$ali[access_id]" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');}" onfocus="jQuery(this).parent().parent().removeClass('has-warning');" />
<span class="form-text">{lang oauth_qinniu_storage} AK</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="access_key">SK</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="access_key" name="access_key" autocomplete="off" value="$ali[access_id]" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');}" onfocus="jQuery(this).parent().parent().removeClass('has-warning');" />
<span class="form-text">{lang oauth_qinniu_storage} SK</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">bucket{lang name}</label>
<div class="col-sm-10">
<input type="text" id="bucket" name="bucket" class="form-control" value="" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');}" onfocus="jQuery(this).parent().parent().removeClass('has-warning');" />
<span class="form-text">{lang oauth_qinniu_manage_bucket}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="hostname">{lang visit_domain_name}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="hostname" name="hostname" autocomplete="off" value="$ali[hostname]" onfocus="jQuery(this).parent().parent().removeClass('has-warning');" onblur="if(this.value==''){jQuery(this).parent().parent().addClass('has-warning');}else{jQuery(this).parent().parent().removeClass('has-warning');}" />
<span class="form-text">{lang oauth_qinniu_storage_bucket}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="region">{lang storage_region}</label>
<div class="col-sm-10">
<!--{loop $HOSTS $key $value}-->
<label class="radio-inline"><input class="form-check-input" type="radio" <!--{if $key=='huadong'}--> checked="checked"<!--{/if}--> name="region" value="$key" /> $value['title']</label>
<!--{/loop}-->
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang add}">
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function validate(form){
if(jQuery("#access_id").val()==''){
jQuery("#access_id").parent().parent().addClass('has-warning');
return false;
}else if(jQuery("#access_key").val()==''){
jQuery("#access_key").parent().parent().addClass('has-warning');
return false;
}else if(jQuery("#bucket").val()==''){
jQuery("#bucket").parent().parent().addClass('has-warning');
return false;
}else if(jQuery("#hostname").val()==''){
jQuery("#hostname").parent().parent().addClass('has-warning');
return false;
}
return true;
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,22 @@
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link <!--{if $_GET[op]=='edit'}-->active<!--{/if}-->" href="{MOD_URL}&op=edit&bz=$bz"> {lang set}</a>
</li>
<li class="nav-item"><a class="nav-link <!--{if $_GET[op]=='space'}-->active<!--{/if}-->" href="{MOD_URL}&op=space">{lang space_management}</a>
</li>
<!--{if $_GET[op]=='spaceadd'}-->
<li class="nav-item"><a class="nav-link active" href="{MOD_URL}&op=spaceadd">{lang add_storage_location}</a>
</li>
<!--{/if}-->
<li class="nav-item"><a class="nav-link <!--{if $_GET[op]=='router'}-->active<!--{/if}-->" href="{MOD_URL}&op=router">{lang routing_management}</a>
</li>
<!--{if $_GET[op]=='routeredit'}-->
<li class="nav-item"><a class="nav-link active" href="{MOD_URL}&op=router">{lang edit_routing}</a>
</li>
<!--{/if}-->
<li class="nav-item"><a class="nav-link <!--{if $_GET[op]=='movetool'}-->active<!--{/if}-->" href="{MOD_URL}&op=movetool">{lang migration_tool}</a>
</li>
</ul>
</div>
</div>

View File

@ -0,0 +1,83 @@
<!--{template lyear:header_simple_start}-->
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<!--{template lyear:right_header}-->
<div class="card">
<div class="card-body">
<a href="{MOD_URL}&op=routeredit" title="{lang add_routing}" class="btn btn-outline-primary">{lang add_routing}</a>
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}&op=router" method="post">
<input type="hidden" name="routersubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<th width="20">&nbsp;</th>
<th width="80">{lang priority}</th>
<th width="150">{lang name}</th>
<th width="100">{lang use_storage}</th>
<th>{lang routing_rule}</th>
<th width="60">{lang enable}</th>
<th width="60">{lang edit}</th>
</thead>
<!--{loop $list $value}-->
<tr>
<td width="20"><input type="checkbox" class="form-check-input" name="delete[]" value="$value[routerid]" /></td>
<td width="80"><input type="text" class="form-control" name="priority[{$value[routerid]}]" value="$value[priority]"/></td>
<td width="150"><input type="text" class="form-control" name="name[{$value[routerid]}]" value="$value[name]" /></td>
<td width="100">$value[position]
<!--{if $value[bz_available]<1}-->
<span class="text-danger">{lang router_routing_failure}</span>
<!--{/if}--></td>
<td style="word-break:break-all">$value[drouter]</td>
<td width="60"><input type="checkbox" class="form-check-input" name="available[{$value[routerid]}]" value="1" <!--{if $value[available]>0}-->checked<!--{/if}-->></td>
<td width="60"><a href="{MOD_URL}&op=routeredit&routerid=$value[routerid]" class="btn btn-outline-primary" title="{lang edit}"><i class="mdi mdi-pencil"></i></a></td>
</tr>
<!--{/loop}-->
</table>
</div>
<div class="col-12">
<div class="form-check">
<input type="checkbox" class="form-check-input" name="chkall" id="chkall" onclick="checkAll('prefix', this.form, 'delete')">
<label class="form-check-label" for="chkall">
{lang del}
</label>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang submit}" />
</dl>
</form>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang board_message}</strong>{lang router_board_message_text}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function checkspace(obj, routerid) {
jQuery(obj).html('<img src="admin/images/loadding.gif">');
jQuery.getJSON('{MOD_URL}&op=space&do=checkspace&routerid=' + routerid, function(json) {
if(json.error) {
jQuery(this).html('<i class="icon-refresh"></i><span class="text-danger">' + json.error + '</span>');
} else {
jQuery('#spaceinfo_' + routerid + ' .spacecheck a').html('<span class="text-success" >{lang already_update}</span>');
jQuery('#spaceinfo_' + routerid + ' .spacesize').html(json.fusesize + '&nbsp;/&nbsp;' + json.ftotalsize).hide().fadeIn('slow');
if(json.usesize < 1) {
jQuery('delete_' + routerid).show();
} else {
jQuery('delete_' + routerid).hide();
}
window.setTimeout(function() {
jQuery('#spaceinfo_' + routerid + ' .spacecheck a').html('<i class="icon-refresh"></i>');
}, 5000);
}
});
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,91 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<!--{template lyear:right_header}-->
<div class="card">
<div class="card-body">
<form id="cpform" action="{MOD_URL}&op=routeredit" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" name="routerid" value="$routerid">
<input type="hidden" value="addroutersubmit" name="true">
<div class="row mb-3">
<label class="col-sm-2">{lang routing_name}</label>
<div class="col-sm-10">
<input type="text" name="router[name]" class="form-control" value="$router[name]">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang priority}</label>
<div class="col-sm-10">
<input type="text" name="router[priority]" class="form-control" value="$router[priority]">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang storage_location}</label>
<div class="col-sm-10">
<select name="router[remoteid]" class="form-select">
<!--{loop $spaces $value}-->
<option value="$value[remoteid]" <!--{if $router[remoteid]==$value[remoteid]}-->selected="selected"<!--{/if}-->> $value[name]
<!--{if $value[available]<1}-->{lang router_routing_failure}<!--{/if}-->
</option>
<!--{/loop}-->
</select>
<ul class="form-text">
<li>{lang cloud_movetool_designator_text}</li>
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang file_type}</label>
<div class="col-sm-10">
<textarea type="textarea" id="exts" class="form-control" name="router[router][exts]" row="6" cols="6">{eval echo implode(',',$router['router']['exts'])}</textarea>
<div class="m-2 p-1">
<a href="javascript:;" class="btn btn-primary" onclick="setExts('jpg,jpeg,png,gif')">{lang photograph_class}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('doc,docx,rtf,odt,htm,html,txt')">word{lang type_attach}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('xls,xlsx,ods,sxc,csv,tsv')">excel{lang type_attach}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('ppt,pptx,pps,ppsx,odp,sxi')">ppt{lang type_attach}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('mp4,avi,wmv,mkv,rmvb,rm,asf,mpg,mpeg,mov')">{lang video_typename_attach}</a>
<a href="javascript:;" class="btn btn-primary" onclick="setExts('txt,ini,conf,log,bat,sql,js,css,htm,html,xml,asp,aspx,php,jsp,json,py,h,c')">{lang text_class}</a>
</div>
<ul class="form-text">
{lang cloud_movetool_file_type_text}
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang file_size}</label>
<div class="col-sm-10">
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="{lang typename_attach_gt}" name="router[router][size][lt]" value="">
<div class="input-group-text">M</div>
<input type="text" class="form-control" placeholder="{lang typename_attach_lt}" name="router[router][size][gt]" value="">
<div class="input-group-text">M</div>
</div>
<ul class="form-text">
{lang cloud_movetool_file_size_text}
</ul>
</div>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" name="addroutersubmit" value="<!--{if $routerid}-->{lang edit}<!--{else}-->{lang add}<!--{/if}-->" type="submit">
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function setExts(str) {
var old = trim(document.getElementById('exts').value).replace(/{1,}/g, ',').replace(/,{1,}/g, ',').replace(/^\,/g, '');
var arr = old ? old.split(',') : [];
var newarr = str.split(',');
for(var i = 0; i < newarr.length; i++) {
if(jQuery.inArray(newarr[i], arr) < 0) {
arr.push(newarr[i]);
}
}
document.getElementById('exts').value = arr.join(',');
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,72 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<!--{template lyear:right_header}-->
<div class="card">
<div class="card-body">
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}&op=space" method="post" >
<input type="hidden" name="cloudsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th width="30">{lang sort}</th>
<th width="150">{lang storage_location}</th>
<th width="50">{lang default}</th>
<th>{lang used_surplus}</th>
<th width="50">&nbsp;</th>
</tr>
</thead>
<!--{loop $list $value}-->
<tr>
<td width="40"><input type="text" class="form-control" name="disp[{$value[remoteid]}]" value="$value[disp]" style="width:45px;" /></td>
<td width="150"><input type="text" class="form-control" name="name[{$value[remoteid]}]" value="$value[name]" /></td>
<td><input type="radio" class="form-check-input" name="isdefault" value="$value[remoteid]" <!--{if $value[isdefault]>0}-->checked<!--{/if}--> ></td>
<td><div id="spaceinfo_{$value[remoteid]}"> <span class="spacesize" style="padding:0 5px">$value[fusesize]&nbsp;/&nbsp;$value[ftotalsize]</span> <span class="spacecheck" style="padding:0 5px"><a href="javascript:;" title="{lang to_obtain}" onclick="checkspace(this,'$value[remoteid]')"><i class="glyphicon glyphicon-refresh"></i></a></span>
<!--{if $value[available]<1}-->
<span class="text-danger">{lang space_storage_failure}</span>
<!--{/if}-->
</div></td>
<td><a id="delete_{$value[remoteid]}" <!--{if $value[bz]=='dzz' || $value[usesize]>0}-->style="display:none"<!--{/if}-->class="text-danger" href="{MOD_URL}&op=space&do=delete&remoteid=$value[remoteid]" onclick="if(confirm('{lang space_del_storage}')){return true;}else{return false}" >{lang delete}</a></td>
</tr>
<!--{/loop}-->
<thead>
<th valign="middle" colspan="7"><input type="submit" class="btn btn-primary bodyloading" value="{lang save_set}" /> <a href="{MOD_URL}&op=spaceadd" title="{lang add_storage_location}" class="btn btn-outline-primary">{lang add_storage_location}</a>
</thead>
</table>
</div>
</form>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang board_message}</strong> {lang space_board_message_text}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
</div>
</div>
</main>
<script type="text/javascript">
function checkspace(obj,remoteid){
jQuery(obj).html('<img src="admin/images/loadding.gif">');
jQuery.getJSON('{MOD_URL}&op=space&do=checkspace&remoteid='+remoteid,function(json){
if(json.error){
jQuery(this).html('<i class="glyphicon glyphicon-refresh"></i><span class="text-danger">'+json.error+'</span>');
}else{
jQuery('#spaceinfo_' + remoteid + ' .spacecheck a').html('<span class="text-success" >{lang already_update}</span>');
jQuery('#spaceinfo_'+remoteid+' .spacesize').html(json.fusesize+'&nbsp;/&nbsp;'+json.ftotalsize).hide().fadeIn('slow');
if(json.usesize<1){
jQuery('delete_'+remoteid).show();
}else{
jQuery('delete_'+remoteid).hide();
}
window.setTimeout(function(){
jQuery('#spaceinfo_'+remoteid+' .spacecheck a').html('<i class="glyphicon glyphicon-refresh"></i>');
},5000);
}
});
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,95 @@
<!--{template lyear:header_simple_start}-->
<style>
.menu{ width:100px;}
.menu-text{width:70px;}
.thumbnails>li img{
cursor:pointer;
}
.thumbnails>li.Selected .thumbnail {
background:#F7F7F7;
}
.thumbnails .thumbnail{
position:relative;
}
.thumbnails>li .selectbox{
position:absolute;
width:16px;
height:16px;
right:0px;
top:0px;
background:url(checkbox.png) no-repeat;
display:none;
}
.thumbnails>li.hover .selectbox {
display:block;
}
.thumbnails>li.Selected .selectbox{
background:url(selected_folder.png) no-repeat;
display:block;
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<!--{template lyear:right_header}-->
<div class="card">
<div class="card-body">
<!--{loop $list $key $value}-->
<h4>$value[header]</h4>
<ul class="thumbnails list-unstyled clearfix p-1">
<!--{loop $value[list] $value1}-->
<li bz="$value1[bz]" data_type="$key" class="text-center float-start p-2 hbg">
<div class="thumbnail"> <img src="dzz/images/default/system/$value1[bz].png" width="100" />
<h5>$value1[name]</h5>
</div>
</li>
<!--{/loop}-->
</ul>
<!--{/loop}-->
</div>
</div>
</div>
</main>
<script type="text/javascript">
function connect_start(bz, type) { //开始云连接
switch(type) {
case 'pan':
url = '{MOD_URL}&bz=' + bz + '&op=oauth';
window.location.href = url;
break;
case 'storage':
url = '{MOD_URL}&bz=' + bz + '&op=oauth';
window.location.href = url;
break;
case 'ftp':
url = '{MOD_URL}&bz=' + bz + '&op=oauth';
window.location.href = url;
break;
case 'disk':
url = '{MOD_URL}&bz=' + bz + '&op=oauth';
window.location.href = url;
break;
default:
url = '{MOD_URL}&bz=' + bz + '&op=oauth';
window.location.href = url;
break;
}
}
jQuery(document).ready(function(e) {
jQuery('.thumbnails li').mouseenter(function() {
jQuery(this).addClass('hover');
}).mouseleave(function() {
jQuery(this).removeClass('hover');
}).click(function() {
var bz = jQuery(this).attr('bz');
var type = jQuery(this).attr('data_type');
connect_start(bz, type);
});
jQuery(document).mousedown(function() {
jQuery('.thumbnails li').removeClass('Selected');
});
});
</script>
<!--{template lyear:footer_simple}-->

View File

@ -2535,7 +2535,7 @@ fa2772327f55d8198301fdb8bcfc8158 *static/bootstrap/fonts/glyphicons-halflings-re
448c34a56d699c29117adc64c43affeb *static/bootstrap/fonts/glyphicons-halflings-regular.woff2
5a061690c67238c5247c01873479570f *static/bootstrap/js/bootstrap-slider.js
7d6ce53c150a26ec3a5d8b18e1903415 *static/bootstrap/js/bootstrap-typeahead.js
6bfd171748f088ad503cb07c080b1f33 *static/bootstrap/js/bootstrap.js
6bfd171748f088ad503cb07c080b1f33 *static/bootstrap/js/bootstrap.min.js
36450289b3866f796bb36f95c874516d *static/bootstrap/js/bootstrap.min.js
6898461f2e5d74eb15d686724b2f541a *static/bootstrap/js/bootstrapSwitch.js
0ce8f355891c26c28f057e195e97dcd5 *static/bootstrap/js/html5shiv.min.js

File diff suppressed because it is too large Load Diff

View File

@ -1,151 +0,0 @@
<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx(zyx@dzz.cc)
*/
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$navtitle = lang('appname');
define('DZZSCRIPT', 'index.php');
$typearr = array('image' => lang('photo'),
'document' => lang('type_attach'),
'link' => lang('type_link'),
'video' => lang('online_video'),
'folder' => lang('type_folder'),
'dzzdoc' => 'DZZ' . lang('type_attach'),
'attach' => lang('rest_attachment')
);
require libfile('function/organization');
if ($_GET['do'] == 'delete') {
$icoid = isset($_GET['icoid']) ? trim($_GET['icoid']) : '';
$icoids = explode(',', $icoid);
$ridarr = array();
$bz = isset($_GET['bz']) ? trim($_GET['bz']) : '';
foreach ($icoids as $icoid) {
if (empty($icoid)) {
continue;
}
$return = IO::Delete($icoid, true);
if (!$return['error']) {
//处理数据
$arr['sucessicoids'][$return['rid']] = $return['rid'];
$arr['msg'][$return['rid']] = 'success';
$arr['name'][$return['rid']] = $return['name'];
$ridarr[] = $return['rid'];
$i++;
} else {
$arr['msg'][$return['rid']] = $return['error'];
$dels[] = $icoid.'_0';
}
}
if (!$return['error']) {
Hook::listen('solrdel',$dels);
showmessage('do_success', $_GET['refer']);
} else {
showmessage($return['error'], $_GET['refer']);
}
} else {
$perpage = 20;
$pfid = isset($_GET['pfid']) ? intval($_GET['pfid']) : '';
$type = isset($_GET['type']) ? trim($_GET['type']) : '';
$keyword = isset($_GET['keyword']) ? trim($_GET['keyword']) : '';
$orgid = isset($_GET['orgid']) ? intval($_GET['orgid']) : '';
$page = (isset($_GET['page'])) ? intval($_GET['page']) : 1;
$start = ($page - 1) * $perpage;
$gets = array(
'mod' => 'filemanage',
'keyword' => $keyword,
'type' => $_GET['type'],
'size' => $_GET['size'],
'dateline' => $_GET['dateline'],
'orgid' => $orgid,
'pfid' => $pfid
);
$theurl = BASESCRIPT . "?" . url_implode($gets);
$refer = $theurl . '&page=' . $page;
if ($_GET['size'] == 'desc') {
$order = 'ORDER BY size DESC';
} elseif ($_GET['size'] == 'asc') {
$order = 'ORDER BY size ASC';
} elseif ($_GET['dateline'] == 'asc') {
$order = 'ORDER BY dateline ASC';
} else {
$_GET['dateline'] = 'desc';
$order = 'ORDER BY size DESC';
}
$sql = "type!='app' and type!='shortcut'";
$foldername = array();
$param = array();
if ($keyword) {
$sql .= ' and (name like %s OR username=%s)';
$param[] = '%' . $keyword . '%';
$param[] = $keyword;
}
if ($type) {
$sql .= ' and type=%s';
$param[] = $type;
}
if ($pfid) {
$sql .= ' and (pfid = %d)';
$param[] = $pfid;
$pathkey = DB::result_first("select pathkey from %t where fid = %d", array('resources_path', $pfid));
$patharr = explode('-', str_replace('_', '', $pathkey));
unset($patharr[0]);
foreach (DB::fetch_all("select fname,fid from %t where fid in(%n)", array('folder', $patharr)) as $v) {
$foldername[] = array('fid' => $v['fid'], 'fname' => $v['fname']);
}
} else {
if ($orgid) {
if ($org = C::t('organization')->fetch($orgid)) {
$fids = array($org['fid']);
foreach (DB::fetch_all("select fid from %t where pfid=%d", array('folder', $org['fid'])) as $value) {
$fids[] = $value['fid'];
}
$sql .= ' and pfid IN(%n)';
$param[] = $fids;
}
}/*else{
$sql .= ' and pfid > 0';
}*//* else {
$flags = array('home', 'organization');
$fids = C::t('folder')->fetch_fid_by_flags($flags);
$sql .= ' and pfid IN(%n)';
$param[] = $fids;
}*/
}
$limitsql = 'limit ' . $start . ',' . $perpage;
if ($count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('resources') . " WHERE $sql", $param)) {
$data = DB::fetch_all("SELECT rid FROM " . DB::table('resources') . " WHERE $sql $order $limitsql", $param);
$multi = multi($count, $perpage, $page, $theurl);
}
$list = array();
foreach ($data as $value) {
if (!$sourcedata = C::t('resources')->fetch_by_rid($value['rid'])) {
continue;
}
if($sourcedata['relpath'] == '/'){
$sourcedata['relpath'] = '回收站';
}
$list[] = $sourcedata;
}
if ($org = C::t('organization')->fetch($orgid)) {
$orgpath = getPathByOrgid($org['orgid']);
$org['depart'] = implode('-', ($orgpath));
} else {
$org = array();
$org['depart'] = lang('select_a_organization_or_department');
$org['orgid'] = $orgid;
}
/*if ($count > $perpage*$page) {
$nextpage = $page + 1;
} else {
$naxtpage = 0;
}*/
include template('list');
}
?>

View File

@ -1,9 +0,0 @@
<?php
$lang = array (
'appname' => '文件管理',
'rotation'=>'旋转',
'checkednum'=>'<span>已选择<span class="ex-number"></span>项',
'file_position'=>'文件位置',
'in_recycle'=>'在回收站',
);
?>

View File

@ -13,12 +13,6 @@ if(!defined('IN_DZZ')) {
$lang = array
(
'share_enable_successful'=>'共享目录启用成功!',
'share_close_successful'=>'共享目录关闭成功!',
'group_on_successful'=>'群组功能开启成功!',
'group_close_successful'=>'群组功能关闭成功!',
'database_export_custom_invalid' => '您至少需要选择一个数据表进行备份',
'database_export_file_invalid' => '数据文件无法保存到服务器,请检查目录属性',
'admin_navtitle'=>'管理中心',
@ -36,42 +30,13 @@ $lang = array
'cloud_type_local'=>'内置',
'cloud_type_ftp'=>'FTP',
'cloud_type_disk'=>'本地磁盘',
'export_range_user'=>'选择导出范围,此范围内的所有用户都会导出',
'export_data'=>'导出资料项',
'compellation'=>'用户名',
'UserTrueName'=>'用户真实姓名',
'phone_number'=>'手机号码',
'phone_number_illegal'=>'手机号码不合法',
'weixin_phone_number'=>'微信绑定的手机号码',
'weixin_illegal'=>'微信号不合法',
'user_weixin'=>'员工微信号',
'weixin_exist'=>'微信号已经存在',
'random_password'=>'生成随机密码',
'exceptional_space'=>'额外空间',
'disable_user'=>'停用此用户',
'block_up'=>'停用',
'set_system_administrator'=>'设为系统管理员',
'add_a_item'=>'增加一项',
'supervisor_position'=>'上司职位',
'send_password_user_mailbox'=>'发送密码到用户邮箱',
'login_email_required'=>'登录邮箱必填',
'name_will'=>'用户名必填',
'none_write_login_password'=>'还没有填写登录密码',
'none_write_affirm_password'=>'还没有填写确认密码',
'none_write_add_theme'=>'还没有添加主题',
'illegal'=>'不合法',
'space_not_change_password'=>'留空,不修改密码',
'data_set'=>'资料设置',
'user_name'=>'用户用户名',
'user_name_email'=>'用户名或邮箱',
'user_name_sensitive'=>'用户名含有敏感字符',
'avatar'=>'头像',
'space_usage'=>'空间使用',
'department'=>'部门',
'organization'=>'机构',
'organization_department'=>'机构部门',
'registration_time'=>'注册时间',
'data_item_list'=>'资料项列表',
'data_edit'=>'资料项编辑',
'identifier'=>'标识符',
@ -108,45 +73,11 @@ $lang = array
'pass_add'=>'递增',
'fuzzy_search'=>'表示支持模糊查询',
'authentication_code'=>'认证代码',
'user_phone_illegal'=>'用户手机号码不合法',
'user_phone_exist'=>'手机号码已经存在',
'user_phone_registered'=>'用户手机号码已经被注册',
'weixin_registered'=>'该微信号已经被注册',
'user_registered_retry'=>'该用户名已经被注册,请更换用户名再试',
'add_user'=>'添加用户',
'add_user_success'=>'添加用户成功',
'edit_user_success'=>'修改用户信息成功',
'email_registered_retry'=>'邮箱已经被注册,请更换邮箱再试',
'contact_administrator'=>'还没有启用实名认证,请联系管理员',
'contact_administrator1'=>'您没有实名认证权限,请联系管理员',
'contact_administrator2'=>'您没有认证权限,请联系管理员',
'contact_administrator3'=>'您没有资料审核权限,请联系管理员',
'export_user'=>'导出用户',
'shared_directory_set'=>'共享目录设置',
'group_on_set'=>'群组功能设置',
'shared_directory_desktop_shortcut'=>'共享目录桌面快捷方式',
'position_management'=>'职位管理',
'add_position'=>'添加职位',
'position_name'=>'职位名称',
'organization_user_manage'=>'机构和用户管理',
'bulking'=>'增量',
'coverage'=>'覆盖',
'import_nbsp'=>'导&nbsp;入',
'creation_agency'=>'新建机构',
'creation_bottom_section'=>'新建下级部门',
'creation_equally_section'=>'新建同级部门',
'please_select_same_type_node'=>'请选择相同类型的节点',
'please_select_same_section_node'=>'请选择相同部门的节点',
'no_institution_users'=>'无机构用户',
'add_administrator_unsuccess'=>'添加管理员失败',
'no_open_Shared_directory'=>'没有开启共享目录,无法设置',
'please_select_range_export'=>'请选择导出范围',
'please_select_project_export'=>'请选择导出项目',
'user_information_table'=>'人员信息表',
'bulk_import_user_template'=>'批量导入用户模板',
'name_email_empty'=>'用户名和邮箱不能为空',
'lack_required_fields_name'=>'缺少必填字段"用户名"',
'lack_required_fields_name_email'=>'缺少必填字段”用户名“或”邮箱“',
'enterprise_binding'=>'企业号绑定',
'enterprise_little_helper'=>'企业小助手',
'enterprise_little_helper_set'=>'企业小助手设置',
@ -206,32 +137,7 @@ $lang = array
'verification_unsuccessful'=>'验证不成功',
'email_send_test'=>'邮件发送测试',
'update_top_department_name'=>'更新顶级部门为站点名称',
'share_title'=>'分享标题',
'stop_sharing'=>'取消分享',
'stop_sharing_success'=>'取消分享成功',
'affirm_stop_sharing'=>'确定取消分享',
'del_share'=>'删除分享',
'screen_share'=>'屏蔽分享',
'affirm_screen_share'=>'确定屏蔽分享',
'share_screen'=>'分享屏蔽',
'share_screen_success'=>'分享屏蔽成功',
'share_screen_failure'=>'分享屏蔽失败',
'shielding_failure'=>'屏蔽失败',
'cancel_shielding'=>'取消屏蔽',
'cancel_shielding_success'=>'取消屏蔽成功',
'cancel_shielding_failure'=>'取消屏蔽失败',
'affirm_cancel_shielding'=>'确定取消屏蔽',
'sharing_file'=>'分享文件',
'share_time'=>'分享时间',
'share_user'=>'分享用户',
'private_share'=>'私密分享',
'scon_code_send_mobile'=>'扫描二维码,发送到手机',
'expiration_time'=>'到期时间',
'limited_number'=>'限制次数',
'extract_password'=>'提取密码',
'been_blocked'=>'已屏蔽',
'file_been_deleted'=>'文件已删除',
'degree_exhaust'=>'次数用尽',
'img_background'=>'图片背景',
'web_background'=>'网址背景',
'background_display_mode'=>'背景显示方式',
@ -268,7 +174,6 @@ $lang = array
'right_click_menu_style'=>'右键菜单样式',
'only_upload_img_file'=>'只能上传图片文件',
'must_fill_address_wallpaper'=>'必须填写壁纸地址',
'import_user'=>'导入用户',
'add_new_type'=>'添加新分类',
'data_import_error'=>'数据导入错误',
'network'=>'网络',
@ -280,11 +185,9 @@ $lang = array
'text_class'=>'文本类',
'application_been'=>'应用已经存在!',
'to_obtain'=>'重新获取',
'online_video'=>'网络视频',
'type_save_success'=>'分类保存成功!',
'already_update'=>'已更新',
'submit_tips' => '按 Enter 键可随时提交您的修改',
'save_changes'=>'保存更改',
'starting_migration'=>'开始迁移',
'migration_completed'=>'迁移完成',
'routing_name'=>'路由名称',
@ -340,6 +243,8 @@ $lang = array
'application_install_successful'=>'应用安装成功',
'application_uninstall_successful'=>'应用卸载成功!',
'application_upgrade_successful'=>'应用升级成功!',
'application_import_version_invalid'=>'本插件适用于 Dzz! {cur_version} 与当前版本 V{set_version} 不一致。<br />如果您需要强制安装本插件请在导入应用时选择忽略版本限制安装',
'application_upgrade_version_invalid'=>'本插件适用于 Dzz! {cur_version} 与当前版本 V{set_version} 不一致。<br />如果您需要强制升级本插件请点击<a href="{url}">强制升级</a>',
'add_new' => '新增',
'select' => '请选择',
@ -351,8 +256,6 @@ $lang = array
'available' => '可用',
'action' => '动作',
'ignore' => '忽略',
'operation' => '操作',
'operator' => '操作者',
'reason' => '原因',
'selling_price'=>'售价',
'original_price'=>'原价',
@ -368,20 +271,15 @@ $lang = array
'thread' => '帖子',
'subject' => '标题',
'nosubject' => '无标题',
'message' => '内容',
'mergeto' => '合并到',
'doings' => '记录',
'blogs' => '日志',
'albums' => '相册',
'shares' => '分享',
'description' => '描述',
'copyright' => '版权信息',
'attachment' => '附件',
'rest_attachment' => '其他附件',
'file' => '文件',
'dir' => '目录',
'ip' => 'IP 地址',
'usergroup' => '用户组',
'according_usergroup' => '按用户组',
'usernum' => '用户数:',
'admingroup' => '管理组',
@ -393,9 +291,6 @@ $lang = array
'current_contents_without_saving'=>'当前内容没有保存,确定要离开吗?',
'mail'=>'邮件设置',
'login_username_placeholder'=>'登录用户名',
'login_username_text'=>'必填,可用于系统登录',
'required_used_login_system'=>'必填,可用于系统登录',
// admin/system/database.html
// 'nav_db' => '数据库',
'nav_db_export' => '备份',
@ -450,11 +345,11 @@ $lang = array
'db_runquery' => '数据库升级',
'db_recover'=>'恢复数据库',
'db_runquery_tips' => '<li>出于安全考虑Dzz! 后台默认情况下禁止 SQL 语句直接执行,只能使用常用 SQL 当中的内容,<br />如果您想自己随意书写 SQL 升级语句,需要将 config/config_global.php 当中的 $_config[admincp][runquery] 设置修改为 1。</li>',
'db_runquery_tips' => '<li>出于安全考虑Dzz! 后台默认情况下禁止 SQL 语句直接执行,只能使用常用 SQL 当中的内容,<br />如果您想自己随意书写 SQL 升级语句,需要将 config/config.php 当中的 $_config[admincp][runquery] 设置修改为 1。</li>',
'db_runquery_sql' => 'Dzz! 数据库升级 - 请将数据库升级语句粘贴在下面',
'db_config_admincp'=>'config文件未设置相关此操作的权限请检查config.php文件中相关admincp的设置',
'db_not_allow_config_admincp'=>'config文件设置不允许此操作请检查config.php文件中相关admincp的设置',
'db_runquery_denied' => '对不起,此项功能已经被禁止,如果需要开启,请修改 config/config_global.php 中的相关配置',
'db_config_admincp'=>'config文件未设置相关此操作的权限请检查config.php文件中相关admincp以及$_config[\'admincp\'][\'runquery\']的设置',
'db_not_allow_config_admincp'=>'config文件设置不允许此操作请检查config.php文件中admincp以及$_config[\'admincp\'][\'dbimport\']的设置',
'db_runquery_denied' => '对不起,此项功能已经被禁止,如果需要开启,请修改 config/config.php 中的相关配置',
'db_runquery_comment' => '注意: 为确保升级成功,请不要修改 SQL 语句的任何部分',
'db_runquery_select' => '现有方案',
'db_runquery_simply' => '常用 SQL 升级语句',
@ -491,7 +386,7 @@ $lang = array
'database_export_zip_succeed' => '数据成功备份并压缩至服务器 <a href="{filename}">{filename}</a> 中',
'tools_updatecache_tips' => '<li>当站点进行了数据恢复、升级或者工作出现异常的时候,您可以使用本功能重新生成缓存。更新缓存的时候,可能让服务器负载升高,请尽量避开会员访问的高峰时间</li>
<li>数据缓存:更新站点的全部数据缓存</li>
<li>模板缓存:更新论坛模板、风格等缓存文件,当您修改了模板或者风格,但是没有立即生效的时候使用</li>
<li>模板缓存:更新Dzz模板、风格等缓存文件,当您修改了模板或者风格,但是没有立即生效的时候使用</li>
',
// admin/stysem
'updatecache'=>'更新缓存',
@ -828,12 +723,6 @@ $lang = array
'edit_type_dzzoffice'=>'为dzzoffice提供各种功能的应用',
'edit_type_dzzoffice1'=>'为dzzoffice提供各种主题和风格',
'edit_type_dzzoffice2'=>'为dzzoffice提供各种扩展和功能增强',
// admin/dzzmarket/filemanage.html
'filemanage_file_user'=>'文件名称或用户名',
'filemanage_del_file'=>'确定要彻底删除(此操作不可恢复)此文件吗?',
'filemanage_del_all_file'=>'确定要彻底删除(此操作不可恢复)所有选择的文件吗?',
'filemanage_desktop'=>'请在桌面内使用',
'select_by_filetype'=>'按文件类型',
// admin/function/function_admin.php
'function_admin_error'=>'数据类型错误,只能导入应用数据',
// admin/icon/main.html
@ -846,17 +735,6 @@ $lang = array
'main_matches_priority_text'=>'同一域名下的匹配顺序,数字越大,优先级越高。当匹配区域有重叠时设置此项',
'main_extensions'=>'特征后缀名',
'main_extensions_text'=>'设置此网址的特征后缀名通过特征后缀名可以调用相应的应用打开此网址如任务板的特征后缀可设置为task',
// admin/member/adduser.html
'adduser_login_email_text'=>'必填,可用于系统登录,员工关注企业号时,会根据邮箱来匹配。',
'adduser_compellation_text'=>'必填,系统中显示,便于同事辨识',
'adduser_phone_number_text'=>'选填,微信绑定的手机号码,员工关注企业号时,会根据员工微信绑定的手机来匹配。',
'adduser_weixin_text'=>'选填,员工微信号,员工关注企业号时,会根据员工的微信号来匹配。',
'adduser_exceptional_space_text'=>'单位M额外增加用户存储空间用户的总空间=默认空间+额外空间)',
'adduser_disable_user_text'=>'用户停用后,该用户将不能登录系统,请谨慎操作',
'adduser_usergroup_text'=>'设置用户为系统管理员后,此用户将拥有系统管理权限,请慎重!',
// admin/member/edituser.html
'edituser_login_email_text'=>'选填,可用于系统登录,员工关注企业号时,会根据员工的邮箱来匹配。',
'edituser_weixin_text'=>'选填,员工微信号,员工关注企业号时,会根据员工的微信号来匹配。如果已经关注,此项不能修改。',
// admin/member/main.html
'member_main_delete'=>'确定要删除此用户吗?此用户的所有是数据和文件都将被清空,无法恢复',
// admin/member/profileset.html
@ -873,80 +751,6 @@ $lang = array
'verifyset_verify_synopsis_text'=>'认证简单介绍会在用户认证页面显示支持UBB',
'verifyset_choosable_data_text'=>'注意:此处勾选的资料项只会在对应的认证页面显示,不在用户基本资料中显示,此认证未启用时也有效。',
'verifyset_verify_group_text'=>'设置允许参与认证的用户组,可以按住 CTRL 多选, 空代表都可以参于认证',
// admin/orguser/detail_org.html
'export_excl'=>'导出此部门的所有用户到excl文件',
'detail_org_no_enable'=>'如不启用,下级所有部门中将不能使用共享目录;启用后,企业盘才会显示共享目录。',
'detail_org_explorerapp_enable'=>'开启后,可在网盘等应用中能够使用该机构或部门的目录。',
'detail_org_enable'=>'启用后,企业盘机构下才会显示此部门的共享目录。',
'detail_org_creation'=>'创建快捷方式后,所属成员桌面默认都会有相应快捷方式。',
'group_org_no_enable'=>'开启后,资源管理器会显示该机构群组选项。',
'group_org_enable'=>'不开启,资源管理器不会显示该机构群组选项。',
'detail_org_administrator'=>'<strong class="pull-left" style="margin-left:-45px;">注:</strong>
<li>机构管理员权限:设置本机构下所有部门管理员,管理本机构中所有人员,管理本机构所有共享目录。</li>
<li>部门管理员权限:设置本部门下所有子部门管理员,管理本部门中所有人员,管理本部门所有共享目录。</li>',
// admin/orguser/guide.html
'orguser_guide_text'=>'<h4><strong>组织管理使用说明</strong></h4>
<ul class="">
<li><img src="dzz/system/images/organization.png" />&nbsp;选中机构为设置机构信息</li>
<li><img src="dzz/system/images/department.png" />&nbsp;选中部门为设置部门信息</li>
<li><img src="dzz/system/images/user.png" />&nbsp;选中人员为设置人员信息</li>
<li>人员、部门、机构可直接拖拽移动更换位置。移动是更换人员所属部门、和更换部门上级机构或上级部门。</li>
<li>按住 <img src="admin/orguser/images/ctrl.png"> 键移动人员或部门为复制。用于将人员同时加入多个部门。</li>
<li>按住 <img src="admin/orguser/images/ctrl.png"> 键可多选,多选后松开 <img src="admin/orguser/images/ctrl.png"> 键移动为批量移动。 不松开 <img src="admin/orguser/images/ctrl.png"> 键移动为批量复制。</li>
<li>在部门、机构、人员上点鼠标右键可出现右键菜单。菜单中有对应的更多操作。</li>
</ul>
<div class="alert alert-warning" style="color:#444;text-shadow:1px 1px 1px #FFF;margin-top:30px;">
<h4><strong>删除用户说明:</strong></h4>
<ul>
<li>所有机构、部门中删除用户,只是从本机构,或部门中移除,用户将不能再拥有本机构或部门的所有使用权限,不是将用户从系统中删除。</li>
<li>当用户没有所属机构和部门时会出现在“未加入机构用户列表”中。 “未加入机构用户列表”只有系统管理员可管理。</li>
<li style="color:red">系统管理员在“未加入机构用户列表”中删除用户,用户会在系统中彻底删除,并且删除用户所有系统数据及保存文件。请管理员谨慎使用,确定成员要删除后再删除。</li>
</ul>
</div>',
// admin/orguser/inport_guide.html
'inport_guide_download'=>'下载人员信息导入模板',
'inport_guide_template'=>'模板的项目会根据用户资料项的多少自动生成',
'inport_guide_user'=>'根据模板编辑需要人员信息表。',
'inport_guide_step'=>'步骤3选择excel表',
'inport_guide_layout'=>'选择编辑好的人员信息表,支持 .xls、.xlsx格式',
'inport_guide_notice'=>'编辑人员信息表注意事项',
'inport_guide_notice_text'=>'<li>1、根据模板字段来编辑需要导入的人员信息,如果已经有档案信息表,则只需将现有的档案信息表中的相关字段名称改为与“模板”里提供的名称一致即可,只要名称对应,字段的位置不影响结果。</li>
<li>2、模板中“用户名”字段必填,其他字段根据需要填写。</li>
<li>3、表中“邮箱”、“用户名”字段中的信息必须是唯一的,不可重复。如果邮箱为空,系统导入时将随机生成邮箱地址。</li>
<li class="danger">4、多级部门创建方法1表中添加多列“所属部门”从左到右分别为一级部门、二级部门、三级部门顺序排列系统会根据从左到右的原则依次创建部门、下级部门、下下级部门等。方法2表格中使用单列上下级部门使用“/”来分割(例如:小学/一年级/一班)。</li>
<li>5、导入用户只能按机构导入,多个机构需要分批导入。</li>
<li>6、表中“登录密码”字段可为空,管理员在导入时能够为用户批量设置统一的密码。用户使用统一密码登录后可自行修改。</li>
<li>7、导入界面中有“增量”、“覆盖”两种导入方式。增量方式为遇到相同用户只会增加用户缺少的字段信息原有信息不变。例如系统中已有用户A密码为123。在批量导入表格中也有用户A导入时设置了统一密码为abc。导入完成后其他用户的密码都为abc原用户A还是保持他的原有密码即123。覆盖导入将系统中原有的用户信息完全替换为表格中的信息。</li>
<li>8、若需导入的人员较多,建议先做一个少量人员的测试表,测试无误后,再使用增量方式导入所有用户。</li>',
// admin/orguser/import_list.html
'import_list_organization'=>'选择要导入到的机构,如果不导入任何机构,会根据用户信息表中的所属部门来生成新的机构和部门,没有则会直接导入到"无机构人员"下',
'import_list_password'=>'默认用户密码,当登录密码项未设置时,会使用此处设置的密码作为新导入的用户的密码',
'import_list_coverage'=>'增量导入方式:新导入的用户信息智能的增加到原有用户信息中;覆盖导入:新导入的信息覆盖原有用户的信息,建议使用增量方式。',
'import_list_text'=>'<li>用户名和邮箱项目为必填项</li>
<li>点击下面的导入项的内容,可以临时编辑,编辑部门时注意,部门每行是上下级的关系,上一行为下一行的上级部门</li>
<li>不需要导入的项目,可以点击右侧的"X"删除掉</li>
<li>点击导入按钮,导入当前项目,全部导入按钮,按顺序导入所有项,中途可以再次点击停止</li>',
// admin/orguser/tree.html
'orguser_tree_delete'=>'您确定要彻底删除此用户(用户的所有数据和文件都会彻底删除)吗?',
'orguser_tree_permission_delete'=>'此处删除,仅从部门中移除此用户,移除后您可能没有操作此用户的权限,您确定要移除此用户吗?',
'orguser_tree_batch_delete'=>'机构或部门不支持批量删除',
'orguser_tree_all_delete'=>'删除部门前,必须先删除此部门的所有下级部门,并且删除共享目录中的文件,您确定要删除此部门吗?',
// admin/orguser/ajax.php
'orguser_ajax_delete'=>'在机构或部门中的用户,不支持彻底删除,请先从机构或部门中删除后重试',
'no_parallelism_jurisdiction'=>'没有对应部门的权限',
// admin/orguser/edituser.php
'orguser_edituser_add_user'=>'<div class="well alert-danger">抱歉!您没有在此机构或部门下添加用户的权限!<br><br>可以在左侧选择有权限的部门,再重试添加</div>',
'orguser_edituser_add_user1'=>'<div class="well alert-danger">抱歉!您没有此用户的管理权限!<br><br>可以在左侧选择有权限管理的用户,再重试添加</div>',
// admin/orguser/import.php
'orguser_import_user'=>'没有权限,只有系统管理员才能导入用户',
'orguser_import_user_table'=>'人员信息表上传未成功,请重新上传',
'orguser_import_xls_xlsx'=>'只允许导入xls,xlsx类型的文件',
'orguser_import_user_message'=>'人员信息表上传成功,正在调转到导入页面',
'orguser_import_tautology'=>'上传信息表未成功,请稍候重试',
'orguser_import_user_message_table'=>'请选择人员信息表',
// admin/orguser/vidw.php
'orguser_vidw_delete'=>'<div class="well alert-danger">抱歉!您没有此部门的管理权限!<br><br>可以在左侧选择有权限管理的部门</div>',
// admin/setting/assistant.html
'assistant_app'=>'该应用为默认应用,可以通过它向全公司范围推送消息。如关注成功通知,公司文件,通报等。',
// admin/setting/main.html
@ -1144,11 +948,6 @@ $lang = array
'setting_wxsyn_organization'=>'<span class="danger">创建父机构失败,忽略</span>',
'setting_wxsyn_synchronization1'=>'不在同步范围,已禁用',
'setting_wxsyn_synchronization2'=>'不在同步范围,忽略',
// admin/share/share.html
'share_file_content'=>'好东西要晒出来,快把你的文件分享给身边的朋友们吧。',
'share_stop_sharing1'=>'<p class="text-center">取消分享后,该条分享记录将被删除,将无法再访问此分享链接。</p><p class="text-center">你确认要取消分享吗?</p>',
'share_stop_sharing2'=>'<p class="text-center">该条分享记录将被屏蔽,将无法再访问此分享链接。</p><p class="text-center">你确认要屏蔽该条分享吗?</p>',
'share_stop_sharing3'=>'<p class="text-center">该条分享记录将被恢复访问。</p><p class="text-center">你确认要取消屏蔽该条分享吗?</p>',
// admin/theme/edit.html
'theme_edit_theme_name_state'=>'<li>主题名称,好的主题名称便于用户了解主题的特色</li><li>设为默认,游客或未设置主题的用户将默认使用此主题</li>',
'theme_edit_version_state'=>'主题版本号',
@ -1202,7 +1001,6 @@ $lang = array
'logs_invite_status_1' => '可使用',
'logs_invite_status_2' => '已使用',
'logs_invite_status_3' => '已发送',
'logs_invite_status_4' => '已过期',
'logs_tips_illegal' => '<li>密码错误记录中的IP需要在管理组内开启查看IP功能才能显示。</li>',
'logs_tips_ban' => '<li>禁止用户记录,需要在管理组内开启禁止用户功能才能显示。</li>',
'logs_select_operation' => '请选择类型',
@ -1235,7 +1033,6 @@ $lang = array
'founder_upgrade_store_directory' => '<b>文件存放目录:</b> ',
'founder_upgrade_diff_show' => '与本地文件的比对结果,状态 <span style="color:red;">差异</span> 表示该本地文件被修改过<br />注意:如果您的源文件是通过 <span style="color:red;">非二进制</span> 方式上传到服务器,可能导致对比结果不准确',
'founder_upgrade_diff' => '差异',
'founder_upgrade_normal' => '正常',
'founder_upgrade_new' => '新增',
'founder_upgrade_download_file' => '升级文件已经全部下载完毕,并存储到服务器目录: ',
'founder_upgrade_backup_file' => '继续升级,将会把现有的旧文件备份到目录: ',

View File

@ -39,8 +39,9 @@ input:-webkit-autofill {
text-align: center;
}
.avatarContainer img {
max-width: 128px;
max-height: 128px;
width: 128px;
height: 128px;
line-height: 128px;
}
.avatarContainer .maintitle{
font-size:20px;

View File

@ -128,45 +128,47 @@ function html_login_form() {
$loginuser = $isguest ? '<input class="form-control" name="admin_email" type="text" title="" onfocus="if(this.value==\'' . lang('login_email_username') . '\'){this.value=\'\'}" onblur="if(this.value==\'\'){this.value=\'' . lang('login_email_username') . '\'}" autocomplete="off" />' : '<div class="username">' . $_G['member']['username'] . '</div><div class="email">' . $_G['member']['email'] . '</div>';
$sid = getglobal('sid');
$avatarstatus=getglobal('avatarstatus','member');
$avastar = '';
if(!$uid){
if($_G['setting']['bbclosed']){
$sitelogo = 'static/image/common/logo.png';
}else{
$sitelogo=$_G['setting']['sitelogo']?'index.php?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$_G['setting']['sitelogo']):'static/image/common/logo.png';
}
$avastar='<img src="'.$sitelogo.'">';
}else{
$avastar = avatar_block($uid);
}
$avastar.='<div class="maintitle">'.$maintitle.'</div>';
$extra = BASESCRIPT . '?' . $_SERVER['QUERY_STRING'];
$forcesecques = '<option value="0">' . ($_G['config']['admincp']['forcesecques'] ? $lang1['forcesecques'] : $lang1['security_question_0']) . '</option>';
echo <<<EOT
echo <<<EOT
<form method="post" name="login" id="loginform" action="$extra" onsubmit="pwmd5('admin_password')">
<input type="hidden" name="sid" value="$sid">
<div class="loginformContainer">
<div class="avatarContainer">$avastar</div>
$loginuser
<div id="admin_password_Container">
<input name="admin_password" id="admin_password" type="password" class="form-control" value="" autocomplete="off" placeholder="$lang1[password]" />
<form method="post" name="login" id="loginform" action="$extra" onsubmit="pwmd5('admin_password')">
<input type="hidden" name="sid" value="$sid">
<div class="loginformContainer">
<div class="avatarContainer">$avastar</div>
$loginuser
<div id="admin_password_Container">
<input name="admin_password" id="admin_password" type="password" class="form-control" value="" autocomplete="off" placeholder="$lang1[password]" />
</div>
<input name="submit" value="$lang1[login]" type="submit" class="btn btn-primary" />
<div class="copyright">Powered by <a href="http://www.dzzoffice.com/" target="_blank">DzzOffice</a> &copy; 2012-$year</div>
</div>
</form>
<script type="text/JavaScript">
jQuery(document).ready(function(e) {
jQuery('#loginform .form-control:first').focus();
if(jQuery('.ie8,.ie9').length){ //ie8模拟placeholder;
jQuery(':input[placeholder]').each(function(){
jQuery(this).placeholder();
});
}
});
</script>
</div>
<input name="submit" value="$lang1[login]" type="submit" class="btn btn-primary bodyloading" />
<div class="copyright">Powered by <a href="http://www.dzzoffice.com/" target="_blank">DzzOffice</a> &copy; 2012-$year</div>
</div>
</form>
<script type="text/JavaScript">
jQuery(document).ready(function(e) {
jQuery('#loginform .form-control:first').focus();
if(jQuery('.ie8,.ie9').length){ //ie8模拟placeholder;
jQuery(':input[placeholder]').each(function(){
jQuery(this).placeholder();
});
}
});
</script>
EOT;
}
?>

View File

@ -12,7 +12,7 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
if (!$_G['cache']['usergroups']) {
loadcache('usergroups');
}
$op=$_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
//error_reporting(E_ALL);
//资料审核员和实名认证员跳转到对应的页面
if ($_G['member']['grid'] == '4') {

View File

@ -10,7 +10,7 @@ if(!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$navtitle = lang('data_set').' - '.lang('appname');
$op=$_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
$profilevalidate = array(
'telephone' => '/^((\\(?\\d{3,4}\\)?)|(\\d{3,4}-)?)\\d{7,8}$/',
'mobile' => '/^(\+)?(86)?0?1\\d{10}$/',
@ -21,7 +21,7 @@ $profilevalidate = array(
'qq' => '/^[1-9]*[1-9][0-9]*$/'
);
$fieldid = $_GET['fieldid'] ? $_GET['fieldid'] : '';
$do=$_GET['do'] ? $_GET['do'] : '';
$do = isset($_GET['do']) ? $_GET['do'] : '';
if($do=='delete'){
C::t('user_profile_setting')->delete_by_fieldid($fieldid);
require_once libfile('function/cache');

View File

@ -0,0 +1,29 @@
<ul class="nav-drawer nav-stacked nav-pills">
<!--{if $_G['adminid']==1 || $_G['member']['grid']==5}-->
<li class="nav-item">
<a class="nav-link <!--{if $op=='verify' && !$vid}-->active<!--{elseif $op=='profileset' || $op=='verifyset' || $op=='verify'}--><!--{else}-->active<!--{/if}-->" href="{MOD_URL}&op=verify"><i class="mdi mdi-account-search"></i><span>{lang members_verify_profile}</span></a>
</li>
<!--{/if}-->
<!--{if $_G['adminid']==1}-->
<li class="nav-item">
<a class="nav-link <!--{if $op=='profileset' }-->active<!--{/if}-->" href="{MOD_URL}&op=profileset"><i class="mdi mdi-account-wrench"></i><span>{lang data_set}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $op=='verifyset' }-->active<!--{/if}-->" href="{MOD_URL}&op=verifyset"><i class="mdi mdi-account-reactivate"></i><span>{lang members_verify}</span></a>
</li>
<!--{/if}-->
<!--{loop $_G[setting][verify] $key $value}-->
<!--{if $value[available]}-->
<!--{if $key==1 && ($_G['adminid']==1 || $_G['member']['grid']==4)}-->
<li class="nav-item">
<a class="nav-link <!--{if $op=='verify' && $vid==$key}-->active<!--{/if}-->" href="{MOD_URL}&op=verify&vid=$key"><i class="mdi mdi-account-plus-outline"></i><span>$value[title]</span></a>
</li>
<!--{elseif $_G['adminid']==1}-->
<li class="nav-item">
<a class="nav-link <!--{if $op=='verify' && $vid==$key}-->active<!--{/if}-->" href="{MOD_URL}&op=verify&vid=$key"><i class="mdi mdi-account-plus-outline"></i><span>$value[title]</span></a>
</li>
<!--{/if}-->
<!--{/if}-->
<!--{/loop}-->
</ul>

View File

@ -0,0 +1,118 @@
<!--{template lyear:header_simple_start}-->
<style>
.itemContainer {
padding: 0 5px 20px;
}
#table-header th:nth-child(6),#table-header th:nth-child(7){
display:none;
}
.itemContainer td:nth-child(6),.itemContainer td:nth-child(7){
display:none;
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<div class="itemContainer">
<form id="cpform" action="{MOD_URL}&op=profileset" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="ordersubmit">
<div class="table-responsive">
<table id="table-header" class="table table-hover align-middle">
<thead>
<th width="60">{lang sort}</th>
<th width="120">{lang identifier}</th>
<th>{lang name}</th>
<th width="60">{lang enable}</th>
<th width="100">{lang data_show}</th>
<th width="60">{lang business_card_show}</th>
<th width="60">{lang registration_page_display}</th>
<th width="120">{lang operation}</th>
</thead>
<!--{loop $list $fieldid $value}-->
<tr>
<td width="60"><input type="text" class="form-control" name="displayorder[$fieldid]" value="$value[displayorder]"></td>
<td class="fieldid <!--{if !$value[customable]}-->gray<!--{/if}-->" width="120">$fieldid</td>
<td>$value[title] </td>
<td width="60"><input type="checkbox" class="form-check-input" name="available[$fieldid]" <!--{if $value[available]}-->checked="checked"<!--{/if}-->value="1"></td>
<td width="100"><input type="checkbox" class="form-check-input" name="invisible[$fieldid]" <!--{if !$value[invisible]}-->checked="checked"<!--{/if}-->value="1"></td>
<td width="60"><input type="checkbox" class="form-check-input" name="showincard[$fieldid]" <!--{if $value[showincard]}-->checked="checked"<!--{/if}-->value="1"></td>
<td width="60"><input type="checkbox" class="form-check-input" name="showinregister[$fieldid]" <!--{if $value[showinregister]}-->checked="checked"<!--{/if}-->value="1"></td>
<td width="100">
<a href="{MOD_URL}&op=profileset&fieldid=$fieldid" class="btn btn-outline-primary btn-sm" title="{lang edit}"><i class="mdi mdi-pencil"></i></a>
<!--{if $value['customable']}-->
<a href="{MOD_URL}&op=profileset&do=delete&fieldid=$fieldid" onclick="return confirm('{lang profileset_delete}')" class="btn btn-outline-danger btn-sm" title="{lang delete}"><i class="mdi mdi-delete"></i></a>
<!--{/if}-->
</td>
</tr>
<!--{/loop}-->
<tr>
<td colspan="20"><button type="button" class="btn btn-outline-info" onclick="addRow(this)"><i class="glyphicon glyphicon-plus"></i>{lang add_data}</button></td>
</tr>
</table>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" type="submit" value="{lang save_set}" />
</dl>
</form>
</div>
</div>
</div>
</div>
</main>
<script type="text/javascript">
var url = '{MOD_URL}';
jQuery(document).ready(function(e) {
jQuery('input').on('ifChecked', function(e) {
jQuery(this).trigger('click');
});
jQuery(document).on('blur', 'input[required]', function() {
var self = this;
var val = this.value;
if(this.value == '') {
jQuery(this).addClass('input-error');
} else if(jQuery(this).hasClass('fieldid')) {
jQuery('.fieldid').not(this).each(function() {
if(jQuery(this).is('td') && this.innerHTML == val) {
jQuery(self).addClass('input-error');
showmessage('{lang identifier_use}', 'danger', 3000, 1);
return;
} else if(jQuery(this).is('input') && this.value == val) {
jQuery(self).addClass('input-error');
showmessage('{lang identifier_use}', 'danger', 3000, 1);
return;
}
});
} else {
jQuery(this).removeClass('input-error');
}
});
jQuery(document).on('change', 'input[required]', function() {
if(this.value == '') { jQuery(this).addClass('input-error') } else { jQuery(this).removeClass('input-error'); }
});
});
function initHeight() {
jQuery('.itemContainer').css('height', document.documentElement.clientHeight-jQuery('.navbar').outerHeight(true)- jQuery('.main-header').outerHeight(true) - jQuery('#table-header').outerHeight(true));
}
function addRow(obj) {
var html = '<tr class="add">' +
'<td width="60"><input type="text" class="form-control" name="add[displayorder][]" value="0" ></td>' +
'<td width="120"><input type="text" class="form-control fieldid" name="add[fieldid][]" value="" placeholder="{lang can_not_repeat}" required="true"></td>' +
'<td ><input type="text" class="form-control" name="add[title][]" value="" style="max-width:150px;" placeholder="{lang data_name}"></td>' +
'<td width="60"><input type="checkbox" class="form-check-input" name="add[available][]" value="1"></td>' +
'<td width="60"><input type="checkbox" class="form-check-input" name="add[invisible][]" value="1"></td>' +
'<td width="60"><input type="checkbox" class="form-check-input" name="add[showincard][]" value="1"></td>' +
'<td width="60"><input type="checkbox" class="form-check-input" name="add[showinregister][]" value="1"></td>' +
'<td width="120"><a href="javascript:;" onclick="jQuery(this).parent().parent().remove()"><i class="ibtn glyphicon glyphicon-trash"></i></a></td>';
jQuery(html).insertBefore(jQuery(obj).parent().parent());
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,265 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link <!--{if !$fieldid}-->active<!--{/if}-->" href="{MOD_URL}&op=profileset">{lang data_item_list}</a>
</li>
<!--{if $fieldid}-->
<li class="nav-item">
<a class="nav-link active" href="{MOD_URL}&op=profileset&fieldid=$fieldid">{lang data_edit}</a>
</li>
<!--{/if}-->
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form id="cpform" action="{MOD_URL}&op=profileset" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="editsubmit">
<input type="hidden" value="$fieldid" name="fieldid">
<input type="hidden" value="$field[displayorder]" name="displayorder">
<div class="row mb-3">
<label class="col-sm-2">{lang name}</label>
<div class="col-sm-10">
<input type="text" class="form-control" value="$field[title]" name="title" required="required" <!--{if $field[isfixed2]}-->disabled="disabled"
<!--{/if}-->/>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang introduce}</label>
<div class="col-sm-10">
<input type="text" class="form-control" value="$field[description]" name="description" <!--{if $field[isfixed2]}-->disabled="disabled"
<!--{/if}-->/>
</div>
</div>
<!--{if !$field[isfixed2]}-->
<div class="row mb-3">
<label class="col-sm-2">{lang form_type}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="formtype1" name="formtype" value="text" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = 'none';document.getElementById('fieldvalidate').style.display = '';" <!--{if $field[formtype]=='text'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="formtype1">{lang HtmlInputText}</label>
</div>
<!--{if $fieldid!='realname'}-->
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="formtype2" name="formtype" value="textarea" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = 'none';document.getElementById('fieldvalidate').style.display = '';" <!--{if $field[formtype]=='textarea'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="formtype2">{lang HtmlTextArea}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="formtype3" name="formtype" value="radio" onclick="document.getElementById('valuenumber').style.display = 'none';document.getElementById('fieldchoices').style.display = '';document.getElementById('fieldvalidate').style.display = 'none';" <!--{if $field[formtype]=='radio'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="formtype3">{lang radio}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="formtype4" name="formtype" value="checkbox" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = '';document.getElementById('fieldvalidate').style.display = 'none';" <!--{if $field[formtype]=='checkbox'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="formtype4">{lang checkBox}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="formtype5" name="formtype" value="select" onclick="document.getElementById('valuenumber').style.display = 'none';document.getElementById('fieldchoices').style.display = '';document.getElementById('fieldvalidate').style.display = 'none';" <!--{if $field[formtype]=='select'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="formtype5">{lang combobox}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="formtype6" name="formtype" value="list" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = '';" <!--{if $field[formtype]=='list'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="formtype6">{lang more_choose_list}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="formtype7" name="formtype" value="file" onclick="document.getElementById('valuenumber').style.display = '';document.getElementById('fieldchoices').style.display = 'none';document.getElementById('fieldvalidate').style.display = 'none';" <!--{if $field[formtype]=='file'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="formtype7">{lang upload_image}</label>
</div>
<!--{/if}-->
</div>
</div>
<div class="row mb-3" id="valuenumber" <!--{if $field[formtype]=='select' || $field[formtype]=='radio' }-->style="display:none"<!--{/if}-->>
<label class="col-sm-2">{lang hawkeye_shellinit}</label>
<div class="col-sm-10">
<input name="size" value="$field[size]" type="text" class="form-control">
<span class="form-text">{lang profileset_edit_delete}</span>
</div>
</div>
<div class="row mb-3" id="fieldchoices" <!--{if $field[formtype]=='text' || $field[formtype]=='textarea' || $field[formtype]=='file' }-->style="display:none"<!--{/if}-->>
<label class="col-sm-2">{lang option_values}</label>
<div class="col-sm-10">
<textarea rows="6" name="choices" id="choices" class="form-control">$field[choices]</textarea>
<span class="form-text">{lang profileset_edit_value}:<br>{lang beijing}<br>{lang shanghai}<br></span>
</div>
</div>
<div class="row mb-3" id="fieldvalidate" <!--{if $field[formtype]=='radio' || $field[formtype]=='select' || $field[formtype]=='list' || $field[formtype]=='checkbox' || $field[formtype]=='file' }-->style="display:none"<!--{/if}-->>
<label class="col-sm-2">{lang regular_verification}</label>
<div class="col-sm-10">
<input name="validate" value="$field[validate]" type="text" class="form-control">
<span class="form-text">{lang profileset_edit_edit}</span>
</div>
</div>
<!--{/if}-->
<div class="row mb-3">
<label class="col-sm-2">{lang members_verify_enable}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="available1" name="available" value="1" <!--{if $field[available]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="available1">{lang enable}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="available2" name="available" value="0" <!--{if !$field[available]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="available2">{lang no_enable}</label>
</div>
</div>
</div>
<!--{if !$field['isfixed1']}-->
<div class="row mb-3">
<label class="col-sm-2">{lang submit_hou}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="available1" name="unchangeable" value="1" <!--{if $field[unchangeable]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="unchangeable1">{lang no_modification}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="available2" name="unchangeable" value="0" <!--{if !$field[unchangeable]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="unchangeable2">{lang revisability}</label>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang modification_hou}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="available1" name="needverify" value="1" <!--{if $field[needverify]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="needverify1">{lang need_moderate}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="available2" name="needverify" value="0" <!--{if !$field[needverify]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="needverify2">{lang no_need_moderate}</label>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang if_required}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="required1" name="required" value="1" <!--{if $field[required]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="required1">{lang required}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="required2" name="required" value="0" <!--{if !$field[required]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="required2">{lang certificate}</label>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang data_page}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="invisible1" name="invisible" value="1" <!--{if $field[invisible]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="invisible1">{lang hide}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="invisible2" name="invisible" value="0" <!--{if !$field[invisible]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="invisible2">{lang show}</label>
</div>
<span class="form-text">{lang profileset_edit_hide}</span>
</div>
</div>
<!--{/if}-->
<div class="row mb-3">
<label class="col-sm-2">{lang default_privacy}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="privacy1" name="privacy" value="-1" <!--{if $_G['setting']['privacy']['profile'][$fieldid]=='-1'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="privacy1">{lang secret}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="privacy2" name="privacy" value="0" <!--{if empty($_G['setting']['privacy']['profile'][$fieldid])}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="privacy2">{lang public}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="privacy3" name="privacy" value="1" <!--{if $_G['setting']['privacy']['profile'][$fieldid]=='1'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="privacy3">{lang department_visible}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="privacy4" name="privacy" value="2" <!--{if $_G['setting']['privacy']['profile'][$fieldid]=='2'}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="privacy4">{lang institution_visible}</label>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang business_card}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="showincard1" name="showincard" value="1" <!--{if $field[showincard]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="showincard1">{lang show}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="showincard2" name="showincard" value="0" <!--{if !$field[showincard]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="showincard2">{lang no_show}</label>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang registration_page}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="showinregister1" name="showinregister" value="1" <!--{if $field[showinregister]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="showinregister1">{lang show}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="showinregister2" name="showinregister" value="0" <!--{if !$field[showinregister]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="showinregister2">{lang no_show}</label>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang allow_search}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="allowsearch1" name="allowsearch" value="1" <!--{if $field[allowsearch]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="allowsearch1">{lang allow_search}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="sallowsearch2" name="allowsearch" value="0" <!--{if !$field[allowsearch]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="allowsearch2">{lang no_allow_search}</label>
</div>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" name="editsubmit" value="{lang save_set}">
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
var url = '{MOD_URL}';
jQuery(document).ready(function(e) {
jQuery(document).on('blur', 'input[required]', function() {
var self = this;
var val = this.value;
if(this.value == '') {
jQuery(this).addClass('input-error');
} else if(jQuery(this).hasClass('fieldid')) {
jQuery('.fieldid').not(this).each(function() {
if(jQuery(this).is('td') && this.innerHTML == val) {
jQuery(self).addClass('input-error');
showmessage('{lang identifier_use}', 'danger', 3000, 1);
return;
} else if(jQuery(this).is('input') && this.value == val) {
jQuery(self).addClass('input-error');
showmessage('{lang identifier_use}', 'danger', 3000, 1);
return;
}
});
} else {
jQuery(this).removeClass('input-error');
}
});
jQuery(document).on('change', 'input[required]', function() {
if(this.value == '') { jQuery(this).addClass('input-error') } else { jQuery(this).removeClass('input-error'); }
});
});
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,227 @@
<!--{template lyear:header_simple_start}-->
<script type="text/javascript" src="admin/scripts/admin.js?{VERHASH}"></script>
<!--日期选择器css-->
<link rel="stylesheet" type="text/css" href="static/lyear/js/bootstrap-datepicker/bootstrap-datepicker3.min.css?{VERHASH}">
<style>
.mod_validate td {
background: #dff0d8 !important;
}
.mod_refusal td {
background: #f2dede !important;
}
.table-sub tr {
height: 30px;
}
.table td img {
max-width: 50px;
max-height: 50px;
margin: 0px;
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link <!--{if $anchor=='authstr' }-->active<!--{/if}--> " href="{MOD_URL}&op=verify&anchor=authstr&vid=$vid">{lang members_verify_nav_authstr}</a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $anchor=='refusal' }-->active<!--{/if}-->" href="{MOD_URL}&op=verify&anchor=refusal&vid=$vid">{lang members_verify_nav_refusal}</a>
</li>
<!--{if $vid}-->
<li class="nav-item">
<a class="nav-link <!--{if $anchor=='pass' }-->active<!--{/if}-->" href="{MOD_URL}&op=verify&anchor=pass&vid=$vid">{lang already_passed}</a>
</li>
<!--{/if}-->
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<!--{if $list}-->
<form class="row gx-3 gy-2 align-items-center" action="{MOD_URL}" method="get">
<input type="hidden" name="mod" value="{MOD_NAME}">
<input type="hidden" name="op" value="verify">
<input type="hidden" name="vid" value="$vid">
<input type="hidden" name="anchor" value="$anchor">
<div class="col-sm-3">
<label class="visually-hidden" for="username">{lang user_name}*</label>
<input type="text" class="form-control" id="username" name="username" value="$_GET[username]" placeholder="{lang user_name}*">
</div>
<div class="col-sm-3">
<label class="visually-hidden" for="uid">UID</label>
<input type="text" class="form-control" id="uid" name="uid" value="$_GET['uid']" placeholder="UID">
</div>
<!--{if $anchor!='pass'}-->
<div class="col-sm-6">
<div class="input-group" data-provide="datepicker">
<span class="input-group-text"></span>
<input type="text" class="form-control" id="dateline1" name="dateline1" placeholder="{lang members_verify_dateline}" value="$_GET[dateline1]">
<span class="input-group-text"></span>
<input type="text" class="form-control" id="dateline2" name="dateline2" placeholder="{lang members_verify_dateline}" value="$_GET[dateline2]">
</div>
</div>
<!--{/if}-->
<div class="col-sm-3">
<label class="visually-hidden">{lang result_ranking}</label>
<select class="form-select" name="orderby">
<!--{if $anchor!='pass'}-->
<option value="dateline">{lang members_verify_dateline}</option>
<!--{else}-->
<option value="uid">UID</option>
<!--{/if}-->
</select>
</div>
<div class="col-sm-3">
<select name="ordersc" class="form-select">
<option value="desc" <!--{if $_GET[ordersc]=='desc' }-->selected="selected"<!--{/if}-->>{lang pass_subtract}</option>
<option value="asc" <!--{if $_GET[ordersc]=='asc' }-->selected="selected"<!--{/if}-->>{lang pass_add}</option>
</select>
</div>
<div class="col-sm-3">
<select name="perpage" class="form-select">
<option value="10" <!--{if $_GET[perpage]=='10' }-->selected="selected"<!--{/if}-->>{lang logs_lpp}10{lang individual}</option>
<option value="20" <!--{if $_GET[perpage]=='20' }-->selected="selected"<!--{/if}-->>{lang logs_lpp}20{lang individual}</option>
<option value="50" <!--{if $_GET[perpage]=='50' }-->selected="selected"<!--{/if}-->>{lang logs_lpp}50{lang individual}</option>
<option value="100" <!--{if $_GET[perpage]=='100' }-->selected="selected"<!--{/if}-->>{lang logs_lpp}100{lang individual}</option>
</select>
</div>
<dl class="mb-3 d-grid">
<button type="submit" name="searchsubmit" value="{lang search}" class="btn btn-primary btn-round bodyloading">{lang search}</button>
<span class="form-text">&nbsp;&nbsp;&nbsp;*{lang fuzzy_search}</span>
</dl>
</form>
<iframe id="frame_profile" name="frame_profile" style="display: none"></iframe>
<form id="cpform" action="{MOD_URL}&op=verify&" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="verifysubmit">
<input type="hidden" value="$vid" name="vid">
<input type="hidden" name="anchor" value="$anchor">
<div class="table-responsive">
<table class="table table-hover align-middle">
<!--{if $anchor!='pass'}-->
<thead>
<th width="90" style="text-align:center">{lang username}</th>
<th width="120">{lang members_verify_dateline}</th>
<th>{lang members_verify_info}</th>
</thead>
<!--{loop $list $value}-->
<tr id="mod_{$value[vid]}_row" verifyid="{$value[vid]}" class="hover">
<td width="90" align="center">$value[username]</td>
<td width="120">$value['dateline']</td>
<td>$value[fieldstr]</td>
</tr>
<!--{/loop}-->
<thead>
<td colspan="15">
<input type="submit" class="btn btn-primary bodyloading" id="submit_batchverifysubmit" name="batchverifysubmit" title="" value="{lang submit}"> &nbsp;
<a href="javascript:;" class="btn btn-outline-primary" onclick="mod_setbg_all('validate')">{lang all_validate}</a> &nbsp;
<a class="btn btn-outline-danger" href="javascript:;" onclick="mod_setbg_all('refusal')">{lang select_all_refuse}</a> &nbsp;
<a class="btn btn-outline-info" href="javascript:;" onclick="mod_cancel_all();">{lang cancel_select}</a>
$multi
</td>
</thead>
<!--{else}-->
<thead>
<th width="80"></th>
<th width="90" style="text-align:center">{lang username}</th>
<th>{lang members_verify_info}</th>
</thead>
<!--{loop $list $value}-->
<tr id="mod_{$value['uid']}_row" verifyid="{$value['uid']}" class="hover">
<td width="80">$value[opstr]</td>
<td width="90" align="center">$value[username]</td>
<td>$value[fieldstr]</td>
</tr>
<!--{/loop}-->
<thead>
<td colspan="15">
<input type="submit" class="btn btn-primary bodyloading" id="submit_batchverifysubmit" name="batchverifysubmit" title="" value="{lang submit}"> &nbsp;
<a href="javascript:;" class="btn btn-primary" onclick="mod_setbg_all('export')">{lang select_all_export}</a> &nbsp;
<a class="btn btn-primary" href="javascript:;" onclick="mod_setbg_all('refusal')">{lang select_all_refuse}</a> &nbsp;
<a class="btn btn-primary" href="{MOD_URL}&op=verify&vid=$vid&anchor=pass&verifysubmit=yes">{lang all_export}</a>
$multi
</td>
</thead>
<!--{/if}-->
</table>
</div>
</form>
<!--{else}-->
<div class="text-center">
<img src="static/image/common/no_list.png" /><br>
<span class="lead">{lang no_relevant_content}…</span>
</div>
<!--{/if}-->
</div>
</div>
</div>
</main>
<script type="text/javascript">
var url = '{MOD_URL}';
function showreason(vid, flag) {
var reasonobj = document.getElementById('reason_' + vid);
if(reasonobj) {
reasonobj.style.display = flag ? '' : 'none';
}
if(!flag && document.getElementById('verifyitem_' + vid) != null) {
var checkboxs = document.getElementById('verifyitem_' + vid).getElementsByTagName('input');
for(var i in checkboxs) {
if(checkboxs[i].type == 'checkbox') {
checkboxs[i].checked = '';
}
}
}
}
function mod_setbg(vid, value) {
document.getElementById('mod_' + vid + '_row').className = 'mod_' + value;
}
function mod_setbg_all(value) {
checkAll('option', document.getElementById('cpform'), value);
var trs = document.getElementById('cpform').getElementsByTagName('TR');
for(var i in trs) {
if(trs[i].id && trs[i].id.substr(0, 4) == 'mod_') {
trs[i].className = 'mod_' + value;
showreason(trs[i].getAttribute('verifyid'), value == 'refusal' ? 1 : 0);
}
}
}
function mod_cancel_all() {
var inputs = document.getElementById('cpform').getElementsByTagName('input');
for(var i in inputs) {
if(inputs[i].type == 'radio') {
inputs[i].checked = '';
}
}
var trs = document.getElementById('cpform').getElementsByTagName('TR');
for(var i in trs) {
if(trs[i].id && trs[i].id.match(/^mod_(\d+)_row$/)) {
trs[i].className = "mod_cancel";
showreason(trs[i].getAttribute('verifyid'), 0)
}
}
}
function singleverify(vid) {
var formobj = document.getElementById('cpform');
var oldaction = formobj.action;
formobj.action = oldaction + 'singleverify=' + vid;
formobj.target = "frame_profile";
formobj.submit();
formobj.action = oldaction;
formobj.target = "";
}
</script>
<!--日期选择器js-->
<script type="text/javascript" src="static/lyear/js/bootstrap-datepicker/bootstrap-datepicker.min.js?{VERHASH}"></script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,67 @@
<!--{template lyear:header_simple_start}-->
<style>
.form-horizontal .form-control {
min-width: 90px;
max-width: 250px;
}
textarea.form-control,select.form-control{
border-width:1px 1px 1px 1px;
}
</style>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<div class="alert alert-warning">
<ul class="m-0">
{lang verifyset_members_verify_text}
</ul>
</div>
<form id="cpform" action="{MOD_URL}&op=verifyset" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="verifysubmit">
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<th width="60">{lang enable}</th>
<th width="120">{lang authentication_code}</th>
<th>{lang members_verify_title}</th>
<th width="120">{lang edit}</th>
</thead>
<!--{eval for($i=1;$i<8;$i++){}-->
{eval $value=$_G['setting']['verify'][$i]}
<tr>
<td width="60"><input type="checkbox" class="form-check-input" name="settingnew[verify][$i][available]" <!--{if $value[available]}-->checked="checked"<!--{/if}-->value="1" /></td>
<td width="120">verify{$i}</td>
<td>
<!--{if $value[readonly]}-->
$value[title]<input type="hidden" name="settingnew[verify][$i][title]" value="$value[title]" />
<!--{else}-->
<input type="text" class="form-control" name="settingnew[verify][$i][title]" value="$value[title]">
<!--{/if}-->
<!--{if $value['icon']}-->
<img src="$value[icon]" />
<!--{/if}-->
</td>
<td width="120">
<a href="{MOD_URL}&op=verifyset&do=edit&vid=$i" class="btn btn-outline-primary btn-sm" title="{lang edit}"><i class="mdi mdi-pencil"></i></a>
</td>
</tr>
<!--{eval }}-->
</table>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" type="submit" value="{lang save_set}" />
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
var url = '{MOD_URL}';
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,150 @@
<!--{template lyear:header_simple_start}-->
<link rel="stylesheet" type="text/css" href="static/lyear/js/bootstrap-lyear-select/bootstrap-lyear-select.css?{VERHASH}">
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}&op=verifyset">{lang members_verify}</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{MOD_URL}&op=verifyset&do=edit&vid=$vid">{lang edit}</a>
</li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form id="cpform" action="{MOD_URL}&op=verifyset&do=edit" class="form-horizontal" method="post" name="cpform" enctype="multipart/form-data">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="verifysubmit">
<input type="hidden" value="$vid" name="vid">
<div class="row mb-3">
<label class="col-sm-2">{lang members_verify_title}</label>
<div class="col-sm-10">
<input name="verify[title]" value="$verifyarr[title]" type="text" class="form-control" <!--{if $verifyarr[readonly]}-->disabled="disabled"<!--{/if}-->>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang members_verify_synopsis}</label>
<div class="col-sm-10">
<textarea name="verify[desc]" type="textarea" class="form-control" rows="3">$verifyarr[desc]</textarea>
<span class="form-text">{lang verifyset_verify_synopsis_text}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang members_verify_enable}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="verify[available]1" name="verify[available]" value="1" <!--{if $verifyarr[available]}-->checked="checked"<!--{/if}-->>{lang enable}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="verify[available]2" name="verify[available]" value="0" <!--{if !$verifyarr[available]}-->checked="checked"<!--{/if}-->>{lang no_enable}</label>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang members_verify_icon}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="verify[showicon]1" name="verify[showicon]" value="1" <!--{if $verifyarr[showicon]}-->checked="checked"<!--{/if}--> onclick="document.('hidden_verify_showicon').style.display = '';">{lang show}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="verify[showicon]2" name="verify[showicon]" value="0" <!--{if !$verifyarr[showicon]}-->checked="checked"<!--{/if}--> onclick="document.getElementById('hidden_verify_showicon').style.display = 'none';">{lang no_show}</label>
</div>
</div>
<dd id="hidden_verify_showicon" class="clearfix mt10" <!--{if !$verifyarr[showicon]}-->style="display:none"<!--{/if}-->>
<div class="row mb-3">
<label class="col-sm-2">{lang members_unverify_icon}</label>
<div class="col-sm-10">
<table>
<tr>
<td valign="top">
<div>
<input id="fileQ3_0" style="display:" name="unverifyiconnew" value="" type="file" class="form-control uploadbtn marginbot" accept="image/jpeg,image/gif,image/png,image/jpg">
<input id="fileQ3_1" style="display:none" name="TMPunverifyiconnew" value="$verifyarr[unverifyicon]" type="text" class="form-control marginbot" accept="image/jpeg,image/gif,image/png,image/jpg">
</div>
<div>
<a id="fileQ3_0a" class="btn btn-primary" style="font-weight:bold;" href="javascript:;" onclick="document.getElementById('fileQ3_1a').style.fontWeight = '';this.style.fontWeight = 'bold';document.getElementById('fileQ3_1').name = 'TMPunverifyiconnew';document.getElementById('fileQ3_0').name = 'unverifyiconnew';document.getElementById('fileQ3_0').style.display = '';document.getElementById('fileQ3_1').style.display = 'none'">{lang web_upload}</a>&nbsp;
<a id="fileQ3_1a" class="btn btn-primary" style="" href="javascript:;" onclick="document.getElementById('fileQ3_0a').style.fontWeight = '';this.style.fontWeight = 'bold';document.getElementById('fileQ3_0').name = 'TMPunverifyiconnew';document.getElementById('fileQ3_1').name = 'unverifyiconnew';document.getElementById('fileQ3_1').style.display = '';document.getElementById('fileQ3_0').style.display = 'none'">{lang input}URL</a>
</div>
</td>
<td>
<div class="ml20">$unverifyiconhtml</div>
</td>
</tr>
</table>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang members_verify_icon}</label>
<div class="col-sm-10">
<table>
<tr>
<td valign="top">
<div>
<input id="fileO4_0" style="display:" name="iconnew" value="" type="file" class="form-control uploadbtn marginbot" accept="image/jpeg,image/gif,image/png,image/jpg">
<input id="fileO4_1" style="display:none" name="TMPiconnew" value="$verifyarr[icon]" type="text" class="form-control marginbot" accept="image/jpeg,image/gif,image/png,image/jpg">
</div>
<div>
<a id="fileO4_0a" class="btn btn-primary" style="font-weight:bold" href="javascript:;" onclick="document.getElementById('fileO4_1a').style.fontWeight = '';this.style.fontWeight = 'bold';document.getElementById('fileO4_1').name = 'TMPiconnew';document.getElementById('fileO4_0').name = 'iconnew';document.getElementById('fileO4_0').style.display = '';document.getElementById('fileO4_1').style.display = 'none'">{lang web_upload}</a>&nbsp;
<a class="btn btn-primary" id="fileO4_1a" style="" href="javascript:;" onclick="document.getElementById('fileO4_0a').style.fontWeight = '';this.style.fontWeight = 'bold';document.getElementById('fileO4_0').name = 'TMPiconnew';document.getElementById('fileO4_1').name = 'iconnew';document.getElementById('fileO4_1').style.display = '';document.getElementById('fileO4_0').style.display = 'none'">{lang input}URL</a>
</div>
</td>
<td>
<div class="ml20">$verificonhtml</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang choosable_data}</label>
<div class="col-sm-10">
<!--{loop $fieldarr $value}-->
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" id="verify[field][{$value[fieldid]}]" name="verify[field][{$value[fieldid]}]" value="$value[fieldid]"<!--{if $verifyarr[field][$value[fieldid]]}--> checked="checked"<!--{/if}-->>
<label class="form-check-label" for="verify[field][{$value[fieldid]}]">$value[title]</label>
</div>
<!--{/loop}-->
<span class="form-text">{lang verifyset_choosable_data_text}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang members_verify_group}</label>
<div class="col-sm-10">
<select class="form-select" name="verify[groupid][]" multiple>
<!--{loop $usergroups $value}-->
<option value="$value[groupid]" <!--{if in_array($value[groupid],$verifyarr[groupid])}-->selected="selected"<!--{/if}-->>$value[grouptitle]</option>
<!--{/loop}-->
</select>
<span class="form-text">{lang verifyset_verify_group_text}</span>
</div>
</div>
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" name="verifysubmit" value="{lang save_set}">
</dl>
</form>
</div>
</div>
</div>
</main>
<script type="text/javascript">
var url = '{MOD_URL}';
jQuery(document).ready(function(e) {
<!--{if $verifyarr['icon']}-->
jQuery('#fileO4_1a').trigger('click');
<!--{/if}-->
<!--{if $verifyarr['unverifyicon']}-->
jQuery('#fileQ3_1a').trigger('click');
<!--{/if}-->
});
</script>
<script type="text/javascript" src="static/lyear/js/bootstrap-lyear-select/bootstrap-lyear-select.js?{VERHASH}"></script>
<!--{template lyear:footer_simple}-->

View File

@ -16,7 +16,7 @@ loadcache('profilesetting');
$vid = intval($_GET['vid']);
$anchor = in_array($_GET['anchor'], array('authstr', 'refusal', 'pass', 'add')) ? $_GET['anchor'] : 'authstr';
$current = array($anchor => 1);
$op=$_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
//判断管理权限
if ($vid) {
if ($vid == 1) {
@ -37,7 +37,7 @@ if ($anchor != 'pass') {
$_GET['orderby'] = 'uid';
}
if (!submitcheck('verifysubmit', true)) {
$navtitle = $vid ? $_G['setting']['verify'][$vid]['title'] : lang('members_verify_profile');
$navtitle = $vid ? $_G['setting']['verify'][$vid]['title'] : lang('members_verify_profile').' - '.lang('appname');
$thurl = ADMINSCRIPT . '?mod=member&op=verify&anchor=' . $anchor . '&vid=' . $vid;
if ($anchor == 'refusal') {
@ -108,7 +108,8 @@ if (!submitcheck('verifysubmit', true)) {
if ($anchor == 'pass') {
$value = array_merge($value, $profiles[$uid]);
}
$value['username'] = '<a href="user.php?&uid=' . $value['uid'] . '" target="_blank"><img src="avatar.php?uid=' . $value['uid'] . '&size=small"><br/><br/>' . $value['username'] . '</a>';
$value['username'] = '<a href="user.php?&uid=' . $value['uid'] . '" target="_blank">'.avatar_block($value['uid']).'<br/><br/>' . $value['username'] . '</a>';
if ($anchor != 'pass') {
$fields = $anchor != 'pass' ? dunserialize($value['field']) : $_G['setting']['verify'][$vid]['field'];
$value['verifytype'] = $value['verifytype'] ? $_G['setting']['verify'][$value['verifytype']]['title'] : lang('members_verify_profile');
@ -131,18 +132,18 @@ if (!submitcheck('verifysubmit', true)) {
$field = profile_show($key, $fields);
}
$fieldstr .= '<tr>' . ($anchor == 'authstr' ? '<td><input type="checkbox" name="refusal[' . $value['vid'] . '][' . $key . ']" value="' . $key . '" onclick="document.getElementById(\'refusal' . $value['vid'] . '\').click();" /></td>' : '') . '<td>' . $_G['cache']['profilesetting'][$key]['title'] . ':</td><td>' . $field . '</td></tr>';
$fieldstr .= '<tr>' . ($anchor == 'authstr' ? '<td><input type="checkbox" class="form-check-input" name="refusal[' . $value['vid'] . '][' . $key . ']" value="' . $key . '" onclick="document.getElementById(\'refusal' . $value['vid'] . '\').click();" /></td>' : '') . '<td>' . $_G['cache']['profilesetting'][$key]['title'] . ':</td><td>' . $field . '</td></tr>';
$i++;
}
$opstr = "";
if ($anchor == 'authstr') {
$opstr .= "<label class=\"radio-inline\"><input type=\"radio\" name=\"verify[$value[vid]]\" value=\"validate\" onclick=\"mod_setbg($value[vid], 'validate');showreason($value[vid], 0);\">" . lang('validate') . "</label><label class=\"radio-inline\"><input type=\"radio\" name=\"verify[$value[vid]]\" value=\"refusal\" id=\"refusal$value[vid]\" onclick=\"mod_setbg($value[vid], 'refusal');showreason($value[vid], 1);\">" . lang('refuse') . "</label>";
$opstr .= "<div class=\"form-check form-check-inline\"><input type=\"radio\" class=\"form-check-input\" name=\"verify[$value[vid]]\" value=\"validate\" onclick=\"mod_setbg($value[vid], 'validate');showreason($value[vid], 0);\"><label class=\"form-check-label\">" . lang('validate') . "</label></div><div class=\"form-check form-check-inline\"><input type=\"radio\" class=\"form-check-input\" name=\"verify[$value[vid]]\" value=\"refusal\" id=\"refusal$value[vid]\" onclick=\"mod_setbg($value[vid], 'refusal');showreason($value[vid], 1);\"><label class=\"form-check-label\">" . lang('refuse') . "</label></div>";
} elseif ($anchor == 'refusal') {
$opstr .= "<label class=\"radio-inline\"><input type=\"radio\" name=\"verify[$value[vid]]\" value=\"validate\" onclick=\"mod_setbg($value[vid], 'validate');\">" . lang('validate') . "</label>";
$opstr .= "<div class=\"form-check form-check-inline\"><input type=\"radio\" class=\"form-check-input\" name=\"verify[$value[vid]]\" value=\"validate\" onclick=\"mod_setbg($value[vid], 'validate');\"><label class=\"form-check-label\">" . lang('validate') . "</label></div>";
}
$fieldstr .= "</tbody><tr><td colspan=\"5\">$opstr <span id=\"reason_$value[vid]\" style=\"display: none;\" title=\"" . lang('moderate_reasonpm') . "\" ><input type=\"text\" class=\"form-control input-sm\" placeholder=\"" . lang('moderate_reasonpm') . "\" name=\"reason[$value[vid]]\" style=\"margin: 0px;\"></span><input type=\"button\" value=\"" . lang('moderate') . "\" name=\"singleverifysubmit\" class=\"btn btn-default btn-sm ml10\" onclick=\"singleverify($value[vid]);\"></td></tr></table>";
$fieldstr .= "</tbody><tr><td colspan=\"5\">$opstr <span id=\"reason_$value[vid]\" style=\"display: none;\" title=\"" . lang('moderate_reasonpm') . "\" ><input type=\"text\" class=\"form-control\" placeholder=\"" . lang('moderate_reasonpm') . "\" name=\"reason[$value[vid]]\" style=\"margin: 0px;\"></span><dl><input type=\"button\" value=\"" . lang('moderate') . "\" name=\"singleverifysubmit\" class=\"btn btn-primary\" onclick=\"singleverify($value[vid]);\"></dl></td></tr></table>";
$value['fieldstr'] = $fieldstr;
$value['dateline'] = dgmdate($value['dateline'], 'u');
$list[$uid] = $value;
@ -172,7 +173,7 @@ if (!submitcheck('verifysubmit', true)) {
}
$fieldstr .= "</table>";
$value['fieldstr'] = $fieldstr;
$opstr = "<ul class=\"list-unstyled\"><li><label class=\"radio-inline\"><input type=\"radio\" name=\"verify[$value[uid]]\" value=\"export\" onclick=\"mod_setbg($value[uid], 'export');\">".lang('export')."</label></li><li><label class=\"radio-inline\"><input type=\"radio\" name=\"verify[$value[uid]]\" value=\"refusal\" onclick=\"mod_setbg($value[uid], 'refusal');\">" . lang('refuse') . "</label></li></ul>";
$opstr = "<ul class=\"list-unstyled\"><li><div class=\"form-check form-check-inline\"><input type=\"radio\" class=\"form-check-input\" name=\"verify[$value[uid]]\" value=\"export\" onclick=\"mod_setbg($value[uid], 'export');\"><label class=\"form-check-label\">".lang('export')."</label></div></li><li><div class=\"form-check form-check-inline\"><input type=\"radio\" class=\"form-check-input\" name=\"verify[$value[uid]]\" value=\"refusal\" onclick=\"mod_setbg($value[uid], 'refusal');\"><label class=\"form-check-label\">" . lang('refuse') . "</label></div></li></ul>";
$value['opstr'] = $opstr;
$value['dateline'] = dgmdate($value['dateline'], 'u');
$list[$uid] = $value;

View File

@ -10,11 +10,12 @@
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$op=$_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
$navtitle = lang('members_verify').' - '.lang('appname');
if ($_G['adminid'] != 1)
showmessage('no_privilege');
include_once libfile('function/cache');
$do = $_GET['do'] ? $_GET['do'] : '';
$do = isset($_GET['do']) ? $_GET['do'] : '';
if ($do == 'edit') {
$vid = $_GET['vid'] < 8 ? intval($_GET['vid']) : 0;
@ -26,14 +27,14 @@ if ($do == 'edit') {
$icon_url = parse_url($verifyarr['icon']);
$prefix = !$icon_url['host'] && strpos($verifyarr['icon'], $_G['setting']['attachurl']) === false ? $_G['setting']['attachurl'] : '';
$verificonhtml = '<label class="radio-inline"><input type="checkbox" class="checkbox" name="deleteicon[' . $vid . ']" value="yes" />'.lang('del1').'</label>&nbsp;<img src="' . $prefix . $verifyarr['icon'] . '?t=' . TIMESTAMP . '" />';
$verificonhtml = '<label class="radio-inline"><input type="checkbox" class="form-check-input" name="deleteicon[' . $vid . ']" value="yes" />'.lang('del1').'</label>&nbsp;<img src="' . $prefix . $verifyarr['icon'] . '?t=' . TIMESTAMP . '" />';
}
$unverifyiconhtml = '';
if ($verifyarr['unverifyicon']) {
$unverifyiconurl = parse_url($verifyarr['unverifyicon']);
$prefix = !$unverifyiconurl['host'] && strpos($verifyarr['unverifyicon'], $_G['setting']['attachurl']) === false ? $_G['setting']['attachurl'] : '';
$unverifyiconhtml = '<label class="radio-inline"><input type="checkbox" class="checkbox" name="delunverifyicon[' . $vid . ']" value="yes" />'.lang('del1').'</label>&nbsp;<img src="' . $prefix . $verifyarr['unverifyicon'] . '?t=' . TIMESTAMP . '" />';
$unverifyiconhtml = '<label class="radio-inline"><input type="checkbox" class="form-check-input" name="delunverifyicon[' . $vid . ']" value="yes" />'.lang('del1').'</label>&nbsp;<img src="' . $prefix . $verifyarr['unverifyicon'] . '?t=' . TIMESTAMP . '" />';
}
$fieldarr = C::t('user_profile_setting') -> fetch_all_by_available(1);

View File

@ -1,26 +0,0 @@
<?php
$lang = array (
'appname' => '机构用户',
'explorer_gropuperm'=>array(
'协作成员',
'管理员',
'创始人'
),
'orgname'=>'机构名称',
'orgname_placeholder'=>'输入机构(群组)名称',
'change'=>'更换',
'org_description'=>'简介',
'org_description_placeholder'=>'输入机构(群组)简要介绍',
'org_space_assign'=>'分配空间大小',
'org_space_assign_tip'=>'当前可以分配的最大可用空间',
'org_space_assign_tips'=>' <li>单位M留空或者0表示不限制-1表示无空间</li><li>限制整个机构或部门(包括下级所有部门)可以使用的空间大小(机构下所有部门的空间使用总和不能超过这个限制)</li><li>部门分配的空间只能从上级部门的可用空间里面划分;一旦分配,上级部门的剩余空间就会相应减少,不管这些分配的空间是否实际使用完</li>',
'space_use_department'=>'部门空间使用',
'space_use_org'=>'机构总空间使用',
'space_use_org_tips'=>'<li>限制整个机构或部门(包括下级所有部门)可以使用的空间大小</li><li>下级部门分配的空间会从上级的可用空间里面分配</li>',
'org_update_success'=>'更新资料成功,3秒后将为您跳转',
'org_img_uploaded_tip'=>'该图片已经上传过了,只需勾选即可',
'clicktoupload'=>'点击上传'
);
?>

View File

@ -0,0 +1,15 @@
.perm-ok{
padding-right: 5px;
}
.proper-bottom{
position: relative;
display: inline-block;
padding-right: 20px;
}
.proper-set{
display: none;
}
.properties-list:hover .proper-set{
display:inline-block;
}

View File

@ -1,4 +1,4 @@
<?php
<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
@ -30,7 +30,7 @@ if ($setting['thumbsize']) {
}
if (!submitcheck('settingsubmit')) {
if ($operation == 'basic') {
$navtitle = lang('members_verify_base');
$navtitle = lang('members_verify_base').' - '.lang('appname');
$spacesize = DB::result_first("select maxspacesize from " . DB::table('usergroup_field') . " where groupid='9'");
include_once libfile('function/organization');
@ -70,78 +70,19 @@ if (!submitcheck('settingsubmit')) {
}
} elseif ($operation == 'upload') {
$setting['maxChunkSize'] = round($setting['maxChunkSize'] / (1024 * 1024), 2);
$navtitle = lang('upload_set');
$navtitle = lang('upload_set').' - '.lang('appname');
$setting['unRunExts'] = implode(',', dunserialize($setting['unRunExts']));
$usergroups = DB::fetch_all("select f.*,g.grouptitle from %t f LEFT JOIN %t g ON g.groupid=f.groupid where f.groupid NOT IN ('2','3','4','5','6','7','8') order by groupid DESC", array('usergroup_field', 'usergroup'));
} elseif ($operation == 'at') {
$navtitle = '@'.lang('sector_set');
$navtitle = '@'.lang('sector_set').' - '.lang('appname');
$setting['at_range'] = dunserialize($setting['at_range']);
$usergroups = DB::fetch_all("select f.*,g.grouptitle from %t f LEFT JOIN %t g ON g.groupid=f.groupid where f.groupid NOT IN ('2','3','4','5','6','7','8') order by groupid DESC", array('usergroup_field', 'usergroup'));
} elseif ($operation == 'access') {
$navtitle = lang('register_visit');
/*if($setting['welcomemsg'] == 1) {
$welcomemsg[] = '1';
} elseif($setting['welcomemsg'] == 2) {
$welcomemsg[] = '2';
} elseif($setting['welcomemsg'] == 3) {
$welcomemsg[] = '1';
$welcomemsg[] = '2';
} else {
$welcomemsg[] = '0';
}*/
$navtitle = lang('loginSet').' - '.lang('appname');
$setting['strongpw'] = dunserialize($setting['strongpw']);
}elseif($operation == 'space'){//获取空间设置结果
/*//处理指定人员
if(isset($setting['memoryorgusers'])){
$muids=explode(',',$setting['memoryorgusers']);
}
$orgids=$uids=$sel_org=$sel_user=array();
foreach($muids as $value){
if(strpos($value,'uid_')!==false){
$uids[]=str_replace('uid_','',$value);
}else{
$orgids[]=$value;
}
}
$open=array();
if($orgids){
$sel_org=C::t('organization')->fetch_all($orgids);
foreach($sel_org as $key=> $value){
$orgpath=getPathByOrgid($value['orgid']);
$sel_org[$key]['orgpath']=implode('-',array_reverse($orgpath));
$arr=(array_keys($orgpath));
//print_r($arr);
array_pop($arr);
if($count=count($arr)){
if($open[$arr[$count-1]]){
if(count($open[$arr[$count-1]])>$count) $open[$arr[count($arr)-1]]=$arr;
}else{
$open[$arr[$count-1]]=$arr;
}
}
}
if(in_array('other',$orgids)){
$sel_org[]=array('orgname'=>'无机构人员','orgid'=>'other','forgid'=>1);
}
}*/
/*if($uids){
$sel_user=C::t('user')->fetch_all($uids);
if($aorgids=C::t('organization_user')->fetch_orgids_by_uid($uids)){
foreach($aorgids as $orgid){
$arr=getUpOrgidTree($orgid,true);
$arr=array_reverse($arr);
if($count=count($arr)){
if($open[$arr[$count-1]]){
if(count($open[$arr[$count-1]])>$count) $open[$arr[count($arr)-1]]=$arr;
}else{
$open[$arr[$count-1]]=$arr;
}
}
}
}
}*/
$setting['welcomemsgtitle'] = cutstr(trim(dhtmlspecialchars($setting['welcomemsgtitle'])), 75);
} elseif($operation == 'space'){//获取空间设置结果
$navtitle=lang('spaceSet').' - '.lang('appname');
$openarr=json_encode(array('orgids'=>$open));
//获取用户组空间设置数据
$usergroups = DB::fetch_all("select f.*,g.grouptitle from %t f LEFT JOIN %t g ON g.groupid=f.groupid where f.groupid NOT IN ('2','3','4','5','6','7','8') order by groupid DESC", array('usergroup_field', 'usergroup'));
@ -149,17 +90,15 @@ if (!submitcheck('settingsubmit')) {
}elseif($operation == 'permgroup'){
$perms = get_permsarray();//获取所有权限;
$permgroups = C::t('resources_permgroup')->fetch_all();
}elseif ($operation == 'qqlogin') {
$navtitle = lang('register_visit');
} elseif ($operation == 'datetime') {
$navtitle = lang('time_or_date');
$navtitle=lang('permGroupSet').' - '.lang('appname');
}elseif ($operation == 'datetime') {
$navtitle = lang('time_or_date').' - '.lang('appname');
$checktimeformat = array($setting['timeformat'] == 'H:i' ? 24 : 12 => 'checked');
$setting['userdateformat'] = dateformat($setting['userdateformat']);
$setting['dateformat'] = dateformat($setting['dateformat']);
$timezones = lang('setting_timezone');
} elseif ($operation == 'sec') {
$navtitle = lang('verification_code_set');
$navtitle = lang('verification_code_set').' - '.lang('appname');
$seccodecheck = /*$secreturn =*/1;
$sectpl = '<br /><sec>: <sec><sec>';
$checksc = array();
@ -169,32 +108,31 @@ if (!submitcheck('settingsubmit')) {
$seccodestatus[2] = $setting['seccodestatus'] & 2;
$seccodestatus[3] = $setting['seccodestatus'] & 4;
} elseif ($operation == 'desktop') {
$navtitle = lang('desktop_set');
$navtitle = lang('desktop_set').' - '.lang('appname');
} elseif ($operation == 'loginset') {
$navtitle = lang('login_page_set');
$navtitle = lang('login_page_set').' - '.lang('appname');
if ($setting['loginset'] && !is_array($setting['loginset'])) {
$setting['loginset'] = unserialize($setting['loginset']);
}
} elseif ($operation == 'smiley') {
$navtitle = lang('expression_set');
$navtitle = lang('expression_set').' - '.lang('appname');
} elseif ($operation == 'mail') {
$navtitle = lang('mail');
$navtitle = lang('mail').' - '.lang('appname');
$setting['mail'] = dunserialize($setting['mail']);
$passwordmask = $setting['mail']['auth_password'] ? $setting['mail']['auth_password']{0} . '********' . substr($setting['mail']['auth_password'], -2) : '';
$passwordmask = $setting['mail']['auth_password'] ? $setting['mail']['auth_password'][0] . '********' . substr($setting['mail']['auth_password'], -2) : '';
$smtps = array();
foreach ($setting['mail']['smtp'] as $id => $smtp) {
$smtp['authcheck'] = $smtp['auth'] ? 'checked' : '';
$smtp['auth_password'] = $smtp['auth_password'] ? $smtp['auth_password']{0} . '********' . substr($smtp['auth_password'], -2) : '';
$smtp['auth_password'] = $smtp['auth_password'] ? $smtp['auth_password'][0] . '********' . substr($smtp['auth_password'], -2) : '';
$smtps[$id] = $smtp;
}
} elseif ($operation == 'censor') {
$navtitle = lang('words_set');
$navtitle = lang('words_set').' - '.lang('appname');
loadcache('censor');
$badwords = $_G['cache']['censor']['words'];
$replace = empty($_G['cache']['censor']['replace']) ? '*' : $_G['cache']['censor']['replace'];
}
} else {
$settingnew = $_GET['settingnew'];
if ($operation == 'basic') {
$settingnew['bbname'] = $settingnew['sitename'];
@ -235,11 +173,10 @@ if (!submitcheck('settingsubmit')) {
$setting['mail'] = dunserialize($setting['mail']);
$oldsmtp = $settingnew['mail']['mailsend'] == 3 ? $settingnew['mail']['smtp'] : $settingnew['mail']['esmtp'];
$deletesmtp = $settingnew['mail']['mailsend'] != 1 ? ($settingnew['mail']['mailsend'] == 3 ? $settingnew['mail']['smtp']['delete'] : $settingnew['mail']['esmtp']['delete']) : array();
$settingnew['mail']['smtp'] = array();
foreach ($oldsmtp as $id => $value) {
if ((empty($deletesmtp) || !in_array($id, $deletesmtp)) && !empty($value['server']) && !empty($value['port'])) {
$passwordmask = $setting['mail']['smtp'][$id]['auth_password'] ? $setting['mail']['smtp'][$id]['auth_password']{0} . '********' . substr($setting['mail']['smtp'][$id]['auth_password'], -2) : '';
$passwordmask = $setting['mail']['smtp'][$id]['auth_password'] ? $setting['mail']['smtp'][$id]['auth_password'][0] . '********' . substr($setting['mail']['smtp'][$id]['auth_password'], -2) : '';
$value['auth_password'] = $value['auth_password'] == $passwordmask ? $setting['mail']['smtp'][$id]['auth_password'] : $value['auth_password'];
$settingnew['mail']['smtp'][] = $value;
}
@ -257,7 +194,6 @@ if (!submitcheck('settingsubmit')) {
isset($settingnew['reglinkname']) && empty($settingnew['reglinkname']) && $settingnew['reglinkname'] = lang('register_immediately');
$settingnew['pwlength'] = intval($settingnew['pwlength']);
$settingnew['regstatus'] = intval($settingnew['regstatus']);
/*if(in_array('open', $settingnew['regstatus']) && in_array('invite', $settingnew['regstatus'])) {
$settingnew['regstatus'] = 3;
} elseif(in_array('open', $settingnew['regstatus'])) {
@ -281,9 +217,7 @@ if (!submitcheck('settingsubmit')) {
if (empty($settingnew['strongpw'])) {
$settingnew['strongpw'] = array();
}
}elseif($operation == 'space'){//空间设置
//include_once libfile('function/cache');
//$setting = $_GET['setting'];
} elseif($operation == 'space'){//空间设置
$group = $_GET['group'];
foreach ($group as $key => $value) {
C::t('usergroup_field') -> update(intval($key), array('maxspacesize' => intval($value['maxspacesize']), 'maxattachsize' => intval($value['maxattachsize']), 'attachextensions' => trim($value['attachextensions'])));
@ -316,7 +250,7 @@ if (!submitcheck('settingsubmit')) {
}
}*/
}elseif ($operation == 'datetime') {
} elseif ($operation == 'datetime') {
if (isset($settingnew['timeformat'])) {
$settingnew['timeformat'] = $settingnew['timeformat'] == '24' ? 'H:i' : 'h:i A';
}
@ -326,34 +260,28 @@ if (!submitcheck('settingsubmit')) {
} elseif ($operation == 'sec') {
$settingnew['seccodestatus'] = bindec(intval($settingnew['seccodestatus'][3]) . intval($settingnew['seccodestatus'][2]) . intval($settingnew['seccodestatus'][1]));
} elseif ($operation == 'qqlogin') {
if (empty($settingnew['qq_appid']) || empty($settingnew['qq_appkey'])) {
$settingnew['qq_login'] = 0;
}
} elseif ($operation == 'censor') {
$data = array('replace' => trim($_GET['replace']), 'words' => $_GET['badwords']);
savecache('censor', $data);
showmessage('do_success', dreferer());
} elseif ($operation == 'loginset') {
if ($back = trim($settingnew['loginset']['background'])) {
if (strpos($back, '#') === 0) {
$settingnew['loginset']['bcolor'] = $back;
} else {
$arr = explode('.', $back);
$ext = array_pop($arr);
if ($ext && in_array(strtolower($ext), array('jpg', 'jpeg', 'gif', 'png'))) {
$settingnew['loginset']['img'] = $back;
$settingnew['loginset']['bcolor'] = '';
if (strpos($back, '#') === 0) {
$settingnew['loginset']['bcolor'] = $back;
} else {
$settingnew['loginset']['url'] = $back;
$settingnew['loginset']['bcolor'] = '';
$arr = explode('.', $back);
$ext = array_pop($arr);
if ($ext && in_array(strtolower($ext), array('jpg', 'jpeg', 'gif', 'png', 'webp'))) {
$settingnew['loginset']['img'] = $back;
$settingnew['loginset']['bcolor'] = '';
} else {
$settingnew['loginset']['url'] = $back;
$settingnew['loginset']['bcolor'] = '';
}
}
} else {
$settingnew['loginset']['bcolor'] = '';
}
} else {
$settingnew['loginset']['bcolor'] = '';
}
} elseif ($operation == 'qywechat') {
switch($_GET['fbind']) {
case 'bind' :
@ -372,7 +300,6 @@ if (!submitcheck('settingsubmit')) {
break;
}
}
$updatecache = FALSE;
$settings = array();
foreach ($settingnew as $key => $val) {
@ -387,9 +314,11 @@ if (!submitcheck('settingsubmit')) {
}
if ($settings) {
C::t('setting') -> update_batch($settings);
if($settings['template']!=$setting['template']) {
cleartemplatecache();
}
}
if($operation == 'basic'){
if($settingnew['sitelogo'] && $settingnew['sitelogo']!=$setting['sitelogo']){
if($setting['sitelogo']) C::t('attachment')->delete_by_aid($setting['sitelogo']);
C::t('attachment')->addcopy_by_aid($settingnew['sitelogo'],1);

View File

@ -18,11 +18,19 @@ $lang = array
'loginSet'=>'登录设置',
'basicSet'=>'基本设置',
'permGroupSet'=>'权限包设置',
'spaceSet'=>'空间设置',
'sitelogo' =>'平台LOGO',
'default_app'=>'默认首页',
'Login template'=>'登录模板',
'Number of login attempts'=>'尝试登录次数',
'How many logins are allowed before disabling'=>'允许登录多少次后禁止登录',
'Forbidden time'=>'禁止时间',
'How many login failures are allowed before you can log in again'=>'允许登录失败多少后才可再次登录',
'sec'=>'秒',
'Visitor login display'=>'游客登录',
'Independent login page login template; Parameters will be synchronized to login (including administrator login), registration, password retrieval, and home application.'=>'独立登录页登录模板;参数会同步到登录(含管理员登录)、注册、找回密码、首页应用。',
'After the user selects tourist login, it will jump to the home page'=>'用户选择游客登录后会跳转至首页',
'default_app_desc'=>'进入系统后的默认首页',
'please_select_default_index'=>'请选择默认首页'
'please_select_default_index'=>'默认首页'
);

View File

@ -11,8 +11,8 @@ if(!defined('IN_DZZ') || !defined('IN_ADMIN')) {
}
if(!submitcheck('mailchecksubmit')) {
$op = $_GET['op']?$_GET['op']:' ';
$navtitle=lang('email_send_test');
$op = isset($_GET['op']) ? $_GET['op'] : '';
$navtitle=lang('email_send_test').' - '.lang('appname');
include template('mailcheck');
}else{
if(!is_array($_G['setting']['mail'])) {

View File

@ -14,7 +14,7 @@ $navtitle = lang('expression_class').' - '.lang('appname');
$imgextarray = array('jpg', 'gif', 'png');
$operation = trim($_GET['operation']);
$id = intval($_GET['id']);
$op = $_GET['op']?$_GET['op']:' ';
$op = isset($_GET['op']) ? $_GET['op'] : '';
if (!$operation) {
if (!submitcheck('smileysubmit')) {
$dirfilter = $list = array();
@ -92,7 +92,7 @@ if (!$operation) {
$smurl = './static/image/smiley/' . $smtype['directory'];
$smdir = DZZ_ROOT . $smurl;
if (!is_dir($smdir)) {
showmessage(lang('smilies_directory_invalid', array('smurl' => $smurl)), ADMINSCRIPT . '?mod=setting&op=smiley');
showmessage(lang('smilies_directory_invalid', array('smurl' => $smurl)), MOD_URL.'&op=smiley');
}
}
@ -101,9 +101,9 @@ if (!$operation) {
if ($smilies['smilies']) {
addsmilies($id, $smilies['smilies']);
updatecache(array('smilies', 'smileycodes', 'smilies_js'));
showmessage(lang('smilies_update_succeed', array('smurl' => $smurl, 'num' => $smilies['num'], 'typename' => $smtype['name'])), ADMINSCRIPT . '?mod=setting&op=smiley');
showmessage(lang('smilies_update_succeed', array('smurl' => $smurl, 'num' => $smilies['num'], 'typename' => $smtype['name'])), MOD_URL.'&op=smiley');
} else {
showmessage(lang('smilies_update_error', array('smurl' => $smurl)), ADMINSCRIPT . '?mod=setting&op=smiley');
showmessage(lang('smilies_update_error', array('smurl' => $smurl)), MOD_URL.'&op=smiley');
}
} elseif ($operation == 'edit' && $id) {
$smtype = C::t('imagetype') -> fetch($id);
@ -119,7 +119,7 @@ if (!$operation) {
$start_limit = ($page - 1) * $smiliesperpage;
$num = C::t('smiley') -> count_by_type_typeid('smiley', $id);
$multipage = multi($num, $smiliesperpage, $page, ADMINSCRIPT . '?mod=setting&op=smiley&operation=edit&id=' . $id);
$multipage = multi($num, $smiliesperpage, $page, MOD_URL.'&op=smiley&operation=edit&id=' . $id,'pull-right');
$smileynum = 1;
$smilies = '';

View File

@ -0,0 +1,90 @@
<!--{template common/header_ajax}-->
<!--{if $operation == 'editpermgroup'}-->
<form onsubmit="return false;">
<div class="modal-header">
<h4 class="modal-title">{lang edit_folder_permissions}</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<div class="mb-3">
<label for="pername" class="form-label">{lang folder_permission_name}</label>
<input type="text" class="form-control" id="pername" name="pername" value="$groupperm[pername]"/>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang choose_permission}</label>
<div class="col-sm-10">
<!--{loop $perms $k $val}-->
<div class="form-check form-check-inline col-6 col-sm-5">
<input class="form-check-input" type="checkbox" name="perms[]" value="$val[1]" id="inputval$val[1]"<!--{if $groupperm[perm] & $val[1]}--> checked="checked" <!--{/if}-->>
<label class="form-check-label" for="inputval$val[1]"><span class="{$val[2]} view-eidt perm_chk" data-perm="$val[1]"></span><span>$val[0]</span></label>
</div>
<!--{/loop}-->
</div>
</div>
</div>
<div class="modal-footer">
<div class="proper-bottom" style="position: relative;">
<div class="checkbox-custom">
<input type="checkbox" class="form-check-input" name="default" value="1" id="inputdefault" <!--{if $groupperm['default']}-->checked="checked"
<!--{/if}-->>
<label for="inputdefault"><span class="proper-span">{lang set_default_permission_group}</span></label>
</div>
</div>
<input type="hidden" name="id" value="$id"/>
<input type="hidden" name="submit" value="true"/>
<button type="button" class="btn btn-outline-primary" onclick="permedit(this.form)">{lang confirms}</button>
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{lang cancel}</button>
</div>
</form>
<script type="text/javascript" reload="1">
function permedit(form) {
jQuery.post(MOD_URL+'&op=ajax&operation=editpermgroup', $(form).serialize(), function (data) {
if (data['success']) {
var perms = data['success']['perm'];
var permstr = '';
if (data['success']['default'] == 0) {
var defaultstr = '<span class="proper-perm proper-set" onclick="setDefault(this,' + data['success']['id'] + ')"><button type="button" class="btn btn-outline-primary btn-sm"><span class="mdi mdi-check perm-ok"></span>设为默认</button></span> ';
} else {
var defaultstr = '<span class="proper-perm proper-default"><span class="mdi mdi-check perm-ok"></span>默认权限</span>';
}
var permoff = '';
if (data['success']['off']) {
permoff = '<div class="form-check form-switch"><input type="checkbox" onchange="edit_perm(this,' + data['success']['id'] + ')" class="form-check-input" /></div>';
} else {
permoff = '<div class="form-check form-switch"><input type="checkbox" onchange="edit_perm(this,' + data['success']['id'] + ')" class="form-check-input" checked="checked" /></div>';
jQuery('.properties-list').each(function () {
var idval = jQuery(this).attr('id');
idval = idval.replace('perm_', '');
jQuery(this).find('.proper-delhover').html('<span class="proper-perm proper-set" onclick="setDefault(this,' + idval + ')"><button type="button" class="btn btn-outline-primary btn-sm"><span class="mdi mdi-check perm-ok"></span>设为默认</button></span>')
})
}
for (var o in perms) {
permstr += '<li class="nav-item"><span class="'+perms[o]+'" ></span></li>';
}
var html ='<tr class="properties-list lead" id="perm_'+data['success']['id']+'"> ' +
'<td>' +
'<img src="dzz/images/extimg/folder.png"><h6 class="d-inline-flex">'+data['success']['pername']+'</h6></td>'+
'<td><ul class="nav nav-pills text-primary">' +permstr+'</ul></td>' +
'<td>' +
'<div class="form-check form-switch"><input type="checkbox" onchange="edit_perm(this,'+data['success']['id']+')" class="form-check-input" checked="checked"/></div>' +
'</td>' +
'<td>' +
'<span class="mdi mdi-pencil lead dcolor" onclick="editpermgroup('+data['success']['id']+')" style="cursor:pointer;"></span> ' +
'<span class="mdi mdi-delete lead dcolor" onclick="delete_perm(this,'+data['success']['id']+')"></span>'+defaultstr+' ' +
'</td>' +
'</tr>';
jQuery('#perm_' + data['success']['id']).replaceWith(html);
var elem = jQuery('#perm_' + data['success']['id']).find('.js-switch');
hideWindow('editpermgroup');
showmessage('权限组编辑成功','success','3000',1);
} else {
showDialog(data['error']);
}
}, 'json');
}
</script>
<!--{/if}-->
<!--{template common/footer_ajax}-->

View File

@ -0,0 +1,23 @@
<ul class="nav-drawer nav-stacked nav-pills">
<li class="nav-item">
<a class="nav-link <!--{if $operation=='basic' || $operation=='datetime' || $operation=='upload' || $operation=='at'}-->active<!--{/if}-->" href="{MOD_URL}&operation=basic"><i class="mdi mdi-card-text-outline"></i><span>{lang basicSet}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $operation=='access' || $operation=='sec' || $operation=='loginset'}-->active<!--{/if}-->" href="{MOD_URL}&operation=access"><i class="mdi mdi-login"></i><span>{lang loginSet}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $operation=='space'}-->active<!--{/if}-->" href="{MOD_URL}&operation=space"><i class="mdi mdi-view-week"></i><span>{lang spaceSet}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $operation=='mail' || $op=='mailcheck' }-->active<!--{/if}-->" href="{MOD_URL}&operation=mail"><i class="mdi mdi-email"></i><span>{lang mail}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $operation=='smiley' || $op=='smiley' }-->active<!--{/if}-->" href="{MOD_URL}&operation=smiley"><i class="mdi mdi-sticker-emoji"></i><span>{lang expression_manage}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $operation=='permgroup'}-->active<!--{/if}-->" href="{MOD_URL}&operation=permgroup"><i class="mdi mdi-account-supervisor"></i><span>{lang permGroupSet}</span></a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $operation=='censor' }-->active<!--{/if}-->" href="{MOD_URL}&operation=censor"><i class="mdi mdi-percent"></i><span>{lang words_management}</span></a>
</li>
</ul>

View File

@ -0,0 +1,40 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&operation=mail">{lang set}</a> </li>
<li class="nav-item"> <a class="nav-link active" href="{MOD_URL}&op=mailcheck">{lang setting_mail_check}</a> </li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body container">
<form id="cpform" action="{MOD_URL}&op=mailcheck" class="form-horizontal" autocomplete="off" method="post" name="cpform" target="mailcheckiframe">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="mailchecksubmit">
<div class="row mb-3">
<label class="col-sm-2" for="sitename">{lang setting_mail_check_test_from}</label>
<div class="col-sm-10">
<input class="form-control" type="text" id="sitename" required nname="test_from" autocomplete="off" value="">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="metakeywords">{lang setting_mail_check_test_to}</label>
<div class="col-sm-10">
<textarea type="textarea" class="form-control" id="metakeywords" name="test_to" autocomplete="off"></textarea>
<span class="form-text">{lang setting_mail_check_test_to_comment}</span>
</div>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" id="submit_mailchecksubmit" name="mailchecksubmit" value="{lang setting_mail_check_submit}" type="submit">
<iframe style="display: none" name="mailcheckiframe"> </iframe>
</dl>
</form>
</div>
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,223 @@
<link rel="stylesheet" href="{MOD_PATH}/images/lsetting.css?{VERHASH}">
<link rel="stylesheet" href="static/dzzicon/icon.css?{VERHASH}">
<style type="text/css">
.view-eidt{
padding-right: 5px;
color: #3779ff;
}
.perm-ok{
padding-right: 5px;
}
.proper-bottom{
position: relative;
display: inline-block;
padding-right: 20px;
}
.proper-set{
display: none;
}
.properties-list:hover .proper-set{
display:inline-block;
}
.proper-delhover{
display: inline-block;
}
</style>
<div class="middle-center-content">
<!--地址栏结束-->
<div class="new-button">
<button type="button" class="btn btn-primary btn-round" data-bs-toggle="modal" id="myModalLabel" data-bs-target="#myjurisdic" aria-expanded="false"> {lang new_permissions} </button>
<div class="modal fade" id="myjurisdic" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
<div class="modal-content">
<form action="{MOD_URL}&op=permgroup&do=addpermgroup" method="post" onsubmit="return permchk(this);">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">{lang add_folder_permission_group}</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="mb-3">
<label for="newpername" class="form-label">{lang folder_permissions}{lang name}</label>
<input type="text" class="form-control" id="newpername" name="pername" value=""/>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang choose_permission}</label>
<div class="col-sm-10">
<!--{loop $perms $k $val}-->
<div class="form-check form-check-inline col-6 col-sm-5">
<input class="form-check-input" type="checkbox" name="perms[]" id="$val[2]" value="$val[1]">
<label class="form-check-label" for="$val[2]"><span class="{$val[2]} view-eidt perm_chk" data-perm="$val[1]"></span><span>$val[0]</span></label>
</div>
<!--{/loop}-->
</div>
</div>
</div>
<div class="modal-footer">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="default" value="1" id="inputfore">
<label class="form-check-label" for="inputfore">{lang set_default_permission_group}</label>
</div>
<button type="submit" class="btn btn-outline-primary bodyloading">{lang confirms}</button>
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">{lang cancel} </button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th>{lang name}</th>
<th style="min-width: 120px;">{lang jurisdiction}</th>
<th>启用</th>
<th width="180px">{lang operation}</th>
</tr>
</thead>
<tbody class="properties-con">
<!--{loop $permgroups $v}-->
<tr class="properties-list lead" id="perm_$v[id]">
<td>
<img src="dzz/images/extimg/folder.png">
<h6 class="d-inline-flex">$v[pername]<!--{if $v['system']}--><span class="badge bg-primary ms-2">{lang system_default}</span><!--{/if}--></h6>
</td>
<td>
<ul class="nav nav-pills text-primary">
<!--{loop $perms $k $val}-->
<li class="nav-item" <!--{if $val[1]&$v[perm]}-->style="display:block"<!--{else}--> style="display:none"<!--{/if}-->><span class="{$val[2]}"></span>
</li>
<!--{/loop}-->
</ul>
</td>
<td>
<div class="form-check form-switch">
<input type="checkbox" onchange="edit_perm(this,'$v[id]')" class="form-check-input" <!--{if !$v[off]}-->checked="checked" <!--{/if}--> />
</div>
</td>
<td>
<!--{if !$v['system']}-->
<span class="mdi mdi-pencil lead dcolor" onclick="editpermgroup('$v[id]')" style="cursor:pointer;"></span>
<span class="mdi mdi-delete lead dcolor" onclick="delete_perm(this,'$v[id]')"></span>
<!--{/if}-->
<div class="proper-delhover">
<!--{if $v[default]}-->
<span class="proper-perm proper-default"><button type="button" class="btn btn-primary btn-sm" disabled=""><span class="mdi mdi-check perm-ok"></span>{lang default_permission}</button></span>
<!--{else}-->
<span class="proper-perm proper-set" onclick="setDefault(this,'$v[id]')"><button type="button" class="btn btn-outline-primary btn-sm"><span class="mdi mdi-check perm-ok"></span>{lang set_default}</button></span>
<!--{/if}-->
</div>
</td>
</tr>
<!--{/loop}-->
</tbody>
</table>
</div>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang folder_property_group_permission}</strong>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<ul class="list-inline fs-6">
<!--{loop $perms $k $val}-->
<li class="col-sm-2 list-inline-item"><span class="text-primary {$val[2]}"></span>$val[0]</li>
<!--{/loop}-->
</ul>
</div>
<script type="text/javascript">
function permchk(form) {
jQuery.post(form.action, jQuery(form).serialize(), function (data) {
if (data['success']) {
var perms = data['success']['perm'];
var permstr = '';
if (data['success']['default'] == 0) {
var defaultstr = '<span class="proper-perm proper-set" onclick="setDefault(this,'+data['success']['id']+')"><button type="button" class="btn btn-outline-primary btn-sm"><span class="mdi mdi-check perm-ok"></span>{lang set_default}</button></span>';
} else {
var defaultstr = '<span class="proper-perm proper-default"><button type="button" class="btn btn-primary"><span class="mdi mdi-check perm-ok"></span>{lang default_permission}</button></span>';
jQuery('.properties-list').each(function(){
var idval = jQuery(this).attr('id');
idval = idval.replace('perm_','');
jQuery(this).find('.proper-delhover').html('<span class="proper-perm proper-set" onclick="setDefault(this,'+idval+')"><button type="button" class="btn btn-outline-primary btn-sm"><span class="mdi mdi-check perm-ok"></span>{lang set_default}</button></span>')
})
}
for(var o in perms){
permstr += '<li class="nav-item"><span class="'+perms[o]+'" ></span></li>';
}
var html ='<tr class="properties-list lead" id="perm_'+data['success']['id']+'"> ' +
'<td>' +
'<img src="dzz/images/extimg/folder.png"><h6 class="d-inline-flex">' + data['success']['pername'] + '</h6></td>'+
'<td><ul class="nav nav-pills text-primary">' +permstr+'</ul></td>' +
'<td>' +
'<div class="form-check form-switch"><input type="checkbox" onchange="edit_perm(this,'+data['success']['id']+')" class="form-check-input" checked="checked"/></div>' +
'</td>' +
'<td>' +
'<span class="mdi mdi-pencil lead dcolor" onclick="editpermgroup('+data['success']['id']+')" style="cursor:pointer;"></span> ' +
'<span class="mdi mdi-delete lead dcolor" onclick="delete_perm(this,'+data['success']['id']+')"></span><div class="proper-delhover">'+defaultstr+'</div>' +
'</td>' +
'</tr>';
var elem = jQuery(html).appendTo('.properties-con').find('.js-switch');
jQuery('#myjurisdic').modal('hide');
showmessage('添加成功','success','3000',1);
return false;
} else {
showDialog(data['error']);
return false;
}
}, 'json');
return false;
}
function edit_perm(obj, pid) {
if (jQuery(obj).prop('checked')) {
var off = 0;
} else var off = 1;
jQuery.post(MOD_URL+'&op=permgroup&do=editpermgroup_off', {'off': off, id: pid}, function (data) {
if (data['success']==true) {
if (off == 0) {
jQuery(obj).attr('checked', true);
showmessage('{lang permission_group_open_succeeded}','success','3000',1);
}else {
jQuery(obj).attr('checked', false);
showmessage('{lang permission_group_close_succeeded}','success','3000',1);
}
} else {
showmessage('操作失败,请刷新重试','error','3000',1);
}
}, 'json')
}
function setDefault(obj, pid) {
jQuery.post(MOD_URL+'&op=permgroup&do=setdefault', {'id': pid}, function (data) {
if (data['success']) {
jQuery('.properties-list').each(function () {
var id = jQuery(this).attr('id').replace('perm_', '');
if (id != pid) {
jQuery(this).find('.proper-delhover').html('<span class="proper-perm proper-set" onclick="setDefault(this,' + id + ')"><button type="button" class="btn btn-outline-primary btn-sm"><span class="mdi mdi-check perm-ok"></span>{lang set_default}</button></span>');
}
})
jQuery(obj).replaceWith('<span class="proper-perm proper-default"><button type="button" class="btn btn-primary btn-sm" disabled=""><span class="mdi mdi-check perm-ok"></span>{lang default_permission}</button></span>');
showmessage('{lang set_default_permission_succeeded}','success','3000',1);
} else {
showmessage('设置失败,请刷新重试','error','3000',1);
}
}, 'json');
}
function delete_perm(obj, pid) {
var msg ='{lang delete_permission_group_sure}';
if(msg){
showDialog( msg, 'confirm','', function(){
jQuery.post(MOD_URL+'&op=permgroup&do=deleteperm', {'id': pid}, function (data) {
if (data['success']) {
jQuery(obj).parents('.properties-list').remove();
showmessage('权限组删除成功','success','3000',1);
} else {
showmessage('删除失败,请刷新重试','error','3000',1);
}
}, 'json')
});
}
return false;
}
function editpermgroup(pid) {
showWindow('editpermgroup', MOD_URL+'&op=ajax&operation=editpermgroup&id=' + pid);
}
</script>

View File

@ -0,0 +1,80 @@
<!--{template lyear:header_simple_start}-->
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link" href="{MOD_URL}&operation=smiley">{lang expression_set}</a> </li>
<li class="nav-item"><a class="nav-link active" href="{MOD_URL}&op=smiley">{lang expression_class}</a> </li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form id="appform" name="appform" action="{MOD_URL}&op=smiley" method="post">
<input type="hidden" name="smileysubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<th width="50">&nbsp;</th>
<th>{lang sort}</th>
<th>{lang enable}</th>
<th>{lang classify}</th>
<th>{lang catalogue}</th>
<th>{lang number}</th>
<th></th>
</thead>
<!--{loop $list $value}-->
<tr>
<td align="center"><label><input type="checkbox" class="form-check-input" name="delete[]" value="$value[typeid]" <!--{if $value[smiliesnum]}-->disabled<!--{/if}--> /></label></td>
<td><input type="text" class="form-control" name="displayordernew[{$value[typeid]}]" value="$value[displayorder]" style="width:45px;" /></td>
<td><label><input type="checkbox" class="form-check-input" name="availablenew[{$value[typeid]}]" value="1" <!--{if $value[available]}-->checked<!--{/if}--> /></label></td>
<td><input type="text" class="form-control " name="namenew[{$value[typeid]}]" value="$value[name]" /></td>
<td>./static/image/smiley/{$value[directory]}</td>
<td>$value[smiliesnum] <input type="hidden" name="smiliesnum[{$value[typeid]}]" value="$value[smiliesnum]" /></td>
<td><a href="{MOD_URL}&op=smiley&operation=update&id=$value[typeid]" class="btn btn-outline-primary btn-sm" onclick="return confirm('{lang seeting_smiley_search}')">{lang update}</a>&nbsp;&nbsp; <a href="{MOD_URL}&op=smiley&operation=edit&id=$value[typeid]" class="btn btn-outline-success btn-sm">{lang detailedness}</a></td>
</tr>
<!--{/loop}-->
<!--{if $list_no}-->
<!--{loop $list_no $key $value1}-->
<tr>
<td align="center">{lang add_new}</td>
<td><input type="text" class="form-control " style="width:45px" name="newdisplayorder[{$key}]" value="$value1[displayorder]" /></td>
<td><label><input type="checkbox" class="form-check-input" name="newavailable[{$key}]" value="1" <!--{if $value1[available]}-->checked<!--{/if}-->></label></td>
<td><input type="text" class="form-control " name="newname[{$key}]" value="" /></td>
<td>./static/image/smiley/{$value1[entry]}
<input type="hidden" name="newdirectory[{$key}]" value="$value1[entry]"></td>
<td>$value1[smnums]
<input type="hidden" name="smnums[{$key}]" value="$value1[smnums]" /></td>
<td>$value1[smilies]</td>
</tr>
<!--{/loop}-->
<!--{else}-->
<tr>
<td align="center">{lang add_new}</td>
<td colspan="15"><span class="form-text">{lang seeting_add_new}</span></td>
</tr>
<!--{/if}-->
<thead>
<th colspan="15" valign="middle" style="border:none"><label for="chkall" class="checkbox-inline">
<input type="checkbox" class="form-check-input" name="chkall" id="chkall" onclick="checkAll('prefix', this.form, 'delete')">
&nbsp;{lang del}</label>
&nbsp;&nbsp;
<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang submit}" />
</th>
</thead>
</table>
</div>
</form>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>{lang board_message}</strong> {lang seeting_smiley_board_message_state}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div>
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,108 @@
<!--{template lyear:header_simple_start}-->
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}&operation=smiley">{lang expression_set}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{MOD_URL}&op=smiley">{lang expression_class}</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{MOD_URL}&operation=$operation&op=smiley&id=$id">{lang detailedness} - $smtype[name]</a>
</li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<form id="appform" name="appform" class="form-horizontal" action="{MOD_URL}&op=smiley&operation=edit" method="post">
<input type="hidden" name="editsubmit" value="true" />
<input type="hidden" name="id" value="$id" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<th width="30">&nbsp;</th>
<th>{lang sort}</th>
<th>{lang photo}</th>
<th>{lang expression}ID</th>
<th>{lang expression_code}</th>
<th>{lang expression_describing}</th>
<th>{lang filename}</th>
</thead>
<!--{loop $list $key $value}-->
<tr>
<td align="center">
<input type="checkbox" class="form-check-input" name="delete[]" value="$value[id]" />
</td>
<td><input type="text" class="form-control" style="width:45px;" name="displayorder[{$value[id]}]" value="$value[displayorder]" style="width:20px;" /></td>
<td><img src="$smurl/$value[url]" border="0" onload="if(this.height>30) {this.resized=true; this.height=30;}" onmouseover="if(this.resized) this.style.cursor='pointer';" onclick="if(!this.resized) {return false;} else {window.open(this.src);}"></td>
<td>$value[id]</td>
<td><input type="text" class="form-control" name="code[{$value[id]}]" id="code_{$key}" value="$value[code]" smileyid="$value[id]" /></td>
<td><input type="text" class="form-control" name="title[{$value[id]}]" id="title_{$key}" value="$value[title]" /></td>
<td>$value[url]<input type="hidden" value="$value[url]" id="url_{$key}" /></td>
</tr>
<!--{/loop}-->
<tr>
<td></td>
<td colspan="8" style="">
{lang batch_code_set_expression}
<input type="text" class="form-control" style="display: inline-block;margin-right:0;width:40px;height:30px;padding:2px 4px" value="{:" title="{lang prefix}" id="prefix" onclick="clearinput(this, '{lang prefix}')"> +
<select id="middle" class="form-control" style="display: inline-block;width:100px;height:30px;padding:2px 4px">
<option value="1">{lang filename}</option>
<option value="2">{lang natural_order}</option>
<option value="3">{lang expression} ID</option>
<option value="4">{lang expression_describing}</option>
</select>
+
<input type="text" class="form-control" style="display: inline-block;margin-right:0;width:40px;height:30px;padding:2px 4px" value=":}" title="{lang suffix}" id="suffix" onclick="clearinput(this, '{lang suffix}')">
<input type="button" class="btn btn-outline-info" onclick="addsmileycodes('{$smileynum}', '');" value="{lang type_app}"> &nbsp;&nbsp; <input type="button" class="btn btn-outline-info" onclick="autoaddsmileycodes('{$smileynum}');" value="{lang automatic_set}">
</td>
</tr>
<thead>
<th colspan="15" valign="middle" style="border:none"><label for="chkall" class="checkbox-inline"><input type="checkbox" class="form-check-input" name="chkall" id="chkall" onclick="checkAll('prefix', this.form, 'delete')">&nbsp;{lang del}</label>&nbsp;&nbsp;<input type="submit" class="btn btn-primary btn-round bodyloading" value="{lang submit}" /></th>
</thead>
</table>
</div>
</form>
</div>
</div>
</div>
</main>
<script type="text/JavaScript">
function addsmileycodes(smiliesnum, pre) {
smiliesnum = parseInt(smiliesnum);
if(smiliesnum > 1) {
for(var i = 1; i < smiliesnum; i++) {
var prefix=trim($(pre + 'prefix').value);
var suffix=trim($(pre + 'suffix').value);
var page=parseInt( '$page');
var middle=$(pre + 'middle').value==1 ? $(pre + 'url_' + i).value.substr(0,$(pre + 'url_' + i).value.lastIndexOf( '.')) : ($(pre + 'middle').value==2 ? i + page * 10 : ($(pre + 'middle').value==3 ? $(pre + 'code_'+ i).attributes[ 'smileyid'].nodeValue:$(pre + 'title_'+ i).value));
if(!prefix || prefix=='{lang prefix}' || !suffix || suffix=='{lang suffix}' ) {
alert( '{lang seeting_smileyedit_prefix}');
return;
}
suffix=! suffix || suffix=='{lang suffix}' ? '' : suffix; $(pre + 'code_' + i).value=prefix + middle + suffix;
}
}
}
function autoaddsmileycodes(smiliesnum) {
smiliesnum=parseInt(smiliesnum);
if(smiliesnum > 1) {
for(var i = 1; i < smiliesnum; i++) {
$( 'code_' + i).value='{:' + '$id' + '_' + $( 'code_'+ i).attributes[ 'smileyid'].nodeValue + ':}';
}
}
}
function clearinput(obj, defaultval) {
if(obj.value==defaultval) {
obj.value='' ;
}
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -324,6 +324,24 @@
<!--{/if}-->>{lang no}</label>
<span class="help-block"> {lang setting_main_leave}</span>
</dl>-->
<dl>
<dt>模板切换:</dt>
<dd class="clearfix">
<label class="radio-inline"> <input type="radio" name="settingnew[template]" value="" <!--{if !$setting[template]}-->checked<!--{/if}-->>默认模板</label>
<label class="radio-inline"> <input type="radio" name="settingnew[template]" value="lyear" <!--{if $setting[template] == 'lyear'}-->checked<!--{/if}-->>光年模板</label>
<span class="help-block">只对当前页面具有多套模板的情况下生效</span>
</dd>
</dl>
<dl>
<dt>升级提醒:</dt>
<dd class="clearfix">
<label class="radio-inline"> <input type="radio" name="settingnew[upgradetis]" value="0" <!--{if !$setting[upgradetis]}-->checked<!--{/if}-->>全部开启</label>
<label class="radio-inline"> <input type="radio" name="settingnew[upgradetis]" value="1" <!--{if $setting[upgradetis] == '1'}-->checked<!--{/if}-->>关闭系统</label>
<label class="radio-inline"> <input type="radio" name="settingnew[upgradetis]" value="2" <!--{if $setting[upgradetis] == '2'}-->checked<!--{/if}-->>关闭插件</label>
<label class="radio-inline"> <input type="radio" name="settingnew[upgradetis]" value="3" <!--{if $setting[upgradetis] == '3'}-->checked<!--{/if}-->>全部关闭</label>
<span class="help-block">关闭系统升级提醒后,只能前往系统工具中进行手动检测升级。关闭插件升级提醒后,只能前往应用市场进行手动检测升级。</span>
</dd>
</dl>
<dl>
<dt>{lang close_terrace}:</dt>
<dd class="clearfix">
@ -340,8 +358,7 @@
</dl>
</dd>
<dd>
<input class="btn btn-primary" id="submit_editsubmit" name="settingsubmit"
value="{lang save_changes}" type="submit">
<input class="btn btn-primary" id="submit_editsubmit" name="settingsubmit" value="{lang save_changes}" type="submit">
</dd>
</dl>
</form>
@ -594,17 +611,13 @@
<dl>
<dt>登录:</dt>
<dd class="clearfix"> <a class="loginset-template" href="admin/setting/images/template1.jpg" target="_blank">
<div class="loginset-template-icon<!--{if $setting[loginset][template] == 1}--> loginset-template-icon1<!--{/if}-->"
data-template="1"> <span class="glyphicon glyphicon-ok"></span> </div>
<div class="loginset-template-icon<!--{if $setting[loginset][template] == 1}--> loginset-template-icon1<!--{/if}-->" data-template="1"> <span class="glyphicon glyphicon-ok"></span> </div>
<img style="width: 100%;" src="admin/setting/images/template1.jpg" alt=""/> </a> <a class="loginset-template" href="admin/setting/images/template2.jpg" target="_blank">
<div class="loginset-template-icon<!--{if $setting[loginset][template] == 2}--> loginset-template-icon1<!--{/if}-->"
data-template="2"> <span class="glyphicon glyphicon-ok"></span> </div>
<div class="loginset-template-icon<!--{if $setting[loginset][template] == 2}--> loginset-template-icon1<!--{/if}-->" data-template="2"> <span class="glyphicon glyphicon-ok"></span> </div>
<img style="width: 100%;" src="admin/setting/images/template2.jpg" alt=""/> </a> <a class="loginset-template" href="admin/setting/images/template3.jpg" target="_blank">
<div class="loginset-template-icon<!--{if $setting[loginset][template] == 3}--> loginset-template-icon1<!--{/if}-->"
data-template="3"> <span class="glyphicon glyphicon-ok"></span> </div>
<div class="loginset-template-icon<!--{if $setting[loginset][template] == 3}--> loginset-template-icon1<!--{/if}-->" data-template="3"> <span class="glyphicon glyphicon-ok"></span> </div>
<img style="width: 100%;" src="admin/setting/images/template3.jpg" alt=""/> </a>
<input type="hidden" class="form-control loginset-template-input"
name="settingnew[loginset][template]" value="$setting[loginset][template]"/>
<input type="hidden" class="form-control loginset-template-input" name="settingnew[loginset][template]" value="$setting[loginset][template]"/>
</dd>
<dd class="clearfix"><span class="help-block">独立登录页登录模版。</span></dd>
</dl>

View File

@ -12,8 +12,8 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
//error_reporting(E_ALL);
include_once libfile('function/organization');
$navtitle = lang('data_synchronization');
$do = $_GET['do'];
$op = $_GET['op']?$_GET['op']:' ';
$do = isset($_GET['do']) ? $_GET['do'] : '';
$op = isset($_GET['op']) ? $_GET['op'] : '';
if (submitcheck('synsubmit')) {
}

View File

@ -12,8 +12,8 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
require_once libfile('function/user', '', 'user');
include_once libfile('function/organization');
$navtitle = lang('data_synchronization');
$do = $_GET['do'];
$op = $_GET['op']?$_GET['op']:' ';
$do = isset($_GET['do']) ? $_GET['do'] : '';
$op = isset($_GET['op']) ? $_GET['op'] : '';
if (submitcheck('synsubmit')) {
}

View File

@ -1,78 +0,0 @@
<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx(zyx@dzz.cc)
*/
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
define('DZZSCRIPT', 'index.php');
//$sharestatus = array('-4' => lang('been_blocked'), '-3' => lang('file_been_deleted'), '-2' => lang('degree_exhaust'), '-1' => lang('logs_invite_status_4'), '0' => lang('founder_upgrade_normal'));
$sharestatus = array('-5'=>lang('sharefile_isdeleted_or_positionchange'),'-4' => lang('been_blocked'), '-3' => lang('file_been_deleted'), '-2' => lang('degree_exhaust'), '-1' => lang('logs_invite_status_4'), '0' => lang('founder_upgrade_normal'));
$typearr = array('folder' => lang('catalogue'), 'image' => lang('photo'), 'document' => lang('type_attach'), 'dzzdoc' => 'Dzz'.lang('type_attach'), 'video' => lang('type_video'), 'attach' => lang('attachment'), 'link' => lang('type_link'), 'url' => lang('other'));
$type = trim($_GET['type']);
$keyword = trim($_GET['keyword']);
$username = trim($_GET['username']);
$asc = isset($_GET['asc']) ? intval($_GET['asc']) : 1;
$uid = intval($_GET['uid']);
$order = in_array($_GET['order'], array('title', 'dateline', 'type', 'size', 'count')) ? trim($_GET['order']) : 'dateline';
$page = empty($_GET['page']) ? 1 : intval($_GET['page']);
$perpage = 20;
$start = ($page - 1) * $perpage;
$gets = array('mod' => 'share', 'type' => $type, 'keyword' => $keyword, 'order' => $order, 'asc' => $asc, 'uid' => $uid, 'username' => $username);
$theurl = BASESCRIPT . "?" . url_implode($gets);
$orderby = " order by $order " . ($asc ? 'DESC' : '');
$sql = "1";
$param = array('shares');
if ($type) {
$sql .= " and type=%s";
$param[] = $type;
$navtitle=$typearr[$type].' - '.lang('appname');
}else{
$navtitle= lang('appname');
}
if ($keyword) {
$sql .= " and title LIKE %s";
$param[] = '%' . $keyword . '%';
}
if ($username) {
$sql .= " and username=%s";
$param[] = $username;
}
if ($uid) {
$sql .= " and uid=%d";
$param[] = $uid;
}
$list = array();
if ($count = DB::result_first("SELECT COUNT(*) FROM %t WHERE $sql", $param)) {
$list = DB::fetch_all("SELECT * FROM %t WHERE $sql $orderby limit $start,$perpage", $param);
foreach ($list as $k=> $value) {
$value['sharelink'] = C::t('shorturl')->getShortUrl(getglobal('siteurl').'index.php?mod=shares&sid='.dzzencode($value['id']));
if ($value['dateline'])
$value['fdateline'] = dgmdate($value['dateline']);
if ($value['password'])
$value['password'] = dzzdecode($value['password']);
if ($value['endtime'])
$value['fendtime'] = dgmdate($value['endtime'], 'Y-m-d');
$value['fsize'] = formatsize($value['size']);
$value['ftype'] = getFileTypeName($value['type'], $value['ext']);
if ($value['type'] == 'folder')
$value['img'] = 'dzz/images/extimg/folder.png';
if ($value['img'])
$value['img'] = str_replace('dzz/images/extimg/', 'dzz/images/extimg_small/', $value['img']);
if ($value['type'] == 'image' && $value['status'] == -3)
$value['img'] = '';
$value['fstatus'] = $sharestatus[$value['status']];
if (is_file($_G['setting']['attachdir'] . './qrcode/' . $value['sid'][0] . '/' . $value['sid'] . '.png'))
$value['qrcode'] = $_G['setting']['attachurl'] . './qrcode/' . $value['sid'][0] . '/' . $value['sid'] . '.png';
$value['shareurl'] = $_G['siteurl'] . 's.php?sid=' . $value['sid'];
$list[$k] = $value;
}
$multi = multi($count, $perpage, $page, $theurl, 'pull-right');
}
include template('share');
?>

View File

@ -1,6 +0,0 @@
<?php
$lang = array (
'appname'=>'分享管理'
);
?>

View File

@ -12,8 +12,8 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
include_once libfile('function/cache');
//error_reporting(E_ALL);
$op = $_GET['op'];
$navtitle = lang('cron') . ' - ' . lang('admin_navtitle');
$op = isset($_GET['op']) ? $_GET['op'] : '';
$navtitle = lang('cron') . ' - ' . lang('appname');
if (empty($_GET['edit']) && empty($_GET['run'])) {
if (!submitcheck('cronssubmit')) {
@ -31,7 +31,7 @@ if (empty($_GET['edit']) && empty($_GET['run'])) {
} else {
$cron['time'] = lang('per_hour');
}
$cron['time'] .= $cron['hour'] >= 0 && $cron['hour'] < 24 ? sprintf('%02d', $cron[hour]) . lang('timeliness') : '';
$cron['time'] .= $cron['hour'] >= 0 && $cron['hour'] < 24 ? sprintf('%02d', $cron['hour']) . lang('timeliness') : '';
if (!in_array($cron['minute'], array(-1, ''))) {
foreach ($cron['minute'] = explode("\t", $cron['minute']) as $k => $v) {
$cron['minute'][$k] = sprintf('%02d', $v);
@ -85,7 +85,7 @@ if (empty($_GET['edit']) && empty($_GET['run'])) {
updatecache('setting');
$msg = lang('crons_succeed');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-success';
$msg_type = 'success';
}
} else {
@ -95,7 +95,7 @@ if (empty($_GET['edit']) && empty($_GET['run'])) {
if (!$cron) {
$msg = lang('cron_not_found');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-error';
$msg_type = 'danger';
include template('cron');
exit();
}
@ -107,7 +107,7 @@ if (empty($_GET['edit']) && empty($_GET['run'])) {
if (!submitcheck('editsubmit')) {
$navtitle = lang('misc_cron_edit') . ' - ' . lang('admin_navtitle');
$navtitle = lang('misc_cron_edit') . ' - ' . lang('appname');
$weekdayselect = $dayselect = $hourselect = '';
@ -158,7 +158,7 @@ if (empty($_GET['edit']) && empty($_GET['run'])) {
$msg = lang('crons_time_invalid');
}
if (!empty($msg)) {
$msg_type = 'text-error';
$msg_type = 'danger';
$redirecturl = dreferer();
include template('cron');
exit();
@ -169,7 +169,7 @@ if (empty($_GET['edit']) && empty($_GET['run'])) {
dzz_cron::run($cronid);
$msg = lang('crons_succeed');
$msg_type = 'text-success';
$msg_type = 'success';
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
}
@ -186,13 +186,13 @@ if (empty($_GET['edit']) && empty($_GET['run'])) {
if (!file_exists($cronfile)) {
$msg = lang('crons_run_invalid', array('cronfile' => $cronfile));
$msg_type = 'text-error';
$msg_type = 'danger';
} else {
dzz_cron::run($cron['cronid']);
$msg = lang('crons_run_succeed');
$redirecturl = BASESCRIPT . '?mod=system&op=cron';
$msg_type = 'text-success';
$msg_type = 'success';
}
}
}

View File

@ -27,10 +27,10 @@ if (!is_dir('./data/' . $backupdir)) {
mkdir('./data/' . $backupdir, 0777);
}
$operation = $_GET['operation'] ? $_GET['operation'] : 'export';
$op = $_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
if ($operation == 'export') {
$navtitle = lang('database_export') . ' - ' . lang('admin_navtitle');
$navtitle = lang('database_export') . ' - ' . lang('appname');
if (!submitcheck('exportsubmit', 1)) {
$shelldisabled = function_exists('shell_exec') ? '' : 'disabled';
@ -153,13 +153,13 @@ if ($operation == 'export') {
unset($sqldump, $zip, $content);
$redirecturl = BASESCRIPT . "?mod=system&op=database&operation=export&type=" . rawurlencode($_GET['type']) . "&saveto=server&filename=" . rawurlencode($_GET['filename']) . "&method=multivol&sizelimit=" . rawurlencode($_GET['sizelimit']) . "&volume=" . rawurlencode($volume) . "&tableid=" . rawurlencode($tableid) . "&startfrom=" . rawurlencode($startrow) . "&extendins=" . rawurlencode($_GET['extendins']) . "&sqlcharset=" . rawurlencode($_GET['sqlcharset']) . "&sqlcompat=" . rawurlencode($_GET['sqlcompat']) . "&exportsubmit=yes&usehex={$_GET['usehex']}&usezip={$_GET['usezip']}";
$msg = lang('database_export_multivol_redirect', array('volume' => $volume));
$msg_type = 'text-success';
$msg_type = 'success';
}
} else {
$msg = '';
$volume--;
$filelist = '<ul>';
$filelist = '<ol class="list-group list-group-numbered">';
if ($_GET['usezip'] == 1) {
$zip = new zipfile();
@ -172,7 +172,7 @@ if ($operation == 'export') {
fclose($fp);
$zip -> addFile($content, basename($filename));
$unlinks[] = $filename;
$filelist .= "<li><a href=\"$filename\">$filename</a></li>\n";
$filelist .= "<li class=\"list-group-item\"><a href=\"$filename\">$filename</a></li>\n";
}
$fp = fopen($zipfilename, 'w');
if (@fwrite($fp, $zip -> file()) !== FALSE) {
@ -182,7 +182,7 @@ if ($operation == 'export') {
} else {
C::t('cache') -> insert(array('cachekey' => 'db_export', 'cachevalue' => serialize(array('dateline' => $_G['timestamp'])), 'dateline' => $_G['timestamp'], ), false, true);
$msg .= lang('database_export_multivol_succeed', array('volume' => $volume, 'filelist' => $filelist));
$msg_type = 'text-success';
$msg_type = 'success';
}
unset($sqldump, $zip, $content);
fclose($fp);
@ -190,16 +190,16 @@ if ($operation == 'export') {
$filename = $zipfilename;
C::t('cache') -> insert(array('cachekey' => 'db_export', 'cachevalue' => serialize(array('dateline' => $_G['timestamp'])), 'dateline' => $_G['timestamp'], ), false, true);
$msg .= lang('database_export_zip_succeed', array('filename' => $filename));
$msg_type = 'text-success';
$msg_type = 'success';
} else {
@touch('./data/' . $backupdir . '/index.htm');
for ($i = 1; $i <= $volume; $i++) {
$filename = sprintf($_GET['usezip'] == 2 ? $backupfilename . "-%s" . '.zip' : $dumpfile, $i);
$filelist .= "<li><a href=\"$filename\">$filename</a></li>\n";
$filelist .= "<li class=\"list-group-item\"><a href=\"$filename\">$filename</a></li>\n";
}
C::t('cache') -> insert(array('cachekey' => 'db_export', 'cachevalue' => serialize(array('dateline' => $_G['timestamp'])), 'dateline' => $_G['timestamp'], ), false, true);
$msg .= lang('database_export_multivol_succeed', array('volume' => $volume, 'filelist' => $filelist));
$msg_type = 'text-success';
$msg_type = 'success';
}
}
@ -247,7 +247,7 @@ if ($operation == 'export') {
unset($sqldump, $zip, $content);
C::t('cache') -> insert(array('cachekey' => 'db_export', 'cachevalue' => serialize(array('dateline' => $_G['timestamp'])), 'dateline' => $_G['timestamp'], ), false, true);
$msg = lang('database_export_zip_succeed', array('filename' => $filename));
$msg_type = 'text-success';
$msg_type = 'success';
} else {
if (@is_writeable($dumpfile)) {
$fp = fopen($dumpfile, 'rb+');
@ -258,12 +258,12 @@ if ($operation == 'export') {
$filename = $backupfilename . '.sql';
C::t('cache') -> insert(array('cachekey' => 'db_export', 'cachevalue' => serialize(array('dateline' => $_G['timestamp'])), 'dateline' => $_G['timestamp'], ), false, true);
$msg = lang('database_export_succeed', array('filename' => $filename));
$msg_type = 'text-success';
$msg_type = 'success';
}
} else {
$msg = lang('database_shell_fail');
$msg_type = 'text-error';
$msg_type = 'danger';
}
@ -274,10 +274,10 @@ if ($operation == 'export') {
} elseif ($operation == 'import') {
$msg = '';
$navtitle = lang('db_recover') . ' - ' . lang('admin_navtitle');
$navtitle = lang('db_recover') . ' - ' . lang('appname');
if (($re = checkpermission('dbimport')) !== true) {
$msg = $re;
$msg_type = 'text-error';
$msg_type = 'danger';
include template('database');
exit();
}
@ -306,7 +306,7 @@ if ($operation == 'export') {
$dir -> close();
} else {
$msg = lang('database_export_dest_invalid');
$msg_type = 'text-error';
$msg_type = 'danger';
include template('database');
exit();
}
@ -365,22 +365,22 @@ if ($operation == 'export') {
}
}
$msg = lang('database_file_delete_succeed');
$msg_type = 'text-success';
$msg_type = 'success';
$redirecturl = dreferer();
} else {
$msg = lang('database_file_delete_invalid');
$msg_type = 'text-error';
$msg_type = 'danger';
$redirecturl = dreferer();
}
}
include template('database');
} elseif ($operation == 'runquery') {
$navtitle = lang('nav_db_runquery') . ' - ' . lang('admin_navtitle');
$navtitle = lang('nav_db_runquery') . ' - ' . lang('appname');
$checkperm = checkpermission('runquery', 0);
if ($checkperm !== true) {
$msg = $checkperm;
$msg_type = 'text-error';
$msg_type = 'danger';
include template('database');
exit();
}
@ -406,11 +406,11 @@ if ($operation == 'export') {
}
if ($sqlerror) {
$msg = lang('database_run_query_invalid', array('sqlerror' => $sqlerror));
$msg_type = 'text-error';
$msg_type = 'danger';
$redirecturl = dreferer();
} else {
$msg = lang('database_run_query_succeed', array('affected_rows' => $affected_rows));
$msg_type = 'text-success';
$msg_type = 'success';
$redirecturl = dreferer();
}
}

View File

@ -11,13 +11,7 @@ if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
}
include_once libfile('function/admin');
$oparr = array('updatecache', 'database','cron', 'log','fileperms');
$leftmenu = array();
$op = $_GET['op'];
foreach ($oparr as $key => $value) {
$leftmenu[$value] = array('title' => lang($value), 'active' => '');
if ($value == $op)
$leftmenu[$value]['active'] = 'class="nav-link active"';
}
$op = isset($_GET['op']) ? $_GET['op'] : '';
$navtitle = lang('fileperms') . ' - ' . lang('appname');
$step = max(1, intval($_GET['step']));
if ($step == 1) {
@ -51,13 +45,13 @@ if ($step == 1) {
continue;
} else {
if(!dir_writeable($fullentry)) {
$result .= '<li class="list-group-item list-group-item-danger">'.(is_dir($fullentry) ? lang('dir') : lang('file')).'./'.$entry.'<span class="badge bg-danger rounded-pill">无法写入</span></li>';
$result .= '<li class="list-group-item text-danger d-flex justify-content-between align-items-start"><div class="ms-2 me-auto"><div class="fw-bold">'.(is_dir($fullentry) ? lang('dir') : lang('file')).'./'.$entry.'</div></div><span class="badge bg-danger rounded-pill">无法写入</span></li>';
}
}
}
$result .= '<li class="list-group-item list-group-item-success">文件及目录属性全部正确<span class="badge bg-primary rounded-pill">都能写入</span></li>';
$result .= '<li class="list-group-item d-flex justify-content-between align-items-start"><div class="ms-2 me-auto"><div class="fw-bold">文件及目录属性全部正确</div></div><span class="badge bg-primary rounded-pill">都能写入</span></li>';
} catch (Exception $e) {
$result .= "<li class=\"list-group-item list-group-item-danger\">发生错误:".$e->getMessage()."</li>";
$result .= "<li class=\"list-group-item text-danger\">发生错误:".$e->getMessage()."</li>";
}
}
include template('fileperms');

View File

@ -9,7 +9,6 @@
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$operation = $_GET['operation'] ? $_GET['operation'] : 'updatecache';
$url=getglobal('siteurl'). BASESCRIPT . '?mod=system&op=' . $operation;
$url = outputurl($url);

View File

@ -2,7 +2,7 @@
$lang = array (
'appname'=>'系统工具',
'systemupgrade'=>'在线升级',
'xtxx'=>'系统概览',
'xtxx'=>'扩展信息',
'fileperms'=>'文件权限检查',
);
?>

View File

@ -9,14 +9,14 @@
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$navtitle = lang('upgrade') . ' - ' . lang('admin_navtitle');
$navtitle = lang('upgrade') . ' - ' . lang('appname');
@set_time_limit(0);
include_once DZZ_ROOT . './core/core_version.php';
include_once libfile('function/admin');
include_once libfile('function/cache');
$dzz_upgrade = new dzz_upgrade();
$step = intval($_GET['step']);
$op = $_GET['op'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
$step = $step ? $step : 1;
$operation = $_GET['operation'] ? trim($_GET['operation']) : 'check';
@ -422,8 +422,8 @@ elseif ($operation == 'showupgrade') {
$list[$type]['btn1'] = lang('founder_upgrade_require_config') . ' php v' . PHP_VERSION . 'MYSQL v' . $dbversion;
} else {
$list[$type]['title'] = 'DzzOffice' . $upgrade['latestversion'] . '_' . $locale . '_' . $charset;
$list[$type]['btn1'] = '<input type="button" class="btn btn-success" onclick="confirm(\'' . lang('founder_upgrade_backup_remind') . '\') ? window.location.href=\'' . $linkurl . '\' : \'\';" value="' . lang('founder_upgrade_automatically') . '">';
$list[$type]['official'] = '<a class="btn btn-link" href="' . $upgrade['official'] . '" target="_blank">' . lang('founder_upgrade_manually') . '</a>';
$list[$type]['btn1'] = '<input type="button" class="btn btn-primary" onclick="confirm(\'' . lang('founder_upgrade_backup_remind') . '\') ? window.location.href=\'' . $linkurl . '\' : \'\';" value="' . lang('founder_upgrade_automatically') . '">';
$list[$type]['official'] = '<a class="btn btn-success" href="' . $upgrade['official'] . '" target="_blank">' . lang('founder_upgrade_manually') . '</a>';
}
}
} else {

View File

@ -0,0 +1,175 @@
<!--{template lyear:header_simple_start}-->
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<!--{if $_GET['edit'] || $_GET['run']}-->
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a hidefocus="true" class="nav-link <!--{if empty($_GET[ 'edit']) && empty($_GET[ 'run'])}-->active<!--{/if}-->" href="{MOD_URL}&op=cron">{lang cron}</a>
</li>
<!--{if !empty($_GET['edit'])}-->
<li class="nav-item">
<a hidefocus="true" class="nav-link active" href="{MOD_URL}&op=cron&edit=$_GET[edit]">{lang misc_cron_edit}</a>
</li>
<!--{/if}-->
<!--{if !empty($_GET['run'])}-->
<li class="nav-item">
<a hidefocus="true" class="nav-link active" href="{MOD_URL}&op=cron&run=$_GET[run]">{lang misc_cron_operation}</a>
</li>
<!--{/if}-->
</ul>
</div>
</div>
<!--{/if}-->
<div class="card">
<div class="card-body">
<!--{if $msg}-->
<div class="alert alert-{$msg_type}" role="alert">
$msg
</div>
<!--{if $redirecturl}-->
<dl class="mb-3 d-grid">
<a href="{$redirecturl}" class="btn btn-primary">{lang message_redirect}</a>
</dl>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
<!--{else}-->
<!--{if $_GET['edit']>0}-->
<div class="alert alert-warning">
<h5>{lang board_message}</h5>
<ul class="form-text">
{lang misc_cron_edit_tips}
</ul>
</div>
<form id="cpform" action="{MOD_URL}&op=cron&edit=$cronid" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="editsubmit">
<div class="row mb-3">
<label class="col-sm-2">{lang weekly}</label>
<div class="col-sm-10">
<select name="weekdaynew" class="form-control">
<option value="-1" selected="selected">*</option>
$weekdayselect
</select>
<span class="form-text">{lang misc_cron_edit_weekday_comment}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang everyday}</label>
<div class="col-sm-10">
<select name="daynew" class="form-control">
<option value="-1" selected="selected">*</option>
$dayselect
</select>
<span class="form-text">{lang misc_cron_edit_day_comment}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang hour}</label>
<div class="col-sm-10">
<select name="hournew" class="form-control">
<option value="-1" selected="selected">*</option>
$hourselect
</select>
<span class="form-text">{lang misc_cron_edit_hour_comment}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang minute}</label>
<div class="col-sm-10">
<input name="minutenew" value="{eval echo implode(',',$cron['minute'])}" type="text" class="form-control">
<span class="form-text">{lang misc_cron_edit_minute_comment}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang misc_cron_edit_filename}</label>
<div class="col-sm-10">
<input name="filenamenew" value="$cron[filename]" type="text" class="form-control">
<span class="form-text">{lang misc_cron_edit_filename_comment}</span>
</div>
</div>
<dl class="mb-3 d-grid">
<button type="submit" class="btn btn-primary btn-round bodyloading" name="exportsubmit" value="true">{lang blank_submit}</button>
</dl>
</form>
<!--{elseif $_GET['run']}-->
<!--{else}-->
<div class="alert alert-warning">
<h5>{lang board_message}</h5>
<ul class="form-text">
{lang misc_cron_tips}
</ul>
</div>
<form id="cpform" action="{MOD_URL}&op=cron" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="cronssubmit">
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<th width="45"></th>
<th style="min-width: 120px">{lang name}</th>
<th>{lang available}</th>
<th>{lang type}</th>
<th style="min-width: 120px">{lang time}</th>
<th style="min-width: 120px">{lang misc_cron_last_run}</th>
<th style="min-width: 120px">{lang misc_cron_next_run}</th>
<th style="min-width: 140px">{lang operation}</th>
</thead>
<!--{loop $crons $cron}-->
<tr>
<td align="right"><input type="checkbox" class="form-check-input" name="delete[]" value="$cron[cronid]" <!--{if $cron[type]=='system' }-->disabled
<!--{/if}-->></td>
<td>
<input type="text" name="namenew[{$cron[cronid]}]" class="form-control" value="$cron[name]">
<strong>$cron[filename]</strong>
</td>
<td><label class="checkbox-inline"><input type="checkbox" class="form-check-input" name="availablenew[{$cron[cronid]}]" value="1" <!--{if $cron[available]>0}-->checked="checked"<!--{/if}-->></label></td>
<td>
<!--{if $cron['type'] == 'system'}-->
{lang inbuilt}
<!--{elseif $cron['type'] == 'user'}-->
{lang custom}
<!--{/if}-->
</td>
<td>$cron[time]</td>
<td>$cron[lastrun]</td>
<td>$cron[nextrun]</td>
<td>
<a class="btn btn-outline-primary" href="{MOD_URL}&op=cron&edit=$cron[cronid]">{lang edit}</a>
<!--{if $cron['run']}-->
<a class="btn btn-outline-success" href="{MOD_URL}&op=cron&run=$cron[cronid]">{lang execute}</a>
<!--{else}-->
<a class="btn btn-outline-success disabled" href="javascript:;" class="text-muted" role="button" aria-disabled="true">{lang execute}</a>
<!--{/if}-->
</td>
</tr>
<!--{/loop}-->
<tr>
<td>{lang add_new}</td>
<td colspan="10"><input type="text" name="newname" value="" class="form-control"></td>
</tr>
</table>
</div>
<div class="col-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="chkall" id="chkallspKI" onclick="checkAll('prefix', this.form, 'delete')">
<label class="form-check-label" for="chkallspKI">{lang del}</label>
</div>
</div>
<dl class="mb-3 d-grid">
<button type="submit" class="btn btn-primary btn-round bodyloading" name="exportsubmit" value="true">{lang blank_submit}</button>
</dl>
</form>
<!--{/if}-->
<!--{/if}-->
</div>
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,252 @@
<!--{template lyear:header_simple_start}-->
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link <!--{if $operation=='export' }-->active<!--{/if}-->" hidefocus="true" href="{MOD_URL}&op=database&operation=export">{lang export}</a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $operation=='import' }-->active<!--{/if}-->" hidefocus="true" href="{MOD_URL}&op=database&operation=import">{lang nav_db_import}</a>
</li>
<li class="nav-item">
<a class="nav-link <!--{if $operation=='runquery' }-->active<!--{/if}-->" hidefocus="true" href="{MOD_URL}&op=database&operation=runquery">{lang nav_db_runquery}</a>
</li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<!--{if $operation=='export'}-->
<div class="alert alert-warning">
<h5>{lang board_message}</h5>
<ul class="form-text">
{lang db_export_tips}
</ul>
</div>
<!--{if !$submit}-->
<form id="cpform" action="{MOD_URL}&op=database&operation=export&setup=1" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="exportsubmit">
<div class="row mb-3">
<label class="col-sm-2">{lang db_export_type}</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="type1" name="type" value="dzz" checked="" onclick="document.getElementById('showtables').style.display = 'none';">{lang all_data_table}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="type2" name="type" value="custom" onclick="document.getElementById('showtables').style.display = '';">{lang db_export_custom}</label>
</div>
</div>
<div id="showtables" style="display:none;">
<div class="form-check">
<input class="form-check-input" type="checkbox" class="form-check-input" name="chkall" onclick="checkAll('prefix', this.form, 'customtables', 'chkall', true)" checked="checked" type="checkbox" id="chkalltables">
<label class="form-check-label" for="chkalltables">{lang check_all_data_table}</label>
</div>
<div class="border-example">
<!--{loop $dztables $value}-->
<div class="form-check form-check-inline col-6 col-sm-4">
<input class="form-check-input" type="checkbox" class="form-check-input" name="customtables[]" value="$value" id="$value" checked="checked">
<label class="form-check-label" for="$value">$value</label>
</div>
<!--{/loop}-->
</div>
</div>
<div id="advanceoption" style="display:none">
<div class="row mb-3">
<label class="col-sm-2">{lang db_export_method}</label>
<div class="col-sm-10">
<label class="radio radio-inline">
<input type="radio" class="form-check-input" name="method" value="shell" onclick="if('0') {if(this.form.sqlcompat[2].checked==true) this.form.sqlcompat[0].checked=true; this.form.sqlcompat[2].disabled=true; this.form.sizelimit.disabled=true;} else {this.form.sqlcharset[0].checked=true; for(var i=1; i&lt;=5; i++) {if(this.form.sqlcharset[i]) this.form.sqlcharset[i].disabled=true;}}" id="method_shell">{lang db_export_shell}</label>
<label class="radio radio-inline">
<input type="radio" class="form-check-input" name="method" value="multivol" checked="checked" onclick="this.form.sqlcompat[2].disabled=false; this.form.sizelimit.disabled=false; for(var i=1; i<=5; i++) {if(this.form.sqlcharset[i]) this.form.sqlcharset[i].disabled=false;}" id="method_multivol">{lang db_export_multivol}</label>
<input type="text" class="form-control" style="width:50px;" name="sizelimit" value="2048">
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang db_export_options_extended_insert}</label>
<div class="col-sm-10">
<label class="radio radio-inline">
<input type="radio" class="form-check-input" name="extendins" value="1">{lang yes}</label><label class="radio radio-inline"><input type="radio" class="form-check-input" name="extendins" value="0" checked="checked">{lang no}</label></div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang db_export_options_sql_compatible}</label>
<div class="col-sm-10"><label class="radio radio-inline"><input type="radio" class="form-check-input" name="sqlcompat" value="" checked="">{lang default}</label><label class="radio radio-inline"><input type="radio" class="form-check-input" name="sqlcompat" value="MYSQL40"> MySQL 3.23/4.0.x</label><label class="radio radio-inline"><input type="radio" class="form-check-input" name="sqlcompat" value="MYSQL41" disabled=""> MySQL 4.1.x/5.x</label></div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang db_export_options_charset}</label>
<div class="col-sm-10"><label class="radio radio-inline"><input type="radio" class="form-check-input" name="sqlcharset" value="">{lang db_export_options_charset}</label>
<label class="radio radio-inline"><input type="radio" class="form-check-input" name="sqlcharset" value="utf8"> UTF8</label></div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang db_export_usehex}</label>
<div class="col-sm-10"><label class="radio radio-inline"><input type="radio" class="form-check-input" name="usehex" value="1" checked="checked">{lang yes}</label>
<label class="radio radio-inline"><input type="radio" class="form-check-input" name="usehex" value="0" >{lang no}</label></div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang db_export_usezip}</label>
<div class="col-sm-10"><label class="radio radio-inline"><input type="radio" class="form-check-input" name="usezip" value="1">{lang db_export_zip_1}</label><label class="radio radio-inline"><input type="radio" class="form-check-input" name="usezip" value="2">{lang db_export_zip_2}</label><label class="radio radio-inline"><input type="radio" class="form-check-input" name="usezip" value="0" checked>{lang db_export_zip_3}</label></div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang db_export_filename}</label>
<div class="col-sm-10"><input type="text" class="form-control" class="form-check-input" name="filename" value="$defaultfilename"></div>
</div>
</div>
<dl class="mb-3 d-grid">
<button type="submit" class="btn btn-primary btn-round bodyloading" name="exportsubmit" value="true" >{lang blank_submit}</button>
<div class="form-check">
<input type="checkbox" class="form-check-input" value="1" onclick="document.getElementById('advanceoption').style.display = document.getElementById('advanceoption').style.display == 'none' ? '' : 'none'; this.value = this.value == 1 ? 0 : 1; this.checked = this.value == 1 ? false : true" id="btn_more">
<label class="form-check-label" for="btn_more">{lang more_options}</label>
</div>
</dl>
</form>
<!--{else}-->
<!--{if $msg}-->
<div class="alert alert-{$msg_type}" role="alert">
$msg
</div>
<!--{/if}-->
<!--{if $redirecturl}-->
<dl class="mb-3 d-grid">
<a href="{$redirecturl}" class="btn btn-primary">{lang message_redirect}</a>
</dl>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
<!--{/if}-->
<!--{elseif $operation=='import'}-->
<!--{if $msg}-->
<div class="alert alert-{$msg_type}" role="alert">
$msg
</div>
<!--{if $redirecturl}-->
<dl class="mb-3 d-grid">
<a href="{$redirecturl}" class="btn btn-primary">{lang message_redirect}</a>
</dl>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
<!--{else}-->
<div class="alert alert-warning">
<h5>{lang board_message}</h5>
<ul class="form-text">
{lang db_import_tips}
</ul>
</div>
$do_import_option
<form id="cpform" action="{MOD_URL}&op=database&operation=import" class="form-horizontal" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="deletesubmit">
<div class="table-responsive">
<table class="table table-hover align-middle" style="border-top:1px solid #DDD">
<thead>
<th></th>
<th>{lang filename}</th>
<th>{lang version}</th>
<th>{lang time}</th>
<th>{lang type}</th>
<th>{lang big_small}</th>
<th>{lang db_method}</th>
<th>{lang db_volume}</th>
<th></th>
</thead>
<!--{loop $list $key $val}-->
<tr>
<td><input type="checkbox" class="form-check-input" name="delete[]" value="$key"></td>
<td>
<!--{if $val['list']}-->
<a href="javascript:;" onclick="jQuery('#exportlog_{$key}').toggle()">$key</a>
<!--{else}-->
<a href="$val[filename]">$key</a>
<!--{/if}-->
</td>
<td>$val[version]</td>
<td>$val['dateline']</td>
<td>$val[ftype]</td>
<td>$val[size]</td>
<td>$val[method]</td>
<td>$val[volume]</td>
<td>
<!--{if $val['list']}-->
<a href="{$datasiteurl}restore.php?operation=import&from=server&datafile_server=$val[datafile_server]&importsubmit=yes" class="btn btn-outline-primary" <!--{if $info[ 'version'] !=$_G[ 'setting'][ 'version']}--> onclick="return confirm('{lang db_import_confirm}');"<!--{else}-->onclick="return confirm('{lang db_import_confirm_sql}');"<!--{/if}-->target="_blank">{lang import}</a>
<!--{else}-->
<a href="{$datasiteurl}restore.php?operation=importzip&datafile_server=$info[datafile_server]&importsubmit=yes" class="btn btn-outline-primary" onclick="return confirm('{lang db_import_confirm_zip}');" target="_blank">{lang db_import_unzip}</a>
<!--{/if}-->
</td>
</tr>
<thead id="exportlog_{$key}" style="display:none;">
<!--{loop $val[list] $key1 $val1}-->
<tr>
<td></td>
<td>
<a href="$val1[filename]">$val1[filename]</a>
</td>
<td>$val1[version]</td>
<td>$val1['dateline']</td>
<td></td>
<td>$val1[size]</td>
<td></td>
<td>$val1[volume]</td>
<td></td>
</tr>
<!--{/loop}-->
</thead>
<!--{/loop}-->
</table>
</div>
<div class="col-12">
<div class="form-check">
<input type="checkbox" class="form-check-input" name="chkall" id="chkallspKI" onclick="checkAll('prefix', this.form, 'delete')">
<label class="form-check-label" for="chkallspKI">{lang del}</label>
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary btn-round bodyloading" name="exportsubmit" value="true" >{lang blank_submit}</button>
</div>
</form>
<!--{/if}-->
<!--{elseif $operation=='runquery'}-->
<div class="alert alert-warning">
<h5>{lang board_message}</h5>
<ul class="form-text">
{lang db_runquery_tips}
</ul>
</div>
<!--{if $msg}-->
<div class="alert alert-{$msg_type}" role="alert">
$msg
</div>
<!--{if $redirecturl}-->
<dl class="mb-3 d-grid">
<a href="{$redirecturl}" class="btn btn-primary">{lang message_redirect}</a>
</dl>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 5000);</script>
<!--{/if}-->
<!--{else}-->
<form id="cpform" action="{MOD_URL}&op=database&operation=runquery" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="true" name="sqlsubmit">
<div class="mb-3">
<label for="queries" class="form-label">{lang db_runquery_sql}</label>
<textarea cols="85" rows="10" name="queries" id="queries" class="form-control"></textarea>
</div>
<div class="col-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="createcompatible" name="createcompatible" value="1" checked="checked">
<label class="form-check-label" for="createcompatible">
{lang db_runquery_createcompatible}
</label>
</div>
</div>
<dl class="mb-3 d-grid">
<div class="col-sm-10"><button type="submit" class="btn btn-primary btn-round bodyloading">{lang blank_submit}</button></div>
</dl>
</form>
<!--{/if}-->
<!--{/if}-->
</div>
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,48 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<!--{if $step==1}-->
<form method="post" class="form-horizontal" action="{MOD_URL}&op=fileperms&step=2">
<input name="formhash" value="{VERHASH}" type="hidden">
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">主要检查文件及文件夹的写入权限,点击下面按钮开始进行检查</label>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary btn-round bodyloading" name="confirmed" value="确定" type="submit">
</dl>
</form>
<!--{elseif $step==2}-->
<div class="text-center m-2">
<h2 class="text-success ml20">正在进行文件权限检查,请稍候......</h2>
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<dl class="mb-3 d-grid"><a href="{MOD_URL}&op=fileperms&step=3" class="btn btn-primary">{lang message_redirect}</a></dl>
<script type="text/javascript">
jQuery('.progress-bar').animate({ width: '100%' }, 2000, function() {
window.location.href = '{MOD_URL}&op=fileperms&step=3';
});
</script>
<!--{elseif $step==3}-->
<!--{if $result}-->
<div class="alert alert-warning d-flex align-items-center" role="alert">
<i class="dzz dzz-error me-2 fs-5"></i>
<div>
如果某个文件或目录被检查到“无法写入”(以红色列出),请即刻通过 FTP 或其他工具修改其属性(例如设置为 777),以确保站点功能的正常使用。
</div>
</div>
<ol class="list-group list-group-numbered">
$result
</ol>
<!--{else}-->
<!--{/if}-->
<!--{/if}-->
</div>
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,8 @@
<!--{eval
$oparr = array('updatecache' => 'mdi-cog-counterclockwise','database' => 'mdi-database', 'cron' => 'mdi-clipboard-clock-outline','systemupgrade' => 'mdi-upload','xtxx' => 'mdi-cog-pause-outline','fileperms' => 'mdi-floppy');
}-->
<ul class="nav-drawer nav-stacked nav-pills">
<!--{loop $oparr $key $value}-->
<li class="nav-item"><a class="nav-link <!--{if $op==$key}-->active<!--{/if}-->" href="{MOD_URL}&op=$key"><i class="mdi $value"></i><span><!--{eval echo lang($key)}--></span></a></li>
<!--{/loop}-->
</ul>

View File

@ -0,0 +1,75 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<ul class="nav nav-step">
<li class="nav-item <!--{if $step==2 || $step==3}-->complete<!--{/if}-->">
<span>1.{lang nav_updatecache_confirm}</span>
<a class="nav-link <!--{if $step==1}-->active<!--{/if}-->" data-toggle="tab"></a>
</li>
<li class="nav-item <!--{if $step==3}-->complete<!--{/if}-->">
<span>2.{lang nav_updatecache_verify}</span>
<a class="nav-link <!--{if $step==2}-->active<!--{/if}-->" data-toggle="tab"></a>
</li>
<li class="nav-item">
<span>3.{lang nav_updatecache_completed}</span>
<a class="nav-link <!--{if $step==3}-->active<!--{/if}-->" data-toggle="tab"></a>
</li>
</ul>
</div>
</div>
<div class="card">
<div class="card-body">
<!--{if $step==1}-->
<form method="post" class="form-horizontal" action="{MOD_URL}&op=updatecache&step=2">
<input name="formhash" value="{VERHASH}" type="hidden">
<div class="m-2">
<div class="form-check form-check-inline">
<input name="type[]" value="data" checked class="form-check-input" type="checkbox">
<label class="form-check-label" for="inlineRadio3">{lang tools_updatecache_data}</label>
</div>
<div class="form-check form-check-inline">
<input name="type[]" value="tpl" id="tplcache" checked class="form-check-input" type="checkbox">
<label class="form-check-label" for="inlineRadio3">{lang tools_updatecache_tpl}</label>
</div>
</div>
<dl class="mb-3 d-grid">
<input class="btn btn-primary" name="confirmed" value="{lang confirms}" type="submit">
</dl>
</form>
<!--{elseif $step==2}-->
<div class="text-center m-2">
<h2 class="text-success ml20">{lang tools_updatecache_waiting}</h2>
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<dl class="mb-3 d-grid">
<a href="{MOD_URL}&op=updatecache&step=3&type=data_tpl" class="btn btn-primary">{lang message_redirect}</a>
</dl>
<script type="text/javascript">
jQuery('.progress-bar').animate({ width: '100%' }, 2000, function() {
window.location.href = '{MOD_URL}&op=updatecache&step=3&type=data_tpl';
});
</script>
<!--{elseif $step==3}-->
<h2 class="text-primary ml20 text-center">{lang update_cache_succeed}</h2>
<script type="text/javascript">
window.setTimeout(function() { location.href = '{MOD_URL}&op=updatecache'; }, 5000);
</script>
<!--{/if}-->
<div class="alert alert-warning">
<h5>{lang board_message}</h5>
<ul class="form-text">
{lang tools_updatecache_tips}
</ul>
</div>
</div>
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,234 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<!--{if $operation == 'patch' || $operation == 'cross'}-->
<header class="card-header">
<div class="card-title"><strong>{lang upgrade}</strong></div>
<!--{loop $steplang $key $value}-->
<!--{if $key>0 && $key<=5}-->
<span <!--{if $key==$step}-->style="color:green"<!--{/if}-->>{$key}.{$value}</span>
<!--{/if}-->
<!--{/loop}-->
</header>
<!--{/if}-->
<!--{if $operation=='check'}-->
<!--{if $msg}-->
<div class="card-body">
<div id="step4">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
</div>
<!--{else}-->
<div class="card-body">
<div class="text-center m-2">
<h2 class="text-success ml20">{lang upgrade_checking}</h2>
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
<script type="text/javascript">
jQuery('.progress-bar').animate({ width: '100%' }, 3000, function() {
window.location.href = '{MOD_URL}&op=systemupgrade&operation=check&checking=1';
});
</script>
<!--{/if}-->
<!--{elseif $operation=='showupgrade'}-->
<!--{if $msg}-->
<div class="card-body">
<div id="step4">
<div class="alert alert-warning">
$msg
</div>
</div>
</div>
<!--{else}-->
<div class="card-header">
<div class="card-title">{lang founder_upgrade_select_version}</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover align-middle">
<!--{loop $list $value}-->
<tr>
<td>$value[title]</td>
<td>$value[btn1]</td>
<!--{if $value[official]}-->
<td>$value[official]</td>
<!--{/if}-->
</tr>
<!--{/loop}-->
</table>
</div>
</div>
<!--{/if}-->
<!--{elseif $operation=='patch' || $operation=='cross' }-->
<!--{if !$_G['setting']['bbclosed']}-->
<div class="card-body">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
<!--{elseif $step==1}-->
<div class="card-header">
<div class="card-title">{lang founder_upgrade_preupdatelist}</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover align-middle">
<!--{loop $updatefilelist $value}-->
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-file"></i> $value</td>
</tr>
<!--{/loop}-->
<thead>
<th colspan="5">&nbsp;{lang founder_upgrade_store_directory} ./data/update/dzzoffice$version</th>
</thead>
<thead>
<th colspan="5">&nbsp;<input type="button" class="btn btn-primary" onclick="window.location.href='$linkurl'" value="{lang founder_upgrade_download}">{eval echo upgradeinformation(0)}</th>
</thead>
</table>
</div>
</div>
<!--{elseif $step==2}-->
<div class="card-body">
<div>$msg</div>
</div>
<!--{elseif $step==3}-->
<!--{if $msg}-->
<div class="card-body">
<div id="step4">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
</div>
<!--{else}-->
<div class="card-header">
<div class="card-title">{lang founder_upgrade_diff_show}</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover align-middle">
<!--{loop $updatefilelist $v}-->
<!--{if isset($ignorelist[$v])}-->
<!--{elseif isset($modifylist[$v])}-->
<tr>
<td class="text-danger">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_diff} &nbsp;<i class="glyphicon glyphicon-exclamation-sign"></i> $v</td>
</tr>
<!--{elseif isset($showlist[$v])}-->
<tr>
<td class="text-success">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_normal} &nbsp;<i class="mdi mdi-check-bold"></i> $v</td>
</tr>
<!--{elseif isset($newlist[$v])}-->
<tr>
<td class="text-info">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_new} &nbsp;<i class="glyphicon glyphicon-plus"></i> $v</td>
</tr>
<!--{/if}-->
<!--{/loop}-->
<thead>
<th colspan="5">{lang founder_upgrade_download_file} ./data/update/dzzoffice{$version}</th>
</thead>
<thead>
<th colspan="5">&nbsp;{lang founder_upgrade_backup_file} ./data/back/dzzoffice{CORE_VERSION} {lang founder_upgrade_backup_file2} </th>
</thead>
<thead>
<th colspan="5">&nbsp;<input type="button" class="btn btn-primary" onclick="window.location.href='{$linkurl}';" value="<!--{if !empty($modifylist)}-->{lang founder_upgrade_force}<!--{else}-->{lang founder_upgrade_regular}<!--{/if}-->" /> {eval echo upgradeinformation(0)}</th>
</thead>
</table>
</div>
</div>
<!--{/if}-->
<!--{elseif $step==4}-->
<!--{if $msg}-->
<div class="card-body">
<div id="step4">
<div class="alert alert-warning text-center">
$msg
</div>
</div>
</div>
<!--{elseif $_GET['siteftpsetting']}-->
<div class="card-body">
<form name="aliform" class="form-horizontal" action="$action" method="post" style="padding:20px;">
<input type="hidden" name="formhash" value="{FORMHASH}">
<p style="padding-left:20px;font-weight:bold;font-size:16px;padding-bottom:20px;">{lang upgrade_website_FTP_set}</p>
<div class="form-group">
<label>FTP {lang server_address}</label>
<input type="text" class="form-control required" name="siteftp[host]" value="" placeholder="{lang host_IP_address}">
<span class="form-text">{lang FTP_server_IP_site_domain}</span>
</div>
<div class="form-group">
<label>FTP {lang server_port}</label>
<input type="text" class="form-control required" name="siteftp[port]" value="21" placeholder="{lang port}">
<span class="form-text">{lang default_for_the_21st}</span>
</div>
<div class="form-group">
<label>FTP {lang account}</label>
<input type="text" class="form-control required" name="siteftp[username]" value="" placeholder="{lang FTP_account_user_name}">
<span class="form-text">{lang accounts_supreme_authority}</span>
</div>
<div class="form-group">
<label>FTP {lang password}</label>
<input type="password" class="form-control required" name="siteftp[password]" value="" placeholder="{lang FTP_account_user_password}">
</div>
<!--<div class="form-group">
<label>编码</label>
<select class="form-control" name="siteftp[charset]">
<option value="GBK" selected="selected">GBK</option>
<option value="UTF-8">UTF-8</option>
<option value="BIG5">BIG5</option>
</select>
<span class="form-text">根据FTP服务器的编码设置不一致会导致乱码</span>
</div>-->
<div class="form-group">
<label>{lang sitepath}</label>
<input type="text" class="form-control required" name="siteftp[attachdir]" value="">
<span class="form-text">{lang site_absolute_path_root_directory}</span>
</div>
<div class="form-group">
<label></label>
<label class="checkbox-inline" style="width:180px;"><input type="checkbox" class="form-check-input" name="siteftp[pasv]" value="1">{lang use_Passive_Mode}</label>
<span class="form-text">{lang general_condition_passive_mode}</span>
</div>
<div class="form-group">
<label></label>
<label class="checkbox-inline" style="width:180px;"><input type="checkbox" class="form-check-input" name="siteftp[ssl]" value="1">{lang enable_secure_link}</label>
<span class="form-text">{lang notice_FTP_open_SSL}</span>
</div>
<div class="form-group">
<label></label>
<input type="submit" class="btn btn-primary btn-round bodyloading" style="padding:6px 25px" value="{lang confirms}">
</div>
</form>
</div>
<!--{/if}-->
<!--{elseif $step==5}-->
<div class="card-body">
<div style="padding:20px;">
<div class="alert alert-success text-center">
$msg
</div>
</div>
</div>
<!--{/if}-->
<!--{/if}-->
</div>
</div>
</main>
<script type="text/javascript">
function createIframe(src) {
document.getElementById('step4').innerHTML = '<iframe marginheight="0" marginwidth="0" allowtransparency="true" frameborder="0" src="' + src + '" style="width:100%;height:100%;"></iframe>';
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="static/bootstrap/css/bootstrap.min.css">
<link href="static/css/common.css" rel="stylesheet" media="all">
<style>
body {
overflow: hidden;
}
</style>
</head>
<body>
<div class="alert alert-warning text-center">
$msg
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!--{template lyear:header_simple_start}-->
<!--{template lyear:header_simple_end}-->
<style>
.list-group-item.active {
color: #fff;
background: #0d6efd;
}
th {
text-align:center;
color: #76a9ff;
line-height: 34px;
padding: 3px 5px;
}
tr {
text-align:center;
}
.ext span:first-child{
display: inline-block;
width: 55%;
}
.label{
padding: 2px;
margin: 2px;
}
</style>
<main class="bs-main-container">
<div class="container-fluid">
<div class="card">
<div class="card-body">
<div class="row">
<div class="list-group">
<div class="list-group-item active">PHP扩展信息<a href="{MOD_URL}&op=xtxx&do=phpinfo" target="_blank" class="btn btn-outline-success btn-small">PHP详情</a></div>
<div class="list-group-item">
<!--{eval echo kuozhan();}-->
</div>
<div class="list-group-item">已加载的扩展
$extensions
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!--{template lyear:footer_simple}-->

View File

@ -100,7 +100,7 @@
<div class="list-group-item active">PHP扩展信息<a href="{MOD_URL}&op=xtxx&do=phpinfo" target="_blank" class="btn btn-success-outline btn-small">PHP详情</a></div>
<div class="list-group-item">
<!--{eval echo kuozhan();}-->
<div>已加载的扩展:<br>
<div style="display: inline-block;">已加载的扩展:<br>
$extensions
</div>
</div>

View File

@ -9,22 +9,10 @@
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$oparr = array('updatecache', 'database', /*'security','patch','update',*/
'cron', 'log');
$leftmenu = array();
$op = $_GET['op'];
foreach ($oparr as $key => $value) {
$leftmenu[$value] = array('title' => lang($value), 'active' => '');
if ($value == $op)
$leftmenu[$value]['active'] = 'class="active"';
}
include libfile('function/cache');
$navtitle = lang('updatecache') . ' - ' . lang('admin_navtitle');
$navtitle = lang('updatecache') . ' - ' . lang('appname');
$step = max(1, intval($_GET['step']));
$op = isset($_GET['op']) ? $_GET['op'] : '';
if ($step == 1) {
} elseif ($step == 2) {
$type = implode('_', (array)$_GET['type']);

View File

@ -9,8 +9,8 @@
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
$op = $_GET['op'];
$do=$_GET['do'];
$op = isset($_GET['op']) ? $_GET['op'] : '';
$do = isset($_GET['do']) ? $_GET['do'] : '';
if($do == 'phpinfo'){
exit(phpinfo());
}
@ -125,15 +125,13 @@ function kuozhan(){
else $func_items = array('mysql_connect', 'file_get_contents', 'xml_parser_create','filesize', 'curl_init','zip_open','ffmpeg','imagick','imagemagick','cURL','date','Exif','Fileinfo','Ftp','GD','gettext','intl','Iconv','json','ldap','Mbstring','Mcrypt','Memcached','MySQLi','SQLite3','OpenSSL','PDO','pdo_mysql','pdo_sqlite','Redis','session','Sockets','Swoole','dom','xml','SimpleXML','libxml','bz2','zip','zlib');
foreach($func_items as $item) {
$status = function_exists($item);
$func_str .= "<div class=\"ext col-sm-6 col-lg-3\">\n";
$func_str .= "<span>$item</span>\n";
$func_str .= "<div class=\"col-sm-4 float-start\">$item\n";
if($status) {
$func_str .= "<span class=\"bei dzz dzz-done\"></span>\n";
$func_str .= "</div>\n";
$func_str .= "<span class=\"mdi mdi-check-circle bei dzz dzz-done text-success lead\"></span>\n";
} else {
$func_str .= "<span class=\"beii dzz dzz-close\"></span>\n";
$func_str .= "</div>\n";
$func_str .= "<span class=\"mdi mdi-close-circle beii dzz dzz-close text-danger lead\"></span>\n";
}
$func_str .= "</div>\n";
}
echo $func_str;
}
@ -141,7 +139,7 @@ function kuozhan(){
$loaded_extensions = get_loaded_extensions();
$extensions = '';
foreach ($loaded_extensions as $key => $value) {
$extensions .= '<span class="label label-primary">'.$value . '</span>';
$extensions .= '<span class="bg label label-primary">'.$value . '</span>';
}
$zaixianrenshu = DB::result_first("SELECT COUNT(*) FROM " . DB::table('session') . " WHERE uid");
$yonghurenshu = DB::result_first("SELECT COUNT(*) FROM " . DB::table('user') . " WHERE uid");

View File

@ -2,7 +2,7 @@
//error_reporting(E_ALL);
if(!defined('IN_DZZ')) {
exit('Access Denied');
}
}
define('NOROBOT', TRUE);
$returntype = isset($_GET['returnType']) ? $_GET['returnType']: 'json';//返回值方式

Some files were not shown because too many files have changed in this diff Show More