<?php
require_once './incs/inc.php';
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>自定义全站小偷系统设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<link rel="stylesheet" type="text/css" href="admincp.css" />
</head>
<br>
<br>
<div align="center" style="border-bottom: 1px solid #ccc;width:600px;">自定义全站小偷系统设置</div>
<br>
<?php

$boxformat='<tr><td valign="top" class="boxleft"><span class="settingtitle">%s</span><br /><span class="settingnote">%s</span></td><td width="325" valign="middle" class="boxright">%s</td></tr><tr><td colspan="2"></td></tr>';
if(!$_GET['do']){
if ($_GET['step']=='ok'){
$configs = readfromfile('./config.inc.php');
$mwyckg=trim($mwyckg);
$mhckg=trim($mhckg);
$mhcsj=trim($mhcsj);
$mname=trim($mname);
$yname=trim($yname);
$yurl=trim($yurl);
$mzzth=bbb(trim($mzzth));
$configs = preg_replace("/[$]webname\s*\=\s*[\"'].*?[\"'];/is", "\$webname = '$mname';", $configs);
$configs = preg_replace("/[$]youname\s*\=\s*[\"'].*?[\"'];/is", "\$youname = '$yname';", $configs);
$configs = preg_replace("/[$]wyckg\s*\=\s*[\"'].*?[\"'];/is", "\$wyckg = '$mwyckg';", $configs);
$configs = preg_replace("/[$]hckg\s*\=\s*[\"'].*?[\"'];/is", "\$hckg = '$mhckg';", $configs);
$configs = preg_replace("/[$]hcsj\s*\=\s*[\"'].*?[\"'];/is", "\$hcsj = '$mhcsj';", $configs);
$configs = preg_replace("/[$]geturl\s*\=\s*[\"'].*?[\"'];/is", "\$geturl = '$yurl';", $configs);
$configs = preg_replace("/[$]zzth\s*\=\s*[\"'].*?[\"'];/is", "\$zzth = '$mzzth';", $configs);
if($pass){
$pass=trim($pass);
$configs = preg_replace("/[$]sitepass\s*\=\s*[\"'].*?[\"'];/is", "\$sitepass = '$pass';", $configs);
}
//$configs = preg_replace("/[$]webkey\s*\=\s*[\"'].*?[\"'];/is", "\$webkey = '$pages';", $configs);
//$configs = preg_replace("/[$]webjs\s*\=\s*[\"'].*?[\"'];/is", "\$webjs = '$jswd';", $configs);
writetofile('./config.inc.php',$configs);
echo '<script type="text/JavaScript">setTimeout("window.location=\'?\';",3000);</script><br /><br /><a href="?">操作成功<br>点这里返回</a>';
exit();
}
		echo '<form name="contform" method="post" action="?do='.$_GET['do'].'&step=ok"><table border="0" cellspacing="0" cellpadding="5" width="600">';
		$boxmain='<input type="radio" name="mwyckg" value="1"'.($wyckg? ' checked="checked"' : '').'/>是&#160;';
		$boxmain.='<input type="radio" name="mwyckg" value="0"'.($wyckg? '' : ' checked="checked"').' />否';
		printf($boxformat,'是否开启伪原创','伪原创功能-同义词替换功能，用于SEO优化。可能影响文章正常阅读',$boxmain);

		$boxmain='<input type="radio" name="mhckg" value="1" onclick="document.getElementById(\'hidden_hckg\').style.display=\'\';"'.($hckg? ' checked="checked"' : '').'/>是&#160;';
		$boxmain.='<input type="radio" name="mhckg" value="0" onclick="document.getElementById(\'hidden_hckg\').style.display=\'none\';"'.($hckg? '' : ' checked="checked"').' />否';
		printf($boxformat,'是否本地缓存','本地缓存需要大空间支持，可提高执行速度',$boxmain);

		echo '<tbody id="hidden_hckg" style="display: none">';
		$boxmain='<input name="mhcsj" size="50" value="'.$hcsj.'" />';
		printf($boxformat,'缓存时间设置','多少分钟整数，如：120',$boxmain);
		echo '</tbody>';

		$boxmain='<input name="mname" size="50" value="'.$webname.'" />';
		printf($boxformat,'网站名称','自定网站名称，如：美女站',$boxmain);

		$boxmain='<input name="yurl" size="50" value="'.$geturl.'" />';
		printf($boxformat,'目标站地址','目标站地址，如：http://www.baidu.com 不要/结尾',$boxmain);

		$boxmain='<input name="yname" size="50" value="'.$youname.'" />';
		printf($boxformat,'目标站名称','目标站网站名称用于替换为设置的网站名称，如：百度',$boxmain);

		$boxmain='<textarea name="mzzth" cols="60" rows="15">'.htmlspecialchars(stripslashes(bbb($zzth,1))).'</textarea>';
		printf($boxformat,'正则替换内容','正则部分以 * 标注，替换以[to]标注,替换多内容以 [or] 分割                   


-------------------这个小偷程序源码,只需要大家能看懂基本的HTML源代码就可以完成替换。








',$boxmain);

		$boxmain='<input name="pass" size="50" value="'.$sitepass.'" />';
		printf($boxformat,'评论管理密码','评论管理密码，用于删除评论',$boxmain);
		echo '<tr><td height="25"><input type="button" onclick="window.location=\'?\'" value="返回" /> <input type="submit" value="保存设置" /></td></tr></table></form>';
}
?>


