?? admin_siteedit.asp
字號(hào):
<!--#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)'>請(qǐng)選擇編號(hào)!</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 編號(hào)="&id,conn,3,3
rs("站名")=name
rs("城市")=city
rs("網(wǎng)址")=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>后臺(tái)管理 - 網(wǎng)址信息修改</title>
<link href="admin.css" rel="stylesheet" type="text/css">
<script language="VBScript">
<!--
''=======================================================''
''函數(shù)作用:檢測(cè)添加網(wǎng)站時(shí)的信息是否符合要求
''=======================================================''
function checkmodisite()
if modi_site.city.value="0" then
msgbox"請(qǐng)選擇城市!"
modi_site.city.focus
elseif modi_site.name.value="" then
msgbox"請(qǐng)輸入網(wǎng)站名稱!"
modi_site.name.focus
elseif getStrLen(modi_site.name.value)>10 then
msgbox"網(wǎng)站名稱過長!(5漢字內(nèi)或10個(gè)字母)"
modi_site.name.focus
elseif modi_site.url.value="" or modi_site.url.value="http://" then
msgbox"請(qǐng)輸入網(wǎng)址!"
modi_site.url.focus
elseif getStrLen(modi_site.about.value)>80 then
msgbox"請(qǐng)輸入文字介紹!(20漢字內(nèi))"
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 編號(hào)="&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">城市編號(hào):</td>
<td width="480" height="35" bgcolor="#EBF4FA">
<input type="text" name="id" size="17" maxlength="4" value="<%=rs("編號(hào)")%>" readonly style=background:#d3d3d3></td>
</tr>
<tr>
<td width="80" align="right" height="40">網(wǎng)站名稱:</td>
<td width="480" height="35">
<input type="text" name="name" size="17" maxlength="5" value="<%=rs("站名")%>">(5漢字內(nèi))</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漢字內(nèi))</td>
</tr>
<tr>
<td width="80" align="right" height="40">網(wǎng) 址 :</td>
<td width="480" height="35">
<input type="text" name="url" size="33" maxlength="50" value="<%=rs("網(wǎng)址")%>"></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漢字內(nèi))</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>
<!--表單結(jié)束-->
<%
end if
rs.close
set rs=nothing
%>
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -