Browse Source

常规问题修正

tags/6.1.7
tianya 2 years ago
parent
commit
288aca6dde
5 changed files with 49 additions and 3 deletions
  1. +2
    -0
      src/admin/dialog/select_soft.php
  2. +20
    -0
      src/admin/js/indexbody.js
  3. +1
    -1
      src/admin/templets/index_body.htm
  4. +1
    -1
      src/system/common.func.php
  5. +25
    -1
      src/system/libraries/statistics.class.php

+ 2
- 0
src/admin/dialog/select_soft.php View File

@@ -62,6 +62,8 @@ a{text-decoration:none!important}
function ReturnValue(reimg) {
if (window.opener.document.<?php echo $f ?> != null) {
window.opener.document.<?php echo $f ?>.value = reimg;
window.close();
return
}
var funcNum = <?php echo isset($CKEditorFuncNum) ? $CKEditorFuncNum : 1; ?>;
if (window.opener.CKEDITOR != null && funcNum != 1) {


+ 20
- 0
src/admin/js/indexbody.js View File

@@ -14,6 +14,26 @@ function ShowWaitDiv() {
$DE('loaddiv').style.display = 'block';
return true;
}
function DedeCopyToClipboard(text) {
if (navigator.clipboard) {
navigator.clipboard.writeText(text);
} else {
var textarea = document.createElement('textarea');
document.body.appendChild(textarea);
// 隐藏此输入框
textarea.style.position = 'fixed';
textarea.style.clip = 'rect(0 0 0 0)';
textarea.style.top = '10px';
textarea.style.display = 'none';
textarea.value = text;
textarea.select();
document.execCommand('copy', true);
document.body.removeChild(textarea);
}
}
function CopySystemInfo(txt) {
DedeCopyToClipboard(txt);
}
$(function () {
$.get("index_testenv.php", function (data) {
if (data !== '') {


+ 1
- 1
src/admin/templets/index_body.htm View File

@@ -69,7 +69,7 @@ table.stattable td{padding:.6rem;border-bottom:1px solid #dee2e6;text-align:righ
</div>
<div class="col-md-6 mt-3 mb-3 updatenews">
<div class="card">
<div class="card-header"><i class="fa fa-gear"></i>&nbsp;系统信息</div>
<div class="card-header"><a href="javascript:CopySystemInfo(`DedeBIZ:操作系统:<?php echo PHP_OS; ?>|Web服务器:<?php echo $_SERVER['SERVER_SOFTWARE']; ?>|PHP版本:<?php echo @phpversion(); ?>|数据库版本:<?php echo $dsql->GetVersion(); ?>`);"><i class="fa fa-gear"></i></a>&nbsp;系统信息</div>
<div class="card-body">
<div id="updateinfos">
<?php echo "<iframe name='stafrm' src='{$offUrl}&uptime={$oktime}' frameborder='0' id='stafrm' style='width:98%;height:70px;padding:.6rem'></iframe>"; ?>


+ 1
- 1
src/system/common.func.php View File

@@ -205,7 +205,7 @@ function ShowMsg($msg, $gourl, $onlymsg = 0, $limittime = 0)
global $cfg_soft_lang, $cfg_cmsurl;
if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..';
$htmlhead = "<html><head><meta charset='utf-8'><title>提示信息</title><meta name='viewport' content='width=device-width,initial-scale=1'><base target='_self'></head>";
$htmlhead .= "<body>".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."<center><script>";
$htmlhead .= "<body><center><script>";
$htmlfoot = "</script></center></body></html>";
$litime = ($limittime == 0 ? 1000 : $limittime);
$func = '';


+ 25
- 1
src/system/libraries/statistics.class.php View File

@@ -57,7 +57,31 @@ class DedeStatistics {
return <<<EOT
(function() {
let u = '{$url}';
fetch(u);
var ms_ie = false;
var ua = window.navigator.userAgent;
if ((ua.indexOf('MSIE ') > -1) || (ua.indexOf('Trident/') > -1)) {
ms_ie = true;
}
if (ms_ie) {
var xhr;
if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
try {
xhr = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
try {
xhr = new ActiveXObject('Microsoft.XMLHTTP');
} catch (e) {}
}
}
if (xhr) {
xhr.open('GET', u, true);
xhr.send(null);
}
} else {
fetch(u);
}
})();
EOT;
}


Loading…
Cancel
Save