📄 syscode.asp
字号:
<%
dim rsmain
dim show_userlogin,show_reg
dim show_class,show_bloger,show_userlist,show_sysxml,show_search,show_placard,show_friends,show_count
dim show_log,show_blogupdate,show_subject,show_comment,show_list
dim show_newblogger,show_bestblog
dim MaxPerPage
dim strFileName
dim totalPut,CurrentPage,TotalPages
response.Write "<meta name='generator' content='"&sitetitle&"'>"& vbcrlf
response.Write "<link rel='alternate' href='rss2.asp' type='application/rss+xml' title='RSS' >"
response.Write "<title>"&sitetitle&"</title>"& vbcrlf
response.Write "</head>"& vbcrlf
'==================================================
'过程名:ShowUserLogin
'作 用:显示用户登录表单
'参 数:无
'==================================================
sub ShowUserLogin()
if CheckUserLogined()=False then
dim regurl,gpurl
if ot_user then
regurl="<a href='"&ot_regurl&"' target='_blank'>"
gpurl="<a href='"&ot_lostpasswordurl&"' target='_blank'>"
else
regurl="<a href='user_reg.asp'>"
gpurl="<a href='user_getpassword.asp'>"
end if
show_userlogin="<table align='center' width='100%' border='0' cellspacing='0' cellpadding='0'>" & vbcrlf
show_userlogin=show_userlogin & "<form action='User_ChkLogin.asp' method='post' name='UserLogin' onSubmit='return CheckForm();'>" & vbcrlf
show_userlogin=show_userlogin & "<tr><td height='25' align='right'>用户名称:</td><td height='25'><input name='UserName' type='text' id='UserName' size='15' maxlength='20'></td></tr>" & vbcrlf
show_userlogin=show_userlogin & "<tr><td height='25' align='right'>登陆密码:</td><td height='25'><input name='Password' type='password' id='Password' size='15' maxlength='20'></td></tr>" & vbcrlf
show_userlogin=show_userlogin & "<tr><td height='25' align='right'>Cookie:</td><td height='25'><select name=CookieDate><option selected value=0>不保存</option><option value=1>保存一天</option>" & vbcrlf
show_userlogin=show_userlogin & "<option value=2>保存一月</option><option value=3>保存一年</option></select></td></tr>" & vbcrlf
show_userlogin=show_userlogin & "<tr align='center'><td height='30' colspan='2'><input name='Login' type='submit' id='Login' value=' 登录 '> " & vbcrlf
show_userlogin=show_userlogin & regurl&"用户注册</a> "&gpurl&"忘记密码</a><br></td>" & vbcrlf
show_userlogin=show_userlogin & "</tr></form></table>" & vbcrlf
%>
<script language=javascript>
function CheckForm()
{
if(document.UserLogin.UserName.value=="")
{
alert("请输入用户名!");
document.UserLogin.UserName.focus();
return false;
}
if(document.UserLogin.Password.value == "")
{
alert("请输入密码!");
document.UserLogin.Password.focus();
return false;
}
}
</script>
<%
Else
show_userlogin="<div align='center'>--欢迎您," & UserName & "--</div>"
show_userlogin= show_userlogin&"<div align='center'>您的身份:"
if UserLevel=7 then
show_userlogin= show_userlogin&"注册用户"
elseif UserLevel=8 then
show_userlogin= show_userlogin&"VIP用户"
elseif UserLevel=9 then
show_userlogin= show_userlogin& "前台管理员"
end if
'show_userlogin= show_userlogin& "<br><b>用户控制面板:</b><br>" & vbcrlf
show_userlogin= show_userlogin& "</div><div align='center'><a href=blog.asp?name="&username&" target='_blank'>我的blog</a>" & vbcrlf
show_userlogin= show_userlogin& " <a href=user_index.asp target='_blank'>管理中心</a></div>" & vbcrlf
show_userlogin= show_userlogin& "<div align='center'><a href='User_Logout.asp'>--注销登录--</a></div>" & vbcrlf
end if
end sub
sub indexshow()
if instr(show,"$show_placard$")>0 then
call sub_showplacard()
show=replace(show,"$show_placard$",show_placard)
end if
if instr(show,"$show_class$")>0 then
call sub_showclass()
show=replace(show,"$show_class$",show_class)
end if
if instr(show,"$show_search$")>0 then
call sub_showsearch()
show=replace(show,"$show_search$",show_search)
end if
if instr(show,"$show_friends$")>0 then
call sub_showfriends()
show=replace(show,"$show_friends$",show_friends)
end if
if instr(show,"$show_count$")>0 then
call sub_showcount()
show=replace(show,"$show_count$",show_count)
end if
if instr(show,"$show_xml$")>0 then
call sub_showsysxml()
show=replace(show,"$show_xml$",show_sysxml)
end if
call runsub("$show_newblogger")
call runsub("$show_comment")
call runsub("$show_newblog")
call runsub("$show_subject")
call runsub("$show_blogupdate")
call runsub("$show_bestblog")
call runsub("$show_bloger")
call runsub("$show_log")
end sub
sub sysshow()
if Application(cachename&"list_update")=false and application(cachename&"list")<>"" then
show=application(cachename&"list")
else
dim rstmp
set rstmp=conn.execute("select skinshowlog from sysskin where isdefault='true'")
show=rstmp(0)
set rstmp=nothing
call indexshow
Application.Lock
application(cachename&"list_update")=false
application(cachename&"list")=show
Application.unLock
end if
if instr(show,"$show_userlogin$")>0 then
call showuserlogin()
show=replace(show,"$show_userlogin$",show_userlogin)
end if
end sub
sub runsub(label)
dim tmp1,tmp2,i
dim tmpstr,para
tmp2=1
while instr(tmp2,show,label)>0
tmp1=instr(tmp2,show,label)
tmp2=instr(tmp1+1,show,"$")
tmpstr=mid(show,tmp1,tmp2-tmp1)
tmpstr=replace(tmpstr,"(","")
tmpstr=replace(tmpstr,")","")
tmpstr=trim(replace(tmpstr,label,""))
para=split(tmpstr,",")
select case label
case "$show_log"
call sub_showlog(para(0),para(1),para(2),para(3),para(4),para(5),para(6),para(7),para(8))
show=replace(show,label&"("&tmpstr&")$",show_log)
case "$show_comment"
call sub_showcomment(para(0),para(1))
show=replace(show,label&"("&tmpstr&")$",show_comment)
case "$show_newblog"
call sub_shownewblog(para(0),para(1))
show=replace(show,label&"("&tmpstr&")$",show_newblog)
case "$show_subject"
call sub_showsubject(para(0))
show=replace(show,label&"("&tmpstr&")$",show_subject)
case "$show_blogupdate"
call sub_showblogupdate(para(0))
show=replace(show,label&"("&tmpstr&")$",show_blogupdate)
case "$show_newblogger"
call sub_shownewblogger(para(0))
show=replace(show,label&"("&tmpstr&")$",show_newblogger)
case "$show_bestblog"
call sub_showbestblog(para(0))
show=replace(show,label&"("&tmpstr&")$",show_bestblog)
case "$show_bloger"
call sub_showbloger(para(0))
show=replace(show,label&"("&tmpstr&")$",show_bloger)
end select
wend
end sub
sub sub_showlog(n,l,order,action,sdate,classid,classname,subjectname,info)
show_log=""
dim rs,msql,ordersql,actionsql,classsql
dim rstmp
dim postname,posttime
select case order
case 1
ordersql=" order by id desc"
case 2
ordersql=" order by iis desc"
case 3
ordersql=" order by commentnum desc"
end select
select case action
case 1
actionsql=""
case 2
actionsql=" and isbest='true'"
end select
if classid=0 then
classsql=""
else
classsql=" and classid="&clng(classid)
end if
msql="select top "&n&" topic,username,addtime,commentnum,iis,id,classid,subjectid,author from blog"
if issqldate then
msql=msql&" where datediff(d,addtime,getdate())<"&cint(sdate)
msql=msql&" and ishide<>'true' and passcheck<>'false' and isnull(ispassword,'true')='true' and (isnull(blog_password,'true')='true' or blog_password='')"
else
msql=msql&" where datediff('d',addtime,now())<"&cint(sdate)
msql=msql&" and ishide<>'true' and passcheck<>'false' and isnull(ispassword)=true and (isnull(blog_password)=true or blog_password='')"
end if
msql=msql&actionsql&classsql
msql=msql&ordersql
'response.Write(msql&"<br><br><br>")
set rs=conn.execute(msql)
show_log=show_log&"<ul>"
while not rs.eof
show_log=show_log&"<li>"
if rs(8)="" or isnull(rs(8)) then postname=rs(1) else postname=rs(8)
posttime=rs(2)
if classname=1 then
set rstmp=conn.execute("select id,classname from classname where id="&rs(6))
if not rstmp.eof then
show_log=show_log&"<a href=list.asp?classid="&rstmp(0)&" target=_blank>〖"&rstmp(1)&"〗</a>"
end if
set rstmp=nothing
end if
if subjectname=1 then
set rstmp=conn.execute("select id,subjectname from subject where id="&rs(7))
if not rstmp.eof then
show_log=show_log&"<a href=blog.asp?name="&postname&"&subjectid="&rstmp(0)&" target=_blank>["&rstmp(1)&"]</a>"
end if
set rstmp=nothing
end if
dim topic
topic=rs(0)
if strLength(topic)>int(l) then
topic=InterceptString(topic,l-3)&"..."
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -