<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
style=request.QueryString("style")
if style="update" then
	SiteName1=request.Form("SiteName")
	SiteUrl1=request.Form("SiteUrl")
	email1=request.Form("email")
	logoUrl1=request.Form("logoUrl")
	keywords1=request.Form("keywords")
	name1=request.Form("name")
	QQ1=request.Form("QQ")
	flash_open1=request.Form("flash_open")
	pagecount1=request.Form("pagecount1")
	pagecount2=request.Form("pagecount2")
	pagecount3=request.Form("pagecount3")
	pagecount4=request.Form("pagecount4")
	tel1=request.Form("tel")
	diqu1=request.Form("diqu")
	yuyue1=request.Form("yuyue")
	MaxWidth1=request.Form("MaxWidth")
	MaxHeight2=request.Form("MaxHeight")
	tongji1=request.Form("tongji")
	gonggao1=request.Form("gonggao")
	luntan1=request.Form("luntan")
	photo_open1=Request.Form("photo_open")
	if SiteUrl1="" then
		SiteUrl1="#"
	end if
	if email1="" then
		email1="#"
	end if
	if LogoUrl1="" then
		LogoUrl1="#"
	end if
	if keywords1="" then
		keywords1="#"
	end if
	if name1="" then
		name1="#"
	end if
	if QQ1="" then
		qq1="#"
	end if
	if pagecount1="" then
		pagecount1="#"
	end if
	if pagecount2="" then
		pagecount2="#"
	end if
	if pagecount3="" then
		pagecount3="#"
	end if
	if pagecount4="" then
		pagecount4="#"
	end if
	if tel1="" then
		tel1="#"
	end if
	if MaxWidth1="" then
		MaxWidth1="#"
	end if
	if MaxHeight2="" then
		MaxHeight2="#"
	end if
	if diqu1="" then
		diqu1="#"
	end if
	if yuyue1="" then
		yuyue1="#"
	end if
	if gonggao1="" then
		gonggao1="#"
	end if
	sql="select * from config"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,3
	rs("sitename")=SiteName1
	rs("SiteUrl")=SiteUrl1
	rs("logoUrl")=logoUrl1
	rs("email")=email1
	rs("keywords")=keywords1
	rs("name")=name1
	rs("qq")=qq1
	rs("pagecount1")=pagecount1
	rs("pagecount2")=pagecount2
	rs("pagecount3")=pagecount3
	rs("pagecount4")=pagecount4
	rs("tel")=tel1
	rs("MaxWidth")=MaxWidth1
	rs("MaxHeight")=MaxHeight2
	rs("diqu")=diqu1
	rs("yuyue")=yuyue1
	RS("tongji")=tongji1
	RS("gonggao")=gonggao1
	RS("luntan")=luntan1
	RS("flash_open")=flash_open1
	RS("photo_open")=photo_open1
	rs.update
	rs.close
	Response.Write("<script language=javascript>alert('修改成功．请返回！');window.location.replace('system.asp')</script>")
