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

📄 editjoin2.asp

📁 中国114网搜索系统 版  本: 文件大小:580 KB 软件语言:简体中文 授权方式:免费版 相关链接:程序演示 开 发 商: 运行环境:ASP源码
💻 ASP
字号:
<%@ LANGUAGE = VBScript%>
<%
id=1
%>
<!-- #include file=../database.asp -->
<%
Set rs = Server.CreateObject("ADODB.Recordset")

function CheckPassword()
	sql="select * from ourusers where Ltrim(Rtrim(username))='supervisor'"
	rs.open sql,conn,1,1
	if not rs.eof then
  		if trim(rs("pass"))<>session("pass") then
    			response.write "<br>错误的密码!"
    			rs.close
    			set rs=nothing
			conn.close
			set conn=nothing
    			response.end
  		else
    			rs.close
  		end if
	else
  		response.write "错误:用户不存在!"
  		rs.close
  		set rs=nothing
		conn.close
		set conn=nothing
  		response.end
	end if
end function

checkPassword()
%>
<!-- Design and Edit By QianFengyun 2000-5-20 -->
<!-- #include file=../change.asp -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0041)http://www.china114net.com 中国114网 -->
<html>
<head>
<title><%=titlename%></title>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<link rel="stylesheet" type="text/css" href="../html/style.css">
</head>
<%
function strLength(str)
	dim WINNT_CHINESE
	WINNT_CHINESE=(len("例子")=2)
	if WINNT_CHINESE then
		dim l,t,c
		dim i
		l=len(str)
		t=l
		for i=1 to l
			c=asc(mid(str,i,1))
			if c<0 then c=c+65536
			if c>255 then
				t=t+1
			end if
		next
		strLength=t
	else 
		strLength=len(str)
	end if
end function

username=trim(request("username"))
if strLength(username)>10 or username="" then
	response.write "没有输入用户名或用户名太长!最多10个字符."
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
end if

sitename=trim(request("sitename"))
if strLength(sitename)>40 or sitename="" then
	response.write "没有输入网站名称或网站名称太长!最多40个字符."
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
end if
url     =trim(request("url"))
if strLength(url)>100 or url="" then
	response.write "没有输入网站地址或网站地址太长!最多100个字符."
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
end if
jiji    =trim(request("jiji"))
if strLength(jiji)>200 then
	response.write "网站简介太长!最多200个字符."
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
end if

fid=request("fenleiid")
if isNumeric(fid)=0 or fid="" then 
  	response.write "没有这个分类!"
	set rs=nothing
	conn.close
	set conn=nothing
  	response.end
end if
fid=int(fid)
if fid<0 then
  	response.write "没有这个分类!"
	set rs=nothing
	conn.close
	set conn=nothing
  	response.end
end if

id=request("id")
if isNumeric(id)=0 or id="" then 
  	response.write "没有这个记录!"
	set rs=nothing
	conn.close
	set conn=nothing
  	response.end
end if
id=int(id)
if id<0 then
  	response.write "没有这个记录!!"
	set rs=nothing
	conn.close
	set conn=nothing
  	response.end
end if


if isObject(conn)=0 then%>
	<!-- #include file=../database.asp -->
	<%
end if

Set rs = Server.CreateObject("ADODB.Recordset")

sql    = "select * from ourusers where username='"&replace(username,"'","''")&"'"
rs.open sql,conn,1,1
if rs.eof or rs.bof then
	response.write "用户名错误!"
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
end if

rs.close

sql    = "select * from fenlei where id="&fid
rs.open sql,conn,1,1

if rs.eof or rs.bof then
  	response.write "填入的<font color=ff0000>分类</font>错误!没有这个分类!可能是此分类不存在或已被删除."
  	rs.close
  	set rs=nothing
	conn.close
	set conn=nothing
  	response.end
else
	fenleiid=rs("id")
end if

expediency=rs("expediency")

tempStr="总分类 "

for i=1 to expediency
	tempStr=tempStr & " &gt; <a href=../fenlei/addfenlei.asp?id="&id&"&fid="&rs(10+i)&">"&trim(rs(i))&"</a>"
next

rs.close

do while right(url,1)="/" or right(url,1)="\"
	url=left(url,len(url)-1)
loop

sql    = "select * from linking where url='"&replace(url,"'","''")&"'"
rs.open sql,conn,1,1
if not rs.eof then
	response.write "网址已经在库中存在,所以没有修改的意义了.此网站已经加在<a href=navigate.asp?id="&rs("fenleiid")&">此分类</a>里了."
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
end if

rs.close

sql    = "select * from templink where id="&id
rs.open sql,conn,1,3
if rs.eof then
	response.write "找不到记录,无法修改!!"
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.end
end if

rs("username")=username
rs("sitename")=sitename
rs("url")     =url
rs("jiji")    =jiji
rs("fenleiid")=fenleiid
rs.Update
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<BODY vlink=0000ff leftmargin="10" topmargin="10" marginwidth="0" marginheight="0" bgcolor="#FFFFFF">
<%
response.write "<br>修改成功!!新资料如下:<br>网站名称:"&server.htmlencode(sitename)&"<br>网站地址:"&server.htmlencode(url)&"<br>网站简介:"&server.htmlencode(jiji)&"<br>所在分类:"&tempStr&"<br>"
%>
</body>
</html>

⌨️ 快捷键说明

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