<!--#include file="Conn.asp"-->
<!--#include file ="Check_Manager.asp"-->
<!--#include file="char.asp"-->
<%Set Rs = Server.CreateObject("ADODB.RecordSet")%>
<HTML>
<HEAD>
<TITLE>管理中心</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="admin/admin.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript src="admin/js.js"></SCRIPT>
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY text=#000000>
<SCRIPT>
function change(obj,i) {
he=parseInt(obj.style.height);
if (he>=80&&he<=400)
   obj.style.height=he+i+'px';
else 
   obj.style.height='80px';
}
</SCRIPT>
<%
Dim isopen
Dim message
If Request.QueryString("action")="save" Then
na = strkill(Request("name"))
logo = strkill(Request.Form("logo"))
message = strkill(Request.Form("message"))
keyword = strkill(Request.Form("keyword"))
upload = Request.Form("photo")
WebEmail = Request.Form("WebEmail")
IsReg = Cint(Request.Form("IsReg"))
IsCm = Cint(Request.Form("IsCm"))
If Request.Form("Submit")="确认" Then
   If na="" or message="" or keyword="" or upload="" or logo="" or IsReg="" Then
    Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('系统配置内容不能为空!');" & Chr(13)
		Response.write "window.document.location.href='Config.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
    Response.End
   Else
Set config = Conn.Execute("Update [Index] set [Index]='"&na&"',[Logo]='"&logo&"',[LockSay]='"&message&"',[Key]='"&keyword&"',[UpSize]='"&upload&"',[WebEmail]='"&WebEmail&"' ,[IsCu]="&IsReg&",[IsCm]="&IsCm&" Where ID=1")
SqlStr = "Update [Index] Set [Lock]="
If Request("isopen")=0 Then
SqlStr = SqlStr & " false Where ID=1"
Else
SqlStr = SqlStr & " true Where ID=1"
End if
Conn.Execute (SqlStr)
JaSys("管理员" & session("ManagerUser")&"更新<font color=red>[系统配置]</font>")
       Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('系统配置更新成功!');" & Chr(13)
		Response.write "window.document.location.href='Config.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
      Response.End
config.Close
Set config=nothing
    End if
End if
End if
%>
<TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
  <TBODY>
  <TR>
    <TD width="100%" bgColor=#f7f3f7 colSpan=2 
      height=30>&nbsp;&nbsp;<B>说明</B>：这里的设置代表了系统中的全局设置，系统设置会改变首页中的一些元素    </TD></TR>
</TBODY>
</TABLE>
<BR>
<%
Set rs=Conn.Execute("Select * From [Index] Where id=1")
If Not (rs.Eof and rs.Bof) Then
%>
<TABLE class=tableBorder cellSpacing=0 cellPadding=0 width="95%" align=center 
border=0>
  <FORM id=form1 name=form1 action=?action=save method=post>
    <TBODY>
      <TR> 
        <TH colSpan=2 height=25><B>基本设置</B></TH>
      </TR>
      <TR> 
        <TD width="40%" height="21" align=right><U>网站名称</U>&nbsp;</TD>
        <TD width="60%">&nbsp; <INPUT name=name value=<%=rs("Index")%> size=35 maxlength="100"></TD>
      </TR>
      <TR> 
        <TD align=right><U>网站Logo</U>&nbsp;</TD>
        <TD width="60%">&nbsp;
          <input name="logo" type="text" id="logo" value="<%=server.HTMLEncode(rs("Logo"))%>" size="35" maxlength="100"></TD>
      </TR>
      <TR> 
        <TD align=right width="40%"><U>网站是否开启</U>&nbsp;</TD>
        <TD width="60%">&nbsp;开 
          <INPUT type=radio <%If rs("Lock")=false Then Response.Write"CHECKED" End If%> value=0 name=isopen>
          关 
          <INPUT type=radio <%If Rs("Lock")=true Then Response.Write"CHECKED" End If%> value=1 name=isopen></TD>
      </TR>
       <TR> 
        <TD align=right width="40%"><U>用户是否需要审核</U>&nbsp;</TD>
        <TD width="60%">&nbsp;开 
          <INPUT type=radio <%If Rs("IsCU")=1 Then Response.Write"CHECKED" End If%> value="1" name=isreg>
          关 
          <INPUT type=radio <%If Rs("IsCu")=0 Then Response.Write"CHECKED" End If%> value="0" name=isreg></TD>
      </TR> 
        <TR> 
        <TD align=right width="40%"><U>留言是否需要审核</U>&nbsp;</TD>
        <TD width="60%">&nbsp;开 
          <INPUT type=radio <%If Rs("IsCm")=1 Then Response.Write"CHECKED" End If%> value="1" name=isCm>
          关 
          <INPUT type=radio <%If Rs("IsCm")=0 Then Response.Write"CHECKED" End If%> value="0" name=isCm></TD>
      </TR>  
      <TR> 
        <TD align=right width="40%"><U>关闭时的公告语</U>&nbsp;</TD>
        <TD width="60%">&nbsp; <TEXTAREA name=message rows=3 wrap=VIRTUAL cols=30><%=rs("LockSay")%></TEXTAREA> 
          <BR> &nbsp;<A 
      href="javascript:change(document.all.message,-20)"><IMG title=缩小文本框 
      src="admin/minus.gif" border=0></A>&nbsp;&nbsp;<A 
      href="javascript:change(document.all.message,20)"><IMG title=放大文本框 
      src="admin/plus.gif" border=0></A></TD>
      </TR>
      <TR> 
        <TD align=right width="40%"><U>上传图片大小</U>&nbsp;</TD>
        <TD width="60%">&nbsp; <INPUT onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" size=20 value="<%=rs("UpSize")%>" name="photo">
          单位:k</TD>
      </TR>
      <TR> 
        <TD align=right width="40%"><U>网站介绍和关键字</U>&nbsp;</TD>
        <TD width="60%">&nbsp; <TEXTAREA name=keyword rows=2 wrap=VIRTUAL cols=30><%=rs("Key")%></TEXTAREA> 
        </TD>
      </TR>
         <TR> 
        <TD align=right width="40%"><U>管理员Eamil</U>&nbsp;</TD>
        <TD width="60%">&nbsp; <INPUT size=20 value="<%=rs("WebEmail")%>" name="WebEmail">
          </TD>
      </TR>
      <TR align=middle bgColor=#f7fbff> 
        <TD colSpan=2 height=25> <INPUT type=submit value="确认" name=Submit> &nbsp;&nbsp; 
          <INPUT type=reset value=重置 name=Submit2></TD>
      </TR>
  </FORM></TBODY>
</TABLE>
<%End if%>
</BODY>
</HTML>