<?
$C_126cmsadmin_tname = 'center_config';

include(dirname(__FILE__)."/global.php");









$filename="../../data/config.php"; //伪静态设置文件

$article_auto_config_filename="../../data/article_auto_config.php"; //文章自动更新设置文件

$statcodFile = '../../126cmsjs/count.js';//第三方统计代码文件


@$job = $submitted_vars["job"];

if($job == "modify"){

  include( $filename );//取得 数组 $webdb
  
  $_webdbs = $_POST['webdbs'];
  
  $webdbs = array_merge($webdb, $_webdbs);//合并数据有相同的后面替换前面
    
  $writefile="<?php	\r\n";
  $i = 0;
  foreach($webdbs AS $key=>$value){
  $i++;
  //$value=addslashes($value);
  $writefile.="\$webdb['$key']='$value';\r\n";
  }
 
  $query    =   updatetofile("$filename","$writefile");
	  
  if ($query)
     {
       $showmsg = "伪静态设置修改成功！";
	   $formurl = "WJT.php";
     }
  else
     {
       $showmsg = "伪静态设置修改失败！";
	   $formurl = "WJT.php";
     }
  
	 
  include('showmsg.php');
  exit;

  
}

//从数据库中读出 产品的内容
require("$filename");

  foreach($webdb AS $key=>$value){
  $value=stripslashes($value);
  $webdbs[$key]=$value;
  }
  

?><!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" />
<title>后台管理</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
	text-decoration: none;
	color: #000000;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: underline;
	color: #FF0000;
}
a:active {
	text-decoration: none;
	color: #000000;
}
-->
</style></head>

<body>
<div align="center" class="font12">
  <table width="100%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#A4B6D7">
    <tr>
      <td width="100%" height="22" align="center" background="images/titlebg.jpg">&nbsp;</td>
    </tr>
  </table>
  <br />
  <table width="100%" height="25" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
      <td align="left" bgcolor="#FFFFFF">[<a 
      href="../../index.php?job=makeIndexHtml" target="_blank" class="a_bt">首页静态</a>]
      [<a       href="MakeHtml.php" class="a_bt">栏目静态</a>]
      [<a       href="../../index.php?job=delIndexHtml" class="a_bt">删除静态首页</a>]
      [<a       href="WJT.php" class="a_bt">伪静态设置</a>] </td>
    </tr>
  </table>
  <br />
  <br />
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
    <tr>
      <td height="22" align="left" class="head">伪静态设置</td>
    </tr>
    <tr>
      <td height="24" align="left">
	  <form id="form1" name="form1" method="post" action="">
	  <table width="99%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="table2">
        <tr>
          <td width="34%" height="28" bgcolor="#FFFFFF">伪静态列表页的表现形式</td>
          <td width="66%" bgcolor="#FFFFFF"><input name="webdbs[listWJT]" id="webdbs[listWJT]" value="<?=$webdbs['listWJT']?>" size="50" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">伪静态内容页的表现形式</td>
          <td bgcolor="#FFFFFF"><input name="webdbs[showWJT]" id="webdbs[showWJT]" value="<?=$webdbs['showWJT']?>" size="50" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">&nbsp;</td>
          <td bgcolor="#FFFFFF"><strong class="red">A类型：</strong>不修改服务器配置的伪静态实现方式:<br />
            列表页表现形式输入“list.php?{$fid}-{$page}.htm”<br />
              内容页页表现形式输入“show.php?{$aid}.htm”<br />
              <br />
            <strong class="red">B类型：</strong>修改服务器配置的伪静态实现方式: <br />
            <strong>1.必须先配置服务器虚拟机设置</strong><br />
            apache服务器配置参考:修改apache配置文件conf/httd.conf把以下红色这段代码放进去后重启apache服务<br />
            &lt;VirtualHost   *:80&gt;<br />
            DocumentRoot /home/www_qibosoft<br />
            ServerName   www.qibosoft.com<br />
            <span class="red">&lt;IfModule   mod_rewrite.c&gt;<br />
            RewriteEngine On<br />
            RewriteRule   ^(.*)/list-([0-9]+)-([0-9]+)\.htm$   $1/list\.php\?fid=$2&amp;page=$3<br />
            RewriteRule   ^(.*)/show-([0-9]+)\.htm$   $1/show\.php\?aid=$2<br />
&lt;/IfModule&gt;</span><br />
            &lt;/VirtualHost&gt;<br />
            列表页表现形式输入“list-{$fid}-{$page}.htm”<br />
            内容页页表现形式输入“show-{$aid}.htm” <br />
            <br /></td>
        </tr>
        <!--<tr>
          <td height="28" bgcolor="#FFFFFF">网站首页专用风格</td>
          <td bgcolor="#FFFFFF"><select name="webdbs[index_style]" id="webdbs[index_style]">
            <option value="" selected="selected">选择风格</option>
            <option value="default">官方风格</option>
          </select>
如果不选择,将依照上面的风格为标准</td>
        </tr>//-->
        <!--<tr>
          <td height="28" bgcolor="#FFFFFF">文章伪原创功能</td>
          <td bgcolor="#FFFFFF"><input type="radio" name="webdbs[NewsWYC]" value="1" <? if($webdbs['NewsWYC'] == 1) echo 'checked';?> />
开启
  <input name="webdbs[NewsWYC]" type="radio" value="0" <? if($webdbs['NewsWYC'] == 0) echo 'checked';?> />
关闭</td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">关键词站群功能</td>
          <td bgcolor="#FFFFFF"><input type="radio" name="webdbs[KeyZQ]" value="1" <? if($webdbs['KeyZQ'] == 1) echo 'checked';?> />
开启
  <input name="webdbs[KeyZQ]" type="radio" value="0" <? if($webdbs['KeyZQ'] == 0) echo 'checked';?> />
关闭</td>
        </tr>
		<tr>
          <td height="28" bgcolor="#FFFFFF">英文翻译功能</td>
          <td bgcolor="#FFFFFF"><input type="radio" name="webdbs[NewsFY]" value="1" <? if($webdbs['NewsFY'] == 1) echo 'checked';?> />
开启
  <input name="webdbs[NewsFY]" type="radio" value="0" <? if($webdbs['NewsFY'] == 0) echo 'checked';?> />
关闭</td>
        </tr>
		<tr>
          <td height="28" bgcolor="#FFFFFF">文章关键字提取功能</td>
          <td bgcolor="#FFFFFF"><input type="radio" name="webdbs[NewsKey]" value="1" <? if($webdbs['NewsKey'] == 1) echo 'checked';?> />
开启
  <input name="webdbs[NewsKey]" type="radio" value="0" <? if($webdbs['NewsKey'] == 0) echo 'checked';?> />
关闭</td>
        </tr>
		<tr>
          <td height="28" bgcolor="#FFFFFF">设置文章每日自动更新数</td>
          <td bgcolor="#FFFFFF"><input name="webdbs[autoAllNum]" id="webdbs[autoAllNum]" value="<?=$webdbs['autoAllNum']?>" size="10" /></td>
        </tr>
		//-->
        <tr>
          <td height="28" bgcolor="#FFFFFF">&nbsp;</td>
          <td bgcolor="#FFFFFF"><input type="submit" value="提交" name="Submit" />
            <input name="job" type="hidden" id="job" value="modify" />            </td>
        </tr>
      </table>
        </form>
      </td>
    </tr>
  </table>
</div>
</body>
</html>
