📄 skin.asp
字号:
sub web_ip_shield()
dim tmp
tmp=true
if web_dim(22)="" or user_ip="" then exit sub
dim sdim,snum
sdim=split(web_dim(22),"|")
snum=ubound(sdim)
for i=0 to snum
if instr("$"&user_ip&".","$"&sdim(i)&".")>0 then
erase sdim
response.clear
call web_head_tit()
call web_no_ip()
call web_clear(1)
end if
next
erase sdim
end sub
'================================================
'作 用:网站错误信息
'参 数:
' etype : 判断错误类型
'================================================
sub web_error(etype)
response.clear
response.cookies(joekoe_cms.web_cookies)("time_load")=DateAdd("s",-5,joekoe_cms.now_time)
response.cookies(joekoe_cms.web_cookies)("old_url")=request.servervariables("http_referer")
response.cookies(joekoe_cms.web_cookies)("error_action")=etype
call format_redirect("error.asp")
end sub
'================================================
'作 用:用户登陆模块
'================================================
sub user_login()
if login_mode="" then
Response.Write (vbcrlf&CMS_Skin.GetDB("login_left1"))
exit sub
end if
dim tmp
tmp=CMS_Skin.GetDB("login_left2")
tmp=Replace(tmp,"{$login_username}",login_username)
tmp=Replace(tmp,"{$login_mode_var}",format_power(login_mode,1))
tmp=Replace(tmp,"{$login_emoney}",login_emoney)
tmp=Replace(tmp,"{$web_unit}",joekoe_cms.web_unit)
tmp=Replace(tmp,"{$login_integral}",login_integral)
tmp=Replace(tmp,"{$login_msg}",login_msg)
Response.Write (vbcrlf&tmp)
end sub
'================================================
'作 用:网站刷新时间相关
'================================================
sub time_load()
dim tim_s,var_s
tim_s=int(dim_num(3))
if int(tim_s)<1 then exit sub
if login_mode=format_power2(1,1) then exit sub
var_s=request.cookies(joekoe_cms.web_cookies)("time_load")
if isdate(var_s) then
if int(datediff("s",var_s,joekoe_cms.now_time))<=int(tim_s) then
call web_error("time_load")
exit sub
end if
end if
response.cookies(joekoe_cms.web_cookies)("time_load")=joekoe_cms.now_time
end sub
'================================================
'作 用:网站开放时间限制功能模块
'================================================
sub time_lock()
if web_dim(10)=0 then exit sub
dim nh,tt
nh=int(hour(joekoe_cms.now_time))
for i=1 to len(web_dim(10))
if i=1 then
if int(mid(web_dim(10),i,1))=0 then
tt=i
end if
else
if int(mid(web_dim(10),i,1))=1 then tt=i-1
end if
if nh=tt then call web_error("time_lock")
next
end sub
function frm_chk()
frm_chk=false
if trim(request.form("chk"))="yes" then
frm_chk=joekoe_cms.post_chk()
end if
end function
'================================================
'作 用:网站发表时间间隔限制功能模块
'================================================
function post_tim()
dim pt_var,pt_num
post_tim=true
pt_var=session("post_tim")
if isdate(pt_var) then
pt_num=datediff("s",pt_var,joekoe_cms.now_time)
if int(dim_num(28))>0 and int(pt_num)<=int(dim_num(28)) then
post_tim=false
end if
end if
session("post_tim")=joekoe_cms.now_time
end function
'================================================
'作 用:图片路径处理
'参 数:
' pvar : 判别图片路径
' pt : 判别图片大小
'================================================
function pic_url(pvar,pt)
dim temp1,pic_var
pic_var=pvar
if pic_var="" then
pic_var=joekoe_cms.web_upload&"no_pic.gif"
else
if instr(pic_var,"://")<1 then
pic_var=joekoe_cms.web_upload&pic_var
end if
end if
select case int(pt)
case 1
temp1="<img border=0 width="&pic_w&" height="&pic_h&" src='" & pic_var & "'>"
case 2
temp1="<img border=0 width="&(pic_w*1.5)&" height="&(pic_h*1.5)&" src='" & pic_var & "'>"
case 3
temp1="<img border=0 src='" & pic_var & "'>"
case 4
temp1="<img border=0 width="&(pic_w*0.7)&" height="&(pic_h*0.7)&" src='" & pic_var & "'>"
case 5
temp1="<img border=0 width="&(pic_w*0.5)&" height="&(pic_h*0.5)&" src='" & pic_var & "'>"
case 8
temp1="<img border=0 width="&(pic_w*1.2)&" height="&(pic_h*1.2)&" src='" & pic_var & "'>"
case else
temp1=pic_var
end select
pic_url=temp1
end function
'================================================
'作 用:图片边框处理
'参 数:
' pvar : 判别图片路径
' pt : 判别图片大小
' purl : 判断图片路径
'================================================
function pic_fk(pvar,pt,purl)
dim burl,picurl
burl="images/fk/"
picurl=pic_url(pvar,pt)
if purl<>"" and var_null(purl)<>"" then picurl="<a href='"&purl&"' target=_blank>"&picurl&"</a>"
pic_fk=Replace(CMS_Skin.GetDB("format_fk"),"{$pics}",picurl)
end function
'================================================
'作 用:标题模块
'参 数:
' b_jt : 标题前小图片
' b_username : 发布人
' b_topic : 标题
' b_c_num : 标题显示字数
' b_url : 连接地址
' b_tim : 发布时间
' b_counter : 浏览的次数
' b_ispic : 缩略图
' b_tit : 标签
' b_count : 回复、浏览等
' b_tim_type : 发布时间
'================================================
function format_topic_type(b_jt,b_username,b_topic,b_c_num,b_url,b_tim,b_counter,b_ispic,b_tit,b_count,b_tim_type)
dim n_img,tim_type,n_c_num,temp1
n_c_num=b_c_num
if b_ispic=true then
n_img=" <img src='"&joekoe_cms.web_dir_skin&"small/img.gif' border=0>"
n_c_num=n_c_num-2
end if
if int(b_tim_type)>0 then
if int(b_tim_type)=2 then tim_type=tim_type&"</td><td align=right>"
tim_type=tim_type&" <font class=tims>"&mid(b_tim,6,5)&"</font>"
end if
temp1=CMS_Skin.GetDB("format_topic")
temp1=Replace(temp1,"{$t_height}",m_hei)
temp1=Replace(temp1,"{$t_jt}",b_jt)
temp1=Replace(temp1,"{$t_url}",b_url)
temp1=Replace(temp1,"{$t_tit}",b_tit)
temp1=Replace(temp1,"{$t_topic}",joekoe_cms.code_html(b_topic,1,b_c_num))
temp1=Replace(temp1,"{$t_topics}",joekoe_cms.code_html(b_topic,1,0))
temp1=Replace(temp1,"{$t_username}",b_username)
temp1=Replace(temp1,"{$t_count}",b_count)
temp1=Replace(temp1,"{$t_counter}",b_counter)
temp1=Replace(temp1,"{$t_tim}",b_tim)
temp1=Replace(temp1,"{$web_var_br}","<br>")
temp1=Replace(temp1,"{$t_img}",n_img)
temp1=Replace(temp1,"{$t_tim_type}",tim_type)
format_topic_type=temp1
end function
'================================================
'作 用:图片模块
'参 数:
' b_pic : 图片地址
' b_topic : 图片标题
' b_c_num : 标题显示字数
' b_url : 图片连接地址
'================================================
function format_pic_type(b_pic,b_topic,b_c_num,b_url)
dim temp1
temp1=CMS_Skin.GetDB("format_pic")
temp1=Replace(temp1,"{$pic_fk}",pic_fk(b_pic,1,b_url))
temp1=Replace(temp1,"{$t_url}",b_url)
temp1=Replace(temp1,"{$t_topics}",joekoe_cms.code_html(b_topic,1,0))
temp1=Replace(temp1,"{$t_topic}",joekoe_cms.code_html(b_topic,1,b_c_num))
format_pic_type=temp1
end function
'================================================
'作 用:网站版权信息模块
'================================================
sub cms_copyright()
dim tmp
tmp=CMS_Skin.GetDB("copyright")
tmp=Replace(tmp,"{$web_url}",joekoe_cms.web_url)
tmp=Replace(tmp,"{$web_name}",joekoe_cms.web_name)
tmp=Replace(tmp,"{$pro_editon}",joekoe_cms.pro_edition)
Response.Write(vbcrlf&tmp)
end sub
'================================================
'作 用:网站是否开放功能模块
'================================================
sub web_no_open()
dim tmp
tmp=CMS_Skin.GetDB("no_open")
tmp=Replace(tmp,"{$web_url}",joekoe_cms.web_url)
tmp=Replace(tmp,"{$web_name}",joekoe_cms.web_name)
tmp=Replace(tmp,"{$web_email}",joekoe_cms.web_email)
Response.Write(vbcrlf&tmp)
end sub
'================================================
'作 用:网站IP限制功能模块
'================================================
sub web_no_ip()
dim tmp
tmp=CMS_Skin.GetDB("no_ip")
tmp=Replace(tmp,"{$web_url}",joekoe_cms.web_url)
tmp=Replace(tmp,"{$web_name}",joekoe_cms.web_name)
tmp=Replace(tmp,"{$web_email}",joekoe_cms.web_email)
Response.Write(vbcrlf&tmp)
end sub
'================================================
'作 用:网站当前在线人数
'================================================
sub web_online()
sql="select count(l_id) from user_login"
set rs=joekoe_cms.exec(sql,1)
application(joekoe_cms.web_cookies&"_web_online")=rs(0)
rs.close
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -