www.pudn.com > baxun36.rar > wz_edit.asp, change:2006-04-24,size:2302b


<!--#include file="mdb.asp"--> 
<% 
if session("adminlogin")<>sessionvar then 
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='index.asp';</script>") 
Response.End 
End if 
dim id,modify,title,url,leibie,memo,topid 
id=request("id") 
if id="" then 
response.write "参数丢失!" 
Response.End 
end if 
modify=request("modify") 
title=request("title") 
url=request("url") 
leibie=request("leibie") 
memo=request("memo") 
topid=request("topid") 
if modify="yes" then 
	if title="" or url="" or leibie="" then 
		response.write "<font color='red'>表单不完整!</font><br>" 
	else 
		set r=server.createobject("adodb.recordset") 
		r.open "select * from detail where id="&id,conn,1,3 
		if not r.eof then 
			r("title")=title 
			r("url")=url 
			if memo="" then 
				r("memo")=" "&memo 
			else 
				r("memo")=memo 
			end if 
			r("classid")=leibie 
                        if not topid="" then r("topid")=cint(topid) 
			r.update 
			response.write "<font color='red'>网站信息修改成功!</font><br>" 
		end if 
			r.close 
			set r=nothing 
	end if 
end if 
%> 
<HTML> 
<HEAD> 
<TITLE>网站信息编辑</TITLE> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">  
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css"> 
</HEAD> 
<BODY> 
<form action="wz_edit.asp" method="get"> 
<% 
set r=server.createobject("adodb.recordset") 
r.open "select * from detail where id="&id,conn,1,3 
if not r.eof then 
%> 
<big>网站信息修改</big> 
<table> 
<tr> 
<td>网站编号:</td><td><input name="x" value='<%=r("id")%>' disabled> 
<input name="id" value='<%=r("id")%>' type='hidden'> 
</td> 
</tr> 
<tr> 
<td>网站名称:</td><td><input name="title" value='<%=r("title")%>'></td> 
</tr> 
<tr> 
<td>网站URL:</td><td><input name="url" value='<%=r("url")%>'></td> 
</tr> 
<tr> 
<td>所属类别:</td><td><input name="leibie" value='<%=r("classid")%>'></td> 
</tr> 
<tr> 
<td>推荐级别:</td><td><input name="topid" value='<%=r("topid")%>'>0-100,数字越大,排名越靠前</td> 
</tr> 
<tr> 
<td>其他信息:</td><td><input name="memo" value='<%=r("memo")%>'></td> 
</tr> 
<tr> 
<td colspan="2"> <input type="submit"> </td> 
</tr> 
</table> 
<% 
end if 
r.close 
set r=nothing 
%> 
<input name="modify" value="yes" type="hidden"> 
</form> 
</BODY> 
</HTML>