📄 admin_siteedit.asp
字号:
<!--#include file="config.asp" -->
<!--#include file="admin_check.asp" -->
<!--#include file="check.asp" -->
<%
call manager(session("grade"),session("adminname"),2)
id=request("id")
if id="" then
response.write "<a href='javascript:history.back(1)'>请选择编号!</a>"
response.end
end if
city=trim(request.form("city"))
name=trim(request.form("name"))
url=trim(request.form("url"))
logo=trim(request.form("logo"))
about=trim(request.form("about"))
zhanzhang=trim(request.form("zhanzhang"))
ctype=trim(request.form("ctype"))
if ctype="ok" then
ctype="-1"
else
ctype="0"
end if
set rs=server.CreateObject("adodb.recordset")
if city<>"" and name<>"" and url<>"" then
rs.open"select * from site where 编号="&id,conn,3,3
rs("站名")=name
rs("城市")=city
rs("网址")=url
rs("简介")=about
rs("logo")=logo
rs("站长")=zhanzhang
rs("审核")=ctype '0未审核,-1已审核
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 checkmodisite()
if modi_site.city.value="0" then
msgbox"请选择城市!"
modi_site.city.focus
elseif modi_site.name.value="" then
msgbox"请输入网站名称!"
modi_site.name.focus
elseif getStrLen(modi_site.name.value)>10 then
msgbox"网站名称过长!(5汉字内或10个字母)"
modi_site.name.focus
elseif modi_site.url.value="" or modi_site.url.value="http://" then
msgbox"请输入网址!"
modi_site.url.focus
elseif getStrLen(modi_site.about.value)>80 then
msgbox"请输入文字介绍!(20汉字内)"
modi_site.about.focus
else
modi_site.submit
end if
end function
-->
</script>
</head>
<body>
<table width="760" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td width="160" valign="top">
<!--#include file="admin_left.asp" -->
</td>
<td width="600" align="center" valign="top">
<%set rs=server.CreateObject("adodb.recordset")
rs.open"select * from site where 编号="&id,conn,1,1
if not rs.eof then
%>
<!--表单开始-->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="560">
<form method="POST" action="admin_siteedit.asp?id=<%=id%>" name="modi_site">
<tr>
<td width="80" align="right" height="40" bgcolor="#EBF4FA">城市编号:</td>
<td width="480" height="35" bgcolor="#EBF4FA">
<input type="text" name="id" size="17" maxlength="4" value="<%=rs("编号")%>" readonly style=background:#d3d3d3></td>
</tr>
<tr>
<td width="80" align="right" height="40">网站名称:</td>
<td width="480" height="35">
<input type="text" name="name" size="17" maxlength="5" value="<%=rs("站名")%>">(5汉字内)</td>
</tr>
<tr>
<td width="80" align="right" height="40" bgcolor="#EBF4FA">所在城市:</td>
<td width="480" height="35" bgcolor="#EBF4FA">
<input type="text" name="city" size="17" maxlength="4" value="<%=rs("城市")%>">(4汉字内)</td>
</tr>
<tr>
<td width="80" align="right" height="40">网 址 :</td>
<td width="480" height="35">
<input type="text" name="url" size="33" maxlength="50" value="<%=rs("网址")%>"></td>
</tr>
<tr>
<td width="80" align="right" height="40" bgcolor="#EBF4FA">LOGO :</td>
<td width="480" height="35" bgcolor="#EBF4FA">
<input type="text" name="logo" size="33" maxlength="80" value="<%=rs("logo")%>"></td>
</tr>
<tr>
<td width="80" align="right" height="80">简 介 :</td>
<td width="480" height="77">
<textarea rows="4" name="about" cols="45"><%=rs("简介")%></textarea>(70汉字内)</td>
</tr>
<tr>
<td width="80" align="right" height="80" bgcolor="#EBF4FA">站长资料:</td>
<td width="480" height="77" bgcolor="#EBF4FA">
<textarea rows="4" name="zhanzhang" cols="45">站长称呼: QQ:
E-mail:
电话:
其它:</textarea></td>
</tr>
<tr>
<td width="80" align="right" height="50">更新日期:</td>
<td width="480" height="35">
<input type="text" name="cdate" size="15" value="<%=rs("日期")%>"> 审核
:<input type="checkbox" name="ctype" value="ok" <%if rs("审核")=-1 then%>checked<%end if%>></td>
</tr>
<tr>
<td width="80" align="right" height="50" bgcolor="#EBF4FA"></td>
<td width="480" height="35" bgcolor="#EBF4FA">
<input type="button" value=" 提 交 " name="add" onclick="checkmodisite()">
<input type="reset" value=" 重 置 " name="B2"></td>
</tr></form>
</table>
<!--表单结束-->
<%
end if
rs.close
set rs=nothing
%>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -