mirror of
https://github.com/DzzXH/DzzOffice.git
synced 2026-04-24 20:11:40 +08:00
解决开启验证IP的情况下管理员不能登录后台的问题和其他已知问题
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
||||||
<style>
|
<style>
|
||||||
.progress.active .progress-bar {
|
.progress.active .progress-bar {
|
||||||
-webkit-animation: none;
|
-webkit-animation: none;
|
||||||
|
|||||||
@@ -145,12 +145,6 @@
|
|||||||
<div class="row mb-3" id="perm_depart" <!--{if $app[ 'group']!=1}-->style="display:none"<!--{/if}-->>
|
<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>
|
<label class="col-sm-2">{lang department_permissions}</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<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&ctrlid=orgids&multiple=1&nouser=1&stype=1" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" allowtransparency="true"></iframe>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="orgids">
|
<div id="orgids">
|
||||||
<!--{loop $sel_org $value}-->
|
<!--{loop $sel_org $value}-->
|
||||||
<button id="orgids_sl_$value[orgid]" type="button" class="btn btn-outline-secondary btn-sorg" data-val="$value['orgid']">
|
<button id="orgids_sl_$value[orgid]" type="button" class="btn btn-outline-secondary btn-sorg" data-val="$value['orgid']">
|
||||||
@@ -159,7 +153,12 @@
|
|||||||
</button>
|
</button>
|
||||||
<!--{/loop}-->
|
<!--{/loop}-->
|
||||||
</div>
|
</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&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" />
|
<input id="sel_orgids" name="orgids" type="hidden" value="$sel" />
|
||||||
<span class="help-block">{lang app_set_application_jurisdiction}</span>
|
<span class="help-block">{lang app_set_application_jurisdiction}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
||||||
<!--{template common/header_simple_end}-->
|
<!--{template common/header_simple_end}-->
|
||||||
<!--{template common/commer_header}-->
|
<!--{template common/commer_header}-->
|
||||||
<div class="bs-container clearfix">
|
<div class="bs-container clearfix">
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<!--{if $value[appadminurl]}-->
|
<!--{if $value[appadminurl]}-->
|
||||||
<a class="btn btn-outline-success" href="$value[appadminurl]">{lang set}</a>
|
<a class="btn btn-outline-success" href="$value[appadminurl]" target="_blank">{lang set}</a>
|
||||||
<!--{/if}-->
|
<!--{/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>
|
<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["system"]!=2}-->
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<link href="{MOD_PATH}/images/market.css?{VERHASH}" rel="stylesheet" media="all">
|
<link href="{MOD_PATH}/images/market.css?{VERHASH}" rel="stylesheet" media="all">
|
||||||
<script type="text/javascript" src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
||||||
<style>
|
<style>
|
||||||
.app_upgradelist{
|
.app_upgradelist{
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|||||||
@@ -5,4 +5,4 @@
|
|||||||
* @link http://www.dzzoffice.com
|
* @link http://www.dzzoffice.com
|
||||||
* @author zyx(zyx@dzz.cc)
|
* @author zyx(zyx@dzz.cc)
|
||||||
*/
|
*/
|
||||||
function checkAll(e,t,a,n,r){n=n||"chkall";for(var c=0;c<t.elements.length;c++){var d=t.elements[c];"option"==e&&"radio"==d.type&&d.value==a&&1!=d.disabled?d.checked=!0:"value"==e&&"checkbox"==d.type&&d.getAttribute("chkvalue")==a?(d.checked=t.elements[n].checked,r&&multiupdate(d)):"prefix"==e&&d.name&&d.name!=n&&(!a||a&&d.name.match(a))&&(d.checked=t.elements[n].checked,r&&(d.parentNode&&"li"==d.parentNode.tagName.toLowerCase()&&(d.parentNode.className=d.checked?"checked":""),d.parentNode.parentNode&&"div"==d.parentNode.parentNode.tagName.toLowerCase()&&(d.parentNode.parentNode.className=d.checked?"item checked":"item")))}}function fixTree_organization(e){e.find(".tree-heng1").each(function(){var e=jQuery(this).parent().parent().parent(),t=jQuery(this).parent().find(".tree-su").length;e.nextAll().each(function(){var e=jQuery(this).find(".child-org");if(e.find(".tree-su").length<=t)return!1;e.find(".tree-su").eq(t).removeClass("tree-su")})})}
|
function checkAll(e,a,t,c,d){c=c||"chkall";for(var n=0;n<a.elements.length;n++){var o=a.elements[n];"option"==e&&"radio"==o.type&&o.value==t&&1!=o.disabled?o.checked=!0:"value"==e&&"checkbox"==o.type&&o.getAttribute("chkvalue")==t?(o.checked=a.elements[c].checked,d&&multiupdate(o)):"prefix"==e&&o.name&&o.name!=c&&(!t||t&&o.name.match(t))&&(o.checked=a.elements[c].checked,d&&(o.parentNode&&"li"==o.parentNode.tagName.toLowerCase()&&(o.parentNode.className=o.checked?"checked":""),o.parentNode.parentNode&&"div"==o.parentNode.parentNode.tagName.toLowerCase()&&(o.parentNode.parentNode.className=o.checked?"item checked":"item")))}}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
||||||
<style>
|
<style>
|
||||||
.loginset-template {
|
.loginset-template {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
||||||
<!--{template common/header_simple_end}-->
|
<!--{template common/header_simple_end}-->
|
||||||
<!--{template common/commer_header}-->
|
<!--{template common/commer_header}-->
|
||||||
<div class="bs-container clearfix">
|
<div class="bs-container clearfix">
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<script type="text/javascript" src="static/js/jquery.textareaexplander.js?{VERHASH}"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="static/lyear/js/bootstrap-lyear-select/bootstrap-lyear-select.css?{VERHASH}">
|
<link rel="stylesheet" type="text/css" href="static/lyear/js/bootstrap-lyear-select/bootstrap-lyear-select.css?{VERHASH}">
|
||||||
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
||||||
<style>
|
<style>
|
||||||
@@ -397,7 +396,8 @@
|
|||||||
</dl>
|
</dl>
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var selorg = {};
|
|
||||||
|
var selorg={};
|
||||||
//添加
|
//添加
|
||||||
selorg.add = function (ctrlid, vals) {
|
selorg.add = function (ctrlid, vals) {
|
||||||
if (vals[0].orgid == 'other') vals[0].path = '{lang no_join_agency_department}';
|
if (vals[0].orgid == 'other') vals[0].path = '{lang no_join_agency_department}';
|
||||||
@@ -1661,7 +1661,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function (e) {
|
jQuery(document).ready(function (e) {
|
||||||
jQuery('textarea').TextAreaExpander(30,500);
|
|
||||||
jQuery('select').lyearSelect();
|
jQuery('select').lyearSelect();
|
||||||
jQuery('.file-hidde').fileupload({
|
jQuery('.file-hidde').fileupload({
|
||||||
url: '{MOD_URL}&op=upload',
|
url: '{MOD_URL}&op=upload',
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
||||||
<style>
|
<style>
|
||||||
.loginset-template {
|
.loginset-template {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
||||||
<!--{template common/header_simple_end}-->
|
<!--{template common/header_simple_end}-->
|
||||||
<!--{template common/commer_header}-->
|
<!--{template common/commer_header}-->
|
||||||
<div class="bs-container clearfix">
|
<div class="bs-container clearfix">
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<!--{template common/header_simple_start}-->
|
<!--{template common/header_simple_start}-->
|
||||||
<script src="admin/scripts/admin.js?{VERHASH}"></script>
|
|
||||||
<!--{template common/header_simple_end}-->
|
<!--{template common/header_simple_end}-->
|
||||||
<!--{template common/commer_header}-->
|
<!--{template common/commer_header}-->
|
||||||
<div class="bs-container clearfix">
|
<div class="bs-container clearfix">
|
||||||
|
|||||||
@@ -123,10 +123,6 @@ html, body {
|
|||||||
jQuery('input').on('ifChecked', function(e) {
|
jQuery('input').on('ifChecked', function(e) {
|
||||||
jQuery(this).trigger('click');
|
jQuery(this).trigger('click');
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery('input[required]').on('blur', function() {
|
|
||||||
if(this.value == '') { jQuery(this).addClass('input-error') } else { jQuery(this).removeClass('input-error'); }
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
function addsystemtype( obj ){
|
function addsystemtype( obj ){
|
||||||
var num=jQuery("#systemlogtable").find("tr").length-1;
|
var num=jQuery("#systemlogtable").find("tr").length-1;
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ class dzz_admincp
|
|||||||
$this->cpaccess = 1;
|
$this->cpaccess = 1;
|
||||||
|
|
||||||
} elseif ($this->cpsetting['checkip'] && ($session['ip'] != $this->core->var['clientip'])) {
|
} elseif ($this->cpsetting['checkip'] && ($session['ip'] != $this->core->var['clientip'])) {
|
||||||
|
showmessage($session['ip']);
|
||||||
$this->cpaccess = 1;
|
$this->cpaccess = 1;
|
||||||
|
|
||||||
} elseif ($session['errorcount'] >= 0 && $session['errorcount'] <= 3) {
|
} elseif ($session['errorcount'] >= 0 && $session['errorcount'] <= 3) {
|
||||||
|
|||||||
@@ -407,20 +407,25 @@ class dzz_app extends dzz_base{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function validate_ip($ip) {
|
||||||
|
return filter_var($ip, FILTER_VALIDATE_IP) !== false;
|
||||||
|
}
|
||||||
private function _get_client_ip() {
|
private function _get_client_ip() {
|
||||||
$ip = $_SERVER['REMOTE_ADDR'];
|
|
||||||
if (isset($_SERVER['HTTP_CLIENT_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_CLIENT_IP'])) {
|
if (!array_key_exists('security', $this->config) || !$this->config['security']['onlyremoteaddr']) {
|
||||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
if (isset($_SERVER['HTTP_CLIENT_IP']) && ip::validate_ip($_SERVER['HTTP_CLIENT_IP'])) {
|
||||||
} elseif(isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches)) {
|
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||||
foreach ($matches[0] AS $xip) {
|
} elseif(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||||
if (!preg_match('#^(10|172\.16|192\.168)\.#', $xip)) {
|
if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ",") > 0) {
|
||||||
$ip = $xip;
|
$exp = explode(",", $_SERVER['HTTP_X_FORWARDED_FOR']);
|
||||||
break;
|
$ip = ip::validate_ip(trim($exp[0])) ? $exp[0] : $ip;
|
||||||
}
|
} else {
|
||||||
}
|
$ip = ip::validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $ip;
|
||||||
}
|
}
|
||||||
return $ip;
|
}
|
||||||
}
|
}
|
||||||
|
return $ip;
|
||||||
|
}
|
||||||
|
|
||||||
private function _init_db() {
|
private function _init_db() {
|
||||||
if($this->init_db) {
|
if($this->init_db) {
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ class dzz_error
|
|||||||
.info {
|
.info {
|
||||||
background: none repeat scroll 0 0 #F3F3F3;
|
background: none repeat scroll 0 0 #F3F3F3;
|
||||||
border: 0px solid #aaaaaa;
|
border: 0px solid #aaaaaa;
|
||||||
border-radius: 10px 10px 10px 10px;
|
border-radius: 10px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
line-height: 160%;
|
line-height: 160%;
|
||||||
@@ -214,11 +214,11 @@ class dzz_error
|
|||||||
|
|
||||||
.help {
|
.help {
|
||||||
background: #F3F3F3;
|
background: #F3F3F3;
|
||||||
border-radius: 10px 10px 10px 10px;
|
border-radius: 10px;
|
||||||
font: 12px verdana, arial, sans-serif;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 160%;
|
line-height: 160%;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sql {
|
.sql {
|
||||||
@@ -261,11 +261,9 @@ EOT;
|
|||||||
}
|
}
|
||||||
echo '</table></div>';
|
echo '</table></div>';
|
||||||
}
|
}
|
||||||
|
echo '<div class="help">'.lang('suggestion_user').'</div>';
|
||||||
|
echo '<div class="help">'.lang('suggestion').'</div>';
|
||||||
$helplink = '';
|
$helplink = '';
|
||||||
|
|
||||||
|
|
||||||
$endmsg = lang('error_end_message', array('host'=>$host));
|
$endmsg = lang('error_end_message', array('host'=>$host));
|
||||||
echo <<<EOT
|
echo <<<EOT
|
||||||
<div class="help">$endmsg. $helplink</div>
|
<div class="help">$endmsg. $helplink</div>
|
||||||
|
|||||||
@@ -911,6 +911,8 @@ $lang = array (
|
|||||||
'backtrace' => '运行信息',
|
'backtrace' => '运行信息',
|
||||||
'error_end_message' => '<a href="http://{host}">{host}</a> 已经将此出错信息详细记录, 由此给您带来的访问不便我们深感歉意',
|
'error_end_message' => '<a href="http://{host}">{host}</a> 已经将此出错信息详细记录, 由此给您带来的访问不便我们深感歉意',
|
||||||
'mobile_error_end_message' => '<a href="http://{host}">{host}</a> 此错误给您带来的不便我们深感歉意',
|
'mobile_error_end_message' => '<a href="http://{host}">{host}</a> 此错误给您带来的不便我们深感歉意',
|
||||||
|
'suggestion_user' => '如果您是用户,建议您尝试刷新页面、关闭所有浏览器窗口重新进行操作。如果无法解决,建议您完整截图本页面并保存,随后向站点管理员反馈此问题',
|
||||||
|
'suggestion' => '如果您是系统管理员,建议您尝试在系统工具中<a href="admin.php?mod=system" target="_blank">更新缓存</a> 以解决问题。若怀疑是插件导致的问题,请附上完整截图联系插件供应方获取帮助,或携带截图通过官方渠道寻求解决方案。若确认是程序自身的Bug,请直接向我们提交Issue,以便我们及时修复。',
|
||||||
|
|
||||||
'file_upload_error_-101' => '上传失败!上传文件不存在或不合法,请返回。',
|
'file_upload_error_-101' => '上传失败!上传文件不存在或不合法,请返回。',
|
||||||
'file_upload_error_-102' => '上传失败!非图片类型文件,请返回。',
|
'file_upload_error_-102' => '上传失败!非图片类型文件,请返回。',
|
||||||
|
|||||||
@@ -154,6 +154,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="user/scripts/setbacksize.js?{VERHASH}"></script>
|
<script type="text/javascript" src="user/scripts/setbacksize.js?{VERHASH}"></script>
|
||||||
<!--{template common/footer}-->
|
<!--{template common/footer}-->
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<script type="text/javascript" reload="1">
|
<script type="text/javascript" reload="1">
|
||||||
jQuery(document).ready(function(e) {
|
jQuery(document).ready(function(e) {
|
||||||
jQuery('#upload_from_edit_{$cid}_menu.tobody').removeClass('tobody').appendTo('body');
|
jQuery('#upload_from_edit_{$cid}_menu.tobody').removeClass('tobody').appendTo('body');
|
||||||
jQuery('#message_edit_{$cid}').TextAreaExpander(25,99999)
|
jQuery('#message_edit_{$cid}').TextAreaExpander(37,99999)
|
||||||
jQuery('#publish_submit_edit_{$cid}').click(function(){
|
jQuery('#publish_submit_edit_{$cid}').click(function(){
|
||||||
var val=jQuery('#message_edit_{$cid}').val();
|
var val=jQuery('#message_edit_{$cid}').val();
|
||||||
if(strlen(val)>0 && strlen(val)<1000){
|
if(strlen(val)>0 && strlen(val)<1000){
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ jQuery(document).ready(function(e) {
|
|||||||
});
|
});
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
|
||||||
jQuery('#message_{$idtype}_{$id}').TextAreaExpander(25,99999);
|
jQuery('#message_{$idtype}_{$id}').TextAreaExpander(37,99999);
|
||||||
<!--{if $_GET[allowattach]>=2}-->
|
<!--{if $_GET[allowattach]>=2}-->
|
||||||
var attachextensions='{eval echo implode('|',$space[attachextensions]);}';
|
var attachextensions='{eval echo implode('|',$space[attachextensions]);}';
|
||||||
if(attachextensions=='') attachextensions="\.*$";
|
if(attachextensions=='') attachextensions="\.*$";
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
ids:'caret,atwho',
|
ids:'caret,atwho',
|
||||||
url:'static/atwho/js/jquery.caret.js?{VERHASH},static/atwho/js/jquery.atwho.js?{VERHASH}'
|
url:'static/atwho/js/jquery.caret.js?{VERHASH},static/atwho/js/jquery.atwho.js?{VERHASH}'
|
||||||
},function(){
|
},function(){
|
||||||
jQuery('#message_{$cid}').TextAreaExpander(25,99999);
|
jQuery('#message_{$cid}').TextAreaExpander(37,99999);
|
||||||
<!--{if $_GET[allowat]>0}-->
|
<!--{if $_GET[allowat]>0}-->
|
||||||
jQuery('#at_home_{$cid}').on('mousedown',function(){
|
jQuery('#at_home_{$cid}').on('mousedown',function(){
|
||||||
document.getElementById('message_{$cid}').value+='@';
|
document.getElementById('message_{$cid}').value+='@';
|
||||||
|
|||||||
@@ -15,41 +15,51 @@ $typearr = array('image' => lang('photo'),
|
|||||||
'document' => lang('type_attach'),
|
'document' => lang('type_attach'),
|
||||||
'link' => lang('type_link'),
|
'link' => lang('type_link'),
|
||||||
'video' => lang('video'),
|
'video' => lang('video'),
|
||||||
'folder' => lang('folder'),
|
'folder' => lang('folder'),
|
||||||
'dzzdoc' => 'DZZ' . lang('type_attach'),
|
'dzzdoc' => 'DZZ' . lang('type_attach'),
|
||||||
'attach' => lang('rest_attachment')
|
'attach' => lang('rest_attachment')
|
||||||
);
|
);
|
||||||
require libfile('function/organization');
|
require libfile('function/organization');
|
||||||
if ($_GET['do'] == 'delete') {
|
if ($_GET['do'] == 'delete') {
|
||||||
$icoid = isset($_GET['icoid']) ? trim($_GET['icoid']) : '';
|
$icoid = isset($_GET['icoid']) ? trim($_GET['icoid']) : '';
|
||||||
|
if (!$icoid) {
|
||||||
|
die(json_encode(['msg' => 'access denied'])); // 使用简化的die函数
|
||||||
|
}
|
||||||
$icoids = explode(',', $icoid);
|
$icoids = explode(',', $icoid);
|
||||||
|
// 初始化数组
|
||||||
$ridarr = array();
|
$ridarr = array();
|
||||||
$bz = isset($_GET['bz']) ? trim($_GET['bz']) : '';
|
$bz = isset($_GET['bz']) ? trim($_GET['bz']) : '';
|
||||||
|
|
||||||
foreach ($icoids as $icoid) {
|
foreach ($icoids as $icoid) {
|
||||||
if (empty($icoid)) {
|
if (empty($icoid)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$return = IO::Delete($icoid, true);
|
try {
|
||||||
if (!$return['error']) {
|
$return = IO::Delete($icoid, true);
|
||||||
//处理数据
|
if (!$return['error']) {
|
||||||
$arr['sucessicoids'][$return['rid']] = $return['rid'];
|
$arr['sucessicoids'][$return['rid']] = $return['rid'];
|
||||||
$arr['msg'][$return['rid']] = 'success';
|
$arr['msg'][$return['rid']] = 'success';
|
||||||
$arr['name'][$return['rid']] = $return['name'];
|
$arr['name'][$return['rid']] = $return['name'];
|
||||||
$ridarr[] = $return['rid'];
|
$ridarr[] = $return['rid'];
|
||||||
$i++;
|
$i++;
|
||||||
} else {
|
} else {
|
||||||
$arr['msg'][$return['rid']] = $return['error'];
|
$arr['msg'][$return['rid']] = $return['error'];
|
||||||
$dels[] = $icoid.'_0';
|
$dels[] = $icoid . '_0';
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
exit(json_encode(['msg' => 'No items were deleted successfully']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$return['error']) {
|
|
||||||
Hook::listen('solrdel',$dels);
|
// 执行成功的条目数检查
|
||||||
showmessage('do_success', $_GET['refer']);
|
if (!empty($return['error'])) {
|
||||||
|
Hook::listen('solrdel', $dels);
|
||||||
|
exit(json_encode(['msg' => 'success']));
|
||||||
} else {
|
} else {
|
||||||
showmessage($return['error'], $_GET['refer']);
|
exit(json_encode(array('msg' => $return['error'])));
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
$lpp = empty($_GET['lpp']) ? 20 : $_GET['lpp'];
|
$lpp = empty($_GET['lpp']) ? 20 : $_GET['lpp'];
|
||||||
$checklpp = array();
|
$checklpp = array();
|
||||||
$checklpp[$lpp] = 'selected="selected"';
|
$checklpp[$lpp] = 'selected="selected"';
|
||||||
|
|||||||
@@ -321,10 +321,10 @@ function delete_file(){
|
|||||||
var icoids = rids.join(',');
|
var icoids = rids.join(',');
|
||||||
if(confirm('{lang Are you sure you want to delete this}'+delnums+'{lang file (if it is a folder, all the sub files under it will be deleted)? Cannot recover after deletion}')){
|
if(confirm('{lang Are you sure you want to delete this}'+delnums+'{lang file (if it is a folder, all the sub files under it will be deleted)? Cannot recover after deletion}')){
|
||||||
jQuery.post('{MOD_URL}&do=delete',{'icoid':icoids},function(data){
|
jQuery.post('{MOD_URL}&do=delete',{'icoid':icoids},function(data){
|
||||||
if(data['success']){
|
if(data['msg']['success']){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}else{
|
} else{
|
||||||
|
showmessage(data['msg']['error'], 'error', 3000, 1);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function(e) {
|
jQuery(document).ready(function(e) {
|
||||||
jQuery('textarea').TextAreaExpander(33);
|
jQuery('textarea').TextAreaExpander(37);
|
||||||
});
|
});
|
||||||
function set_submit(form) {
|
function set_submit(form) {
|
||||||
jQuery.post('$_G[siteurl]'+'{MOD_URL}&op=ajax&do=orginfo',jQuery(form).serialize(), function (data) {
|
jQuery.post('$_G[siteurl]'+'{MOD_URL}&op=ajax&do=orginfo',jQuery(form).serialize(), function (data) {
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--{/loop}-->
|
<!--{/loop}-->
|
||||||
<div class="page clearfix" style="padding: 20px 0">$multi</div>
|
<!--{if $multi}--><div class="page clearfix" style="padding: 20px 0">$multi</div><!--{/if}-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--{/loop}-->
|
<!--{/loop}-->
|
||||||
<div class="page clearfix" style="padding: 20px 0">$multi</div>
|
<!--{if $multi}--><div class="page clearfix" style="padding: 20px 0">$multi</div><!--{/if}-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -218,6 +218,8 @@
|
|||||||
for(var o in json.msg){
|
for(var o in json.msg){
|
||||||
if(json.msg[o]['success']){
|
if(json.msg[o]['success']){
|
||||||
jQuery('.list div[data-sid="'+o+'"]').remove();
|
jQuery('.list div[data-sid="'+o+'"]').remove();
|
||||||
|
} else {
|
||||||
|
showmessage('db_error_message', 'error', 3000, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
refresh_header();
|
refresh_header();
|
||||||
|
|||||||
@@ -436,4 +436,4 @@ $(function(){
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="static/js/jstree.min.js?{VERHASH}"></script>
|
<script type="text/javascript" src="static/js/jstree.min.js?{VERHASH}"></script>
|
||||||
<!--{template common/footer_system}-->
|
<!--{template common/footer_system}-->
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
jQuery('select').lyearSelect();
|
jQuery('select').lyearSelect();
|
||||||
jQuery('textarea').TextAreaExpander(30,999);
|
jQuery('textarea').TextAreaExpander(37,999);
|
||||||
})
|
})
|
||||||
jQuery(document).on('blur','.has-error .form-control',function(){
|
jQuery(document).on('blur','.has-error .form-control',function(){
|
||||||
if(this.value) jQuery(this).closest('.form-group').removeClass('has-error');
|
if(this.value) jQuery(this).closest('.form-group').removeClass('has-error');
|
||||||
|
|||||||
Reference in New Issue
Block a user