end if
%>
<html>
<head>
<title>系统设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/bbs.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          min=test.substring(8,p); max=test.substr;
	    if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
		ing(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' 不能为空！\n'; }
  } if (errors) alert('出现错误的可能原因：\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
<script language=javascript>
<!--
	function zipwindow() {
		var ref = "img_upload.asp";
			window.open(ref, "zipwin", 'width=350, height=220');
	}	
	function rightStr(str,n)
	{
		if(str.length<=n)
		{
			return(str);
		}
		{
			return(str.substr(str.length-n,n));
		}
	}
	function addcontent(str1,str2)
	{
		myform.txtcontent.focus();
		if ((document.selection)&&(document.selection.type== "Text"))
		{
			var range= document.selection.createRange();
			var ch_text=range.text;
			range.text= str1 + ch_text + str2;
		} 
		else
		{
			document.myform.txtcontent.value=document.myform.txtcontent.value+str1+str2;
			myform.txtcontent.focus();
		}
	}
	function submitonce(theform)
	{
		if (document.all||document.getElementById)
		{
			for (i=0;i<theform.length;i++)
			{
				var tempobj=theform.elements[i];
				if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
				tempobj.disabled=true;
			}
		}
	}

	function storeCaret (textEl)
	{
		if (textEl.createTextRange) 
		textEl.caretPos = document.selection.createRange().duplicate(); 
	}
	
	function checklength(){alert("帖子内容长度: "+document.myform.txtcontent.value.length+" 个字，\n最多允许<%=DEF_MaxTextLength%>字节。");}
//-->
</script>
</head>
<body topmargin="0">
<%
if session("flag")>0 then
   Response.Write("<br><br><br><center>对不起。你没有权限进入此页面！！！</center>")
   Response.end 
end if
%>
<table width=461 height="642" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="1" height="305" align="center"><br> </td>
    <td width="481" valign="top"> 
      <form action="system.asp?style=update" method="post" name="form1" onSubmit="MM_validateForm('SiteName','','R','ztindex','','R','zlindex','','R','ptindex','','R','rwindex','','R','MaxWidth','','R','MaxHeight','','R');return document.MM_returnValue">
        <%
		sql="select * from [config]"
		set rs=server.CreateObject("Adodb.recordset")
		rs.open sql,conn,1,1
			%>
        <font color="#F0F0F0">df </font> 
        <table width="579" height="654" border="0" cellpadding="0" cellspacing="0">
          <tr align="center"> 
            <td height="30" colspan="2"><strong>系统设置</strong></td>
          </tr>
          <tr> 
            <td width="114" height="28">网站名称</td>
            <td width="465"> 
              <input name="SiteName" type="text" id="SiteName" value="<%if not rs.eof then%><%=rs("SiteName")%><%end if%>" size="45" style="font-family:宋体; font-size:9pt; color:#000000; width:350px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
            </td>
          </tr>
          <tr> 
            <td height="28" width="114">网站地址</td>
            <td width="465"> 
              <input name="SiteUrl" type="text" id="SiteUrl" value="<%if not rs.eof then%><%=rs("SiteUrl")%><%end if%>" size="45" style="font-family:宋体; font-size:9pt; color:#000000; width:250px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              注：最后一定要加&quot;/&quot;</td>
          </tr>
          <tr> 
            <td height="28" width="114">网站顶部图标</td>
            <td width="465"> 
              <input name="logoUrl" type="text" id="logoUrl" value="<%if not rs.eof then%><%=rs("logoUrl")%><%end if%>" size="45" style="font-family:宋体; font-size:9pt; color:#000000; width:250px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              <a href="javascript:zipwindow()" title=上传图片>上传图片</a> </td>
          </tr>
          <tr> 
            <td height="28" width="114">网站关键字</td>
            <td width="465"> 
              <input name="keywords" type="text" id="keywords" value="<%if not rs.eof then%><%=rs("keywords")%><%end if%>" size="60" style="font-family:宋体; font-size:9pt; color:#000000; width:350px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
            </td>
          </tr>
          <tr> 
            <td height="28" width="114">网站所有人姓名</td>
            <td width="465"> 
              <input name="name" type="text" id="name" value="<%if not rs.eof then%><%=rs("name")%><%end if%>" size="45" style="font-family:宋体; font-size:9pt; color:#000000; width:350px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
            </td>
          </tr>
          <tr> 
            <td height="28" width="114">网站所有人Email</td>
            <td width="465"> 
              <input name="email" type="text" id="email" value="<%if not rs.eof then%><%=rs("email")%><%end if%>" size="45" style="font-family:宋体; font-size:9pt; color:#000000; width:350px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
            </td>
          </tr>
          <tr> 
            <td height="14" width="114">网站所有人QQ</td>
            <td width="465"> 
              <input name="qq" type="text" id="qq" value="<%if not rs.eof then%><%=rs("qq")%><%end if%>" size="45" style="font-family:宋体; font-size:9pt; color:#000000; width:350px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
            </td>
          </tr>
          <tr> 
            <td height="13" width="114">联系电话：</td>
            <td width="465"> 
              <input name="tel" type="text" id="tel" value="<%if not rs.eof then%><%=rs("tel")%><%end if%>" size="45" style="font-family:宋体; font-size:9pt; color:#000000; width:350px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
            </td>
          </tr>
          <tr> 
            <td height="12" width="114">文章每页显示</td>
            <td width="465" height="12">
              <input name="pagecount4" type="text" id="MaxWidth" size="4" value="<%=rs("pagecount4")%>" style="font-family:宋体; font-size:9pt; color:#000000; width:30px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              篇 </td>
          </tr>
          <tr>
            <td height="24">网站统计设置</td>
            <td width="465" height="24"><input type="radio" name="tongji" value="1" <%if RS("tongji")=1 then%>checked<%End if%>>
              按真实来访ip统计 
                <input name="tongji" type="radio" value="0" <%if RS("tongji")=0 then%>checked<%End if%>>
按页面总来访统计</td>
          </tr>
          <tr> 
            <td height="26" width="114"> 站点图片属性</td>
            <td width="465"> 宽： 
              <input name="MaxWidth" type="text" id="MaxWidth" size="4" value="<%=rs("MaxWidth")%>" style="font-family:宋体; font-size:9pt; color:#000000; width:30px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              高： 
              <input name="MaxHeight" type="text" id="MaxHeight" size="4" value="<%=rs("MaxHeight")%>" style="font-family:宋体; font-size:9pt; color:#000000; width:30px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              &nbsp;首页推荐图片显示 
              <input name="pagecount1" type="text" id="pagecount2" value="<%if not rs.eof then%><%=rs("pagecount1")%><%end if%>" size="5" style="font-family:宋体; font-size:9pt; color:#000000; width:30px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              组 </td>
          </tr>
          <tr> 
            <td height="6" width="114">图片栏目属性</td>
            <td width="465">一级图片显示 
              <input name="pagecount2" type="text" id="pagecount22" value="<%if not rs.eof then%><%=rs("pagecount2")%><%end if%>" size="5" style="font-family:宋体; font-size:9pt; color:#000000; width:30px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              张 二级图片显示 
              <input name="pagecount3" type="text" id="pagecount23" value="<%if not rs.eof then%><%=rs("pagecount3")%><%end if%>" size="5" style="font-family:宋体; font-size:9pt; color:#000000; width:30px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              张 一级横排显示
              <input name="photo_open" type="text" id="pagecount23" value="<%if not rs.eof then%><%=rs("photo_open")%><%end if%>" size="5" style="font-family:宋体; font-size:9pt; color:#000000; width:30px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
              张图片</td>
          </tr>
          <tr>
            <td height="12">首页显示论坛调用</td>
            <td width="465"><input type="radio" name="luntan" value="1" <%if RS("luntan")=1 then%>checked<%End if%>>
显示
  <input name="luntan" type="radio" value="0" <%if RS("luntan")=0 then%>checked<%End if%>>
不显示</td>
          </tr>
          <tr>
            <td height="12">首页Flash音乐调用</td>
            <td width="465"><input type="radio" name="flash_open" value="1" <%if RS("flash_open")=1 then%>checked<%End if%>>
使用
  <input name="flash_open" type="radio" value="0" <%if RS("flash_open")=0 then%>checked<%End if%>>
不使用</td>
          </tr>
          <tr> 
            <td height="23" width="114">在线预约区域</td>
            <td width="465" height="23"> 
              <input name="diqu" type="text" id="tel" value="<%if not rs.eof then%><%=rs("diqu")%><%end if%>" size="45" style="font-family:宋体; font-size:9pt; color:#000000; width:400px; height:19px; border:1px solid #000000; background-color:#F0F0F0;">
            </td>
          </tr>
          <tr>
            <td height="21">网站公告</td>
            <td width="465" height="21"><textarea id="gonggao" cols="45" style="font-family:宋体; font-size:9pt; color:#000000; width:400px; height:80px; border:1px solid #000000; background-color:#F0F0F0;" name="gonggao"><%if not rs.eof then%><%=rs("gonggao")%><%end if%>
            </textarea></td>
          </tr>
          <tr> 
            <td height="23" width="114">在线预约须知</td>
            <td width="465" height="23"> 
              <textarea id="tel" cols="45" style="font-family:宋体; font-size:9pt; color:#000000; width:400px; height:159px; border:1px solid #000000; background-color:#F0F0F0;" name="yuyue"><%if not rs.eof then%><%=rs("yuyue")%><%end if%></textarea>
            </td>
          </tr>
          <tr> 
            <td height="28" width="114">&nbsp;</td>
            <td width="465"> 
              <input type="submit" name="Submit" value="设 置" style="COLOR: #ffffff; BACKGROUND-COLOR: #411D03">
              &nbsp;&nbsp;&nbsp; 
              <input type="button" name="Submit2" value="取 消" onClick="javascript:history.back();" style="COLOR: #ffffff; BACKGROUND-COLOR: #411D03">
            </td>
          </tr>
          <tr> 
            <td colspan="2">&nbsp;</td>
          </tr>
        </table>
      </form></td>
  </tr>
  <tr> 
    <td height="16">&nbsp;</td>
    <td><div align="center"></div></td>
  </tr>
</table>
</body>
</html>
<%
rsclose()
ConnClose()
%>
