更新内容: (#284)

* 修复数据表格点击重置按钮后不按类型加载数据问题和添加刷新按钮

* 修复邮件发件人为空问题

* 修复分享文件在移动端无法打开文件夹问题

* 修复网盘应用在Linux环境下部分语言不能翻译的问题

* 重命名 dzz/explorer/language/zh-CN 为 dzz/explorer/language/zh-cn

* 修改php版本要求

* 优化在线升级页面UI,网盘新增群组空间大小修改

* 修改php版本要求

* Update core_version.php
This commit is contained in:
小胡 2025-02-10 16:05:18 +08:00 committed by GitHub
parent c92782eb71
commit a3ed155c90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 213 additions and 112 deletions

View File

@ -52,4 +52,15 @@
5. 访问 http://您的域名/install/update.php。
6. 按照程序提示直至所有升级完毕。删除install/update.php 程序,以免被恶意利用。
7. 管理员登录后,系统工具 -> 更新系统缓存。
8. 系统设置 -> 打开站点。
8. 系统设置 -> 打开站点。
### 运行环境
- 服务器:
- WindowsLinuxMac ...
- PHP 7.0~8.0
- 数据库: mysql 5.0+
- 浏览器适配:
- Chrome
- Firefox
- Opera
- IE8+

View File

@ -93,7 +93,7 @@
2. 备份文件(如果有程序文件或风格文件的改动);
3. 进入 管理 -> 系统工具 -> 在线更新,按提示完成更新任务
3. 进入 管理 -> 系统工具 -> 在线更新,按提示完成更新;
4. 系统工具 -> 更新系统缓存;

View File

@ -328,7 +328,7 @@ elseif($operation == 'cross' || $operation == 'patch'){
$return["second"]=1;
exit(json_encode($return));
}
elseif($step == 3) {
elseif($step == 3) {
$return["percent"]=55;
$return["second"]=300;
$return["msg"]= lang('app_upgrade_newversion_ing' );
@ -369,7 +369,7 @@ elseif($operation == 'cross' || $operation == 'patch'){
elseif($step==4){
$return["percent"]=80;
$return["second"]=3000;
$return["msg"]=lang('app_upgrade_newversion_ing' );
$return["msg"]=lang('app_upgrade_newversion_ing');
$return["step"]=4;
$updatefilelist = $dzz_upgrade->fetch_updatefile_list_bymd5($appinfo);
@ -399,7 +399,7 @@ elseif($operation == 'cross' || $operation == 'patch'){
$paraftp .= '&siteftp[' . $k . ']=' . $v;
}
}
if(!$_GET['startupgrade']) {
if (!$_GET['backfile']) {
$linkurl = $theurl . '&step=4&backfile=1&confirm=' . $confirm . $paraftp;
@ -463,8 +463,8 @@ elseif($operation == 'cross' || $operation == 'patch'){
$return["msg"]=lang('app_upgrade_file_success', array( 'upgradeurl' => upgradeinformation_app(4)));
exit(json_encode($return));
}
if($_GET['dodabase']){
if($_GET['dodabase']){
$finish = FALSE;
$dir = $appinfo['app_path'];
$appname = $appinfo['identifier'];
@ -483,11 +483,11 @@ elseif($operation == 'cross' || $operation == 'patch'){
}else{
@rename($importfile2,$importfile);
}
}
}
$importtxt = @implode('', file($importfile));
$apparray = getimportdata('Dzz! app');
$filename = $apparray['app']['extra']['upgradefile'];
$filename = $apparray['app']['extra']['upgradefile'];
if (!empty($filename) && preg_match('/^[\w\.]+$/', $filename)) {
$filename = DZZ_ROOT . './'.$dir.'/' . $appname . '/' . $filename;
if (file_exists($filename)) {
@ -526,7 +526,6 @@ elseif($operation == 'cross' || $operation == 'patch'){
$return["msg"]=lang('app_upgrade_database_success', array( 'upgradeurl' => upgradeinformation_app(5)));
exit(json_encode($return));
}
$linkurl = ADMINSCRIPT . '?mod=appmarket&op=upgrade_app_ajax&operation=' . $operation . '&appid=' .$appid. '&step=5&confirm=' . $confirm;
$return["url"]=$linkurl;
@ -536,7 +535,7 @@ elseif($operation == 'cross' || $operation == 'patch'){
$return["msg"]=lang('app_upgrade_newversion_will_success');
exit(json_encode($return));
}
elseif($step==5){
elseif($step==5){
//删除更新文件列表tmp临时文件
$srcfile = DZZ_ROOT .$appinfo['app_path'].'/' . $appinfo['identifier'].'/updatelist.tmp';
if (file_exists($srcfile)) {

View File

@ -224,4 +224,4 @@
</script>
<!--日期选择器js-->
<script type="text/javascript" src="static/lyear/js/bootstrap-datepicker/bootstrap-datepicker.min.js?{VERHASH}"></script>
<!--{template lyear:footer_simple}-->
<!--{template lyear:footer_simple}-->

View File

@ -29,7 +29,7 @@ if ($operation == 'patch' || $operation == 'cross') {
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.reload();" value="' . lang('founder_upgrade_reset') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"btn btn-link\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
if (!$_GET['iframe']) {
include template('upgrade');
@ -88,7 +88,7 @@ if ($operation == 'patch' || $operation == 'cross') {
if (!$upgradeinfo) {
$msg = '<p style="margin:10px 0;color:red">' . lang('upgrade_none', array('upgradeurl' => upgradeinformation(-1))) . '</p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"btn btn-link\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
if (!$_GET['iframe']) {
include template('upgrade');
@ -107,7 +107,7 @@ if ($operation == 'patch' || $operation == 'cross') {
if (empty($updatefilelist)) {
$msg = '<p style="margin:10px 0;color:red">' . lang('upgrade_download_upgradelist_error', array('upgradeurl' => upgradeinformation(-2))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($thurl) . '\';", 1000);</script>';
$msg .= ' <p style="margin:10px 0"><a href="' . $thurl . '">' . lang('message_redirect') . '</p>';
$msg .= ' <p style="margin:10px 0"><a href="' . $thurl . '" class=\"btn btn-link\">' . lang('message_redirect') . '</p>';
if (!$_GET['iframe']) {
include template('upgrade');
exit();
@ -137,10 +137,10 @@ if ($operation == 'patch' || $operation == 'cross') {
$msg = lang('upgrade_download_complete_to_compare', array('upgradeurl' => upgradeinformation(0)));
if (!$_GET['iframe']) {
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 1000);</script>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
$msg .= ' <p><a href="' . $linkurl . '" class=\"btn btn-link\">' . lang('message_redirect') . '</a></p>';
} else {
$msg .= '<script type="text/JavaScript">setTimeout("parent.location.href=\'' . $linkurl . '\';", 1000);</script>';
$msg .= ' <p><a href="javascript:;" onclick="parent.location.href=\'' . $linkurl . '\';return false;">' . lang('message_redirect') . '</a></p>';
$msg .= ' <p><a href="javascript:;" onclick="parent.location.href=\'' . $linkurl . '\';return false;" class=\"btn btn-link\">' . lang('message_redirect') . '</a></p>';
include template('upgrade_iframe');
exit();
}
@ -153,12 +153,12 @@ if ($operation == 'patch' || $operation == 'cross') {
if ($downloadstatus == 1) {
$linkurl = $theurl . '&step=2&fileseq=' . $fileseq . '&iframe=1';
$msg = lang('upgrade_downloading_file', array('file' => $updatefilelist[$fileseq - 1], 'percent' => sprintf("%2d", 100 * $fileseq / count($updatefilelist)) . '%', 'upgradeurl' => upgradeinformation(1))) . '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 50);</script>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
$msg .= ' <p><a href="' . $linkurl . '" class=\"btn btn-link\">' . lang('message_redirect') . '</a></p>';
} elseif ($downloadstatus == 2) {
$linkurl = $theurl . '&step=2&fileseq=' . ($fileseq + 1) . '&iframe=1';
$msg = '<p style="margin:10px 0">' . lang('upgrade_downloading_file', array('file' => $updatefilelist[$fileseq - 1], 'percent' => sprintf("%2d", 100 * $fileseq / count($updatefilelist)) . '%', 'upgradeurl' => upgradeinformation(1))) . '<script type="text/JavaScript">setTimeout("location.href=\'' . $linkurl . '\';", 50);</script></p>';
$msg .= ' <p><a href="' . $linkurl . '">' . lang('message_redirect') . '</a></p>';
$msg .= ' <p><a href="' . $linkurl . '" class=\"btn btn-link\">' . lang('message_redirect') . '</a></p>';
} else {
$linkurl = $theurl . '&step=2&fileseq=' . ($fileseq) . '&iframe=1';
$msg = '<p style="margin:10px 0">' . lang('upgrade_redownload', array('file' => $updatefilelist[$fileseq - 1], 'upgradeurl' => upgradeinformation(-3))) . '</p>';
@ -200,7 +200,7 @@ if ($operation == 'patch' || $operation == 'cross') {
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_set_ftp') . '" />';
$msg .= ' &nbsp; <input type="button" class="btn btn-default" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_reset') . '" /></p>';
$msg .= "<script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"btn btn-link\">" . lang('message_return') . "</a>');";
$msg .= "</script>";
include template('upgrade');
exit();
@ -218,7 +218,7 @@ if ($operation == 'patch' || $operation == 'cross') {
$linkurl = $theurl . '&step=4&backfile=1&confirm=' . $confirm . $paraftp;
$msg = '<p style="margin:10px 0">' . lang('upgrade_backuping', array('upgradeurl' => upgradeinformation(2))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($linkurl) . '\';", 1000);</script>';
$msg .= ' <p style="margin:10px 0"><a href="' . $linkurl . '">' . lang('message_redirect') . '</p>';
$msg .= ' <p style="margin:10px 0"><a href="' . $linkurl . '" class=\"btn btn-link\">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();
}
@ -229,7 +229,7 @@ if ($operation == 'patch' || $operation == 'cross') {
if (!$dzz_upgrade -> copy_file($destfile, $backfile, 'file')) {
$msg = '<p style="margin:10px 0">' . lang('upgrade_backup_error', array('upgradeurl' => upgradeinformation(-5))) . '</p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" >" . lang('message_return') . "</a>');";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"btn btn-link\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
@ -238,7 +238,7 @@ if ($operation == 'patch' || $operation == 'cross') {
}
$msg = '<p style="margin:10px 0">' . lang('upgrade_backup_complete', array('upgradeurl' => upgradeinformation(3))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout("location.href=\'' . ($theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp) . '\';", 1000);</script>';
$msg .= ' <p><a href="' . ($theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp) . '">' . lang('message_redirect') . '</p>';
$msg .= ' <p><a href="' . ($theurl . '&step=4&startupgrade=1&confirm=' . $confirm . $paraftp) . '" class=\"btn btn-link\">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();
}
@ -258,7 +258,7 @@ if ($operation == 'patch' || $operation == 'cross') {
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_reupload') . '" />';
$msg .= '&nbsp;<input type="button" class="btn btn-default" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_reset_ftp') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"btn btn-link\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
@ -268,7 +268,7 @@ if ($operation == 'patch' || $operation == 'cross') {
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_recopy') . '" />';
$msg .= '&nbsp;<input type="button" class="btn btn-default" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_set_ftp') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"btn btn-link\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
@ -292,7 +292,7 @@ if ($operation == 'patch' || $operation == 'cross') {
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_reupload') . '" />';
$msg .= '&nbsp;<input type="button" class="btn btn-default" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_reset_ftp') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"btn btn-link\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
@ -302,7 +302,7 @@ if ($operation == 'patch' || $operation == 'cross') {
$msg .= '<p style="margin:10px 0"><input type="button" class="btn btn-primary" onclick="window.location.href=\'' . $linkurl . '\'" value="' . lang('founder_upgrade_recopy') . '" />';
$msg .= '&nbsp;<input type="button" class="btn btn-default" onclick="window.location.href=\'' . $ftplinkurl . '\'" value="' . lang('founder_upgrade_set_ftp') . '" /></p>';
$msg .= "<p style=\"margin:10px 0\"><script type=\"text/javascript\">";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"lightlink\">" . lang('message_return') . "</a>');";
$msg .= "if(history.length > (BROWSER.ie ? 0 : 1)) document.write('<a href=\"javascript:history.go(-1);\" class=\"btn btn-link\">" . lang('message_return') . "</a>');";
$msg .= "</script></p>";
include template('upgrade');
exit();
@ -316,7 +316,7 @@ if ($operation == 'patch' || $operation == 'cross') {
$linkurl = $_G['siteurl'] . 'install/update.php?step=prepare&from=' . rawurlencode($dbreturnurl) . '&frommd5=' . rawurlencode(md5($dbreturnurl . $_G['config']['security']['authkey']));
$msg = '<p style="margin:10px 0">' . lang('upgrade_file_successful', array('upgradeurl' => upgradeinformation(4))) . '</p>';
$msg .= '<script type="text/JavaScript">setTimeout(function(){createIframe(\'' . $linkurl . '\');}, 1000);</script>';
$msg .= ' <p><a href="javascript:;" onclick="createIframe(\'' . $linkurl . '\');return false">' . lang('message_redirect') . '</p>';
$msg .= ' <p><a href="javascript:;" onclick="createIframe(\'' . $linkurl . '\');return false" class=\"btn btn-link\">' . lang('message_redirect') . '</p>';
include template('upgrade');
exit();

View File

@ -41,7 +41,7 @@
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
<a href="{$redirecturl}" class="btn btn-link">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->

View File

@ -101,7 +101,7 @@
<!--{/if}-->
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
<a href="{$redirecturl}" class="btn btn-link">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
@ -115,7 +115,7 @@
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
<a href="{$redirecturl}" class="btn btn-link">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 2000);</script>
<!--{/if}-->
@ -205,7 +205,7 @@
<p class="$msg_type">$msg</p>
<!--{if $redirecturl}-->
<p class="text-info">
<a href="{$redirecturl}" class="lightlink">{lang message_redirect}</a>
<a href="{$redirecturl}" class="btn btn-link">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{$redirecturl}';}, 5000);</script>
<!--{/if}-->

View File

@ -5,12 +5,18 @@
<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}-->
<div class="card-title">
<strong>{lang upgrade}</strong>
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<!--{loop $steplang $key $value}-->
<!--{if $key>0 && $key<=5}-->
<li class="breadcrumb-item <!--{if $key==$step}-->active" style="color: var(--bs-primary);" aria-current="page<!--{/if}-->">{$key}.{$value}</li>
<!--{/if}-->
<!--{/loop}-->
</ol>
</nav>
</div>
</header>
<!--{/if}-->
<!--{if $operation=='check'}-->
@ -82,7 +88,7 @@
<table class="table table-hover align-middle">
<!--{loop $updatefilelist $value}-->
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<i class="glyphicon glyphicon-file"></i> $value</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<i class="mdi mdi-file"></i> $value</td>
</tr>
<!--{/loop}-->
<thead>
@ -109,10 +115,10 @@
</div>
</div>
<!--{else}-->
<div class="card-header">
<div class="card-title">{lang founder_upgrade_diff_show}</div>
</div>
<div class="card-body">
<div class="alert alert-warning text-center">
{lang founder_upgrade_diff_show}
</div>
<div class="table-responsive">
<table class="table table-hover align-middle">
<!--{loop $updatefilelist $v}-->
@ -120,15 +126,15 @@
<!--{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>
<td class="text-danger">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_diff} &nbsp;<i class="mdi mdi-alert-circle"></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>
<td class="text-success">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_normal} &nbsp;<i class="mdi mdi-check-circle"></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>
<td class="text-info">&nbsp;&nbsp;&nbsp;&nbsp;{lang founder_upgrade_new} &nbsp;<i class="mdi mdi-plus-circle"></i> $v</td>
</tr>
<!--{/if}-->
<!--{/loop}-->
@ -157,68 +163,85 @@
</div>
<!--{elseif $_GET['siteftpsetting']}-->
<div class="card-body">
<form name="aliform" class="form-horizontal" action="$action" method="post" style="padding:20px;">
<form name="aliform" class="form-horizontal" action="$action" method="post">
<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>
<p style="font-weight:bold;font-size:16px;">{lang upgrade_website_FTP_set}</p>
<div class="row mb-3">
<label class="col-sm-2" for="siteftp[host]">FTP {lang server_address}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="siteftp[host]" id="siteftp[host]" value="" placeholder="{lang host_IP_address}">
<span class="form-text">{lang FTP_server_IP_site_domain}</span>
</div>
</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 class="row mb-3">
<label class="col-sm-2" for="siteftp[port]">FTP {lang server_port}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="siteftp[port]" id="siteftp[port]" value="21" placeholder="{lang port}">
<span class="form-text">{lang default_for_the_21st}</span>
</div>
</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 class="row mb-3">
<label class="col-sm-2" for="siteftp[username]">FTP {lang account}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="siteftp[username]" id="siteftp[username]" value="" placeholder="{lang FTP_account_user_name}">
<span class="form-text">{lang accounts_supreme_authority}</span>
</div>
</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 class="row mb-3">
<label class="col-sm-2" for="siteftp[password]">FTP {lang password}</label>
<div class="col-sm-10">
<input type="password" class="form-control required" name="siteftp[password]" id="siteftp[password]" value="" placeholder="{lang FTP_account_user_password}">
</div>
</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 class="row mb-3">
<label class="col-sm-2" for="siteftp[charset]">编码</label>
<div class="col-sm-10">
<select class="form-control" name="siteftp[charset]" id="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>-->
<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 class="row mb-3">
<label class="col-sm-2" for="siteftp[attachdir]">{lang sitepath}</label>
<div class="col-sm-10">
<input type="text" class="form-control required" name="siteftp[attachdir]" id="siteftp[attachdir]" value="">
<span class="form-text">{lang site_absolute_path_root_directory}</span>
</div>
</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 class="row mb-3">
<label class="col-sm-2"></label>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="siteftp[pasv]" name="siteftp[pasv]" value="1">
<label class="form-check-label" for="siteftp[pasv]">{lang use_Passive_Mode}</label>
</div>
<span class="form-text">{lang general_condition_passive_mode}</span>
</div>
</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 class="row mb-3">
<label class="col-sm-2"></label>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="siteftp[ssl]" name="siteftp[ssl]" value="1">
<label class="form-check-label" for="siteftp[ssl]">{lang enable_secure_link}</label>
</div>
<span class="form-text">{lang notice_FTP_open_SSL}</span>
</div>
</div>
<div class="form-group">
<label></label>
<input type="submit" class="btn btn-primary btn-round bodyloading" style="padding:6px 25px" value="{lang confirms}">
<dl class="mb-3 d-grid">
<input type="submit" class="btn btn-primary btn-round bodyloading" 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 class="alert alert-success text-center">
$msg
</div>
</div>
<!--{/if}-->
@ -228,7 +251,7 @@
</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>';
document.getElementById('step4').innerHTML = '<iframe marginheight="0" marginwidth="0" allowtransparency="true" frameborder="0" src="' + src + '" style="width:100%;height:100%;min-height:400px;"></iframe>';
}
</script>
<!--{template lyear:footer_simple}-->

View File

@ -46,7 +46,7 @@
<!--{elseif $step==2}-->
<p class="ml20">{lang tools_updatecache_waiting}</p>
<p class="text-success ml20">
<a href="{MOD_URL}&op=updatecache&step=3&type=data_tpl" class="lightlink">{lang message_redirect}</a>
<a href="{MOD_URL}&op=updatecache&step=3&type=data_tpl" class="btn btn-link">{lang message_redirect}</a>
</p>
<script type="text/JavaScript">setTimeout(function(){location.href='{MOD_URL}&op=updatecache&step=3&type=data_tpl';}, 2000);</script>
<!--{elseif $step==3}-->

View File

@ -90,6 +90,50 @@ if($do == 'filelist'){
}
}
require template('group_list');
}elseif($do=='folder_maxspacesize'){
$orgid=intval($_GET['orgid']);
$setspacesize = intval($_GET['maxspacesize']);
if(!$org=C::t('organization')->fetch($orgid)){
exit(json_encode(array('error'=>'该机构或群组不存在或被删除')));
}
//暂时只允许系统管理员进行空间相关设置
if($_G['adminid'] != 1){
exit(json_encode(array('error'=>'没有权限')));
}
if($setspacesize != 0){
//获取允许设置的空间值
$allowallotspace = C::t('organization')->get_allowallotspacesize_by_orgid($orgid);
if($allowallotspace < 0) {
exit(json_encode(array('error' => '可分配空间不足')));
}
//获取当前已占用空间大小
$currentallotspace = C::t('organization')->get_orgallotspace_by_orgid($orgid,0,false);
//设置值小于当前下级分配总空间值即:当前设置值 < 下级分配总空间
if($setspacesize > 0 && $setspacesize*1024*1024 < $currentallotspace){
exit(json_encode(array('error'=>'设置空间值不足,小于已分配空间值!','val'=>$org['maxspacesize'])));
}
//上级包含空间限制时,无限制不处理,直接更改设置值
if($allowallotspace > 0 && ($setspacesize*1024*1024 > $allowallotspace)){
exit(json_encode(array('error'=>'总空间不足!','val'=>$org['maxspacesize'])));
}
}
//设置新的空间值
if(C::t('organization')->update($orgid,array('maxspacesize'=>$setspacesize))){
exit(json_encode(array('msg'=>'success')));
}else{
exit(json_encode(array('error'=>'设置不成功或未更改','val'=>$org['maxspacesize'])));
}
}elseif($do == 'groupmanage'){
$gids = isset($_GET['gid']) ? $_GET['gid']:'';
if(!$orgs = DB::fetch_all("select * from %t where orgid in(%n)",array('organization',$gids))){

View File

@ -279,7 +279,7 @@ $lang = array(
'my_involved' => '我参与的',
'group_name' => '群组名称',
'creater' => '创建者',
'create_date' => '创建日期',
'create_date' => '创建时间',
'function_management' => '功能管理',
'groups_management' => '群组管理',
'update_finish' => '上传完成',

View File

@ -67,6 +67,11 @@
<span class="member_header_title">{lang group_file}</span>
</div>
</th>-->
<th class="member_header_3" width="10%">
<div class="member_header_td_div">
<span class="member_header_title">空间</span>
</div>
</th>
<th class="member_header member_header_5" width="10%">
<div class="member_header_td_div">
<span class="member_header_title">{lang group}</span>
@ -81,10 +86,10 @@
<table class="table" width="100%" border="0">
<tbody id="memberlist">
<!--{loop $groups $v}-->
<tr id="group_{$v[orgid]}" class="member_tr Icoblock opengroup" data-gid="$v[orgid]"
<tr id="group_{$v[orgid]}" class="member_tr Icoblock" data-gid="$v[orgid]"
data-groupon="$v[syatemon]" data-diron="$v['available']">
<td class="member_item_td" valign="middle" width="40%" style="position: relative;">
<div class="member_item_td_div member_item_td_name member_item_td_group">
<div class="member_item_td_div member_item_td_name member_item_td_group opengroup" data-gid="$v[orgid]">
<a href="javascript:;" style="float: left;">
{eval echo avatar_group($v['orgid']);}
</a>
@ -102,7 +107,13 @@
<span>$v[usernum]</span>
</td>
<td class="member_item_td" valign="middle" width="20%">
<span>{eval echo dgmdate($v['dateline'],'Y-m-d');}</span>
<span>{eval echo dgmdate($v['dateline']);}</span>
</td>
<td class="member_item_td" valign="middle" width="10%">
<div class="input-group" style="display: flex;">
<input type="text" class="form-control" id="maxspacesize" name="maxspacesize" value="$v[maxspacesize]" onchange="folder_maxspacesize(this,'$v[orgid]')">
<span class="input-group-text" id="basic-addon2">M</span>
</div>
</td>
<td class="member_item_td" valign="middle" width="10%">
<input type="checkbox" class="js-switch sysdiron" value="$v['diron']" data-gid="{$v[orgid]}" <!--{if $v['diron']}-->checked="checked"<!--{/if}-->
@ -140,6 +151,17 @@
InputAnimate.init($(this));
});
});
function folder_maxspacesize(obj,orgid){
jQuery.post(MOD_URL+'&op=groupmanage&do=folder_maxspacesize',{'orgid':orgid,'maxspacesize':obj.value,'t':new Date().getTime()},function(json){
if(json.error){
obj.value=json.val;
showmessage(json.error,'danger',3000,1);
}else{
jQuery('#'+orgid+' a.jstree-clicked').trigger('click');
showmessage('空间大小设置成功','success',3000,1);
}
},'json');
}
//群组共享开启关闭
$(document).off('change.sysdiron').on('change.sysdiron','#memberlist .sysdiron',function(){
var obj = $(this);
@ -151,9 +173,9 @@
showmessage('{lang do_successed_wait_update_datas}', 'success', 3000, 1, 'right-bottom');
// showDialog('{lang do_successed_wait_update_datas}', 'right');
obj.val(diron);
/*setTimeout(function () {
setTimeout(function () {
location.reload();
}, 2000);*/
}, 2000);
} else {
showmessage(data['error'], 'error', 3000, 1, 'right-bottom');
// showDialog(data['error']);
@ -171,9 +193,9 @@
showmessage('{lang do_successed_wait_update_datas}', 'success', 3000, 1, 'right-bottom');
// showDialog('{lang do_successed_wait_update_datas}', 'right');
obj.val(groupon);
/*setTimeout(function () {
setTimeout(function () {
location.reload();
}, 2000);*/
}, 2000);
// showmessage('{lang do_successed_wait_update_datas}', 'info', 3000, 1, 'right-bottom');
} else {
showmessage(data['error'], 'error', 3000, 1, 'right-bottom');

View File

@ -48,7 +48,7 @@ $(document).off('tap.openfolder').on('tap.openfolder', '.folderlist', function (
select_file(obj);
return false;
} else {
$.post(MOD_URL + '&op=ajax', {path: dhpath, currentfolder: 0}, function (data) {
$.post(MOD_URL + '&op=ajax', {path: dhpath, currentfolder: 0,sid: sid}, function (data) {
$('#dataContainer').html(data);
$('#filelist').html($('#dataContainer').find('.module-list').html());
$($('#dataContainer').find('.breadcrumb-data:first').html()).insertAfter($('.breadcrumb li').last());

View File

@ -70,7 +70,7 @@
<script type="text/javascript" src="{MOD_PATH}/scripts/mobile/appevent.js?{VERHASH}"></script>
<script type="text/javascript" src="{MOD_PATH}/scripts/mobile/share.js?{VERHASH}"></script>
<script type="text/javascript">
var nextpage = '{$nextpage}',morepath = '{$morepath}',is_wxwork = '{$is_wxwork}', u = navigator.userAgent;;
var nextpage = '{$nextpage}',morepath = '{$morepath}',is_wxwork = '{$is_wxwork}', u = navigator.userAgent,sid = '{$_GET[sid]}';
$(function(){
if(!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) || is_wxwork){
$('.downfile').addClass('hide');

View File

@ -13,7 +13,7 @@
var opt={
'cookieid':null, //记忆左侧大小和关闭状态的cookie标志符
'cookietime':60*60*24*30,
'leftHide':700
'leftHide':1024
}
options=$.extend(opt,options);
var $this=$(this);
@ -71,9 +71,8 @@
$topContainer.css('paddingLeft',document.documentElement.clientWidth<opt.leftHide?0:left);
$this.css({'left':left,'cursor':'w-resize'});
if(options.cookieid && !nocookie) setcookie(options.cookieid+'_isshow','show',options.cookietime);
}else{
if($leftContainer.width()<10 || $leftContainer.is(':hidden')){
if($leftContainer.width()<64 || $leftContainer.is(':hidden')){
dragerClick('show');
}else{
dragerClick('hide');
@ -124,7 +123,7 @@
leftHide();
};
var leftHide=function(){
if(document.documentElement.clientWidth<opt.leftHide){
if(document.documentElement.clientWidth<opt.leftHide){
dragerClick('hide',true);
}else{
if(options.cookieid && getcookie(options.cookieid+'_isshow')){
@ -142,11 +141,14 @@
var init=function(){
Layout();
$this.find('.left-drager-op').off('click').on('click',function(){
dragerClick();
});
jQuery('.lyear-aside-toggler').off('click').on('click',function(){
if($leftContainer.width()<10 || $leftContainer.is(':hidden')){
dragerClick('hide');
}else{
if($leftContainer.width()<64 || $leftContainer.is(':hidden')){
dragerClick('show');
}else{
dragerClick('hide');
}
});
@ -161,7 +163,7 @@
dragerClick('show');
}
}else{
if($leftContainer.width()<10 || $leftContainer.is(':hidden')){
if($leftContainer.width()<64 || $leftContainer.is(':hidden')){
dragerClick('hide');
}else{
dragerClick('show');
@ -176,7 +178,7 @@
window.setTimeout(function(){Layout();},100);
};
leftHide();
};
};
init();
};
})(jQuery);