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

📄 link.asp

📁 蓝色WAP建站系统,WAP源码,更多请登陆http://xywap.cn
💻 ASP
字号:
<!--#include file="wapls_up.asp"-->
<%
'==================================
'=文 件 名:Link.asp
'=适用版本:蓝色世纪WAP网站管理系统(CMS)V1.1
'=官方版权:http://www.wapls.com
'=文件功能:网站合作链接
'=文件作者:蓝色阳光
'=发行时间:2007-02-01
'==================================
IF  Request.QueryString("Action")="view" Then
	call view
elseIF  Request.QueryString("Action")="add" Then
	call add
elseIF  Request.QueryString("Action")="save" Then
	call save
elseIF  Request.QueryString("Action")="link" Then
	call link
elseIF  Request.QueryString("Action")="sm" Then
	call sm
else
	call main
End IF
'========网站的链接列表=======
Function main

od=TRim(Request("od"))
if not isnumeric(od) then od="1"

if od=1 then
	txtid="link_date"
	txt="贡献点排行"
else
	txtid="link_id"
	txt="新站点排行"
end if

dim sql
%>
<card id="index" title="<%=txt%>">
<p align="<%=const1%>">
<%
if len(mb_link)>1 then
response.write ""&outHTM(mb_link)&"<br/>"
end if
%>
<a href="Link.asp?od=1">贡献点排行</a>|<a href="Link.asp?od=2">新站点排行</a><br/>
<%
Set Rs = Server.CreateObject("Adodb.Recordset")
	Sql = "SELECT * FROM wapls_link order by "&txtid&" desc"
	Rs.Open Sql,conn,1,1
	if not (rs.bof and rs.eof)  then 

page = Request("Page")
Rs.PageSize = pagenum	'一页显示记录
IF Not IsEmpty(Page) Then
IF Not IsNumeric(Page) Then	'判断Page是否为数字
Page=1
Else
Page=Cint(Page)		'转换成短整形Integer
End IF
IF Page > Rs.PageCount Then
Rs.AbsolutePage = Rs.PageCount	'设置当前显示页等于最后一页
ElseIF Page <= 0 Then
Rs.AbsolutePage = 1		'设置当前页等于第一页
Else
Rs.AbsolutePage = Page	'如果大于零,显示当前页等于接收的页数
End IF
Else
Rs.AbsolutePage = 1
End IF
Page = Rs.AbsolutePage
For i=1 to Rs.PageSize
If Rs.Eof Then
Exit For
End If
if len(mb_logo)>1 then
response.write "<img src='"&mb_logo&"/biao.gif' alt='.'/>"
end if
%><%=utf8(i+(page-1)*Rs.PageSize)%>:<%IF rs("passed")=1 Then%><%=utf8(Rs("link_name"))%>[待审]<%else%><a href="Link.asp?Action=view&amp;id=<%=rs("link_id")%>"><%=utf8(Rs("link_name"))%></a><%end if%><br/>
<%
		Rs.MoveNext
	Next

if page>=Rs.PageCount then
'Response.Write ("[下-页]")        
else
Response.Write("[<a href='?od="&od&"&amp;Page=" & (Page+1) & "'>下-页</a>]<br/>")
end if
if page<=1 then
'Response.Write ("[上-页] ")
else        
Response.Write("[<a href='?od="&od&"&amp;Page=" & (Page-1) & "'>上-页</a>]<br/>")
end if
if Rs.PageCount>2 then
%><input name="Page<%=minute(now)%><%=second(now)%>" format="*N" maxlength="50" size="2" value="<%=page+1%>"/>
<anchor>GO>><go href="?od=<%=od%>" method="post">
<postfield name="Page" value="$(Page<%=minute(now)%><%=second(now)%>)"/></go></anchor><br/>
共(<%=utf8(page)%>/<%=rs.pageCount%>)页<br/><%end if%>
<%
	else

		response.write "暂无链接!<br/>"

	end if
		Rs.close
		set rs=nothing

if len(mb_logo)>1 then
response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
else%>
----------<br/>
<%end if%>
<a href="link.asp?Action=add">[马上加入]</a><br/>
<a href="link.asp?Action=sm">[排名规则]</a>
<%
end Function
'========网站的链接详情========
Function view
%>
<card id="index" title="查看链接">
<p align="<%=const1%>">
您即将离开<%=wapname%>.并且提醒您接下来请小心收费陷阱.<br/>
<%
dim sql,id
id = Request.QueryString("id")
		Set rs=Server.CreateObject("Adodb.Recordset")
		Sql = "select * from wapls_link where passed=0 and link_id="&id
		rs.open sql,conn,1,1
	if not (rs.bof and rs.eof)  then 
	if rs("link_logo")<>""  then 
%><img src="<%=rs("link_logo")%>" alt="LOGO..."/><br/><%end if%>
网站:<%=utf8(rs("link_name"))%><br/>
地址:<%=utf8(rs("link_url"))%><br/>
简介:<%=utf8(rs("link_content"))%><br/>
<%else%>
请求的参数错误...<br/>
<%end if
if len(mb_logo)>1 then
response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
else%>
----------<br/>
<%end if%>
<a href="<%=utf8(rs("link_url"))%>">[立即访问]</a><br/>
<a href="link.asp">[链接首页]</a>
<%
Rs.close
set rs=nothing
end Function
'========网站的合作链接提交========
Function add
%>
<card id="index" title="加入链接">
<p align="<%=const1%>">
<%if link_ok=0 then%>
系统暂停开放此项功能<br/>
<%else%>
<%if link_ok=2 and session("name")="" then%>
系统目前只对会员开放此项功能<br/>
<%else%>
申请前请先阅读<a href="link.asp?Action=sm">排名规则</a><br/>
类型:<select title="分类" name="cat_id<%=minute(now)%><%=second(now)%>">
<option title="请选择" value="">请选择</option>
<%
set rst=server.createobject("ADODB.Recordset")
Sql="select * from wapls_link_cat order by Cat_ID asc"
rst.open Sql,conn,1,1
i=1
do while not rst.eof
%>
<option title="<%=rst("Cat_Name")%>" value="<%=rst("cat_id")%>"><%=i%>.<%=rst("Cat_Name")%></option>
<%
i=i+1
rst.movenext
loop
rst.Close
set rst=nothing
%></select><br/>
网站:<input name="link_name<%=minute(now)%><%=second(now)%>" emptyok="false" maxlength="40"/><br/>
地址:<input name="link_url<%=minute(now)%><%=second(now)%>" emptyok="false" maxlength="80" value="http://"/><br/>
简介:<input name="link_content<%=minute(now)%><%=second(now)%>" format="false" maxlength="100" value="免费网站"/><br/>
LOGO:<input name="link_logo<%=minute(now)%><%=second(now)%>" format="false" maxlength="80" value="http://"/>允许空<br/>
<br/>
验证:<input name="yz<%=minute(now)%><%=second(now)%>" format="*N" maxlength="4" size="7"/>  <%=s%><br/><br/>
<anchor>[马上加入]<go href="link.asp?Action=save" method="post">
<postfield name="link_name" value="$(link_name<%=minute(now)%><%=second(now)%>)"/>
<postfield name="cat_id" value="$(cat_id<%=minute(now)%><%=second(now)%>)"/>
<postfield name="link_content" value="$(link_content<%=minute(now)%><%=second(now)%>)"/>
<postfield name="link_url" value="$(link_url<%=minute(now)%><%=second(now)%>)"/>
<postfield name="link_logo" value="$(link_logo<%=minute(now)%><%=second(now)%>)"/>
<postfield name="yz" value="$(yz<%=minute(now)%><%=second(now)%>)"/>
<postfield name="yz1" value="<%=s%>"/>
</go>
</anchor>
<%
end if
end if
%>
<br/>
<a href="link.asp">[链接首页]</a>
<%
end Function
'========网站的合作链接提交=======
Function save
%>
<card id="index" title="提交链接">
<p align="<%=const1%>">
<%
yz=Request("yz")
yz1=Request("yz1")
if yz<>yz1 then
response.redirect "wapls_404.asp?id=9"
else
	link_name=Trim(Request("link_name"))
	link_url=Trim(Request("link_url"))
	link_content=Request("link_content")
	link_logo=Request("link_logo")
	cat_id=Request("cat_id")
	if link_name=""  then response.redirect "wapls_404.asp?id=14"
	if link_url="" or link_url="http://" then response.redirect "wapls_404.asp?id=15"
	if cat_id="" then response.redirect "wapls_404.asp?id=17"
			Dim sql,rs
			set rs=server.CreateObject("adodb.recordset")
			sql="select * from wapls_link where link_url='"&link_url&"'"
			rs.open sql,conn,1,3

if not (rs.bof and rs.eof)  then
response.redirect "wapls_404.asp?id=16"
else
rs.addnew()
	rs("link_name")=link_name
	rs("link_url")=link_url
	rs("link_content")=link_content
	rs("passed")=addlink_ok
	rs("cat_id")=cat_id
	sql="select isimage from wapls_link_cat where cat_id="&cat_id
	set rs2=server.createobject("adodb.recordset")
	rs2.open sql,conn,1,1
	if rs2("isimage")=0 then
		rs("link_logo")=""
	else
		rs("link_logo")=link_logo
	end if
	rs2.close
	set rs2=nothing
rs.update()
end if
%>
您的链接提交成功!<br/>
您网站的排名是根据下面这条点击自动排名的.<br/>
每有一次点击.您的网站会自动的排名到第一位的.<br/>
<%if len(mb_logo)>1 then
response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
else%>
----------<br/>
<%end if%>
链接名称:<%=wapname%><br/>
链接地址:<%=wapurl%>/?linkid=<%=rs("link_id")%><br/>
链接图象:<%=wapurl%>/<%=waplogo%><br/>
<%if len(mb_logo)>1 then
response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
else%>
----------<br/>
<%end if%>
<%if addlink_ok=1 then%>
等有了回点.审核后就可以正常访问了.
<%
end if
Rs.close
set rs=nothing
end if
%>
<br/>
<a href="link.asp">[链接首页]</a>
<%end Function
'========网站的合作链接回链=======
Function link
dim sql,rs,link_id
linkid = Request.QueryString("linkid")
if linkid<>"" and session("linkidip")<>userip then
			set rs=server.CreateObject("adodb.recordset")
			sql="select * from wapls_link where link_id="&linkid
			rs.open sql,conn,1,3
if not (rs.bof and rs.eof)  then
rs("link_date")=now()
rs("rw1")=rs("rw1")+1
rs.update
session("linkidip")=userip
end if
%>
<card id="index" title="" ontimer="index.asp"><timer value="1"/>
<p align="<%=const1%>">
正在读取数据...
<br/>----------
<%
else
response.redirect "index.asp"
end if
%>
<%
Rs.close
set rs=nothing
end Function
'========网站的合作链接说明=======
Function sm
%>
<card id="index" title="链接说明">
<p align="<%=const1%>">
<%
if len(mb_linksm)>1 then
response.write ""&outHTM(mb_linksm)&"<br/>"
end if
if len(mb_logo)>1 then
response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
else
%>
----------<br/>
<%end if%>
<a href="link.asp">[链接首页]</a>
<%end Function%>
<br/><a href='index.asp'>[返回首页]</a>
<!--#include file="wapls_down.asp"-->

⌨️ 快捷键说明

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