<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>织梦安全卫士</title>
<link href="img/base.css" rel="stylesheet" type="text/css" />
<link href="img/indexbody.css" rel="stylesheet" type="text/css" />
<link href="css/base.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/indexbody.css" />
<style type="text/css">
td { padding-left:8px; }
.dlist{ clear:both;border-bottom:1px dotted #B8E6A2;line-height:24px; }
.dshow, .hide,.trhide{ display:none; }
.dtip{ float:left; width:70px; color:#999; line-height:24px; height:24px; }
</style>
<script language='javascript' src='../images/js/j.js'></script>
<script language='javascript' src='js/main.js'></script>
<script language="javascript" src="../include/dedeajax2.js"></script>
<script language="javascript" src="js/indexbody.js"></script>
<script type="text/javascript">
$(function(){
	var score = 100;
	var timer = setInterval(function(){
		if($(".dshow:eq(0)").length==1){
			n = $(".dshow:eq(0)").attr("data");
			if(n) score -= n;
			$(".dshow:eq(0)").fadeIn().removeClass("dshow");
			$(".chkproccess").html("<img src='images/loadinglit.gif'  onerror=\"this.src='img/loadinglit.gif'\"/>正在检查，请稍后 &nbsp; &nbsp; 当前得分：<font color=red>"+score+"分</font>");
		}else{
			var chk = ['adminchk', 'updatechk', 'dbzendchk', 'filechk'];
			i = 0;
			$.each(chk, function(index, value){
				$.getJSON("?ac="+value+"&"+Math.random(), function(rs){
					i ++ ;
					$("."+value+" div:eq(0)").html(rs.msg);
					$("."+value+" div:eq(1)").html(rs.tip);
					$("."+value+" div:eq(2)").html(rs.act);
					$("."+value).show();
					score -= rs.sc;
					$(".chkproccess").html("<img src='images/loadinglit.gif'  onerror=\"this.src='img/loadinglit.gif'\"/>正在检查，请稍后 &nbsp; &nbsp; 当前得分：<font color=red>"+score+"分</font>");
					if(i==chk.length) {
						if(score>=95){
							vs = "您的网站安全维护得不错，希望继续坚持";
						}else if(score>=80){
							vs = "您的网站安全性一般，加强安全防护才能确保万无一失";
						}else if(score>=60){
							vs = "您的网站安全刚及格，如不加强安全防护存在入侵危险";
						}else if(score<60){
							vs = "您的网站安全不及格，非常危险，请马上进行安全防护";
						}
						$(".chkproccess").html("检测完成&nbsp; &nbsp; 当前得分：<font color=red>"+score+"分</font> <font color=gray>"+vs+"</font>");
					}
				});
			});
			clearInterval(timer);
		}
	},500);
})
function Loadfilechk()
{
	var myajax = new DedeAjax($DE('updateinfos'));
	myajax.SendGet2('?ac=Loadfilechk');
}
</script>
</head>

<body leftmargin="8" topmargin="8" background='images/allbg.gif'>
<div class="bodytitle">
	<div class="bodytitleleft"></div>
	<div class="bodytitletxt" style="padding-left:10px;">织梦安全卫士 - 安全检测中心</div>
</div>
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#CFCFCF; min-width:1000px;">
	<tr>
		<td width="100%" height="24" colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif" style="padding-left:10px;"><b class="chkproccess"><img src='images/loadinglit.gif' onerror="this.src='img/loadinglit.gif'" />正在检查，请稍后 &nbsp; &nbsp; 当前得分：<font color=red>100分</font></b></td>
	</tr>
	<tr>
		<td colspan="2" bgcolor="#FFFFFF">

			<div class="dlist dshow" <?php if($mysql_error_size>0) echo "data=5"; ?> >
				<div style='width:450px;float:left'><?php if($mysql_error_size>0) echo "mysql执行错误（".formatsize($mysql_error_size)."）记录未处理，存在泄漏后台路径风险"; else echo "检测是否有mysql执行错误记录"; ?></div>
				<div class="dtip"><?php if($mysql_error_size>0) echo "建议检查"; ?></div>
				<div style='float:left'><?php if($mysql_error_size>0) echo '<a href="?ac=delerr" class="np coolbg">直接删除</a>'; else echo "没有风险[安全]"; ?><?php if($mysql_error_size>0) echo '（<a href="?ac=checkserv&f='.$datadir.'/mysql_error_trace.inc">如果频繁生成，建议检查并优化系统，工程师协助检查？</a>）'; ?></div>
			</div>

			<div class="dlist dshow" <?php if(is_file($log_file)) echo "data=7"; ?>>
				<div style="width:450px;float:left">
					<?php if(is_file($log_file)) echo "sql注入拦截记录（".formatsize(filesize($log_file))."），存在泄漏数据库前缀等信息，可能为入侵提供指导"; else echo "检测是否有sql注入拦截记录"; ?>
				</div>
				<div class="dtip"><?php if(is_file($log_file)) echo "建议删除"; ?></div>
				<div style='float:left'><?php if(is_file($log_file)) echo '<a href="?ac=delinject" class="np coolbg">直接删除</a>';else echo "没有风险[安全]"; ?></div>
			</div>

<?php if(preg_match("/57/", $cfg_version)){ ?>
			<div class="dlist dshow" <?php if(!preg_match("#6#", $safe_gdopen)) echo "data=10"; ?>>
				<div style='width:450px;float:left'><?php if(!preg_match("#6#", $safe_gdopen)) echo "后台登录验证码未开启，验证码可以有效避免机器人爆破后台密码"; else echo "检查后台登录验证码是否开启"; ?></div>
				<div class="dtip"><?php if(!preg_match("#6#", $safe_gdopen)) echo "建议开启"; ?></div>
				<div style='float:left'><?php if(!preg_match("#6#", $safe_gdopen)) echo '<a href="sys_safe.php" class="np coolbg">现在开启</a>';else echo "没有风险[安全]"; ?><?php if(!preg_match("#6#", $safe_gdopen)) echo '（<a href="?ac=checkserv&tab=2&stype=yz">验证码异常？联系技术工程师帮您开启</a>）'; ?></div>
			</div>
<?php } ?>
			<div class="dlist dshow" <?php if(preg_match('/dede\/dedesafer/i',$cururl)) echo "data=12"; ?>>
				<div style='width:450px;float:left'><?php if(preg_match('/dede\/dedesafer/i',$cururl)) echo "您的管理目录的名称中包含默认名称dede，建议修改为其它名称"; else echo "检查后台管理目录名安全性"; ?></div>
				<div class="dtip"><?php if(preg_match('/dede\/dedesafer/i',$cururl)) echo "建议修改"; ?></div>
				<div style='float:left'><?php if(preg_match('/dede\/dedesafer/i',$cururl)) echo '<a href="file_manage_view.php?filename=dede&activepath=&fmdo=rename" class="np coolbg" onclick="return confirm(\'修改后请用新后台名称重新登录\')">立即修改</a>';else echo "没有风险[安全]"; ?></div>
			</div>
			
			<div class="dlist dshow" <?php if(!isset($bkday)) echo "data=8"; ?>>
				<div style='width:450px;float:left'><?php if(!isset($bkday)) echo "您还没有备份过数据库，建议您立即备份"; elseif($bkday>7) echo "您已经有".$bkday."没有备份数据库了，建议您立即备份"; else echo "检查数据库是否需要备份"; ?></div>
				<div class="dtip"><?php if(!isset($bkday) || $bkday>7){ echo "建议备份"; } ?></div>
				<div style='float:left'><?php if(!isset($bkday) || $bkday>7) echo '<a href="sys_data.php" class="np coolbg">直接备份</a>';else echo "没有风险[安全]"; ?></div>
			</div>
			
			<div class="dlist dshow">
				<div style='width:450px;float:left'>清理广告缓存，修改广告后前台没有效果的需要执行该清理</div>
				<div class="dtip"></div>
				<div style='float:left'><?php if(@$adc!=1) echo '<a href="?ac=adclear" class="np coolbg">立即清理</a>';else echo '清理完成'; ?></div>
			</div>
			
			<div class="dlist dshow" <?php if($tplcachesize>1000000) echo "data=4"; elseif($tplcachesize>0)  echo "data=2" ?>>
				<div style='width:450px;float:left'>清空模板缓存（<?php echo formatsize($tplcachesize); ?>），仅当缓存占用过多空间时清理，无需频繁清理</div>
				<div class="dtip"><?php if($tplcachesize>1000000) echo "建议清理";  else echo "建议保留"; ?></div>
				<div style='float:left'><?php if($tplcachesize>0) echo '<a href="?ac=tplclear" class="np coolbg">立即清理</a>';else echo "无需清理"; ?></div>
			</div>

			<div class="dlist adminchk hide">
				<div style='width:450px;float:left'></div>
				<div class="dtip"></div>
				<div style='float:left'></div>
			</div>
			
			<div class="dlist updatechk hide">
				<div style='width:450px;float:left'></div>
				<div class="dtip"></div>
				<div style='float:left'></div>
			</div>
			
			<div class="dlist dbzendchk hide">
				<div style='width:450px;float:left'></div>
				<div class="dtip"></div>
				<div style='float:left'></div>
			</div>

			<div class="dlist filechk hide">
				<div style='width:450px;float:left'></div>
				<div class="dtip"></div>
				<div style='float:left'></div>
			</div>

		</td>
	</tr>
	<tr class="trhide">
		<td height="30" colspan="2" bgcolor="#F9FCEF">操作结果</td>
	</tr>
	<tr class="trhide">
		<td height="300" colspan="2" id="updateinfos" valign="top" bgcolor="#FFFFFF"></td>
	</tr>
</table>
<div style="text-align:center; padding:10px;">官方网站：<a href="http://www.dedeadmin.com" target="_blank">http://www.dedeadmin.com</a> 客服QQ：<a href="http://wpa.qq.com/msgrd?v=3&uin=79702151&site=qq&menu=yes" target="_blank">79702151</a> </br>
<a href="http://www.caijixia.com " target="_blank">织梦采集侠 dedecms必备全自动采集伪原创SEO插件</a></div>
<script type="text/javascript">
$.getScript("http://openapi.dedeapps.com/?m=content&c=stats&a=dedesafer&dedever=<?php echo $cfg_version;?>&softlang=<?php echo $cfg_soft_lang;?>&domain="+document.domain+"&"+Math.random(), function(){
	//统计
});
</script>
</body>
</html>
