📄 skin.asp
字号:
session("login_msg")=login_msg
end if
if login_msg>0 then
dim msg_id,msg_name,msg_topic
sql="select top 1 id,send_u,topic from user_mail where accept_u='"&login_username&"' and types=1 and isread=0"
set rs=joekoe_cms.exec(sql,1)
msg_id=int(rs(0))
msg_name=rs(1)
msg_topic=rs(2)
rs.close
else
login_msg=0
end if
if var_null(session("user_on"))="" then
sql="select top 1 l_id from user_login where l_username='"&login_username&"'"
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
call joekoe_cms.exec("insert into user_login(l_username,l_type,l_where,l_tim_login,l_tim_end,l_ip,l_sys,l_forum_online) values('"&login_username&"',0,'"&left(tit,50)&"','"&joekoe_cms.now_time&"','"&joekoe_cms.now_time&"','"&user_ip&"','"&user_sys&"',"&forum_online&")",0)
total_counter=total_counter+1
call joekoe_cms.exec("update configs set counter=counter+1",0)
end if
rs.close
session("user_on")=login_username
call web_online()
end if
if format_mid_num(9)=1 then
total_counter=total_counter+1
call joekoe_cms.exec("update configs set counter=counter+1",0)
end if
if var_null(trim(request.querystring("uppath")))="" then call joekoe_cms.exec("update user_login set l_where='"&left(tit,50)&"',l_tim_end='"&joekoe_cms.now_time&"',l_forum_online="&forum_online&" where l_username='"&login_username&"'",0)
end if
end if
online_num=int(application(joekoe_cms.web_cookies&"_web_online"))
if int(online_num)>web_config(10,0) then
call joekoe_cms.exec("update configs set max_online="&online_num&",max_tim='"&joekoe_cms.now_time&"'",0)
end if
if int(total_counter)>int(application(joekoe_cms.web_cookies&"_configs_counter")) then
application(joekoe_cms.web_cookies&"_configs_counter")=total_counter
call joekoe_cms.exec("update configs set counter="&total_counter,0)
end if
if page_power<>"" and instr("."&page_power&".","."&login_modep&".")<1 then call web_error("power")
select case var1
case 1
if int(format_mid_num(8))=1 and login_mode="" then call my_login()
case 2
if login_mode="" then call my_login()
end select
if var2=1 and login_mode<>"" then
if popedom_p(41)=1 then call web_error("locked")
end if
if var3=5 then exit sub
if var3=4 then exit sub
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$lefter}",CMS_Skin.skmod_lefter)
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$web_skin}",joekoe_cms.web_dir_skin)
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$web_name}",joekoe_cms.web_name)
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$web_url}",joekoe_cms.web_url)
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$menu}",web_menu())
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$today_now}",joekoe_cms.time_type("",5))
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$today_week}",weekdayname(weekday(joekoe_cms.today_time)))
if tit_fir="" then
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$tit_now}","<font title='"&joekoe_cms.code_html(tit,1,0)&"'>"&joekoe_cms.code_html(tit,1,30)&"</font>")
else
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$tit_now}","<a href='"&index_url&".asp'>"&tit_fir&"</a> → <font title='"&joekoe_cms.code_html(tit,1,0)&"'>"&joekoe_cms.code_html(tit,1,12)&"</font>")
end if
scroll_head="<marquee scrolldelay=100 scrollamount=3 onMouseOut='if (document.all!=null){this.start()}' onMouseOver='if (document.all!=null){this.stop()}'> "&scroll_head&" </marquee>"
if login_msg>0 then scroll_head="<bgsound src='"&joekoe_cms.web_dir_skin&"mail/message.wav'><a href='user_mail.asp'><img src='"&joekoe_cms.web_dir_skin&"mail/new.gif' align=absmiddle border=0> 我的短信箱(<font class=red>"&login_msg&" 新</font>)</a>"&joekoe_cms.js_put("document.write(msg_go('"&joekoe_cms.web_dir&"',"&login_msg&",'"&msg_topic&"',"&msg_id&",'"&msg_name&"'));",1)
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$tit_scroll}",scroll_head)
CMS_Skin.sktitle=Replace(CMS_Skin.sktitle,"{$righter}",CMS_Skin.skmod_righter)
Response.Write(CMS_Skin.sktitle)
response.write web_left(var3)
end sub
'================================================
'作 用:网站底部信息功能模块
'参 数:
' var1 : 此参数值保留
' var2 : 判断是否显示底部信息
'================================================
sub web_end(var1,var2)
if var2=0 then
dim tmp_exec_tim
tmp_exec_tim=FormatNumber((timer()-joekoe_cms.timer_start),3)
if left(tmp_exec_tim,1)="." then tmp_exec_tim="0"&tmp_exec_tim
Response.Write web_right
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$lefter}",CMS_Skin.skmod_lefter)
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$web_url}",joekoe_cms.web_url)
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$web_name}",joekoe_cms.web_name)
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$skin}",CMS_Skin.skname)
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$exec_tim}",tmp_exec_tim)
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$exec_num}",joekoe_cms.num_rs)
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$online_num}",online_num)
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$cache_num}",Application.Contents.count)
CMS_Skin.skend=Replace(CMS_Skin.skend,"{$righter}",CMS_Skin.skmod_righter)
Response.Write(vbcrlf&CMS_Skin.skend)
end if
call web_clears(1)
end sub
'================================================
'作 用:网站名称、关键字、样式设置
'================================================
sub web_head_title()
CMS_Skin.skhead=Replace(CMS_Skin.skhead,"{$web_name}",joekoe_cms.web_name)
CMS_Skin.skhead=Replace(CMS_Skin.skhead,"{$tit}",tit)
CMS_Skin.skhead=Replace(CMS_Skin.skhead,"{$css}",CMS_Skin.skcss)
Response.Write(CMS_Skin.skhead)
end sub
'================================================
'作 用:等级设置
'================================================
function popedom_p(popedom_n)
if cint(popedom_n)>len(login_popedom) or len(login_popedom)<>50 then
popedom_p=0
exit function
end if
popedom_p=int(mid(login_popedom,popedom_n,1))
end function
'================================================
'作 用:网站左边部分设置
'================================================
function web_left(lt)
select case cint(lt)
case 2
web_left=CMS_Skin.skmod_lefter&"<table border=0 width='100%' cellspacing=0 cellpadding=0><tr><td align=center class=bg_1>"
case else
web_left=CMS_Skin.skmod_lefter&CMS_Skin.sktable_lefter
end select
end function
'================================================
'作 用:网站中间部分设置
'================================================
sub web_center(ct)
Response.Write vbcrlf&CMS_Skin.sktable_center
end sub
'================================================
'作 用:网站右边部分设置
'================================================
function web_right()
web_right=vbcrlf&CMS_Skin.sktable_righter&CMS_Skin.skmod_righter
end function
'================================================
'作 用:一般在论坛部分使用
'================================================
sub web_branch(jst)
response.write web_right()
response.write web_left(2)
response.buffer
end sub
'================================================
'作 用:弹出对话框
'参 数:
' msg_type : 判断弹出方式
' msg_var : 提示内容
' msg_url : 跳转路径
'================================================
sub web_js_msg(msg_type,msg_var,msg_url)
call cookies_load()
if msg_type=0 then
response.write "alert("""&msg_var&""");location.href="""&msg_url&""";"
exit sub
end if
response.write joekoe_cms.js_put("alert("""&msg_var&""");location.href="""&msg_url&""";",1)
end sub
'================================================
'作 用:cookies有效期
'================================================
sub cookies_load()
response.cookies(joekoe_cms.web_cookies)("time_load")=dateadd("s",-5,joekoe_cms.now_time)
end sub
'================================================
'作 用:处理cookies
'参 数:
' t1 : 判断cookies有效期
'================================================
sub cookies_clear(tl)
if tl=1 then call cookies_load()
response.cookies(joekoe_cms.web_cookies)("login_username")=""
response.cookies(joekoe_cms.web_cookies)("login_password")=""
response.cookies(joekoe_cms.web_cookies)("login_id")=""
login_mode=""
login_username=""
login_password=""
end sub
'================================================
'作 用:处理登陆后用户信息
'================================================
sub my_login()
if login_mode<>"" then exit sub
dim temp1
temp1=trim(request.serverVariables("url"))&"?"&trim(request.serverVariables("QUERY_STRING"))
temp1=server.urlencode(temp1)
response.cookies(joekoe_cms.web_cookies)("time_load")=DateAdd("s",-5,joekoe_cms.now_time)
response.cookies(joekoe_cms.web_cookies)("login_username")=""
response.cookies(joekoe_cms.web_cookies)("login_password")=""
response.cookies(joekoe_cms.web_cookies)("login_id")=""
response.cookies(joekoe_cms.web_cookies)("iscookies")=""
call format_redirect("login.asp?old_url="&temp1)
end sub
'================================================
'作 用:导航菜单相关
'================================================
function format_menu(mvar)
dim i
format_menu=""
for i=0 to ubound(dim_menu)
if mvar=left(dim_menu(i),instr(dim_menu(i),":")-1) then
format_menu=right(dim_menu(i),len(dim_menu(i))-instr(dim_menu(i),":"))
exit for
end if
next
end function
'================================================
'作 用:网站风格相关
'================================================
sub skin_load()
dim n_skin
n_skin=trim(request.cookies(joekoe_cms.web_cookies)("skin_var"))
if n_skin<>"" then
joekoe_cms.web_skin=n_skin
skin_dir=joekoe_cms.web_dir&"skin/"&n_skin&"/"
joekoe_cms.web_dir_skin=skin_dir
end if
end sub
'================================================
'作 用:页面转跳
'参 数:
' r_url : 页面转跳路径
'================================================
sub format_redirect(r_url)
call web_clears(0)
response.clear
response.redirect r_url
response.end
end sub
'================================================
'作 用:清除所有全局数组等
'================================================
sub web_clears(c_end)
erase dim_menu
call web_clear(c_end)
end sub
'================================================
'作 用:网站是否开启
'================================================
sub web_is_open()
if web_dim(0)=0 then
response.clear
call web_head_tit()
call web_no_open()
call web_clear(1)
end if
end sub
'================================================
'作 用:网站IP限制
'================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -