Browse Source

常规问题修复

tags/6.1.7
tianya 2 years ago
parent
commit
a09a603733
9 changed files with 66 additions and 39 deletions
  1. +1
    -1
      README.md
  2. +31
    -29
      src/admin/makehtml_homepage.php
  3. +5
    -1
      src/admin/makehtml_taglist.php
  4. +1
    -1
      src/admin/templets/index_body.htm
  5. +13
    -4
      src/admin/templets/makehtml_homepage.htm
  6. +2
    -2
      src/install/templates/step-1.html
  7. +11
    -1
      src/static/ckeditor/plugins/mimage/plugin.js
  8. +1
    -0
      src/system/database/dedesqli.class.php
  9. +1
    -0
      src/system/database/dedesqlite.class.php

+ 1
- 1
README.md View File

@@ -53,7 +53,7 @@ Sockets:支持接入DedeBIZ商业组件模块
..../a 默认HTML文件存放目录[必须可写入]
..../admin 默认后台管理目录[可任意改名]
..../apps 插件扩展程序目录[不可写入,可执行]
..../data 系统缓存或其它可写入数据存放目录[必须可写入,但不可执行]
..../data 系统缓存或其它可写入数据存放目录[必须可写入,但不可执行,建议关闭对外访问权限]
..../install 安装程序目录,安装完后可删除[安装时必须有可写入权限]
..../static 静态资源存放目录[必须可写入,无需执行]
..../system 类库文件目录[建议关闭对外访问权限]


+ 31
- 29
src/admin/makehtml_homepage.php View File

@@ -25,35 +25,37 @@ if ($dopost == "view") {
$client->key = $cfg_bizcore_key;
$data = $client->AdminPWDExists();
$data = json_decode($data->data);
$rs = (array)($data->result);
if ($rs["admin_pwd_exists"] == "false") {
//设定dedebiz admin密码
if ($dedebiz_admin == "" || $dedebiz_admin !== $re_dedebiz_admin) {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-danger\" role=\"alert\">DedeBIZ操作密码为空或两次指定的密码不符</div><br>";
$client->Close();
exit;
}
$data = $client->AdminPWDCreate($dedebiz_admin);
if ($data->data != "ok") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-danger\" role=\"alert\">DedeBIZ设定操作密码失败:${$data}</div><br>";
$client->Close();
exit;
}
} else {
if ($dedebiz_admin == "") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-danger\" role=\"alert\">DedeBIZ操作密码为空</div><br>";
$client->Close();
exit;
}
$data = $client->AdminSetIndexLockState($dedebiz_admin, $lockindex);
if ($data->data != "ok") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-danger\" role=\"alert\">DedeBIZ操作密码失败,填写正确的操作密码</div><br>";
$client->Close();
exit;
if ($data) {
$rs = (array)($data->result);
if ($rs["admin_pwd_exists"] == "false") {
//设定dedebiz admin密码
if ($dedebiz_admin == "" || $dedebiz_admin !== $re_dedebiz_admin) {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-danger\" role=\"alert\">DedeBIZ操作密码为空或两次指定的密码不符</div><br>";
$client->Close();
exit;
}
$data = $client->AdminPWDCreate($dedebiz_admin);
if ($data->data != "ok") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-danger\" role=\"alert\">DedeBIZ设定操作密码失败:${$data}</div><br>";
$client->Close();
exit;
}
} else {
if ($dedebiz_admin == "") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-danger\" role=\"alert\">DedeBIZ操作密码为空</div><br>";
$client->Close();
exit;
}
$data = $client->AdminSetIndexLockState($dedebiz_admin, $lockindex);
if ($data->data != "ok") {
echo "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/web/css/bootstrap.min.css\"><style>.modal {position: static;}</style>";
echo "<div class=\"alert alert-danger\" role=\"alert\">DedeBIZ操作密码失败,填写正确的操作密码</div><br>";
$client->Close();
exit;
}
}
}
$client->Close();


+ 5
- 1
src/admin/makehtml_taglist.php View File

@@ -28,7 +28,11 @@ if ($action == "search") {
);
echo json_encode($result);
}

$result = array(
"code" => 200,
"data" => null,
);
echo json_encode($result);
exit;
}



+ 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"><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-header"><a href="javascript:CopySystemInfo(`Dede:<?php echo $cfg_version_detail;?>|操作系统:<?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>"; ?>


+ 13
- 4
src/admin/templets/makehtml_homepage.htm View File

@@ -74,9 +74,17 @@
$client->appid = $cfg_bizcore_appid;
$client->key = $cfg_bizcore_key;
$data = $client->AdminPWDExists();
$data = json_decode($data->data);
$rs = (array)($data->result);
if($rs["admin_pwd_exists"] == "false") {
if($data->code == -1){
?>
<tr>
<td height="26" colspan="2" valign="top" bgcolor="#FFFFFF">尚未开启DedeBIZ商业组件 <a class="btn btn-danger btn-sm" target="_blank" href="https://www.dedebiz.com/start?code=-1008">如何启动组件</a>
</td>
</tr>
<?php
} else {
$data = json_decode($data->data);
$rs = (array)($data->result);
if($rs["admin_pwd_exists"] == "false") {
?>
<tr>
<td height="26" valign="top" bgcolor="#FFFFFF">设置操作密码:</td>
@@ -105,7 +113,8 @@
</td>
</tr>
<?php
}
}
}
} else {
?>
<tr>


+ 2
- 2
src/install/templates/step-1.html View File

@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="<?php echo $cfg_soft_lang; ?>">
<title>安装程序</title>
<title>DedeCMSV6安装程序</title>
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
<script src="../static/web/js/jquery.min.js"></script>
@@ -101,7 +101,7 @@
<div class="form-text text-danger">在根目录安装时不必理会</div>
</div>
<button type="submit" class="btn btn-success">立即安装</button>
<span class="ml-2">安装即表示您同意<a href="https://www.dedebiz.com/license" target="_blank" class="text-dark">站点授权协议</a></span>
<span class="ml-2">安装即表示您同意<a href="https://www.dedebiz.com/license?from=install" target="_blank" class="text-success">《站点授权协议》</a></span>
</form>
</div>
</div>


+ 11
- 1
src/static/ckeditor/plugins/mimage/plugin.js View File

@@ -4,7 +4,17 @@ CKEDITOR.plugins.add("mimage", {
a.addCommand("openMImageDialog",
{
exec: function (a) {
var posLeft = 100; var posTop = 100;
var w = 800;
var h = 600;
var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
var dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
var systemZoom = width / window.screen.availWidth;
var posLeft = (width - w) / 2 / systemZoom + dualScreenLeft;
var posTop = (height - h) / 2 / systemZoom + dualScreenTop;
window.open("./dialog/select_mimages.php?f=" + a.name, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + posLeft + ", top=" + posTop);
}
});


+ 1
- 0
src/system/database/dedesqli.class.php View File

@@ -492,6 +492,7 @@ EOT;
{
$errorTrackFile = DEDEDATA.'/mysqli_error_trace.inc';
if ($this->showError) {
$msg = str_replace(array("\r","\n"),"",addslashes($msg));
ShowMsg("{$msg}", "javascript:;", -1);
exit;
}


+ 1
- 0
src/system/database/dedesqlite.class.php View File

@@ -505,6 +505,7 @@ EOT;
{
$errorTrackFile = DEDEDATA.'/sqlite_error_trace.inc';
if ($this->showError) {
$msg = str_replace(array("\r","\n"),"",addslashes($msg));
ShowMsg("{$msg}", "javascript:;", -1);
exit;
}


Loading…
Cancel
Save