@@ -123,16 +123,16 @@ if (!function_exists('IsWritable')) { | |||
$safeMsg = array(); | |||
$dirname = str_replace('index_body.php', '', strtolower($_SERVER['PHP_SELF'])); | |||
if (preg_match("#[\\|/]admin[\\|/]#", $dirname)) { | |||
$safeMsg[] = '后台管理登录名称为admin,建议您进行修改'; | |||
$safeMsg[] = '检测到后台管理登录名称带admin,建议您进行修改'; | |||
} | |||
if (IsWritable(DEDEDATA.'/common.inc.php')) { | |||
$safeMsg[] = '数据库配置data/common.inc.php文件,建议您以管理员权限设置禁止写入和执行'; | |||
$safeMsg[] = '检测到数据库配置data/common.inc.php文件写入权限,建议您以管理员权限设置禁止写入和执行'; | |||
} | |||
if (!IsSSL()) { | |||
$safeMsg[] = '网址非安全链接,建议您配置https'; | |||
$safeMsg[] = '检测到网址非安全链接,建议您配置https'; | |||
} | |||
if (version_compare(PHP_VERSION, '5.3.0', '<')) { | |||
$safeMsg[] = 'php版本过低会无法正常使用后台,建议您升级到php7.x'; | |||
$safeMsg[] = '检测到php版本过低会无法正常使用后台,建议您升级到php7.x'; | |||
} | |||
if (!DEDEBIZ_SAFE_MODE) { | |||
$safeMsg[] = '系统运行环境为开发模式,建议您启用安全模式 <a href="index_body.php?dopost=safe_mode" class="btn btn-success btn-xs">详情</a>'; | |||
@@ -142,10 +142,10 @@ if ($rs < 0) { | |||
$linkurl = '<a href="sys_admin_user.php" class="btn btn-success btn-xs">修改</a>'; | |||
switch ($rs) { | |||
case -1: | |||
$msg = "管理员默认名称没有修改,建议您修改 {$linkurl}"; | |||
$msg = "检测到管理员默认名称没有修改,建议您修改 {$linkurl}"; | |||
break; | |||
case -2: | |||
$msg = "管理员默认名称和密码没有修改,建议您修改 {$linkurl}"; | |||
$msg = "检测到管理员默认名称和密码没有修改,建议您修改 {$linkurl}"; | |||
break; | |||
} | |||
$safeMsg[] = $msg; | |||
@@ -154,7 +154,7 @@ if ($rs < 0) { | |||
<?php | |||
if (count($safeMsg) > 0) { | |||
?> | |||
<div class="alert alert-danger mt-3"> | |||
<div class="alert alert-warning mt-3"> | |||
<ul> | |||
<?php | |||
$i = 1; | |||
@@ -22,7 +22,7 @@ if (empty($action)) { | |||
else if ($action == 'getfields') { | |||
AjaxHead(); | |||
$dsql->GetTableFields($exptable); | |||
echo "<div class='alert alert-warning mb-0'>"; | |||
echo "<div class='alert alert-info mb-0'>"; | |||
echo "表<span class='text-primary'>".$exptable."</span>含有的字段:<br>"; | |||
while ($row = $dsql->GetFieldObject()) { | |||
echo "<a href=\"javascript:pf('{$row->name}')\">".$row->name."</a>\r\n"; | |||
@@ -12,7 +12,6 @@ require_once(dirname(__FILE__).'/config.php'); | |||
require_once(DEDEINC.'/libraries/dedehttpdown.class.php'); | |||
CheckPurview('sys_Edit'); | |||
if (empty($action)) $action = ''; | |||
if (empty($message)) $message = '尚未进行检测'; | |||
if (empty($filetype)) $filetype = 'php|inc'; | |||
if (empty($info)) $info = 'eval|cmd|system|exec|_GET|_POST|_REQUEST|base64_decode'; | |||
$fileHashURL = "https://cdn.dedebiz.com/release/{$cfg_version_detail}.json"; | |||
@@ -25,7 +24,7 @@ foreach ($filelist as $key => $ff) { | |||
} | |||
$alter = ""; | |||
if (count($offFiles) == 0) { | |||
$alter = DedeAlert('与官方文件服务器通信失败,校验时候无法保证本地文件和同官方文件服务器是否一致', ALERT_DANGER); | |||
$alter = DedeAlert('官方文件服务器通信失败,无法保证本地文件和同官方文件服务器是否一致', ALERT_DANGER); | |||
} | |||
function TestOneFile($f) | |||
{ | |||
@@ -47,7 +46,7 @@ function TestOneFile($f) | |||
if ($localFilehash === $remoteFilehash) { | |||
return 0; | |||
} | |||
$message .= "<div><span class='d-inline-block w-75'>发现可疑文件:{$trfile}</span><a href='file_manage_view.php?fmdo=edit&filename=$oldTrfile&activepath=' target='_blank' class='btn btn-light btn-sm'><i class='fa fa-eye'></i> 查看</a><a href='sys_safetest.php?action=viewdiff&filename=$oldTrfile' target='_blank' class='btn btn-light btn-sm'><i class='fa fa-pencil-square'></i> 修改</a><a href='file_manage_view.php?fmdo=del&filename=$oldTrfile&activepath=' target='_blank' class='btn btn-danger btn-sm'><i class='fa fa-trash'></i> 删除</a></div><hr>\r\n"; | |||
$message .= "<div class='mb-3'><span class='d-inline-block w-75'>发现可疑文件:{$trfile}</span><a href='file_manage_view.php?fmdo=edit&filename=$oldTrfile&activepath=' target='_blank' class='btn btn-light btn-sm'><i class='fa fa-eye'></i> 查看</a><a href='sys_safetest.php?action=viewdiff&filename=$oldTrfile' target='_blank' class='btn btn-light btn-sm'><i class='fa fa-pencil-square'></i> 修改</a><a href='file_manage_view.php?fmdo=del&filename=$oldTrfile&activepath=' target='_blank' class='btn btn-danger btn-sm'><i class='fa fa-trash'></i> 删除</a></div>\r\n"; | |||
return 1; | |||
} | |||
return 0; | |||
@@ -68,7 +67,6 @@ function TestSafe($tdir) | |||
} | |||
//检测 | |||
if ($action == 'test') { | |||
$message = '<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">'; | |||
AjaxHead(); | |||
TestSafe(DEDEROOT); | |||
if ($message == '') $message = "没发现可疑文件"; | |||
@@ -77,7 +75,7 @@ if ($action == 'test') { | |||
} else if ($action == 'viewdiff') { | |||
$filename = isset($filename) ? $filename : ""; | |||
if (empty($filename)) { | |||
ShowMsg("没有选择对应的文件", "-1"); | |||
ShowMsg("请选择对应的文件", "-1"); | |||
exit; | |||
} | |||
$baseFile = "https://cdn.dedebiz.com/release/{$cfg_version_detail}$filename"; | |||
@@ -15,7 +15,7 @@ | |||
<td bgcolor="#f5f5f5" colspan="2">自动摘要分页</td> | |||
</tr> | |||
<tr> | |||
<td width="360"> | |||
<td width="630"> | |||
<label>栏目id:<input type="text" name="channel" id="channel" value="1" class="admin-input-xs"></label> | |||
<span>(可在“<a href="mychannel_main.php">栏目模型管理</a>”处获得)</span> | |||
</td> | |||
@@ -170,7 +170,7 @@ | |||
<label class="l-height-28"><input type="radio" name="cross" id="cross2" value="2" onclick="CheckCross()"> 手工指定交叉栏目id(用英文逗号)</label> | |||
<span onclick="ShowHide('helpvarco')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span><br> | |||
<textarea name="crossid" id="crossid" class="admin-textarea-sm" style="display:none"></textarea> | |||
<div id="helpvarco" class="alert alert-warning my-2" style="display:none">交叉栏目是指一个大栏目与另一个非下级的子栏目出现交叉的情况,相当于系统原来的副栏目功能,不过现在改在栏目里预先设置好。注:会自动索引交叉栏目的文档,但不会索引交叉栏目下级栏目的文档,这种应用也适用于按地区划分资讯的站点</div> | |||
<div id="helpvarco" class="alert alert-info my-2" style="display:none">交叉栏目是指一个大栏目与另一个非下级的子栏目出现交叉的情况,相当于系统原来的副栏目功能,不过现在改在栏目里预先设置好。注:会自动索引交叉栏目的文档,但不会索引交叉栏目下级栏目的文档,这种应用也适用于按地区划分资讯的站点</div> | |||
</td> | |||
</tr> | |||
<?php if ($id==0) {?> | |||
@@ -195,7 +195,7 @@ | |||
<input type="text" name="tempindex" value="{style}/index_<?php echo $nid?>.htm" class="admin-input-lg"> | |||
<button type="button" name="set2" class="btn btn-success btn-sm" onclick="SelectTemplets('form1.tempindex')">选择</button> | |||
<span onclick="ShowHide('helpvar1')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span> | |||
<div id="helpvar1" class="alert alert-warning my-2" style="display:none"> | |||
<div id="helpvar1" class="alert alert-info my-2" style="display:none"> | |||
<p>{tid} 栏目id</p> | |||
<span>{cid} 栏目模型名字id</span> | |||
</div> | |||
@@ -211,7 +211,7 @@ | |||
<td> | |||
<input type="text" name="namerule2" id="namerule2" value="{typedir}/{tid}-{page}.html" class="admin-input-lg"> | |||
<span onclick="ShowHide('helpvar2')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span> | |||
<div id="helpvar2" class="alert alert-warning my-2" style="display:none"> | |||
<div id="helpvar2" class="alert alert-info my-2" style="display:none"> | |||
<p>静态规则</p> | |||
<p>{tid} 栏目id</p> | |||
<p>{page} 栏目页码数</p> | |||
@@ -226,7 +226,7 @@ | |||
<td> | |||
<input type="text" name="namerule" tid="namerule" value="<?php echo $cfg_df_namerule;?>" class="admin-input-lg"> | |||
<span onclick="ShowHide('helpvar3')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span> | |||
<div id="helpvar3" class="alert alert-warning my-2" style="display:none"> | |||
<div id="helpvar3" class="alert alert-info my-2" style="display:none"> | |||
<p>静态规则</p> | |||
<p>{Y}{M}{D} 年月日</p> | |||
<p>{timestamp} INT类型的UNIX时间戳</p> | |||
@@ -71,7 +71,7 @@ | |||
<td> | |||
<input type="text" name="namerule2" id="namerule2" value="{typedir}/{tid}-{page}.html" class="admin-input-lg"> | |||
<span onclick="ShowHide('helpvar1')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span> | |||
<div id="helpvar1" class="alert alert-warning my-2" style="display:none"> | |||
<div id="helpvar1" class="alert alert-info my-2" style="display:none"> | |||
<p>静态规则</p> | |||
<p>{tid} 栏目id</p> | |||
<p>{page} 栏目页码数</p> | |||
@@ -86,7 +86,7 @@ | |||
<td> | |||
<input type="text" name="namerule" id="namerule" value="{typedir}/{aid}.html" class="admin-input-lg"> | |||
<span onclick="ShowHide('helpvar2')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span> | |||
<div id="helpvar2" class="alert alert-warning my-2" style="display:none"> | |||
<div id="helpvar2" class="alert alert-info my-2" style="display:none"> | |||
<p>静态规则</p> | |||
<p>{Y}{M}{D} 年月日</p> | |||
<p>{timestamp} INT类型的UNIX时间戳</p> | |||
@@ -156,7 +156,7 @@ | |||
<label class="l-height-28"><input type="radio" name="cross" id="cross2" value="2" onclick="CheckCross()" <?php if ($myrow['cross']==2) echo "checked='1'";?>> 手工指定交叉栏目id(用英文逗号)</label> | |||
<span onclick="ShowHide('helpvarco')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span><br> | |||
<textarea name="crossid" id="crossid" class="admin-textarea-sm" style="<?php if ($myrow['cross']!=2) echo'display:none';?>"><?php echo $myrow['crossid'];?></textarea> | |||
<div id="helpvarco" class="alert alert-warning my-2" style="display:none">交叉栏目是指一个大栏目与另一个非下级的子栏目出现交叉的情况,相当于系统原来的副栏目功能,不过现在改在栏目里预先设置好。注:会自动索引交叉栏目的文档,但不会索引交叉栏目下级栏目的文档,这种应用也适用于按地区划分资讯的站点</div> | |||
<div id="helpvarco" class="alert alert-info my-2" style="display:none">交叉栏目是指一个大栏目与另一个非下级的子栏目出现交叉的情况,相当于系统原来的副栏目功能,不过现在改在栏目里预先设置好。注:会自动索引交叉栏目的文档,但不会索引交叉栏目下级栏目的文档,这种应用也适用于按地区划分资讯的站点</div> | |||
</td> | |||
</tr> | |||
<tr> | |||
@@ -179,7 +179,7 @@ | |||
<input type="text" name="tempindex" value="<?php echo $myrow['tempindex']?>" class="admin-input-lg"> | |||
<button type="button" name="set2" class="btn btn-success btn-sm" onclick="SelectTemplets('form1.tempindex')">选择</button> | |||
<span onclick="ShowHide('helpvar1')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span> | |||
<div id="helpvar1" class="alert alert-warning my-2" style="display:none"> | |||
<div id="helpvar1" class="alert alert-info my-2" style="display:none"> | |||
<p>{tid} 栏目id</p> | |||
<span>{cid} 栏目模型名字id</span> | |||
</div> | |||
@@ -195,7 +195,7 @@ | |||
<td> | |||
<input type="text" name="namerule2" id="namerule2" value="<?php echo $myrow['namerule2']?>" class="admin-input-lg"> | |||
<span onclick="ShowHide('helpvar2')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span> | |||
<div id="helpvar2" class="alert alert-warning my-2" style="display:none"> | |||
<div id="helpvar2" class="alert alert-info my-2" style="display:none"> | |||
<p>静态规则</p> | |||
<p>{tid} 栏目id</p> | |||
<p>{page} 栏目页码数</p> | |||
@@ -210,7 +210,7 @@ | |||
<td> | |||
<input type="text" name="namerule" id="namerule" value="<?php echo $myrow['namerule']?>" class="admin-input-lg"> | |||
<span onclick="ShowHide('helpvar3')" title="帮助" class="btn btn-success btn-sm"><i class="fa fa-question-circle"></i></span> | |||
<div id="helpvar3" class="alert alert-warning my-2" style="display:none"> | |||
<div id="helpvar3" class="alert alert-info my-2" style="display:none"> | |||
<p>静态规则</p> | |||
<p>{Y}{M}{D} 年月日</p> | |||
<p>{timestamp} INT类型的UNIX时间戳</p> | |||
@@ -20,7 +20,7 @@ | |||
</tr> | |||
<tr> | |||
<td colspan="2"> | |||
<div class="alert alert-warning mb-0">文档单页管理仅适用于页面较少的情况(建议小于500个页面)大量文档的用文档模型进行管理,文档模板里用“{dede:field name='body'/}”来获得</div> | |||
<div class="alert alert-info mb-0">文档单页管理仅适用于页面较少的情况(建议小于500个页面)标签“{dede:field name='body'/}”调用</div> | |||
</td> | |||
</tr> | |||
<tr> | |||
@@ -21,7 +21,7 @@ | |||
</tr> | |||
<tr> | |||
<td colspan="2"> | |||
<div class="alert alert-warning mb-0">文档单页管理仅适用于页面较少的情况(建议小于500个页面)大量文档的用文档模型进行管理,文档模板里用“{dede:field name='body'/}”来获得</div> | |||
<div class="alert alert-info mb-0">文档单页管理仅适用于页面较少的情况(建议小于500个页面)标签“{dede:field name='body'/}”调用</div> | |||
</td> | |||
</tr> | |||
<tr> | |||
@@ -174,8 +174,8 @@ body.hidemenu .body-right { | |||
position:relative; | |||
padding-left:50px; | |||
display:block; | |||
height:40px; | |||
line-height:40px; | |||
height:42px; | |||
line-height:42px; | |||
cursor:pointer; | |||
transition:all .5s | |||
} | |||
@@ -184,7 +184,7 @@ body.hidemenu .body-right { | |||
} | |||
.item-menu li i { | |||
position:absolute; | |||
top:13px; | |||
top:14px; | |||
left:20px; | |||
color:#545b62 | |||
} | |||
@@ -18,7 +18,7 @@ define('ALERT_WARNING', 5); | |||
define('ALERT_INFO', 6); | |||
define('ALERT_LIGHT', 7); | |||
define('ALERT_DARK', 8); | |||
define("ALERT_TPL", '<div style="position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;width:auto;font-size:12px;color:~color~;background:~background~;border-color:~border~;border:1px solid transparent;border-radius:.5rem">~content~</div>'); | |||
define("ALERT_TPL", '<div style="position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;width:auto;font-size:14px;color:~color~;background:~background~;border-color:~border~;border:1px solid transparent;border-radius:.5rem">~content~</div>'); | |||
//$content:文档,$type:alert类型 | |||
function DedeAlert($content, $type = ALERT_PRIMARY, $isHTML = false) | |||
{ | |||
@@ -48,7 +48,7 @@ | |||
<nav class="py-3"> | |||
<ul class="pagination justify-content-center">{dede:pagebreak/}</ul> | |||
</nav> | |||
<div class="alert alert-warning mt-3">您会看到这个提示,那是因为您的系统无法识别某栏目的模型信息,或者您新建模型后,没为这个模型设计单独的模板不同模型的文档浏览页的模板为:article_模型名字标识.htm如“article_article.htm”,更多的信息您可以在栏目模型管理的地方查看</div> | |||
<div class="alert alert-info mt-3">您会看到这个提示,那是因为您的系统无法识别某栏目的模型信息,或者您新建模型后,没为这个模型设计单独的模板不同模型的文档浏览页的模板为:article_模型名字标识.htm如“article_article.htm”,更多的信息您可以在栏目模型管理的地方查看</div> | |||
{dede:fieldlist} | |||
<table class="table"> | |||
<tr> | |||