<?

error_reporting ( 0 );
require_once('data.php');

if ($_COOKIE ['x_Cookie'] != $adminname or $_COOKIE ['y_Cookie'] != md5 ( $password )) {
	echo "<script>location.href='index.php';</script>";
	exit ();
}
?>
<!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=gb2312">
<link rel="stylesheet" type="text/css" href="css/admin.css">
<link href="css/jquery.css" rel="stylesheet" type="text/css">
<link href="css/base.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
function tab(no,n){
	for(var i=1;i<=n;i++){
		$('#config'+i).hide();
	}
	$('#config'+no).show();
} 
</script>
</head>
<body> 
<?
if ($_GET ['id'] == 'man') {
	include '../inc/config.php';?>
<div class="right">
 <? include "welcome.php";?>
  <div class="right_main">
<table width="98%" border="0" cellpadding="4" cellspacing="1"class="tableoutline"><tr class="tb_head"><td><h2>操作导航：</h2></td></tr><tr class="firstalt"><td><ul class="do_nav"><li><a href="javascript:" onClick="tab(1,6);">网站设置</a></li><li><a href="javascript:" onClick="tab(2,6);">友情链接</a></li><li><a href="javascript:" onClick="tab(3,6);">缓存设置</a></li></ul></td></tr></table>
<table width="98%" border="0" cellpadding="4" cellspacing="1"
	class="tableoutline">
	<form action="?id=save" method="post">
	<tbody id="config1">
		<tr nowrap class="tb_head">
			<td colspan="2">
			<h2>网站信息：</h2>
			</td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>网站标题</b><br>
			</td>
			<td><input type="text" name="webtitle" size="25" maxlength="50" value="<?=$webtitle;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		
		<tr nowrap class="firstalt">
			<td width="260"><b>首页列表调用分类ID</b><br>
			<font color="#666666">设置为0，则调用所有问题</font></td>
			<td><input type="text" name="home_id" size="25" maxlength="50" value="<?=urldecode($home_id);?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>网站域名</b><br>
			<font color="#666666">系统所安装的域名,结尾以<font color="red">斜杠"/"</font>结尾</font></td>
			<td><input type="text" name="url" size="25" maxlength="50" value="<?=$url;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>二级目录</b><br>
			<font color="#666666">注意以<font color="red">斜杠"/"</font>结尾,根目录请留空</font></td>
			<td><input type="text" name="erji" size="25" maxlength="50" value="<?=$erji;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		
		<tr nowrap class="firstalt">
			<td width="260"><b>默认风格</b><br>
			<font color="#666666">网站风格文件夹.位于templets目录下</font></td>
			<td><!----input type="text" name="template" size="25" maxlength="50" value="<?=$template;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ---->
			<select name="template" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >
				<option value="soso" <?
	if ($template == "soso")
		echo " selected";?>>搜搜问问模板1</option>
				<option value="utf-8" <?
	if ($template == "utf-8")
		echo " selected";?>>搜搜问问模板2</option>
				<option value="ababb.com" <?
	if ($template == "ababb.com")
		echo " selected";?>>绿色模板</option>
			</select>
			</td>
		</tr>
		


		<tr nowrap class="firstalt">
			<td width="260"><b>关键字</b><br>
			<font color="#666666">SEO关键字描述</font></td>
			<td><input name="keywords" type="text" value="<?=$keywords;?>"
				size="55" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>网站描述</b><br>
			<font color="#666666">SEO网页内容信息描述</font></td>
			<td><textarea name="description" cols="80"
				style="height: 70px; width: 350px" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ><?=$description;?></textarea></td>
		</tr>
	<tr nowrap class="firstalt">
			<td width="260"><b>首页右侧关键词设置</b><br>
			<font color="#666666">填入要设置的关键词，以|隔开</font></td>
			<td><textarea name="gjc" cols="80"
				style="height: 70px; width: 350px" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ><? $gjc=preg_replace('/;/','&#13;&#10;',$gjc);echo $gjc;?></textarea></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>屏蔽页面地址</b><br>
			<font color="#666666">填入要屏蔽的页面地址的ID，以|隔开</font></td>
			<td><textarea name="x_key" cols="80"
				style="height: 70px; width: 350px" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ><? $x_key=preg_replace('/;/','&#13;&#10;',$x_key);echo $x_key;?></textarea></td>
		</tr>
		
		<tr class="firstalt">
			<td width="260" valign="top"><b>统计代码</b><br>
			<font color="#666666">流量统计代码<br><!--<font color="red">注意：把代码中的双引号改成单引号</font>--></font></td>
			<td><textarea name="tongji" cols="80"
				style="height: 70px; width: 350px" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ><?=$tongji;?></textarea></td>
		</tr>
		<tr class="firstalt">
			<td width="260" valign="top"><b>底部版权代码</b><br>
			<font color="#666666">网站底部版权信息</font><font color="#666666"><br>
			<!--<font color="red">注意：把代码中的双引号改成单引号</font>--></font></td>
			<td><textarea name="banquan" cols="80"
				style="height: 70px; width: 350px" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ><?=$banquan;?></textarea></td>
		</tr>

		<tr nowrap class="firstalt">
			<td width="260"><b>备案信息</b><br>
			<font color="#666666">填写贵站的ICP备案信息</font></td>
			<td><input type="text" name="beian" size="25" value="<?=$beian;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>蜘蛛访问记录开关</b><br>
			<font color="#666666">空间不支持ASP的勿开启</font></td>
			<td><select name="zhizhu" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >
				<option value="1" <?
	if ($zhizhu == "1")
		echo " selected";?>>开启</option>
				<option value="0" <?
	if ($zhizhu == "0")
		echo " selected";?>>关闭</option>
			</select></td>
		</tr>
		<tr nowrap class="tb_head">
			<td colspan="2">
			<h2>页面设置：</h2>
			</td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>伪原创开关</b><br>
			<font color="#666666">开启伪原创有利于seo</font></td>
			<td><select name="wyc" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >
				<option value="on" <?
	if ($wyc == "on")
		echo " selected";?>>开启</option>
				<option value="off" <?
	if ($wyc == "off")
		echo " selected";?>>关闭</option>
			</select></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>浏览模式</b><br>
			<font color="#666666">动态与静态的切换</font></td>
			<td><select name="wjt" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >
				<option value="on" <?
	if ($wjt == "on")
		echo " selected";?>>伪静态</option>
				<option value="off" <?
	if ($wjt == "off")
		echo " selected";?>>动态浏览</option>
			</select></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>伪静态后缀名</b><br>
			<font color="#666666">以<font color="red">.开头</font>，例如&nbsp;&nbsp;.html</font></td>
			<td><input type="text" name="houzhui" size="25" maxlength="50" value="<?=$houzhui;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>是否开启评论功能</b><br>
			<font color="#666666">开启问题页评论功能</font></td>
			<td><select name="pinglun"onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >
				<option value="1" <?
	if ($pinglun == "1")
		echo " selected";?>>开启</option>
				<option value="0" <?
	if ($pinglun == "0")
		echo " selected";?>>关闭</option>
			</select></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>采集方式</b><br>
			<font color="#666666">服务器不支持采集的时候,可以尝试更换采集方式</font></td>
			<td><select name="caiji" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >
				<option value="curl_init" <?
	if ($caiji == "curl_init")
		echo " selected";?>>curl_init</option>
				<option value="fsock" <?
	if ($caiji == "fsock")
		echo " selected";?>>fsockopen</option>
				<option value="fsock" <?
	if ($caiji == "pfsock")
		echo " selected";?>>pfsockopen</option>
				<option value="file_get_contents" <?
	if ($caiji == "file_get_contents")
		echo " selected";?>>file_get_contents</option>
			</select></td>
		</tr>
	</tbody>

	<tbody id="config2" style="display: none">
		<tr nowrap class="tb_head">
			<td colspan="3">
			<h2>友情链接：</h2>
			</td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260" align="center"><b>网站名称</b><br>
			</td>
			<td style="padding-left: 120px;"><b>网站地址</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>顺序</b></td>
		</tr>
		<?
	$link = preg_replace ( '/;/', "", $link, 1 );
	$link = explode ( ";", $link );
	$coulink = count ( $link );
	$n = 0;
	for($i = 0; $i < $coulink; $i ++) {
		if (! empty ( $link [$i] )) {
			$sitelink = explode ( "|", $link [$i] );
		}
		?>
        <tr nowrap class="firstalt">
			<td width="260" align="center"><input
				name="link_name[<?=$n;?>]" type="text" value="<?=str_replace ( "
	\r\n", "", $sitelink [0] );?>"
				maxlength="50" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
			<td style="padding-left: 70px;"><input
				name="link_url[<?=$n;?>]" type="text" value="<?
		if (empty ( $sitelink [0] ) && empty ( $sitelink [1] )) {
			echo "http://";
		} else {
		}
		?><?=str_replace ( "
	\r\n", "", $sitelink [1] );?>"
				size="30" maxlength="250" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
				name="link_order[<?=$n;?>]" type="text" value="<?=$n;?>"
				size="5" maxlength="5" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
<?
		$n ++;
	}
	?>
<?php

	if (! empty ( $sitelink [0] ) && ! empty ( $sitelink [1] )) {
		?>
<tr nowrap class="firstalt">
			<td width="260" style="padding-left: 32px;">添加&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
				name="link_name_sub" type="text" maxlength="50" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
			<td style="padding-left: 70px;"><input name="link_url_sub"
				type="text" size="30" value="http://" maxlength="250" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
				name="link_order_sub" type="text" size="5" value="50" maxlength="5" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
<?php
	} else {
	}
	?>
      </tbody>

	<tbody id="config3" style="display: none">
		<tr nowrap class="tb_head">
			<td colspan="2">
			<h2>缓存设置：</h2>
			</td>
		</tr>
		
		<tr nowrap class="firstalt">
			<td width="260"><b>栏目页缓存目录</b><br>
			<font color="#666666">以<font color="red">斜杠"/"</font>结尾，例如&nbsp;&nbsp;list/</font></td>
			<td><input type="text" name="mulu" size="25" maxlength="50" value="<?=$mulu;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>内容页缓存目录</b><br>
			<font color="#666666">以<font color="red">斜杠"/"</font>结尾，例如&nbsp;&nbsp;html/</font><br>
			</td>
			<td><input type="text" name="news" size="25" maxlength="50" value="<?=$news;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>首页缓存保存时间</b><br>
			<font color="#666666">小时为单位,1为1小时</font></td>
			<td><input type="text" name="cachetimea" size="25" maxlength="50" value="<?=$cachetimea;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>列表页缓存保存时间</b><br>
			<font color="#666666">小时为单位,1为1小时</font></td>
			<td><input type="text" name="cachetimeb" size="25" maxlength="50" value="<?=$cachetimeb;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>内容页缓存保存时间</b><br>
			<font color="#666666">小时为单位,1为1小时</font></td>
			<td><input type="text" name="cachetimec" size="25" maxlength="50" value="<?=$cachetimec;?>" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" ></td>
		</tr>
		<tr nowrap class="firstalt">
			<td width="260"><b>缓存开关</b><br>
			<font color="#666666">开启页面缓存，节省服务器CPU资源</font></td>
			<td><select name="cache" onFocus="this.style.borderColor='#00CC00'" onBlur="this.style.borderColor='#dcdcdc'" >
				<option value="on" <?
	if ($cache == "on")
		echo "selected";?>>开启</option>
				<option value="off" <? if ($cache == "off")
	echo "selected";?>>关闭</option>
			</select></td>
		</tr>
	</tbody>

	<tr class="firstalt">
		<td colspan="2" align="center"><input type="hidden" name="action" value="setting"> <input class="bginput" type="submit" name="submit" value=" 提交 "> <input class="bginput" type="reset" name="Input" value=" 重置 "></td>
	</tr>
	</form>
</table>
</div>
</div>
<? include "footer.php";?>
</body>
</html>

<?php
} elseif ($_GET ['id'] == 'save') {	
	$linkname = $_POST ['link_name'];
	$linkurl = $_POST ['link_url'];
	$linkorder = $_POST ['link_order'];
	$linkname_sub = ! empty ( $_POST ['link_name_sub'] ) ? trim ( $_POST ['link_name_sub'] ) : "";
	$linkurl_sub = ! empty ( $_POST ['link_url_sub'] ) ? trim ( $_POST ['link_url_sub'] ) : "";
	$linkorder_sub = ! empty ( $_POST ['link_order_sub'] ) ? trim ( $_POST ['link_order_sub'] ) : "";
	for($i = 0; $i < count ( $linkname ); $i ++) {
		if ($linkname [$i] != "") {
			$linkstr [$i] = $linkname [$i] . "|" . $linkurl [$i];
		}
	}
	if ($linkname_sub != "") {
		$linkstr [$linkorder_sub] = $linkname_sub . "|" . $linkurl_sub;
	}
	ksort ( $linkstr );
	while ( list ( $key, $value ) = each ( $linkstr ) ) {
		$linkstrs .= ";" . $value;
	}
	$word = '<?php' . "
	
	\r\n" . '$webtitle=' . '"' . $_POST ['webtitle'] . '"' . ";
	
	\r\n" . '$home_id=' . '"' . urlencode($_POST ['home_id']) . '"' . ";
	 \r\n".'$home_id='.'\''.stripslashes($_POST['home_id']).'\''.";

	\r\n" . '$url=' . '"' . $_POST ['url'] . '"' . ";
	\r\n" . '$erji=' . '"' . $_POST ['erji'] . '"' . ";
	\r\n" . '$tongji=' . '"' . str_replace('"',"'",stripslashes($_POST ['tongji'])) . '"' . ";
	\r\n" . '$banquan=' . '"' . str_replace('"',"'",stripslashes($_POST ['banquan'])) . '"' . ";
	\r\n" . '$beian=' . '"' . $_POST ['beian'] . '"' . ";
	\r\n" . '$mulu=' . '"' . $_POST ['mulu'] . '"' . ";
	\r\n" . '$news=' . '"' . $_POST ['news'] . '"' . ";
	\r\n" . '$cachetimea=' . '"' . $_POST ['cachetimea'] . '"' . ";
	\r\n" . '$cachetimeb=' . '"' . $_POST ['cachetimeb'] . '"' . ";
	\r\n" . '$cachetimec=' . '"' . $_POST ['cachetimec'] . '"' . ";
	\r\n" . '$cache=' . '"' . $_POST ['cache'] . '"' . ";
	\r\n" . '$wyc=' . '"' . $_POST ['wyc'] . '"' . ";
	\r\n" . '$wjt=' . '"' . $_POST ['wjt'] . '"' . ";
	\r\n" . '$zhizhu=' . '"' . $_POST ['zhizhu'] . '"' . ";
	\r\n" . '$pinglun=' . '"' . $_POST ['pinglun'] . '"' .";
	\r\n". '$caiji=' . '"' . $_POST ['caiji'] . '"' . ";
	
	\r\n" . '$gjc=' . '"' . $_POST ['gjc'] . '"' . ";
	\r\n" . '$houzhui=' . '"' . $_POST ['houzhui'] . '"' . ";
	\r\n" . '$x_key=' . '"' . $_POST ['x_key'] . '"' . ";
	\r\n" . '$keywords=' . '"' . $_POST ['keywords'] . '"' . ";
	\r\n" . '$description=' . '"' . $_POST ['description'] . '"' . ";
	\r\n" . '$link=' . '"' . $linkstrs . '"' . ";
	
	\r\n" . '$template=' . '"' . $_POST ['template'] . '"' . ";
	\r\n?>";
	$htaccess = "RewriteEngine On
	\r\nRewriteBase /
	\r\n
	\r\nRewriteCond %{REQUEST_FILENAME} !-f
	\r\nRewriteCond %{REQUEST_FILENAME} !-d 
	\r\nRewriteRule ^(.*)".$_POST['erji']."index".$_POST['houzhui']."$ $1/".$_POST['erji']."index\.php
 \r\nRewriteRule ^(.*)".$_POST['erji'].$_POST['news']."([0-9,a-z]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."html\.php\?id=$2  
 \r\nRewriteRule ^(.*)".$_POST['erji'].$_POST['mulu']."([0-9,a-z]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."list\.php\?id=$2
 \r\nRewriteRule ^(.*)".$_POST['erji']."so/(.+)-([0-9]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."so\.php\?id=$2&page=$3 
 \r\nRewriteRule ^(.*)".$_POST['erji'].$_POST['mulu']."([0-9,a-z]+)-([0-9]+)".$_POST['houzhui']."$  $1/".$_POST['erji']."list\.php\?id=$2&page=$3";
	$httpd = "[ISAPI_Rewrite]
	\r\nRepeatLimit 32
	\r\nRewriteRule ^(.*)/".$_POST['erji']."index".$_POST['houzhui']."$ $1/".$_POST['erji']."index\.php
 \r\nRewriteRule ^(.*)/".$_POST['erji'].$_POST['news']."([0-9,a-z]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."html\.php\?id=$2
 \r\nRewriteRule ^(.*)/".$_POST['erji'].$_POST['mulu']."([0-9,a-z]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."list\.php\?id=$2
 \r\nRewriteRule ^(.*)/".$_POST['erji']."so/(.+)-([0-9]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."so\.php\?id=$2&page=$3
 \r\nRewriteRule ^(.*)/".$_POST['erji'].$_POST['mulu']."([0-9,a-z]+)-([0-9]+)".$_POST['houzhui']."$  $1/".$_POST['erji']."list\.php\?id=$2&page=$3";
	$nginx = "location / {
	\r\nRewriteRule ^(.*)/".$_POST['erji']."index".$_POST['houzhui']."$ $1/".$_POST['erji']."index\.php
 \r\nRewriteRule ^/".$_POST['erji'].$_POST['news']."([0-9,a-z]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."html\.php\?id=$2 last;
 \r\nRewriteRule ^/".$_POST['erji'].$_POST['mulu']."([0-9,a-z]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."list\.php\?id=$2 last;
 \r\nRewriteRule ^/".$_POST['erji']."so/(.+)-([0-9]+)".$_POST['houzhui']."$ $1/".$_POST['erji']."so\.php\?id=$2&page=$3 last;
 \r\nRewriteRule ^/".$_POST['erji'].$_POST['mulu']."([0-9,a-z]+)-([0-9]+)".$_POST['houzhui']."$  $1/".$_POST['erji']."list\.php\?id=$2&page=$3 last;
	\r\n}";
	if (preg_match ( "/require|include|REQUEST|eval|system|fputs/i", $word )) {
		echo "<script>alert('含有非法字符！');location.href='?id=man';</script>";
		exit ();
	} else {
		$Dir = $_POST ['erji'];
		if ($Dir == "") {
			$Dir1 = "../";
		} else {
			$Dir1 = "../../";
		}
		$fp = fopen ( "../inc/config.php", "w" );
		fwrite ( $fp, $word );
		fclose ( $fp );
		$htaccessfp = fopen ( $Dir1 . ".htaccess", "w" );
		fwrite ( $htaccessfp, $htaccess );
		fclose ( $htaccessfp );
		$httpdfp = fopen ( $Dir1 . "httpd.ini", "w" );
		fwrite ( $httpdfp, $httpd );
		fclose ( $httpdfp );
		$nginxp = fopen ( $Dir1 . "nginx.conf", "w" );
		fwrite ( $nginxp, $nginx );
		fclose ( $nginxp );
		echo "<script>alert('修改成功！');window.location='admin_main.php?id=man';</script>" ;;
		exit ();
	}
}
?>
