<?php
/*
'**************************************************************************************************
' 软件名称: 盘锦DJ舞曲网CMS Content Management PjRen.Net
' 版本编号: Version 2.5
' 盘锦舞曲: http://www.pj57.com
' 官方网站: http://www.pjren.net
' 小说网站: http://www.hx39.com
' 0427DJ网: http://www.0427dj.net
' 官方论坛: http://www.tianjiazhen.com
' 版权所有: 盘锦舞曲开发团队    盘锦人(QQ:814006710)
' 郑重声明:
'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    2、盘锦网络事业部保留此软件的法律追究权利
'**************************************************************************************************
*/
include_once("../include/install.php");
include_once("../include/config.php");
include_once("../include/function.php");
include_once("admin_version.php");
include_once("admin_loginstate.php");
include_once("../config.uc.php");
$UC_DBTABLEPRE=explode("`".UC_DBNAME."`.",UC_DBTABLEPRE);
?>
<!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="images/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript">var tentpath='<?php echo S_SitePath?>';</script>
<link type="text/css" href="images/alerts.css" rel="stylesheet" media="screen">
<script language="javascript" src="js/jquery.js"></script>
<script language="javascript" src="js/alerts.js"></script>
<script language="javascript">
<!--
  $(document).ready(function(){
							 
		if($("#WebMode").val()==1){
				 $("#dynamic").css("display","");
				 $("#static").css("display","none");
			}
		$("#Submit").click(function(){
			var SiteName=$("#SiteName").val();							
			var SiteDomain=$("#SiteDomain").val();					
			var SitePath=$("#SitePath").val();	
			var checkcode=$("#checkcode").val();
			
			$("#SiteName").css("border-color","#666 #ccc #ccc #666");
			$("#SiteDomain").css("border-color","#666 #ccc #ccc #666");
			$("#SitePath").css("border-color","#666 #ccc #ccc #666");
			$("#checkcode").css("border-color","#666 #ccc #ccc #666");
			
			if(SiteName==""){
				$("#SiteName").css("border","1px solid red").focus();
				return false;}
			else if(SiteDomain==""){
				$("#SiteDomain").css("border","1px solid red").focus();
				return false;}
			else if(SitePath==""){
				$("#SitePath").css("border","1px solid red").focus();
				return false;}
			else if(checkcode==""){
				$("#checkcode").css("border","1px solid red").focus();
				return false;}
		})
		$("#WebMode").change(function(){
				 var mm=$("#WebMode").val();	 
		         if(mm==1){
					 $("#dynamic").css("display","");
					 $("#static").css("display","none");
					 }
				 else{
					 $("#dynamic").css("display","none");
					 $("#static").css("display","");
					 
					 }	 
				  });					 
				

			 });
function Rjyusm(content){
	jPrompt("",content,"&nbsp;会员二级域名简介：")
	}
-->
</script>
</head><body>
<?php SystemPer(1);?>
<div class="r_main">
	<div class="r_content">
		<div class="r_content_1">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb_style" >
  <form action="?action=baseinfoEidt" method="post"  name="form1" id="form1" >
    <tr>
      <td colspan="2" height="30" class="td_title">&nbsp;网站基本设置</td>
    </tr>
    <tr>
      <td width="103"  height="30" align="left" class="td_border">&nbsp;网站名称：</td>
      <td class="td_border"><input type="text" name="SiteName" id="SiteName" value="<?php echo S_SiteName?>" size="40" />
          <font color="#FF0000">＊</font> </td>
    </tr>
    <tr>
      <td  width="103" height="30" align="left" class="td_border">&nbsp;网站域名：</td>
      <td class="td_border"><input type="text" name="SiteDomain" id="SiteDomain" value="<?php echo S_SiteDomain?>" size="40"/>
          <font color="#FF0000">＊</font>&nbsp; 如：Http://Www.PjRen.Net </td>
    </tr>
    <tr>
      <td width="103"  height="30" align="left" class="td_border">&nbsp;网站路径：</td>
      <td class="td_border"><input type="text" name="SitePath" id="SitePath" value="<?php echo S_SitePath?>" size="40"/>
          <font color="#FF0000">＊</font>&nbsp; 如：根目录设置为空/，二级目录/Dj/ </td>
    </tr>
    <tr>
      <td width="103"  height="30" align="left" class="td_border">&nbsp;授权KEY：</td>
      <td class="td_border"><input type="text" name="S_YmKey" id="S_YmKey" value="盘锦DJ舞曲网Www.PjRen.Net" size="40" readonly/>
          <font color="#FF0000">＊</font>&nbsp; 本程序已授权 </td>
    </tr>
    <tr>
      <td width="103" height="30" align="left" class="td_border">&nbsp;登陆认证码： </td>
      <td class="td_border">
        <input name="checkcode" type="text" id="checkcode" value="<?php echo S_CheckCode?>" size="40" />
        <font color="#FF0000">＊</font></td>
    </tr>
    <tr id="sqlserver" >
      <td width="103" height="30" class="td_border">&nbsp;MySql服务器：</td>
      <td height="30" class="td_border"><input name="Const_SqlServerName" type="text" id="Const_SqlServerName" value="<?php echo S_Sqlservername?>" size="40" />
        <font color="#FF0000">＊</font>MySql服务器名称或IP地址 </td>
    </tr>
    <tr id="sqlserver" >
      <td width="103" height="30" class="td_border">&nbsp;MySql名称：</td>
      <td height="30" class="td_border"><input name="Const_SqlDbName" type="text" id="Const_SqlDbName" value="<?php echo S_Sqldbname?>" size="40" />
        <font color="#FF0000">＊</font>请填写数据库名称</td>
    </tr>
    <tr id="sqlserver" >
      <td width="103" height="30" class="td_border">&nbsp;MySql帐号：</td>
      <td height="30" class="td_border"><input name="Const_SqlUserID" type="password" id="Const_SqlUserID" value="<?php echo S_Sqluserid?>" size="40" />
        <font color="#FF0000">＊</font></td>
    </tr>
    <tr id="sqlserver" >
      <td width="103" height="30" class="td_border">&nbsp;MySql密码：</td>
      <td height="30" class="td_border"><input name="Const_SqlPassword" type="password" id="Const_SqlPassword" value="<?php echo S_Sqlpwd?>" size="40" />
        <font color="#FF0000">＊</font></td>
    </tr>
    <tr>
      <td colspan="2" height="30" class="td_title">&nbsp;会员主页运行模式</td>
    </tr>
    <tr>
      <td width="103" height="30" align="left" class="td_border">&nbsp;会员伪静态开关：</td>
      <td class="td_border"><input type="radio" name="UserMode" id="UserMode" value="0" class="radio" <?php if(S_Usermode==0){echo "checked";}?> />
        开启&nbsp;&nbsp;
        <input type="radio" name="UserMode" id="UserMode" value="1"  class="radio" <?php if(S_Usermode==1){echo "checked";}?>/>
        关闭&nbsp; </td>
    </tr>
    <tr>
      <td width="103" height="30" align="left" class="td_border">&nbsp;会员二级域名：</td>
      <td class="td_border"><input type="radio" name="UymMode" id="UymMode" value="0" class="radio" <?php if(S_Uymmode==0){echo "checked";}?> onClick="javascript:document.getElementById('opss').style.display=''" />
        开启<font id="opss" <?php if(S_Uymmode==1){echo "style=\"display:none\"";} ?>>&nbsp;&nbsp;<font color="#FF0000">＊域名网址：</font>
        <input name="UymUrl" type="text" id="UymUrl" value="<?php echo S_Uymurl?>" size="25" /></font>
        &nbsp;&nbsp;
        <input type="radio" name="UymMode" id="UymMode" value="1"  class="radio" <?php if(S_Uymmode==1){echo "checked";}?> onClick="javascript:document.getElementById('opss').style.display='none'"/>
        关闭&nbsp;&nbsp;<font color="#FF0000">＊开启二级域名说明，</font><font color="#0000FF"><a style="cursor:pointer" onclick="Rjyusm('此功能必须要独立主机才能运行，开启二级域名，域名必须填写，如：chshcms.com，IIS必须绑定您使用的二级域名主机头为空,主目录指向user,默认文档为 i.php,才能运行，否则出错!')">点此查看</a></font></td>
    </tr>
    <tr>
      <td colspan="2" height="30" class="td_title">&nbsp;会员整合UC设置</td>
    </tr>
    <tr>
      <td width="103" height="30" align="left" class="td_border">&nbsp;会员整合UC：</td>
      <td class="td_border"><input type="radio" name="UcMode" id="UcMode" value="1" class="radio" <?php if(S_Ucmode==1){echo "checked";}?> onClick="javascript:document.getElementById('opssss').style.display=''" />
        开启&nbsp;&nbsp;
        <input type="radio" name="UcMode" id="UcMode" value="0"  class="radio" <?php if(S_Ucmode==0){echo "checked";}?> onClick="javascript:document.getElementById('opssss').style.display='none'"/>
        关闭&nbsp; </td>
    </tr>
    <tr id="opssss" <?php if(S_Ucmode==0){echo "style=\"display:none\"";} ?>>
      <td colspan="2"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" class="cn">
    <tr>
      <td width="163" height="30" align="left" class="td_border">&nbsp;UC数据库服务器： </td>
      <td class="td_border">
        <input name="Uc_Host" type="text" id="Uc_Host" value="<?php echo UC_DBHOST?>" size="40" />
        <font color="#FF0000">＊UCenter 数据库主机</font></td>
    </tr>
    <tr>
      <td width="163" height="30" align="left" class="td_border">&nbsp;UC数据库用户名： </td>
      <td class="td_border">
        <input name="Uc_User" type="password" id="Uc_User" value="<?php echo UC_DBUSER?>" size="40" />
        <font color="#FF0000">＊UCenter 数据库用户名</font></td>
    </tr>
    <tr>
      <td width="163" height="30" align="left" class="td_border">&nbsp;UC数据库密码： </td>
      <td class="td_border">
        <input name="Uc_Pwd" type="password" id="Uc_Pwd" value="<?php echo UC_DBPW?>" size="40" />
        <font color="#FF0000">＊UCenter 数据库密码</font></td>
    </tr>
    <tr>
      <td width="163" height="30" align="left" class="td_border">&nbsp;UC数据库名称： </td>
      <td class="td_border">
        <input name="Uc_Name" type="text" id="Uc_Name" value="<?php echo UC_DBNAME?>" size="40" />
        <font color="#FF0000">＊UCenter 数据库名称</font></td>
    </tr>
    <tr>
      <td width="163" height="30" align="left" class="td_border">&nbsp;UC数据库表前缀： </td>
      <td class="td_border">
        <input name="Uc_Tablepre" type="text" id="Uc_Tablepre" value="<?php echo $UC_DBTABLEPRE[1]?>" size="40" />
        <font color="#FF0000">＊UCenter 数据库表前缀</font></td>
    </tr>
    <tr>
      <td width="163" height="30" align="left" class="td_border">&nbsp;UC通信通信密钥： </td>
      <td class="td_border">
        <input name="Uc_Key" type="text" id="Uc_Key" value="<?php echo UC_KEY?>" size="40" />
        <font color="#FF0000">＊UCenter 的通信密钥, 要与 UCenter 保持一致</font></td>
    </tr>
    <tr>
      <td width="163" height="30" align="left" class="td_border">&nbsp;UC访问网址： </td>
      <td class="td_border">
        <input name="Uc_Api" type="text" id="Uc_Api" value="<?php echo UC_API?>" size="40" />
        <font color="#FF0000">＊UCenter 的 URL 地址</font></td>
    </tr> 
    <tr>
      <td width="163" height="30" align="left" class="td_border">&nbsp;UC应用ID： </td>
      <td class="td_border">
        <input name="Uc_Appid" type="text" id="Uc_Appid" value="<?php echo UC_APPID?>" size="40" />
        <font color="#FF0000">＊当前应用的 ID，设置ECMS在Ucenter的ID应用</font></td>
    </tr> </table></td>
    </tr>
    <tr>
      <td colspan="2" height="30" class="td_title">&nbsp;程序结构设置</td>
    </tr>
    <tr>
      <td width="103" align="left"  class="td_border">&nbsp;程序运行模式： </td>
      <td width="633" height="30" class="td_border"><select name="WebMode" id="WebMode"  style="width:86px;" >
          <option value="0" <?php if(S_Webmode==0){echo "selected";}?> >静态模式</option>
          <option value="1" <?php if(S_Webmode==1){echo "selected";}?>>动态模式</option>
        </select><input type="hidden" name="TemplateUrl" id="TemplateUrl" value="<?php echo S_Templateurl?>"/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 歌曲下载模式：<select name="DownMode" id="DownMode"  style="width:96px;" >
          <option value="0" <?php if(S_Downmode==0){echo "selected";}?> >会员下载</option>
          <option value="1" <?php if(S_Downmode==1){echo "selected";}?> >验证下载</option>
          <option value="2" <?php if(S_Downmode==2){echo "selected";}?>>游客下载</option>
        </select></td>
    </tr>
    <tr>
      <td width="103" align="left"  class="td_border">&nbsp;舞曲图片目录：</td>
      <td height="30" class="td_border"><input name="Videofolder" type="text" id="Videofolder" value="<?php echo S_Vimgfolder?>" size="10" />        
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 文章图片目录：
        <input name="Newfolder" type="text" id="Newfolder" value="<?php echo S_Aimgfolder?>" size="10" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 专辑图片目录：
      <input name="Topicfolder" type="text" id="Topicfolder" value="<?php echo S_Timgfolder?>" size="10" />      
      &nbsp;&nbsp; </td>
    </tr>
    <tr id="static">
      <td colspan="2"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" class="cn">
      		<tr>
            	<td  height="30" align="left" class="td_border">&nbsp;列表是否使用动态：</td>
                 <td colspan="5" class="td_border"><input name="slists" type="checkbox" class="checkbox" value="1" <?php if(defined('S_Slists') && S_Slists=='1') echo "checked";?>>&nbsp;<font color="red">(new)</font></td>
            </tr>
          <tr>
            <td  height="30" align="left" class="td_border">&nbsp;文件生成选项：</td>
            <td colspan="5" class="td_border"><select name="GetCreate" id="GetCreate" style="width:86px;">
                <option value="1" <?php if(S_Getcreate==1){echo "selected";} ?> >排序编号</option>
                <option value="2" <?php if(S_Getcreate==2){echo "selected";} ?> >分类别名</option>
                <option value="3" <?php if(S_Getcreate==3){echo "selected";} ?> >别名目录</option>
                <option value="4" <?php if(S_Getcreate==4){echo "selected";} ?> >ID目录</option>
              </select>
              ＋
              <select name="CreateID" id="CreateID">
                <option value="1" <?php if(S_Createid==1){echo "selected";} ?>>常规</option>
                <option value="2" <?php if(S_Createid==2){echo "selected";} ?>>加密</option>
                <option value="3" <?php if(S_Createid==3){echo "selected";} ?>>拼音ID</option>
              </select>
              <font color="#FF0000">＊</font>&nbsp;&nbsp;&nbsp;&nbsp; 生成每页间隔：&nbsp; &nbsp;
              &nbsp; 
              <input type="text" name="StopTime" id="StopTime" value="<?php echo S_StopTime?>"  size="5" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
              秒 &nbsp; 每页生成：
              <input name="Createpre" type="text" id="Createpre"  size="5" value="<?php echo S_Createpre?>" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
              条 </td>
          </tr>
          <tr>
            <td width="14%" height="30" class="td_border">&nbsp;舞曲列表目录：</td>
            <td width="24%" align="left" class="td_border"><input type="text" name="S_VideoListFolder" id="S_VideoListFolder" value="<?php echo S_Svlistfolder?>" /></td>
            <td width="14%" height="30" class="td_border">&nbsp;舞曲播放目录：</td>
            <td width="23%" class="td_border"><input type="text" name="S_VideoContentFolder" id="S_VideoContentFolder" value="<?php echo S_Svcontentfolder?>" /></td>
            <td width="10%" class="td_border">&nbsp;生成后缀：</td>
            <td width="15%" class="td_border"><select name="S_VideoContentSuffix" id="S_VideoContentSuffix">
                <option value="html" <?php if(S_Svcontentsuffix=="html"){echo "selected";} ?>>html</option>
                <option value="php" <?php if(S_Svcontentsuffix=="php"){echo "selected";} ?>>php</option>
                <option value="htm" <?php if(S_Svcontentsuffix=="htm"){echo "selected";} ?>>htm</option>
                <option value="shtml" <?php if(S_Svcontentsuffix=="shtml"){echo "selected";} ?>>shtml</option>
            </select></td>
          </tr>
          <tr>
            <td height="30" class="td_border">&nbsp;文章列表目录：</td>
            <td align="left" class="td_border"><input type="text" name="S_NewsListFolder" id="S_NewsListFolder" value="<?php echo S_Snlistfolder?>" /></td>
            <td height="30" class="td_border">&nbsp;文章内容目录：</td>
            <td class="td_border"><input type="text" name="S_NewsContentFolder" id="S_NewsContentFolder" value="<?php echo S_Sncontentfolder?>" /></td>
            <td class="td_border">&nbsp;生成后缀：</td>
            <td class="td_border"><select name="S_NewsContentSuffix" id="S_NewsContentSuffix">
                <option value="html" <?php if(S_Sncontentsuffix=="html"){echo "selected";} ?>>html</option>
                <option value="php" <?php if(S_Sncontentsuffix=="php"){echo "selected";} ?>>php</option>
                <option value="htm" <?php if(S_Sncontentsuffix=="htm"){echo "selected";} ?>>htm</option>
                <option value="shtml" <?php if(S_Sncontentsuffix=="shtml"){echo "selected";} ?>>shtml</option>
              </select></td>
          </tr>
          <tr>
            <td height="30" class="td_border" >&nbsp;专辑保存目录：</td>
            <td align="left" class="td_border"><input type="text" name="S_AlbumListFolder" id="S_AlbumListFolder" value="<?php echo S_Stlistfolder?>" /></td>
            <td height="30" class="td_border" >&nbsp;播放保存目录：</td>
            <td class="td_border"><input name="S_PlayFolder" type="text" id="S_PlayFolder" value="<?php echo S_PlayFolder?>" /></td>
            <td  class="td_border">&nbsp;生成后缀：</td>
            <td  class="td_border"><select name="S_AlbumContentSuffix" id="S_AlbumContentSuffix">
                <option value="html" <?php if(S_Stcontentsuffix=="html"){echo "selected";} ?> >html</option>
                <option value="php" <?php if(S_Stcontentsuffix=="php"){echo "selected";} ?>>php</option>
                <option value="htm"  <?php if(S_Stcontentsuffix=="htm"){echo "selected";} ?>>htm</option>
                <option value="shtml" <?php if(S_Stcontentsuffix=="shtml"){echo "selected";} ?>>shtml</option>
              </select></td>
          </tr>
        </table></td>
    </tr>
    <tr id="dynamic" style="display:none">
      <td colspan="2"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" class="cn">
          <tr>
            <td width="14%" height="30" class="td_border">&nbsp;舞曲文件名称：</td>
            <td width="24%" align="left" class="td_border"><input name="D_VideoName" type="text" id="D_VideoName" value="<?php echo S_Dvname?>" /></td>
            <td width="14%" class="td_border">&nbsp;舞曲运行模式：</td>
            <td width="23%" class="td_border"><select name="D_VideoMode" id="D_VideoMode">
                <option value="1" <?php if(S_Dvmode==1){echo "selected";} ?>>php动态版</option>
                <option value="0" <?php if(S_Dvmode==0){echo "selected";} ?>>php伪静态</option>
            </select></td>
            <td width="10%" class="td_border">&nbsp;文件后缀：</td>
            <td width="15%" class="td_border"><select name="D_VideoSuffix" id="D_VideoSuffix">
                <option value="html" <?php if(S_Dvsuffix=="html"){echo "selected";} ?>>html</option>
                <option value="php" <?php if(S_Dvsuffix=="php"){echo "selected";} ?>>php</option>
                <option value="htm" <?php if(S_Dvsuffix=="htm"){echo "selected";} ?>>htm</option>
                <option value="shtml" <?php if(S_Dvsuffix=="shtml"){echo "selected";} ?>>shtml</option>
            </select></td>
          </tr>
          <tr>
            <td height="30" class="td_border">&nbsp;文章文件名称：</td>
            <td align="left" class="td_border"><input name="D_NewsName" type="text" id="D_NewsName" value="<?php echo S_Dnname?>" /></td>
            <td class="td_border">&nbsp;文章运行模式：</td>
            <td class="td_border"><select name="D_NewsMode" id="D_NewsMode">
                <option value="1" <?php if(S_Dnmode==1){echo "selected";} ?>>php动态版</option>
                <option value="0" <?php if(S_Dnmode==0){echo "selected";} ?>>php伪静态</option>
              </select></td>
            <td class="td_border">&nbsp;文件后缀：</td>
            <td class="td_border"><select name="D_NewsSuffix" id="D_NewsSuffix">
                <option value="html" <?php if(S_Dnsuffix=="html"){echo "selected";} ?>>html</option>
                <option value="php" <?php if(S_Dnsuffix=="php"){echo "selected";} ?>>php</option>
                <option value="htm" <?php if(S_Dnsuffix=="htm"){echo "selected";} ?>>htm</option>
                <option value="shtml" <?php if(S_Dnsuffix=="shtml"){echo "selected";} ?>>shtml</option>
              </select></td>
          </tr>
          <tr>
            <td height="30" >&nbsp;专辑文件名称：</td>
            <td align="left" ><input name="D_AlbumName" type="text" id="D_AlbumName" value="<?php echo S_Dtname?>" /></td>
            <td >&nbsp;专辑运行模式：</td>
            <td ><select name="D_AlbumMode" id="D_AlbumMode">
                <option value="1" <?php if(S_Dtmode==1){echo "selected";} ?>>php动态版</option>
                <option value="0" <?php if(S_Dtmode==0){echo "selected";} ?>>php伪静态</option>
              </select></td>
            <td >&nbsp;文件后缀：</td>
            <td ><select name="D_AlbumSuffix" id="D_AlbumSuffix">
                <option value="html" <?php if(S_Dtsuffix=="html"){echo "selected";} ?>>html</option>
                <option value="php" <?php if(S_Dtsuffix=="php"){echo "selected";} ?>>php</option>
                <option value="htm" <?php if(S_Dtsuffix=="htm"){echo "selected";} ?>>htm</option>
                <option value="shtml" <?php if(S_Dtsuffix=="shtml"){echo "selected";} ?>>shtml</option>
              </select></td>
          </tr> </table></td>
    </tr>
    
    <tr>
      <td height="30" colspan="2" class="td_title">&nbsp;播放设置选项</td>
    </tr>
    <tr>
      <td height="30" colspan="2" class="td_border"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="cn">
        <tr>
          <td width="14%" class="td_border">&nbsp;普通播放器设置：</td>
          <td width="24%" class="td_border">宽
            <input name="S_PlayWidth" id="S_PlayWidth" type="text" value="<?php echo S_PlayWidth?>" size="3" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
            PX
            &nbsp;高
            <input name="S_PlayHeight" id="S_PlayHeight" type="text" value="<?php echo S_PlayHeight?>" size="3" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
            PX</td>
          <td width="14%" class="td_border">&nbsp;</td>
          <td width="23%" class="td_border">&nbsp;</td>
          <td width="15%" class="td_border">&nbsp;</td>
          <td width="10%" class="td_border">&nbsp;</td>
        </tr>
      </table></td>
<input type="hidden" value="1" name="S_IsStaticPlay" id="S_IsStaticPlay"  size="4">
<input type="hidden" value="1" name="S_PlayAddrEnc" id="S_PlayAddrEnc"  size="4">
<input type="hidden" value="<?php echo S_Uid?>" name="S_UID" id="S_UID"  size="4">
    </tr>
    <tr>
      <td height="30" colspan="2" ><table width="100%" border="0" cellspacing="0" cellpadding="0" class="cn">
        <tr>
          <td width="14%">&nbsp;视频播放器设置：</td>
          <td width="24%">宽
            <input name="S_PlayspWidth" id="S_PlayspWidth" type="text" value="<?php echo S_PlayspWidth?>" size="3" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
            PX
            &nbsp;高
            <input name="S_PlayspHeight" id="S_PlayspHeight" type="text" value="<?php echo S_PlayspHeight?>" size="3" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
            PX</td>
          <td width="14%" class="td_border">&nbsp;播放加载广告：</td>
          <td width="23%" class="td_border">设
            <input name="S_AdLoadTime" id="S_AdLoadTime" type="text" value="<?php echo S_AdLoadTime?>" size="3" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
            秒</td>
          <td width="10%" >&nbsp;</td>
          <td width="15%" >&nbsp;</td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="2" height="30" class="td_title">&nbsp;其它相关设置</td>
    </tr>
    <tr>
      <td width="103" height="30" align="left" class="td_border">&nbsp;网站缓存开关：</td>
      <td class="td_border"><input type="radio" name="IsCache" id="IsCache" value="1" class="radio" <?php if(S_IsCache==1){echo "checked";}?> onClick="javascript:document.getElementById('ops').style.display=''" />
        开启<font id="ops" <?php if(S_IsCache==0){echo "style=\"display:none\"";} ?>>&nbsp;&nbsp;缓存时间：
        <input type="text" name="CacheTime" id="CacheTime" value="<?php echo S_CacheTime?>" size="4"  onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
        秒&nbsp; 缓存标识：
        <input name="CacheMark" type="text" id="CacheMark" value="<?php echo S_CacheMark?>" size="13" />
        缓存目录:
        <input name="CacheFolder" type="text" id="CacheFolder" value="<?php echo S_CacheFolder?>" size="13" />
        </font>&nbsp;&nbsp;
        <input type="radio" name="IsCache" id="IsCache" value="0"  class="radio" <?php if(S_IsCache==0){echo "checked";}?> onClick="javascript:document.getElementById('ops').style.display='none'"/>
        关闭&nbsp; </td>
    </tr>
    <tr>
      <td width="103" height="30" align="left">&nbsp;图片文字水印：</td>
      <td class="td_border"><input type="radio" name="Watermark" id="Watermark" value="1" <?php if(S_WaterMark==1){echo "checked";}?>  class="radio" onClick="javascript:document.getElementById('opw').style.display=''" />
        开启<font id="opw" <?php if(S_WaterMark==0){echo "style=\"display:none\"";} ?>>&nbsp;&nbsp;字体大小：
        <input name="WaterFontSize" type="text" id="WaterFontSize" value="<?php echo S_WaterFontSize?>" size="4" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
        px&nbsp; 水印文字：
        <input name="WaterFont" type="text" id="WaterFont" value="<?php echo S_WaterFont?>" size="13" />
        字体颜色:
        <select name="WaterFontColor">
			<option style="background-color:<?php echo S_WaterFontColor?>;color: <?php echo S_WaterFontColor?>" value="<?php echo S_WaterFontColor?>"></option>
            <option style="background-color:#00FF00;color: #00FF00" value="#00FF00">绿色</option>
            <option style="background-color:#0000CC;color: #0000CC" value="#0000CC">深蓝</option>
            <option style="background-color:#FFFF00;color: #FFFF00" value="#FFFF00">黄色</option>
            <option style="background-color:#FF33CC;color: #FF33CC" value="#FF33CC">粉红</option>
            <option style="background-color:#FF0000;color: #FF0000" value="#FF0000">红色</option>
            <option style="background-color:#660099;color: #660099" value="#660099">紫色</option>
        </select>
		     <select name="WaterLocation"  id="WaterLocation" style="width:75px;" >
          <option value="0" <?php if(S_WaterLocation==0){echo "selected";} ?>>随机位置</option>
          <option value="1" <?php if(S_WaterLocation==1){echo "selected";} ?>>顶端居左</option>
          <option value="2" <?php if(S_WaterLocation==2){echo "selected";} ?>>顶端居中</option>
          <option value="3" <?php if(S_WaterLocation==3){echo "selected";} ?>>顶端居右</option>
          <option value="4" <?php if(S_WaterLocation==4){echo "selected";} ?>>中部居左</option>
          <option value="5" <?php if(S_WaterLocation==5){echo "selected";} ?>>中部居中</option>
          <option value="6" <?php if(S_WaterLocation==6){echo "selected";} ?>>中部居右</option>
          <option value="7" <?php if(S_WaterLocation==7){echo "selected";} ?>>底端居左</option>
          <option value="8" <?php if(S_WaterLocation==8){echo "selected";} ?>>底端居中</option>
          <option value="9" <?php if(S_WaterLocation==9){echo "selected";} ?>>底端居右</option>
        </select>
        </font> &nbsp;&nbsp;
        <input type="radio" name="Watermark" id="Watermark" value="0" class="radio"  <?php if(S_WaterMark==0){echo "checked";}?>  onClick="javascript:document.getElementById('opw').style.display='none'"/>
        关闭        </td>
    </tr>
    <tr>
      <td colspan="2" height="30" class="td_title">&nbsp;站点信息设置</td>
    </tr>
    <tr>
      <td width="103"  height="30" align="left" class="td_border">&nbsp;热门搜索：</td>
      <td class="td_border"><input type="text" name="HotKeyWords" id="HotKeyWords" value="<?php echo S_Keywords?>" size="60" />
        <br />
        <font color="#FF0000">＊注意：每个关健词可以使用&quot;逗号,空格,|,下划线,&quot;来隔开</font></td>
    </tr>
    <tr>
      <td width="103"  height="30" align="left" class="td_border">&nbsp;备案信息：</td>
      <td class="td_border"><input name="SiteICP" type="text" id="SiteICP" value="<?php echo S_SiteICP?>" size="40" />      </td>
    </tr>
    <tr>
      <td  width="103" height="30" align="left" class="td_border">&nbsp;站长ＱＱ：</td>
      <td class="td_border"><input name="AdminQQ" type="text" id="AdminQQ" value="<?php echo S_AdminQQ?>" size="40" />      </td>
    </tr>
    <tr>
      <td  width="103" height="30" align="left" class="td_border">&nbsp;站长电话：</td>
      <td class="td_border"><input name="Admindel" type="text" id="Admindel" value="<?php echo S_Admindel?>" size="40" />      </td>
    </tr>
    <tr>
      <td width="103"  height="30" align="left" class="td_border">&nbsp;站长邮箱：</td>
      <td class="td_border"><input name="AdminEmail" type="text" id="AdminEmail" value="<?php echo S_Adminmail?>" size="40" />      </td>
    </tr>
    <tr>
      <td width="103"  height="30" align="left" class="td_border">&nbsp;网站公告： </td>
      <td class="td_border"><textarea name="SiteNotice" cols="70" rows="5" id="SiteNotice"><?php echo stripslashes(html_entity_decode(S_SiteNotice))?></textarea></td>
    </tr>   
    <tr>
      <td  width="103" height="30" align="left" class="td_border">&nbsp;统计代码：</td>
      <td class="td_border"><textarea name="SiteCount" cols="70" rows="5" id="SiteCount"><?php echo html_entity_decode(stripslashes(S_SiteCount))?></textarea>      </td>
    </tr>        
    <tr>
      <td width="103" height="30" align="right" class="td_border">&nbsp;</td>
      <td class="td_border"><input type="submit" name="Submit" id="Submit" value="确定提交" class="rb1" />
        &nbsp;&nbsp;
      <input type="reset" name="Submit2" value="清除重置"  class="rb1"/></td>
    </tr>
  </form>
</table>

		</div>
	</div>
</div>

<?php include "admin_bottom.php" ?>
<?php
	$action=SafeRequest("action","get");
if ($action=="baseinfoEidt"){
	$nSiteName = SafeRequest("SiteName","post");
	$nSiteDomain = SafeRequest("SiteDomain","post");
	$nSitePath = SafeRequest("SitePath","post");
	$ncheckcode =SafeRequest("checkcode","post");
	$nConst_SqlServerName =SafeRequest("Const_SqlServerName","post");
	$nConst_SqlDbName =SafeRequest("Const_SqlDbName","post");
	$nConst_SqlUserID =SafeRequest("Const_SqlUserID","post");
	$nConst_SqlPassword =SafeRequest("Const_SqlPassword","post");
	$nHotKeyWords = SafeRequest("HotKeyWords","post");
	$nSiteICP = SafeRequest("SiteICP","post");
	$nAdminQQ = SafeRequest("AdminQQ","post");
	$nAdmindel=SafeRequest("Admindel","post");
	$nAdminEmail = SafeRequest("AdminEmail","post");
	$nSiteCount = htmlentities(SafeRequest("SiteCount","post"));
	$nIsCache = SafeRequest("IsCache","post");
	$nCacheTime = SafeRequest("CacheTime","post");
	$nStopTime=SafeRequest("StopTime","post");
	$nTemplateUrl = SafeRequest("TemplateUrl","post");
	$nGetCreate=SafeRequest("GetCreate","post");
	$nCreateID=SafeRequest("CreateID","post");
	$nCreatepre=SafeRequest("Createpre","post");
	$nCacheMark=SafeRequest("CacheMark","post");
	$nCacheFolder=SafeRequest("CacheFolder","post");
	$nVideofolder=SafeRequest("Videofolder","post");
	$nNewfolder=SafeRequest("Newfolder","post");
	$nTopicfolder=SafeRequest("Topicfolder","post");
	$nWatermark=SafeRequest("Watermark","post");
	$nWaterLocation=SafeRequest("WaterLocation","post");
	$nWaterFont=SafeRequest("WaterFont","post");
	$nWaterFontSize=SafeRequest("WaterFontSize","post");
	$nWaterFontColor=SafeRequest("WaterFontColor","post");
	$nWebMode=SafeRequest("WebMode","post");
	$nDownMode=SafeRequest("DownMode","post");
	$nUcMode=SafeRequest("UcMode","post");
	$nUserMode=SafeRequest("UserMode","post");
	$nUymMode=SafeRequest("UymMode","post");
	$nUymUrl=SafeRequest("UymUrl","post");
   	$nS_VideoListFolder=SafeRequest("S_VideoListFolder","post");
   	$nS_VideoContentFolder=SafeRequest("S_VideoContentFolder","post");
   	$nS_VideoContentSuffix=SafeRequest("S_VideoContentSuffix","post");
   	$nS_NewsListFolder=SafeRequest("S_NewsListFolder","post");
  	$nS_NewsContentFolder=SafeRequest("S_NewsContentFolder","post");
   	$nS_NewsContentSuffix=SafeRequest("S_NewsContentSuffix","post");
   	$nS_AlbumContentName=SafeRequest("S_AlbumContentName","post");
   	$nS_AlbumContentSuffix=SafeRequest("S_AlbumContentSuffix","post");
   	$nD_VideoName=SafeRequest("D_VideoName","post");
   	$nD_VideoMode=SafeRequest("D_VideoMode","post");
   	$nD_NewsName=SafeRequest("D_NewsName","post");
   	$nD_NewsMode=SafeRequest("D_NewsMode","post");
   	$nD_VideoSuffix=SafeRequest("D_VideoSuffix","post");
   	$nD_NewsSuffix=SafeRequest("D_NewsSuffix","post");
   	$nD_AlbumSuffix=SafeRequest("D_AlbumSuffix","post");
   	$nD_AlbumName=SafeRequest("D_AlbumName","post");
   	$nD_AlbumMode=SafeRequest("D_AlbumMode","post");
   	$nS_AlbumListFolder=SafeRequest("S_AlbumListFolder","post");
   	$nS_IsStaticPlay=SafeRequest("S_IsStaticPlay","post");
   	$nS_PlayFolder=SafeRequest("S_PlayFolder","post");
   	$nS_PlayHeight=SafeRequest("S_PlayHeight","post");
   	$nS_PlayWidth=SafeRequest("S_PlayWidth","post");
   	$nS_PlayspHeight=SafeRequest("S_PlayspHeight","post");
   	$nS_PlayspWidth=SafeRequest("S_PlayspWidth","post");
   	$nS_PlayAddrEnc=SafeRequest("S_PlayAddrEnc","post");
   	$nS_AdLoadTime=SafeRequest("S_AdLoadTime","post");
	$nS_UID=SafeRequest("S_UID","post");
	$nslists=SafeRequest("slists","post");
	$nS_YmKey=SafeRequest("S_YmKey","post");
        //UC信息
   	$nUC_DBHOST=SafeRequest("Uc_Host","post");
   	$nUC_DBUSER=SafeRequest("Uc_User","post");
   	$nUC_DBPW=SafeRequest("Uc_Pwd","post");
   	$nUC_DBNAME=SafeRequest("Uc_Name","post");
   	$nUC_DBTABLEPRE=SafeRequest("Uc_Tablepre","post");
   	$nUC_DBTABLEPRE="`".$nUC_DBNAME."`.".$nUC_DBTABLEPRE."";
   	$nUC_KEY=SafeRequest("Uc_Key","post");
   	$nUC_API=SafeRequest("Uc_Api","post");
   	$nUC_APPID=SafeRequest("Uc_Appid","post");

	
	$nSiteNotice=htmlentities(SafeRequest("SiteNotice","post"));
	
	//判断生成目录有无重名
	$arr1=array($nS_VideoListFolder,$nS_VideoContentFolder,$nS_NewsListFolder,$nS_NewsContentFolder,$nS_AlbumListFolder,$nS_PlayFolder,$nD_VideoName,$nD_NewsName,$nD_AlbumName);
	$arr2=array("S舞曲列表目录","S舞曲播放目录","S文章列表目录","S文章内容目录","S专题列表目录","S静态播放目录","D舞曲文件名称","S文章文件名称","S专题文件名称");
	for ($i=0;$i<8;$i++)
	{
		for($j=0;$j<8;$j++){
			if($i<>$j){
				 if ($arr1[$i]==$arr1[$j]){
	     			// exit("</br><font color='red'>".$arr2[$i].":".$arr1[$i]."----".$arr2[$j].":".$arr1[$j]."重名了,请修改</font></br>");			
					echo "<script>jAlert('<font color=red>生成目录有重名了,请修改</font>','操作提示');</script>" ;
					die();
					 }
				}
			}
		}
	//判断图片目录是否有重名
	$arr3=array($nVideofolder,$nNewfolder,$nTopicfolder);
	$arr4=array("舞曲图片保存目录","文章保存目录","专题保存目录");
	for ($k=0;$k<3;$k++)
	{
		for($l=0;$l<3;$l++)
		{
			if($k<>$l){
				if($arr3[$k]==$arr3[$l]){
					echo "<script>jAlert('<font color=red>图片保存目录有重名,请修改</font>','操作提示');</script>";
					die();
					}
				}
			}
		}
	
	//下面为自动修改文件名
	//判断图片文件夹是否修改，是则自动修改本地对应文件名
	$i=0;
	$Arra=array(S_Vimgfolder,S_Aimgfolder,S_Timgfolder);
	$Arrb=array($nVideofolder,$nNewfolder,$nTopicfolder);
	for($i=0;$i<3;$i++){
		if ($Arra[$i]<>$Arrb[$i]){
			rename("../images/".$Arra[$i],"../images/".$Arrb[$i]);
			}
		}
	//判断动态文件夹名是否修改	
	$i=0;
	$Arra=array(S_Dvname,S_Dnname,S_Dtname);
	$Arrb=array($nD_VideoName,$nD_NewsName,$nD_AlbumName);
	for($i=0;$i<3;$i++){
		if ($Arra[$i]<>$Arrb[$i]){
			rename("../".$Arra[$i],"../".$Arrb[$i]);
			}
		}
	//缓存目录名

	if(S_CacheFolder!=$nCacheFolder){
		if(file_exists("../".S_CacheFolder."/")){
			rename("../".S_CacheFolder,"../".$nCacheFolder);
			}	
		else{
			mkdir("../".$nCacheFolder);
			}	
		}
	else{
		if(!file_exists("../".S_CacheFolder)){
			mkdir("../".$nCacheFolder);
			}
		}	

		
	$strs="<?php"."\r\n";
	
	$strs=$strs."define(\"S_SiteName\",\"".$nSiteName."\");\r\n";
	$strs=$strs."define(\"S_SiteDomain\",\"".$nSiteDomain."\");\r\n";
	$strs=$strs."define(\"S_CheckCode\",\"".$ncheckcode."\");\r\n";
	$strs=$strs."define(\"S_Sqlservername\",\"".$nConst_SqlServerName."\");\r\n";
	$strs=$strs."define(\"S_Sqldbname\",\"".$nConst_SqlDbName."\");\r\n";
	$strs=$strs."define(\"S_Sqluserid\",\"".$nConst_SqlUserID."\");\r\n";
	$strs=$strs."define(\"S_Sqlpwd\",\"".$nConst_SqlPassword."\");\r\n";
	$strs=$strs."define(\"S_SitePath\",\"".$nSitePath."\");\r\n";
	$strs=$strs."define(\"S_YmKey\",\"".$nS_YmKey."\");\r\n";
	$strs=$strs."define(\"S_Keywords\",\"".$nHotKeyWords."\");\r\n";
	$strs=$strs."define(\"S_SiteICP\",\"".$nSiteICP."\");\r\n";
	$strs=$strs."define(\"S_AdminQQ\",\"".$nAdminQQ."\");\r\n";
	$strs=$strs."define(\"S_Admindel\",\"".$nAdmindel."\");\r\n";
	$strs=$strs."define(\"S_Adminmail\",\"".$nAdminEmail."\");\r\n";
	$strs=$strs."define(\"S_SiteCount\",\"".$nSiteCount."\");\r\n";
	
	$strs=$strs."define(\"S_IsCache\",".$nIsCache.");\r\n";
	$strs=$strs."define(\"S_CacheTime\",".$nCacheTime.");\r\n";
	$strs=$strs."define(\"S_CacheMark\",\"".$nCacheMark."\");\r\n";
	$strs=$strs."define(\"S_CacheFolder\",\"".$nCacheFolder."\");\r\n";
	
	$strs=$strs."define(\"S_Templateurl\",\"".$nTemplateUrl."\");\r\n";
	$strs=$strs."define(\"S_Getcreate\",".$nGetCreate.");\r\n";
	$strs=$strs."define(\"S_Createid\",".$nCreateID.");\r\n";
	$strs=$strs."define(\"S_Createpre\",".$nCreatepre.");\r\n";
	$strs=$strs."define(\"S_StopTime\",".$nStopTime.");\r\n";
	$strs=$strs."define(\"S_Vimgfolder\",\"".$nVideofolder."\");\r\n";
	$strs=$strs."define(\"S_Aimgfolder\",\"".$nNewfolder."\");\r\n";
	$strs=$strs."define(\"S_Timgfolder\",\"".$nTopicfolder."\");\r\n";
	$strs=$strs."define(\"S_WaterMark\",".$nWatermark.");\r\n";
	$strs=$strs."define(\"S_WaterFontSize\",".$nWaterFontSize.");\r\n";
	$strs=$strs."define(\"S_WaterLocation\",".$nWaterLocation.");\r\n";
	$strs=$strs."define(\"S_WaterFont\",\"".$nWaterFont."\");\r\n";
	$strs=$strs."define(\"S_WaterFontColor\",\"".$nWaterFontColor."\");\r\n";
	$strs=$strs."define(\"S_Downmode\",".$nDownMode.");\r\n";
	$strs=$strs."define(\"S_Webmode\",".$nWebMode.");\r\n";
	$strs=$strs."define(\"S_Ucmode\",".$nUcMode.");\r\n";
	$strs=$strs."define(\"S_Usermode\",".$nUserMode.");\r\n";
	$strs=$strs."define(\"S_Uymmode\",".$nUymMode.");\r\n";
	$strs=$strs."define(\"S_Uymurl\",\"".$nUymUrl."\");\r\n";
	$strs=$strs."define(\"S_Svlistfolder\",\"".$nS_VideoListFolder."\");\r\n";
	$strs=$strs."define(\"S_Svcontentfolder\",\"".$nS_VideoContentFolder."\");\r\n";
	$strs=$strs."define(\"S_Svcontentsuffix\",\"".$nS_VideoContentSuffix."\");\r\n";
	
	$strs=$strs."define(\"S_Snlistfolder\",\"".$nS_NewsListFolder."\");\r\n";
	$strs=$strs."define(\"S_Sncontentfolder\",\"".$nS_NewsContentFolder."\");\r\n";
	$strs=$strs."define(\"S_Sncontentsuffix\",\"".$nS_NewsContentSuffix."\");\r\n";
	
	$strs=$strs."define(\"S_Stcontentsuffix\",\"".$nS_AlbumContentSuffix."\");\r\n";
	$strs=$strs."define(\"S_Dvname\",\"".$nD_VideoName."\");\r\n";
	$strs=$strs."define(\"S_Dvmode\",".$nD_VideoMode.");\r\n";
	$strs=$strs."define(\"S_Dnname\",\"".$nD_NewsName."\");\r\n";
	$strs=$strs."define(\"S_Dnmode\",".$nD_NewsMode.");\r\n";
	$strs=$strs."define(\"S_Dvsuffix\",\"".$nD_VideoSuffix."\");\r\n";
	$strs=$strs."define(\"S_Dnsuffix\",\"".$nD_NewsSuffix."\");\r\n";
	$strs=$strs."define(\"S_Dtsuffix\",\"".$nD_AlbumSuffix."\");\r\n";
	$strs=$strs."define(\"S_Dtname\",\"".$nD_AlbumName."\");\r\n";
	$strs=$strs."define(\"S_Dtmode\",".$nD_AlbumMode.");\r\n";
	$strs=$strs."define(\"S_Stlistfolder\",\"".$nS_AlbumListFolder."\");\r\n";
	$strs=$strs."define(\"S_IsStaticPlay\",".$nS_IsStaticPlay.");\r\n";
	$strs=$strs."define(\"S_PlayFolder\",\"".$nS_PlayFolder."\");\r\n";
	$strs=$strs."define(\"S_PlayHeight\",".$nS_PlayHeight.");\r\n";
	$strs=$strs."define(\"S_PlayWidth\",".$nS_PlayWidth.");\r\n";
	$strs=$strs."define(\"S_PlayspHeight\",".$nS_PlayspHeight.");\r\n";
	$strs=$strs."define(\"S_PlayspWidth\",".$nS_PlayspWidth.");\r\n";
	$strs=$strs."define(\"S_PlayAddrEnc\",".$nS_PlayAddrEnc.");\r\n";
	$strs=$strs."define(\"S_AdLoadTime\",".$nS_AdLoadTime.");\r\n";
	$strs=$strs."define(\"S_SiteNotice\",\"".$nSiteNotice."\");\r\n";
	
	$strs=$strs."define(\"S_Slists\",\"".$nslists."\");\r\n";
	
	$strs=$strs."?>";
	//写文件
	$ifile = new iFile('../include/config.php','w');
	$ifile->WriteFile($strs,3); 

        /////////////写入整合UC信息////////////////////
        if($nUcMode==1){
	$strsuc="<?php"."\r\n";
	$strsuc=$strsuc."define(\"UC_CONNECT\", \"mysql\");\r\n";
	$strsuc=$strsuc."define(\"UC_DBHOST\", \"".$nUC_DBHOST."\");\r\n";
	$strsuc=$strsuc."define(\"UC_DBUSER\", \"".$nUC_DBUSER."\");\r\n";
	$strsuc=$strsuc."define(\"UC_DBPW\", \"".$nUC_DBPW."\");\r\n";
	$strsuc=$strsuc."define(\"UC_DBNAME\", \"".$nUC_DBNAME."\");\r\n";
	$strsuc=$strsuc."define(\"UC_DBCHARSET\", \"gbk\");\r\n";
	$strsuc=$strsuc."define(\"UC_DBTABLEPRE\", \"".$nUC_DBTABLEPRE."\");\r\n";
	$strsuc=$strsuc."define(\"UC_KEY\", \"".$nUC_KEY."\");\r\n";
	$strsuc=$strsuc."define(\"UC_API\", \"".$nUC_API."\");\r\n";
	$strsuc=$strsuc."define(\"UC_CHARSET\", \"gbk\");\r\n";
	$strsuc=$strsuc."define(\"UC_IP\", \"\");\r\n";
	$strsuc=$strsuc."define(\"UC_APPID\", ".$nUC_APPID.");\r\n";
	$strsuc=$strsuc."?>";
	//写文件
	$ifile = new iFile('../config.uc.php','w');
	$ifile->WriteFile($strsuc,3); 
        }
        ////////////写入伪静态规则//////////////////////
if($nD_VideoMode==0 or $nD_NewsMode==0 or $nD_AlbumMode==0 or $nUserMode==0){
	$strss="[ISAPI_Rewrite]"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."# 3600 = 1 hour"."\r\n";
	$strss=$strss."CacheClockRate 3600"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."RepeatLimit 32"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."# chshdjcms Rewrite规则"."\r\n";
	$strss=$strss."\r\n";
   if($nD_NewsMode==0){
	$strss=$strss."#artlist"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/art(.*)----([0-9]+)----([0-9]+)\.".$nD_NewsSuffix."$ $1/".$nD_NewsName."/\?ac=Art$2&ID=list-$3&pages=$4"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#artshow"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/k----([0-9]+)\.".$nD_NewsSuffix."$ $1/".$nD_NewsName."/\?ID=show-$2"."\r\n";
	$strss=$strss."\r\n";
   }
  if($nD_VideoMode==0){
	$strss=$strss."#djlist"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/(.*)----([0-9]+)----([0-9]+)\.".$nD_VideoSuffix."$ $1/".$nD_VideoName."/\?ac=$2&ID=list-$3&pages=$4"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djplay"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/p----([0-9]+)\.".$nD_VideoSuffix."$ $1/".$nD_VideoName."/\?ID=play-$2"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djrihits"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djri\.html$ $1/toplist/\?ac=rhits"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djzhouhits"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djzhou\.html$ $1/toplist/\?ac=zhits"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djyuehits"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djyue\.html$ $1/toplist/\?ac=yhits"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djhits"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djhits\.html$ $1/toplist/\?ac=hits"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djfavhits"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djfav\.html$ $1/toplist/\?ac=fav"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djdownhits"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djdown\.html$ $1/toplist/\?ac=down"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djdinghits"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djding\.html$ $1/toplist/\?ac=ding"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djcaihits"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djcai\.html$ $1/toplist/\?ac=cai"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#dj5x"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/dj5x\.html$ $1/toplist/\?ac=5x"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djnews"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djnews\.html$ $1/toplist/\?ac=news"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#djplay"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/toplist/djplay\.html$ $1/toplist/\?ac=play"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#index"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/index\.html$ $1/index\.php"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#Down"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/d----([0-9]+)\.html$ $1/down\.php\?id=$2"."\r\n";
	$strss=$strss."\r\n";
   }
   if($nD_AlbumMode==0){
	$strss=$strss."#topic"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/zj----([0-9]+)\.".$nD_AlbumSuffix."$ $1/".$nD_AlbumName."/\?ac=Zj&ID=0&pages=$2"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#topiclist"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/zj---(.*)---([0-9]+)\.".$nD_AlbumSuffix."$ $1/".$nD_AlbumName."/\?ac=Zj&ID=$2&pages=$3";
	$strss=$strss."\r\n";
   }
}
     //////////////////会员伪静态////////////////////
if($nUserMode==0){
	$strssu="[ISAPI_Rewrite]"."\r\n";
	$strssu=$strssu."\r\n";
	$strssu=$strssu."# 3600 = 1 hour"."\r\n";
	$strssu=$strssu."CacheClockRate 3600"."\r\n";
	$strssu=$strssu."\r\n";
	$strssu=$strssu."RepeatLimit 32"."\r\n";
	$strssu=$strssu."\r\n";
	$strssu=$strssu."# chshdjcmsuser Rewrite规则"."\r\n";
	$strssu=$strssu."\r\n";
  if($nUymMode==0){
	$strssu=$strssu."#userweb"."\r\n";
	$strssu=$strssu."RewriteRule ^(.*)/index\.html$ $1/i\.php"."\r\n";
	$strssu=$strssu."\r\n";
	$strssu=$strssu."#userlist"."\r\n";
	$strssu=$strssu."RewriteRule ^(.*)/(.*)----(.*)\.html$ $1/\?op=$2&pages=$3 [I]"."\r\n";
	$strssu=$strssu."\r\n";
	$strssu=$strssu."#userpicgo"."\r\n";
	$strssu=$strssu."RewriteRule ^(.*)/picgo---(.*)\.html$ $1/\?op=picgo&id=$2 [I]"."\r\n";
	$strssu=$strssu."\r\n";
  }else{
	$strss=$strss."\r\n";
	$strss=$strss."#userlist"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/user/(.*)----(.*)\.html$ $1/user/i\.php\?u=$2&op=$3 [I]"."\r\n";
	$strss=$strss."\r\n";
	$strss=$strss."#userpicgo"."\r\n";
	$strss=$strss."RewriteRule ^(.*)/user/(.*)---picgo---(.*)\.html$ $1/user/i\.php\?u=$2&op=picgo&id=$3 [I]"."\r\n";
	$strss=$strss."\r\n";
  }
}
        //写文件
  if($nUserMode==0){
        //会员伪静态
        if($nUymMode==0){
	     $ifile = new iFile('../user/httpd.ini','w');
	     $ifile->WriteFile($strssu,3); 
        }else{
 	     $ifile = new iFile('../httpd.ini','w');
	     $ifile->WriteFile($strss,3); 
        }
  }

  if($nD_VideoMode==0 or $nD_NewsMode==0 or $nD_AlbumMode==0){
	$ifile = new iFile('../httpd.ini','w');
	$ifile->WriteFile($strss,3); 
  }
	echo "<script>window.location='admin_config.php';</script>";
}
?>
</body>
</html>

