<%
Action=request("action")
if Action="" then 
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from webinfo"
rs.open sql,conn,1,3
%>
<form action="main.asp?adminjob=webanthor&action=save" method="post">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#A3BFE8">
  <tr>
    <td height="20" colspan="2" align="center" bgcolor="#E9F1F8">网站其他设置</td>
  </tr>
  <tr>
    <td height="20" colspan="2" align="center" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  
  <tr>
    <td width="32%" height="20" align="center" bgcolor="#E9F1F8">网&nbsp;&nbsp;&nbsp;&nbsp; 站&nbsp;&nbsp;&nbsp; 标&nbsp;&nbsp;&nbsp; 题</td>
    <td width="68%" align="left" bgcolor="#E9F1F8"><label>
      <input name="txt_title" type="text" id="txt_title"  style="width:400px" size="45" value="<%=rs("w_title")%>"/>
    </label></td>
  </tr>
  <tr>
    <td height="20" align="center" bgcolor="#E9F1F8">网 站 优 化[keywords]</td>
    <td align="left" bgcolor="#E9F1F8"><textarea name="txt_keyword" cols="45" rows="5" id="txt_keywords" style="width:400px"><%=rs("w_keyword")%></textarea></td>
  </tr>
  <tr>
    <td height="20" align="center" bgcolor="#E9F1F8">
	网站优化[description]</td>
    <td align="left" bgcolor="#E9F1F8"><textarea name="txt_description" cols="45" rows="5" id="txt_description" style="width:400px"><%=rs("w_descrip")%></textarea></td>
  </tr>
  <tr>
    <td height="20" align="center" bgcolor="#E9F1F8">网&nbsp;&nbsp; 站&nbsp;&nbsp; 备&nbsp;&nbsp; 案&nbsp; 号</td>
    <td height="20" align="left" bgcolor="#E9F1F8"><input name="txt_beian" type="text" id="txt_beian"  style="width:400px" size="45" value="<%=rs("w_beian")%>"/></td>
  </tr>
  <tr>
    <td height="20" colspan="2" align="center" bgcolor="#E9F1F8">&nbsp;</td>
  </tr>
  <tr>
    <td height="20" colspan="2" align="center" bgcolor="#E9F1F8"><label>
      <input type="submit" name="Submit" value="提交修改">
    </label></td>
  </tr>
</table>
</form>
<%
rs.close
set rs=nothing
%>
<%else%>
<%
Title=server.HTMLEncode(trim(request("txt_title")))
Keyword=server.HTMLEncode(request("txt_keyword"))
Descrip=server.HTMLEncode(request("txt_description"))
Beian=server.HTMLEncode(request("txt_beian"))
if Title="" or Keyword="" or Descrip=""  then 
response.write "<script>alert('信息提示：\n\n内容不能为空！');history.go(-1);</Script>"
else
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from webinfo"
rs.open sql,conn,1,3 
rs("w_title")=Title
rs("w_keyword")=Keyword
rs("w_descrip")=Descrip
rs("w_beian")=Beian
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>alert('信息提示：\n\n操作成功!');location='main.asp?adminjob=webanthor';</script>"
end if
%>
<%end if%>