<?php
/*
'**************************************************************************************************
' 软件名称: 搜一次 Content Management System
' 版本编号: Version 1.X
' 官方网站: http://www.syccms.com
' 官方论坛：http://bbs.syccms.com
' 版权所有: 搜一次运营团队
' 法律顾问: 杭州市元茂律师事务所 严飞律师
' 郑重声明:
'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    2、搜一次网络事业部保留此软件的法律追究权利
'**************************************************************************************************
*/
include("admin_loginstate.php");
include("../include/conn.php");
include("../include/function.php");
include("admin_version.php");
?>
<!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","");
					 
					 }	 
				  });					 
				

			 });

-->
</script>
</head><body>
<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.SycCms.Com </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; 如：根目录设置为空/，二级目录/WuHen/ </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="text" 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" /></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?>"/></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>
              </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>
              </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"><select name="S_IsStaticPlay" id="S_IsStaticPlay" style="width:86px;">
            <option value="1" <?php if(S_IsStaticPlay==1){echo "selected";} ?>>不生成</option>
            <option value="0" <?php if(S_IsStaticPlay==0){echo "selected";} ?>>生成静态</option>
          </select></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="15%" class="td_border">&nbsp;皮皮播放器ID：</td>
          <td width="10%" class="td_border"><input type="Text" value="<?php echo S_UID?>" name="S_UID" id="S_UID"  size="4">已经失效</td>
        </tr>
      </table></td>
    </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%"><select name="S_PlayAddrEnc" id="S_PlayAddrEnc" style="width:86px;">
            <option value="1" <?php if(S_PlayAddrEnc==1){echo "selected";} ?>>不加密</option>
            <option value="2" <?php if(S_PlayAddrEnc==2){echo "selected";} ?>>Base加密</option>
          </select></td>
          <td width="14%" >&nbsp;播放宽高设置：</td>
          <td width="23%" >宽
            <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="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="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");
	$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");
   	$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_PlayAddrEnc=SafeRequest("S_PlayAddrEnc","post");
   	$nS_AdLoadTime=SafeRequest("S_AdLoadTime","post");
	$nS_UID=SafeRequest("S_UID","post");
	
	$nslists=SafeRequest("slists","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"."\n";
	
	$strs=$strs."define(\"S_SiteName\",\"".$nSiteName."\");\n";
	$strs=$strs."define(\"S_SiteDomain\",\"".$nSiteDomain."\");\n";
	$strs=$strs."define(\"S_CheckCode\",\"".$ncheckcode."\");\n";
	$strs=$strs."define(\"S_Sqlservername\",\"".$nConst_SqlServerName."\");\n";
	$strs=$strs."define(\"S_Sqldbname\",\"".$nConst_SqlDbName."\");\n";
	$strs=$strs."define(\"S_Sqluserid\",\"".$nConst_SqlUserID."\");\n";
	$strs=$strs."define(\"S_Sqlpwd\",\"".$nConst_SqlPassword."\");\n";
	$strs=$strs."define(\"S_SitePath\",\"".$nSitePath."\");\n";
	$strs=$strs."define(\"S_Keywords\",\"".$nHotKeyWords."\");\n";
	$strs=$strs."define(\"S_SiteICP\",\"".$nSiteICP."\");\n";
	$strs=$strs."define(\"S_AdminQQ\",\"".$nAdminQQ."\");\n";
	$strs=$strs."define(\"S_Adminmail\",\"".$nAdminEmail."\");\n";
	$strs=$strs."define(\"S_SiteCount\",\"".$nSiteCount."\");\n";
	
	$strs=$strs."define(\"S_IsCache\",".$nIsCache.");\n";
	$strs=$strs."define(\"S_CacheTime\",".$nCacheTime.");\n";
	$strs=$strs."define(\"S_CacheMark\",\"".$nCacheMark."\");\n";
	$strs=$strs."define(\"S_CacheFolder\",\"".$nCacheFolder."\");\n";
	
	$strs=$strs."define(\"S_Templateurl\",\"".$nTemplateUrl."\");\n";
	$strs=$strs."define(\"S_Getcreate\",".$nGetCreate.");\n";
	$strs=$strs."define(\"S_Createid\",".$nCreateID.");\n";
	$strs=$strs."define(\"S_Createpre\",".$nCreatepre.");\n";
	$strs=$strs."define(\"S_StopTime\",".$nStopTime.");\n";
	$strs=$strs."define(\"S_Vimgfolder\",\"".$nVideofolder."\");\n";
	$strs=$strs."define(\"S_Aimgfolder\",\"".$nNewfolder."\");\n";
	$strs=$strs."define(\"S_Timgfolder\",\"".$nTopicfolder."\");\n";
	$strs=$strs."define(\"S_WaterMark\",".$nWatermark.");\n";
	$strs=$strs."define(\"S_WaterFontSize\",".$nWaterFontSize.");\n";
	$strs=$strs."define(\"S_WaterLocation\",".$nWaterLocation.");\n";
	$strs=$strs."define(\"S_WaterFont\",\"".$nWaterFont."\");\n";
	$strs=$strs."define(\"S_WaterFontColor\",\"".$nWaterFontColor."\");\n";
	$strs=$strs."define(\"S_Webmode\",".$nWebMode.");\n";
	$strs=$strs."define(\"S_Svlistfolder\",\"".$nS_VideoListFolder."\");\n";
	$strs=$strs."define(\"S_Svcontentfolder\",\"".$nS_VideoContentFolder."\");\n";
	$strs=$strs."define(\"S_Svcontentsuffix\",\"".$nS_VideoContentSuffix."\");\n";
	
	$strs=$strs."define(\"S_Snlistfolder\",\"".$nS_NewsListFolder."\");\n";
	$strs=$strs."define(\"S_Sncontentfolder\",\"".$nS_NewsContentFolder."\");\n";
	$strs=$strs."define(\"S_Sncontentsuffix\",\"".$nS_NewsContentSuffix."\");\n";
	
	$strs=$strs."define(\"S_Stcontentsuffix\",\"".$nS_AlbumContentSuffix."\");\n";
	$strs=$strs."define(\"S_Dvname\",\"".$nD_VideoName."\");\n";
	$strs=$strs."define(\"S_Dvmode\",".$nD_VideoMode.");\n";
	$strs=$strs."define(\"S_Dnname\",\"".$nD_NewsName."\");\n";
	$strs=$strs."define(\"S_Dnmode\",".$nD_NewsMode.");\n";
	$strs=$strs."define(\"S_Dvsuffix\",\"".$nD_VideoSuffix."\");\n";
	$strs=$strs."define(\"S_Dnsuffix\",\"".$nD_NewsSuffix."\");\n";
	$strs=$strs."define(\"S_Dtsuffix\",\"".$nD_AlbumSuffix."\");\n";
	$strs=$strs."define(\"S_Dtname\",\"".$nD_AlbumName."\");\n";
	$strs=$strs."define(\"S_Dtmode\",".$nD_AlbumMode.");\n";
	$strs=$strs."define(\"S_Stlistfolder\",\"".$nS_AlbumListFolder."\");\n";
	$strs=$strs."define(\"S_IsStaticPlay\",".$nS_IsStaticPlay.");\n";
	$strs=$strs."define(\"S_PlayFolder\",\"".$nS_PlayFolder."\");\n";
	$strs=$strs."define(\"S_PlayHeight\",".$nS_PlayHeight.");\n";
	$strs=$strs."define(\"S_PlayWidth\",".$nS_PlayWidth.");\n";
	$strs=$strs."define(\"S_PlayAddrEnc\",".$nS_PlayAddrEnc.");\n";
	$strs=$strs."define(\"S_AdLoadTime\",".$nS_AdLoadTime.");\n";
	$strs=$strs."define(\"S_UID\",".$nS_UID.");\n";
	$strs=$strs."define(\"S_SiteNotice\",\"".$nSiteNotice."\");\n";
	
	$strs=$strs."define(\"S_Slists\",\"".$nslists."\");\n";
	
	$strs=$strs."?>";
	//写文件
	$ifile = new iFile('../include/config.php','w');
	$ifile->WriteFile($strs,3); 
	echo "<script>window.location='admin_config.php';</script>";
	}
?>
</body>
</html>

