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

📄 config.bak.asp

📁 漂亮的企业网站系统v11 1、整体修改了上一版的一些BUG。 2、修改了页面底部的统计形式。 3、修改了“公告更新”栏目
💻 ASP
📖 第 1 页 / 共 2 页
字号:
  dim poptemp:poptemp=0
  if len(popedom_var)=50 then poptemp=int(mid(popedom_var,popedom_n,1))
  popedom_format=poptemp
end function

'----------------------------------power emoney----------------------------------
sub emoney_notes(power,emoney,n_sort,iid,err_type,rss,conns,url,p_name)
  dim temp1:temp1=emoney_note(power,emoney,n_sort,iid,p_name)
  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,p_name)
  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="&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_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/"&web_var(web_config,5)&"/"&snum&".gif' align=absmiddle>&nbsp;"
end function

sub is_type()
%>
<%response.write img_small("isok")%>开放主题
<%response.write img_small("ishot")%>热门主题
<%response.write img_small("islock")%>锁定主题
<%response.write img_small("istop")&""&img_small("istops")%>&nbsp;固顶、总固顶主题
<%response.write img_small("isgood")&""&img_small("ispel")%>精华、推荐主题
<%response.write img_small("isvote")%>投票主题
<%
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>" & _
		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,13,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,3)&"|"&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,13,2,"","|"&web_var(web_color,6)&"|","")&"</td></tr></table>"
  case else
    left_action=kong&format_bar("<font class=end><b>功能跳转</b></font>",left_action,13,2,"fk4",web_var(web_color,3)&"|"&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_article,num_business,num_video,num_down,stat_temp
  set rs=server.createobject("adodb.recordset")
  sql="select username from user_data order by id desc"
  rs.open sql,conn,1,1
  if not(rs.eof and rs.bof) then
    num_reg=int(rs.recordcount)
    new_username=rs("username")
  end if
  rs.close
  
  sql="select count(id) from bbs_topic"
  set rs=conn.execute(sql)
  if not(rs.eof and rs.bof) then num_topic=int(rs(0))
  rs.close
  
  sql="select count(id) from bbs_data"
  set rs=conn.execute(sql)
  if not(rs.eof and rs.bof) then num_data=int(rs(0))
  rs.close

  sql="select count(id) from article where hidden=1"
  set rs=conn.execute(sql)
  if not(rs.eof and rs.bof) then num_article=int(rs(0))
  rs.close
  
  sql="select count(id) from down where hidden=1"
  set rs=conn.execute(sql)
  if not(rs.eof and rs.bof) then num_down=int(rs(0))
  rs.close
  
  sql="select count(id) from video where hidden=1"
  set rs=conn.execute(sql)
  if not(rs.eof and rs.bof) then num_video=int(rs(0))
  rs.close
  
  sql="select count(id) from business where hidden=1"
  set rs=conn.execute(sql)
  if not(rs.eof and rs.bof) then num_business=int(rs(0))
  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_article&"</font> 篇</td></tr>" & _
       vbcrlf&"<tr><td>"&sjt&"影片总数:<font class=red>"&num_video&"</font> 个</td></tr>" & _
       vbcrlf&"<tr><td>"&sjt&"软件总数:<font class=red>"&num_down&"</font> 个</td></tr>" & _
       vbcrlf&"<tr><td>"&sjt&"交易总数:<font class=red>"&num_business&"</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 "<table  border='0' cellspacing='0' cellpadding='0'><tr><td width='100%' height=4></td></tr></table>"&forum_table1&"<tr"&forum_table2&"><td> "&img_small("fk4") &" <font class=end><b>论坛数据</b></font></td></tr><tr"&forum_table4&"><td align=center height=30>"&stat_temp&"</td></tr></table>"
  end if
end sub

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

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

sub business_left()
  dim temp1
  temp1=vbcrlf&"<table border=0 width='98%' cellspacing=0 cellpadding=4 align=center class=tf>" & _
	vbcrlf&"<tr><td height=5 width='98%'></td></tr>" & _
	vbcrlf&"<tr><td colspan=2 align=left><table border=0 width='98%'>" & _
	vbcrlf&"<tr><td>    请您遵守中华人民共和国有关法律、法规;</td></tr>" & _
	vbcrlf&"<tr><td>    尊重网上道德并遵守诚实信用原则;</td></tr>" & _
	vbcrlf&"<tr><td>    请勿发表与本站栏目内容无关的话题和不法言论。</td></tr>" & _
	vbcrlf&"<tr><td><a href='user_put.asp?action=business'><img src='images/flea/flea_put.gif' title='发布我的交易信息' border=0></a>" & _
	vbcrlf&"</table></td></tr>" & _	
	vbcrlf&"</td></tr></table>"
  call business_skin("市场公告",temp1,"",1)
end sub

sub business_skin(t1,t2,t3,t4)
  if t4=1 then response.write "<table border=0 width='96%' cellspacing=0 cellpadding=0 align=center><tr><td align=center>"
  response.write kong&format_bar("<font class=end><b>"&t1&"</b></font>",t2,14,0,0,"||",t3)
  if t4=1 then response.write "</td></tr></table>"
end sub


sub top_flea2(utt,ijt,sh,n_num)
  dim temp1
  temp1=vbcrlf&"<table border=0 width='99%' cellspacing=2 cellpadding=0 align=center class=tf><tr height=0><td width='75%'></td><td width='25%'></td></tr>"
  sql="select top "&n_num&" name,id,c_id,s_id,"&utt&" from business order by "&utt&" desc,id"
  set rs=conn.execute(sql)
  do while not rs.eof
    temp1=temp1&vbcrlf&"<tr><td height="&space_mod&" class=bw>"&img_small(ijt)&format_flea_view(rs("name"),1,"")&"</td><td align=center class=red_3>"&rs(utt)&"</td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</table>"
  call business_skin("最新信息",temp1,"",1)
end sub

function format_flea_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_flea_view="<a href='flea_view.asp?c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&id="&rs("id")&"' title='查看 "&uuser&" 的详细资料'"
  if ut=1 then format_flea_view=format_flea_view&" target=_blank"
  format_flea_view=format_flea_view&uc&">"&uuser&"</a>"
end function
%>

⌨️ 快捷键说明

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