📄 config.asp
字号:
u1=int(left(sdim(ui+1),instr(sdim(ui+1),":")-1))
if u_s<u1 then
uu=ui:exit for
elseif u_s=u1 then
uu=ui+1:exit for
end if
case sn
response.write u_s&"-"&u1
if u_s>=u1 then uu=ui:exit for
case else
u2=int(left(sdim(ui+1),instr(sdim(ui+1),":")-1))
if u_s>=u1 and u_s<u2 then uu=ui:exit for
end select
next
if u_t=2 then
tempp=right(sdim(uu),len(sdim(uu))-instr(sdim(uu),":"))
else
tempp=tempp&uu
end if
erase sdim:user_star=tempp
end function
function user_power_type(ptt)
dim pdim,pn:user_power_type="网站用户图例:"
pdim=split(user_power,"|")
for pn=0 to ubound(pdim)
user_power_type=user_power_type&" "&img_small("icon_"&left(pdim(pn),instr(pdim(pn),":")-1))&right(pdim(pn),len(pdim(pn))-instr(pdim(pn),":"))
next
erase pdim
user_power_type=user_power_type&" "&img_small("icon_other")&"游客"
end function
function popedom_format(popedom_var,popedom_n)
dim poptemp:poptemp=0
if len(popedom_var)=50 then poptemp=int(mid(popedom_var,popedom_n,1))
popedom_format=poptemp
end function
sub emoney_notes(power,emoney,n_sort,iid,err_type,rss,conns,url)
dim temp1:temp1=emoney_note(power,emoney,n_sort,iid)
if temp1<>"yes" then
if int(rss)=1 then rs.close:set rs=nothing
if int(conns)=1 then call close_conn()
select case err_type
case "error"
call cookies_type("power")
case "js"
%><script language=javascript>
alert("您没有足够的权限或钱币进行刚才的操作!\n\n点击返回……");
location.href='<%response.write url%>';
</script><%
response.end
end select
end if
end sub
function emoney_note(power,emoney,n_sort,iid)
dim userp,sql,rs,notess:notess="no"
if len(power)>0 then
userp=format_power(login_mode,2)
if not(isnumeric(userp)) then userp=0
userp=int(userp)
if userp=0 then login_emoney=0
if instr(1,"."&power&".","."&userp&".")>0 then notess="yes"
end if
if login_mode="" and int(emoney)>0 then notess="no"
if notess="yes" then
set rs=conn.execute("select id from notes where username='"&login_username&"' and nsort='"&n_sort&"' and iid="&iid)
if rs.eof and rs.bof then notess="no2"
rs.close:set rs=nothing
end if
if notess="no2" then
if int(emoney)=0 then
notess="yes"
elseif int(emoney)>0 and int(login_emoney)>=int(emoney) then
conn.execute("update user_data set emoney=emoney-"&emoney&" where username='"&login_username&"'")
conn.execute("insert into notes(username,nsort,iid,emoney,tim) values('"&login_username&"','"&n_sort&"',"&iid&","&emoney&",'"&now_time&"')")
login_emoney=login_emoney-emoney:notess="yes"
end if
end if
emoney_note=notess
end function
function web_var(wvar,wn)
dim wdim,wnum:wnum=wn:wnum=wnum-1
wdim=split(wvar,"|")
if wnum>ubound(wdim) then web_var="":erase wdim:exit function
web_var=wdim(wnum):erase wdim
end function
function web_varn(wvar,wn)
dim wdim,wnum:wnum=wn:wnum=wnum-1
wdim=split(wvar,"|")
if wnum>ubound(wdim) then web_var=1:erase wdim:exit function
web_varn=wdim(wnum):erase wdim
if not(isnumeric(web_varn)) then web_varn=1
end function
function web_var_num(vvar,vnum,vn)
if vnum>len(vvar) then web_var_num=0:exit function
web_var_num=mid(vvar,vnum,vn)
if not(isnumeric(web_var_num)) then web_var_num=0
end function
function var_null(ub)
var_null=trim(ub)
if var_null="" or isnull(var_null) then var_null=""
end function
function format_end(ft,fvar)
if ft=0 then
format_end=" ("&fvar&")"
else
format_end=" <font class=gray>("&fvar&")</font>"
end if
end function
function first_id(ndata)
dim rsf
set rsf=conn.execute("select top 1 id from "&ndata&" order by id desc")
first_id=rsf("id")
rsf.close:set rsf=nothing
end function
function format_user_view(uuser,ut,uc)
if len(uuser)<1 then format_user_view="<font class=gray>-----</font>":exit function
if uc<>"" then uc=" class="&uc
format_user_view="<a href='user_view.asp?username="&server.urlencode(uuser)&"' title='查看 "&uuser&" 的详细资料'"
if ut=1 then format_user_view=format_user_view&" target=_blank"
format_user_view=format_user_view&uc&">"&uuser&"</a>"
end function
function format_img(fvar)
format_img="<img border=0 src='images/"&web_var(web_config,5)&"/"&fvar&"'>"
end function
function icon_type(tn,tb)
dim it_i
for it_i=0 to tn
icon_type=icon_type&"<img border=0 src='images/icon/"&it_i&".gif'> <input type=radio value="&it_i&" name=icon"
if it_i=0 then icon_type=icon_type&" checked"
icon_type=icon_type&" class=bg_"&tb&"> "
next
end function
function img_small(snum)
img_small="<img border=0 src='images/small/"&snum&".gif' align=absmiddle class=fr> "
end function
sub is_type()
%>
<%response.write img_small("isok")%> 开放的主题
<%response.write img_small("ishot")%> 回复超过10贴
<%response.write img_small("islock")%> 锁定的主题
<%response.write img_small("istop")&" "&img_small("istops")%> 固顶、总固顶的主题
<%response.write img_small("isgood")%> 精华主题
<%
end sub
function left_action(jt,lat)
dim jtn:jtn=img_small(jt)
left_action=vbcrlf&"<table border=0 width='96%' cellspacing=0 cellpadding=4 align=center class=fr>" & _
vbcrlf&"<tr><td height=5 width='50%'></td><td width='50%'></td></tr>" & _
vbcrlf&"<tr><td>"&jtn&"<a href='user_action.asp?action=list'>用户列表</a></td><td>"&jtn&"<a href='online.asp'>与我在线</a></td></tr>" & _
vbcrlf&"<tr><td>"&jtn&"<a href='user_action.asp?action=top'>发贴排行</a></td><td>"&jtn&"<a href='user_action.asp?action=emoney'>财富排行</a></td></tr>" & _
vbcrlf&"<tr><td>"&jtn&"<a href='forum_action.asp?action=new'>论坛新贴</a></td><td>"&jtn&"<a href='forum_action.asp?action=hot'>论坛热贴</a></td></tr>" & _
vbcrlf&"<tr><td>"&jtn&"<a href='forum_action.asp?action=top'>论坛置顶</a></td><td>"&jtn&"<a href='forum_action.asp?action=good'>论坛精华</a></td></tr>" & _
vbcrlf&"<tr><td>"&jtn&"<a href='forum_action.asp?action=tim'>回复新贴</a></td><td>"&jtn&"<a href='help.asp?action=forum'>论坛帮助</a></td></tr>" & _
vbcrlf&"</table>"
select case lat
case 2
left_action=kong&format_bar("<img src='images/"&web_var(web_config,5)&"/left_action.gif' border=0>",left_action,sk_bar,2,"","|"&web_var(web_color,6)&"|","")
case 3
left_action="<table border=0 width='96%' cellspacing=0 cellpadding=0 align=center><tr><td align=center>"&kong&format_bar("<img src='images/"&web_var(web_config,5)&"/left_action.gif' border=0>",left_action,0,2,jt,web_var(web_color,2)&"|"&web_var(web_color,6)&"|","")&"</td></tr></table>"
case 4
left_action="<table border=0 width='96%' cellspacing=0 cellpadding=0 align=center><tr><td align=center>"&kong&format_bar("<img src='images/"&web_var(web_config,5)&"/left_action.gif' border=0>",left_action,sk_bar,2,"","|"&web_var(web_color,6)&"|","")&"</td></tr></table>"
case else
left_action=kong&format_bar("<font class=end><b>功能跳转</b></font>",left_action,0,2,"fk4",web_var(web_color,2)&"|"&web_var(web_color,6)&"|","")
end select
end function
sub main_stat(sh,sjt,sm,st,sbg)
dim num_topic,num_data,num_reg,new_username,num_news,num_article,num_down,stat_temp
sql="select * from configs where id=1"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
rs.close
conn.execute("insert into configs(id,num_topic,num_data,num_reg,new_username,num_news,num_article,num_down,num_product) values(1,0,0,0,'',0,0,0,0)")
set rs=conn.execute(sql)
end if
num_topic=rs("num_topic")
num_data=rs("num_data")
num_reg=rs("num_reg")
new_username=rs("new_username")
num_news=rs("num_news")
num_article=rs("num_article")
num_down=rs("num_down")
rs.close
if sjt<>"" then sjt=img_small(sjt)
stat_temp="<table border=0 width='99%' align=center><tr><td height=2></td></tr>"
if st=1 then
stat_temp=stat_temp&vbcrlf&"<tr><td>"&sjt&"网站模式:<font class=blue>"&web_var(web_stamp,int(mid(web_setup,3,1))+1)&"</font></td></tr>" & _
vbcrlf&"<tr><td>"&sjt&"当前在线:<font class=red>"&online_num&"</font> 人</td></tr>" & _
vbcrlf&"<tr><td>"&sjt&"新闻总数:<font class=red>"&num_news&"</font> 条</td></tr>" & _
vbcrlf&"<tr><td>"&sjt&"文章总数:<font class=red>"&num_article&"</font> 篇</td></tr>" & _
vbcrlf&"<tr><td>"&sjt&"资源总数:<font class=red>"&num_down&"</font> 个</td></tr>"
end if
stat_temp=stat_temp&vbcrlf&"<tr><td>"&sjt&"网站注册:<font class=red>"&num_reg&"</font> 人</td></tr>" & _
vbcrlf&"<tr><td>"&sjt&"最新注册:"&format_user_view(new_username,1,"")&"</td></tr>" & _
vbcrlf&"<tr><td>"&sjt&"主题总数:<font class=red>"&num_topic&"</font> 贴</td></tr>" & _
vbcrlf&"<tr><td>"&sjt&"贴子总数:<font class=red>"&num_data&"</font> 贴</td></tr>" & _
vbcrlf&"<tr><td height=2></td></tr></table>"
if st=1 then
call left_type(stat_temp,"stat",sm)
else
response.write format_bar("<font class=end><b>论坛数据</b></font>",stat_temp,0,2,sh,web_var(web_color,2)&"|"&web_var(web_color,sbg)&"|","")
end if
end sub
sub cookies_type(ct)
response.cookies(web_cookies)("old_url")=request.servervariables("http_referer")
response.cookies(web_cookies)("error_action")=ct
call cookies_yes()
call format_redirect("error.asp")
response.end
end sub
sub cookies_yes()
if request.cookies(web_cookies)("iscookies")="yes" then
response.cookies(web_cookies).expires=date+365
end if
end sub
sub format_redirect(fr)
response.redirect fr
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -