⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit_city.asp

📁 网上学生心里调查系统
💻 ASP
字号:
<!--#include file="config.asp" -->
<!--#include file="check.asp" -->
<%
city=trim(request("ct"))
if city="" then
  response.write "<a href='javascript:history.back(1)'>请选择城市!</a>"
  response.end
end if
%>
<%
errwrite="错误!请确定您的权限!请您<a href='javascript:history.back(1)'>&gt;&gt;返回&lt;&lt;</a><br>或尝试<a href='edit_login.asp?id="&id&"'>重新登陆</a>!"

if len(session("quhao"))=0 or len(session("guanli"))=0 then
  response.redirect ("edit_login.asp?id=" & id)
  'response.write errwrite
  response.end
end if

set rscity=server.CreateObject("adodb.recordset")
rscity.open"select * from city where 区号='"& city &"'",conn,1,1
if not rscity.eof then
  if session("guanli")<>rscity("管理") or session("quhao")<>rscity("区号") then
     response.write errwrite
     response.end
   end if
end if
rscity.close
set rscity=nothing
%>
<%
about=trim(request.form("about"))


set rs=server.CreateObject("adodb.recordset")
if  about<>"" then
  rs.open"select * from city where 区号='"&city&"'",conn,3,3
  
  rs("简介")=about
  rs("日期")=date()
  
  rs.update
  rs.close
  set rs=nothing
  response.write "<font color=red>修改成功!</font>"
else 
end if
%>

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>城市信息修改</title>
<link href="admin.css" rel="stylesheet" type="text/css">
<script language="VBScript">
<!--
''=======================================================''
''函数作用:检测添加城市时的信息是否符合要求
''=======================================================''
function checkmodicity()
if Len(admin_city.about.value)>90 then
  msgbox"请输入文字介绍!(90汉字内)"
  admin_city.about.focus 
else
admin_city.submit
end if
end function
-->
</script>
</head>
<body leftmargin="5" topmargin="5">
<div align="<%=sitealign%>">
<%set rs=server.CreateObject("adodb.recordset")
rs.open"select * from city where 区号='"&city&"'",conn,1,1
if not rs.eof then
     %>
<!--表单开始-->
<table border="0" cellpadding="10" cellspacing="0" style="border:1px dotted #99CCFF; border-collapse: collapse" width="500">
  <form method="POST" action="edit_city.asp?ct=<%=city%>" name="admin_city">
  <tr>
    <td width="80" align="right" height="80" bgcolor="#EBF4FA" style="border: 1px dotted #99CCFF">城市简介:</td>
    <td width="420" height="77" bgcolor="#EBF4FA">
    <textarea rows="7" name="about" cols="38"><%=rs("简介")%></textarea>(70汉字内)</td>
  </tr>
  <tr>
    <td align="right" height="50">说明:</td>
    <td height="35" style="line-height: 18pt">
    请管理员在此处至少填写一种联系方式!<br>
    如:<font color="#008000">如果你有本页没有刊登或者刊登错误的本地同志活动场所的最新信息,请告诉我们!城市管理员 QQ 12345 
    或 Email:d1tz@qq.com</font></td>
  </tr>
  <tr>
    <td align="right" height="50" bgcolor="#EBF4FA"></td>
    <td height="35" bgcolor="#EBF4FA">
    <input type="button" value=" 提 交 " name="add" onclick="checkmodicity()">&nbsp;&nbsp;
    <input type="reset" value=" 重 置 " name="B2"></td>
  </tr></form>
</table>
<!--表单结束-->
 <%
 end if
  rs.close
  set rs=nothing
  %>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"  width="500">
  <tr>
    <td align="right" width="490" height="40">管理选项:<a href="edit_city.asp?ct=<%=city%>">城市管理</a> |
    <a href="edit_citybook.asp?ct=<%=city%>">城市留言管理</a> | 
    <a href="edit_login.asp">管理登陆</a> | 
    <a href="edit_logout.asp">退出登录</a></td>
    <td width="10"> </td>
  </tr>
</table>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -