⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
字号:
<%
			'开启缓冲页面功能
dim web_config,web_cookies,web_login,web_setup,web_menu,web_num,web_color,web_upload,web_safety,web_edition,web_label
dim web_news_art,web_down,web_movie,web_shop,web_stamp,space_mod
dim web_error,user_grade,user_power,forum_type,now_time,timer_start,redx,kong,ukong,go_back,closer,lefter,righter
dim login_username,login_password,login_mode,login_message,login_popedom,login_emoney
dim rs,sql,i,tit,tit_fir,index_url,action,page_power,m_unit
%>
<!-- #include file="common.asp" -->
<!-- #include file="functions.asp" -->
<%
space_mod=web_var(web_num,12):m_unit=web_var(web_config,8):now_time=time_type(now(),9):timer_start=timer()
web_label="<a href='http://jjb.skycodes.com' target=_blank><b><font face=Arial color=#CC3300>源码</font><font face=Arial>天空</font></b></a>"
redx="&nbsp;<font color='#ff0000'>*</font>&nbsp;":kong="<table width='100%' height=2><tr><td></td></tr></table>":web_edition="jjb.skycodes.com":ukong="<table border=0><tr><td height=6></td></tr></table>"
go_back="<a href='javascript:history.back(1)'>返回上一页</a>":closer="<a href='javascript:self.close()'>『关闭窗口』</a>"
login_mode="":login_popedom="":login_message=0
login_username=trim(request.cookies(web_cookies)("login_username"))
login_password=trim(request.cookies(web_cookies)("login_password"))
action=trim(request.querystring("action"))
'------------------------------------格式化窗口-------------------------------------
function format_bar(bar_var,bar_body,bar_type,bar_fk,bar_jt,bar_color,bar_more)
  dim bar_temp,bar_vars,bar_mores,bar_height
  bar_height=20:bar_mores=""
  bar_vars="<table border=0 cellspacing=0 cellpadding=0><tr><td>&nbsp;"
  if isnumeric(bar_jt) then
    if bar_jt<>0 then bar_vars=bar_vars&"<img border=0 src='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_jt.gif' align=absmiddle>&nbsp;"
  else
    if bar_jt<>"" then bar_vars=bar_vars&img_small(bar_jt)
  end if
  bar_vars=bar_vars&bar_var&"</td></tr></table>"
  if bar_more<>"" then bar_mores=bar_more&"&nbsp;&nbsp;"
  
  bar_temp=vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=0"
  select case int(left(bar_type,1))
  case 0
    bar_temp=bar_temp&"><tr>" & _
	     vbcrlf&"<td>"&bar_vars&"</td>" & _
	     vbcrlf&"<td align=right>"&bar_mores&"</td>"
  case 1
    bar_temp=bar_temp&"><tr>" & _
	     vbcrlf&"<td width=20 valign=top>"&format_img("bar_"&bar_type&"_left.gif")&"</td>" & _
	     vbcrlf&"<td background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bg.gif'><table border=0 width='100%' cellspacing=0 cellpadding=0><tr><td>"&bar_vars&"</td><td align=right>"&bar_more&"</td></tr></table></td>" & _
	     vbcrlf&"<td width=20>"&format_img("bar_"&bar_type&"_right.gif")&"</td>"
  case 2
    bar_temp=bar_temp&"><tr>" & _
	     vbcrlf&"<td width=20 valign=top>"&format_img("bar_"&bar_type&"_left.gif")&"</td>" & _
	     vbcrlf&"<td width="&web_var(bar_color,3)&" background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bg0.gif'>"&bar_vars&"</td>" & _
	     vbcrlf&"<td width=20>"&format_img("bar_"&bar_type&"_center.gif")&"</td>" & _
	     vbcrlf&"<td background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bg.gif' align=right>&nbsp;"&bar_more&"</td>" & _
	     vbcrlf&"<td width=20 align=right>"&format_img("bar_"&bar_type&"_right.gif")&"</td>"
  
  '------------------------------------case3源码天空-------------------------------------
  case 3
    bar_temp=bar_temp&"><tr>" & _
	     vbcrlf&"<td width=20 valign=top>"&format_img("bar_"&bar_type&"_left.gif")&"</td>" & _
	     vbcrlf&"<td width="&web_var(bar_color,3)&" background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bg0.gif'>"&bar_vars&"</td>" & _
	     vbcrlf&"<td background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bg.gif' align=right>&nbsp;</td>" & _
	     vbcrlf&"<td width=20 align=right>"&format_img("bar_"&bar_type&"_right.gif")&"</td>"
  end select
  bar_temp=bar_temp&vbcrlf&"</tr></table>"
  if bar_fk=1 or bar_fk=3 then
    bar_body="<table border=0 width='98%' cellspacing=4 cellpadding=4><tr><td>"&bar_body&"</td></tr></table>"
  else
    bar_body="<table border=0 width='100%'><tr><td>"&bar_body&"</td></tr></table>"
  end if
  
  format_bar="<table width='100%' cellspacing=0 cellpadding=0"
  select case bar_fk
  case 0,1
    format_bar=format_bar&" border=0>" & _
	       vbcrlf&"<tr><td height="&bar_height&" valign=bottom"
    if int(left(bar_type,1)) =0 then format_bar=format_bar&"bgcolor="&web_var(bar_color,1)
    format_bar=format_bar&" background='"&web_var(bar_color,3)&"'>"&bar_temp&"</td></tr>" & _
	       vbcrlf&"<tr><td align=center"
    if web_var(bar_color,2)<>"" then format_bar=format_bar&" bgcolor="&web_var(bar_color,2)
    format_bar=format_bar&">"&bar_body&"</td></tr></table>"
  case 2,3
    if int(left(bar_type,1))=0 then
      format_bar=format_bar&" border=1 bgcolor="&web_var(bar_color,2)&" bordercolor="&web_var(bar_color,1)&">" & _
		 vbcrlf&"<tr><td height="&bar_height&" bgcolor="&web_var(bar_color,1)&" background='"&web_var(bar_color,3)&"' valign=bottom>"&bar_temp&"</td></tr>" & _
		 vbcrlf&"<tr><td align=center bordercolor="&web_var(bar_color,2)&">"&bar_body&"</td></tr>"&vbcrlf&"</table>"
    else
      format_bar=format_bar&" border=0>" & _
		 vbcrlf&"<tr><td height="&bar_height&" valign=bottom>"&bar_temp&"</td></tr><tr><td align=center>" & _
		 vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=0><tr align=center><td width=1 bgcolor="&web_var(bar_color,1)&"></td><td bgcolor="&web_var(bar_color,2)&">"&bar_body&"</td><td width=1 bgcolor="&web_var(bar_color,1)&"></td></tr><tr><td height=1 colspan=3 bgcolor="&web_var(bar_color,1)&"></td></tr></table>" & _
		 vbcrlf&"</td></tr></table>"
    end if
 '------------------------------------case4源码天空-------------------------------------
   case 4
       format_bar=format_bar&" border=0>" & _
		 vbcrlf&"<tr><td height="&bar_height&" valign=bottom>"&bar_temp&"</td></tr><tr><td align=center>" & _
		 vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=0><tr align=center><td width=5 background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_mbgl.gif'></td><td bgcolor="&web_var(bar_color,2)&">"&bar_body&"</td><td width=5 background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_mbgr.gif'></td></tr></table></td></tr>"
	   if bar_mores="" then
	     format_bar=format_bar & "<tr><td align=center><table border=0 height=16 width='100%' cellspacing=0 cellpadding=0><tr align=center><td width=5><img border=0 src='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bbgl.gif'></td>" & _
	     vbcrlf&"<td width='100%' background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bbgc.gif'></td><td width=78><img border=0 src='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bbgr0.gif'></td></tr></table>"
       else
       	 format_bar=format_bar & "<tr><td align=center><table border=0 height=16 width='100%' cellspacing=0 cellpadding=0><tr align=center><td width=5><img border=0 src='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bbgl.gif'></td>" & _
	     vbcrlf&"<td width='100%' background='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bbgc.gif'></td><td width=78><img border=0 src='images/"&web_var(web_config,5)&"/bar_"&bar_type&"_bbgr1.gif'></td></tr></table>"
       end if
       format_bar=format_bar &vbcrlf&"</td></tr></table>"
   case 5
      format_bar=format_bar&" border=0>" & _
 	  vbcrlf&"<tr><td align=center >"&bar_body&"</td></tr>"&vbcrlf&"</table>"
  end select
end function

'------------------------------------格式化窗口2------------------------------------
function format_table(btype,tc)
  'response.write tc
  select case btype
  case 1
    format_table="<table align=center border=1 width='98%' cellspacing=1 cellpadding=1 bgcolor="&web_var(web_color,tc)&" bordercolor="&web_var(web_color,1)&">"
  case 2
    format_table=""
  case 3
    format_table=" bgcolor="&web_var(web_color,tc)&" bordercolor="&web_var(web_color,tc)
  case 4
    format_table=" background='images/"&web_var(web_config,5)&"/bg_table.gif' bordercolor="&web_var(web_color,tc)
  end select
end function

'------------------------------------格式化窗口3------------------------------------
function format_k(kvar,kt,kk,kw,kh)
  dim temp1,t1
  t1="images/"&web_var(web_config,5)&"/k"&kt&"_"
  temp1=vbcrlf&"<table border=0 width="&kw+kk*2&" height="&kh+kk*2&" cellpadding=0 cellspacing=0>" & _
	vbcrlf&"<tr>" & _
	vbcrlf&"<td width="&kk&" height="&kk&"><img src='"&t1&"1.gif' border=0></td>" & _
	vbcrlf&"<td width="&kw&" height="&kk&" background='"&t1&"top.gif'></td>" & _
	vbcrlf&"<td width="&kk&" height="&kk&"><img src='"&t1&"2.gif' border=0></td>" & _
	vbcrlf&"</tr>" & _
	vbcrlf&"<tr>" & _
	vbcrlf&"<td width="&kk&" height="&kh&" background='"&t1&"left.gif'></td>" & _
	vbcrlf&"<td width="&kw&" height="&kh&" align=center>"&kvar&"</td>" & _
	vbcrlf&"<td width="&kk&" height="&kh&" background='"&t1&"right.gif'></td>" & _
	vbcrlf&"</tr>" & _
	vbcrlf&"<tr>" & _
	vbcrlf&"<td width="&kk&" height="&kk&"><img src='"&t1&"3.gif' border=0></td>" & _
	vbcrlf&"<td width="&kw&" height="&kk&" background='"&t1&"end.gif'></td>" & _
	vbcrlf&"<td width="&kk&" height="&kk&"><img src='"&t1&"4.gif' border=0></td>" & _
	vbcrlf&"</tr>" & _
	vbcrlf&"</table>"
  format_k=temp1
end function

'------------------------------------格式化分页-------------------------------------
sub format_pagecute()
  if rssum mod nummer > 0 then
    thepages=rssum\nummer+1
  else
    thepages=rssum\nummer
  end if
  page=trim(request("page"))
  if not(isnumeric(page)) then page=1
  if int(page)>int(thepages) or int(page)<1 then
    viewpage=1
  else
    viewpage=int(page)
  end if
end sub

'-------------------------------------栏目名称--------------------------------------
function format_menu(mvars)
  dim i,mdim,mvar:mvar=trim(mvars):format_menu=""
  mdim=split(web_menu,"|")
  for i=0 to ubound(mdim)
    if mvar=left(mdim(i),instr(mdim(i),":")-1) then format_menu=right(mdim(i),len(mdim(i))-instr(mdim(i),":")):exit for
  next
  erase mdim
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

'-----------------------------------提取网站变量------------------------------------
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="&nbsp;("&fvar&")"
  else
    format_end="&nbsp;<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_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/"&snum&".gif' align='baseline'>&nbsp;"
end function

'-------------------------------------Cookies---------------------------------------
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

'--显示频道...
if ShowSiteChannel="Yes" then
	strChannel= "<table border=0 cellSpacing=0 style='CURSOR: hand; width:1%; height:25; align:right; letter-spacing: 2px; background-image: url(images/menu_bg3.gif)'><tr>"
	sqlChannel="select * from Channel order by OrderID"
	set rsChannel=server.CreateObject("adodb.recordset")
	rsChannel.open sqlChannel,conn,1,1
	do while not rsChannel.eof
		if rsChannel("ChannelID")=ChannelID then
			ChannelUrl=rsChannel("LinkUrl")
			ChannelName=rsChannel("ChannelName")
			strChannel=strChannel & "<td background='images/menu_bg4.gif'></td><a href='" & ChannelUrl & "'><td nowrap class='menu_bg1' onmouseover='this.className=""menu_bg2""' onmouseout='this.className=""menu_bg1""'>" & ChannelName & "</td></a>"
		else
			strChannel=strChannel & "<td background='images/menu_bg4.gif'></td><a href='" & rsChannel("LinkUrl") & "'><td nowrap class='menu_bg' onmouseover='this.className=""menu_bg2""' onmouseout='this.className=""menu_bg""'>" & rsChannel("ChannelName") & "</td></a>"
		end if
		rsChannel.movenext
	loop
	rsChannel.close
	set rsChannel=nothing
	strPath=strPath & "&nbsp;&gt;&gt;&nbsp;<a href='" & ChannelUrl & "'>" & ChannelName & "</a>"
	strPageTitle=strPageTitle & " >> " & ChannelName
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -