自助友情链接
作者:cmscn 日期:2007-01-23
<!-- #include file="inc/con_help.asp" -->
<!-- #include file="../include/jk_val_code.asp" -->
<%
index_url="links"
select case action
case "add"
tit_fir="友情链接"
tit="自助交换链接"
case else
tit="友情链接"
end select
if action="add" then
call web_head(0,0,0,0,0)
else
call web_head(0,0,0,0,0)
end if
'----------------------------左边 开始----------------------------
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write tit%></td></tr>
<tr class=bg_td><td align=center height=50><a href='<%response.write joekoe_cms.web_url%>' target=_blank><img border=0 src='<%=web_dim(6)%>images/logo.gif' width=88 heigh=31 alt='<%response.write joekoe_cms.web_name%>'></a></td></tr>
<tr class=bg_td><td align=center height=100><textarea name=flink_main rows=5 cols=21 onfocus=this.select() onmouseover=this.focus()><a href='<%response.write joekoe_cms.web_url%>' target=_blank><img border=0 src='<%response.write joekoe_cms.web_url%>images/logo.gif' width=88 heigh=31 alt='<%response.write joekoe_cms.web_name%>'></a></textarea></td></tr>
<tr class=bg_td><td align=center height=20><a href='?action=add'><b><font class=blue>自助添加友情链接</font></b></a></td></tr>
</table>
<%
call left_help()
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------
response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>"
select case action
case "add"
call links_add()
case else
call links_view()
end select
response.write vbcrlf&"</table>"
'----------------------------中间 结束----------------------------
call web_end(0,0)
sub links_add()
dim nname,nurl,npic,orders,nsort,hidden,valcode,found_err,sort
if joekoe_cms.chk() then
nname=trim(request.form("nname"))
nname=joekoe_cms.code_form(nname)
nurl=trim(request.form("url"))
nurl=joekoe_cms.code_form(nurl)
npic=trim(request.form("pic"))
npic=joekoe_cms.code_form(npic)
sort=trim(request.form("sort"))
sort=joekoe_cms.code_form(sort)
valcode="jk"&trim(request.form("valcode"))
found_err=""
if nname="" then
found_err=found_err & "+请输入您的 <font class=red>网站名称</font>(长度不能大于20)<br>"
end if
if nurl="" or lcase(nurl)="http://" or len(nurl)>100 then
found_err=found_err & "+网站名称 不能为空!(长度不能大于100)<br>"
end if
if sort<>"txt" then
if npic="" or len(npic)>100 then
found_err=found_err & "+图片地址 不能为空!(长度不能大于100)<br>"
end if
end if
if val_chk(index_url)=false then
found_err=found_err &"+您输入的 <font class=red>验 证 码</font> 为空或有错误,请勿非法提交!<br>"
end if
if found_err<>"" then
response.write "<tr class=bg_td><td align=center height=300 colspan=3>"&found_error(found_err,260)&"</td></tr>"
exit sub
end if
orders=1
sql="select top 1 orders from links where sort='fir' order by orders desc"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then orders=int(rs("orders"))+1
rs.close
sql="select * from links"
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,3
rs.addnew
rs("orders")=orders
rs("sort")=code_admin("sort",1,100)
rs("nname")=nname
rs("url")=code_admin("url",1,100)
rs("pic")=code_admin("pic",1,100)
rs("hidden")=false
rs.update
rs.close
%>
<tr class=bg_td><td align=center height=300 colspan=3>
<font class=red>谢谢你与本站交换友情链接!请先做好本站链接,审核后即可开通!</font><br><br>
<a href='links.asp'>返回友情链接</a><br><br>
(系统将在 <font class=red><%response.write dim_num(21)%></font> 秒钟后自动返回)
<meta http-equiv='refresh' content='<%response.write dim_num(21)%>; url=links.asp'>
</td></tr>
<%
call val_chk_end(index_url)
exit sub
end if
%>
<form name=linkfrom action='?action=add' method=post onsubmit="frm_submitonce(this);">
<input type=hidden name=chk value='yes'>
<%response.write val_code_num(index_url,1)%>
<tr><td class=td0 colspan=2> 用户自助添加链接</td></tr>
<tr class=bg_td height=0><td width='20%'></td><td width='80%'></td></tr>
<tr class=bg_td>
<td>自助链接类型:</td><td>
<input type=radio name=sort value='txt' checked>文字链接
<input type=radio name=sort value='fir'>首页链接
<input type=radio name=sort value='sec'>内页链接
<input type=radio name=sort value='forum'>论坛链接
</td></tr>
<tr class=bg_td>
<td>网站名称:</td>
<td><input type=text name=nname size=50 maxlength=20></td>
</tr>
<tr class=bg_td>
<td>链接地址:</td>
<td><input type=text name=url value='http://' size=50 maxlength=100></td>
</tr>
<tr class=bg_td>
<td>图片LOGO:</td>
<td><input type=text name=pic value='' size=60 maxlength=100></td>
</tr>
<tr class=bg_td>
<td>确定后提交!</td>
<%if login_mode="" then%>
<td height=30>您好!<%response.write web_nologin%></td>
<%else%>
<td height=30><input type=submit value='提交添加'> <input type=reset value='重新填写'></td>
<%end if%>
</tr>
</form>
<tr><td class=td0 colspan=2> 注意事项</td></tr>
</tr>
<tr class=bg_td>
<td colspan=2><font class=red>请先做好与本站的连接,才有可能通过!相关地址图片如下</font></td>
</tr>
<tr class=bg_td>
<td>网站名称:</td>
<td><%response.write joekoe_cms.web_name%></td>
</tr>
<tr class=bg_td>
<td>链接地址:</td>
<td><%response.write joekoe_cms.web_url%></td>
</tr>
<tr class=bg_td>
<td>图片LOGO:</td>
<td><%response.write joekoe_cms.web_url%>images/logo.gif</td>
</tr>
<tr><td class=td0 colspan=2> 链接说明</td></tr>
<tr class=bg_td><td align=center colspan=2>
<table border=0 width=450>
<tr><td>1、站点必须内容详实,制作马虎或名不副实者恕不链接。</td></tr>
<tr><td>2、含有修改浏览者默认页或注册表的网页不予链接。</td></tr>
<tr><td>3、含有任何反动内容或色情内容的不予链接。</td></tr>
</table>
</td></tr>
<%
end sub
sub links_view()
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> 首页链接</td></tr>
<tr class=bg_td><td align=center>
<table border=0 width='100%' cellspacing=0 cellpadding=0>
<tr><td align=center><script language=javascript src='<%=web_dim(6)%>style/data_link_fir.js'></script></td></tr>
</table>
</td></tr>
<tr><td class=td0> 内页链接</td></tr>
<tr class=bg_td><td align=center>
<table border=0 width='100%' cellspacing=0 cellpadding=0>
<tr><td align=center><script language=javascript src='<%=web_dim(6)%>style/data_link_sec.js'></script></td></tr>
</table>
</td></tr>
<tr><td class=td0> 论坛链接</td></tr>
<tr class=bg_td><td align=center>
<table border=0 width='100%' cellspacing=0 cellpadding=0>
<tr><td align=center><script language=javascript src='<%=web_dim(6)%>style/data_link_forum.js'></script></td></tr>
</table>
</td></tr>
<tr><td class=td0> 文字链接</td></tr>
<tr class=bg_td><td align=center>
<table border=0 width='100%' cellspacing=0 cellpadding=0>
<tr><td align=center><script language=javascript src='<%=web_dim(6)%>style/data_link_txt.js'></script></td></tr>
</table>
</td></tr>
<tr><td class=td0> 链接说明</td></tr>
<tr class=bg_td><td align=center>
<table border=0 width=450>
<tr><td>1、站点必须内容详实,制作马虎或名不副实者恕不链接。</td></tr>
<tr><td>2、含有修改浏览者默认页或注册表的网页不予链接。</td></tr>
<tr><td>3、含有任何反动内容或色情内容的不予链接。</td></tr>
</table>
<%
end sub
%>
评论: 8 | 引用: 0 | 查看次数: 766
发表评论