con_gsjs.asp

来自「是个不错的文件代码,希望大家好好用,」· ASP 代码 · 共 204 行

ASP
204
字号
<!-- #include file="skin.asp" -->
<!-- #include file="jk_nsort.asp" -->
<!-- #include file="../style/data_sort_gsjs.asp" -->

<%

cid=0
sid=0
n_sort="gsjs"
index_url="gsjs"
tit_fir=format_menu(index_url)
m_channel=index_url
web_img_m="m_"&m_channel
web_img_h="h_"&m_channel

sub gsjs_load(t1,t2,t3)

end sub

sub gsjs_end()
  if isarray(sort_dim) then erase sort_dim
end sub

sub gsjs_search(t_title)
  response.write vbcrlf&gsjs_bar_top(t_title,0) & _
		 vbcrlf&gsjs_search_list("文章") & _
		 vbcrlf&gsjs_bar_end("",0)
end sub

sub gsjs_label(t_title)
  response.write vbcrlf&gsjs_bar_top(t_title,0) & _
		 vbcrlf&gsjs_label_list() & _
		 vbcrlf&gsjs_bar_end("",0)
end sub

sub gsjs_sort(t_url,t1,t2,t_title)
  response.write vbcrlf&gsjs_bar_top(t_title,0) & _
		 vbcrlf&sort_type(t_url,t1,t2) & _
		 vbcrlf&gsjs_bar_end("",0)
end sub

sub gsjs_left(nt,n_num,c_num,n_title)
  dim n_username,n_topic,n_tim
  response.write vbcrlf&gsjs_bar_top(n_title,1)
  sql="select top "&n_num&" id,username,topic,tim,counter,emoney,power from gsjs where hidden=1"
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
  case "good"
    sql=sql&" and istop=1 order by id desc"
  case else
    sql=sql&" order by id desc"
  end select
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    n_username=rs("username")
    n_topic=rs("topic")
    n_tim=rs("tim")
    n_tim=joekoe_cms.time_type(n_tim,1)
    response.write vbcrlf&gsjs_topic_type(c_num,rs("id"),n_username,n_topic,n_tim,rs("counter"),false,0,rs("emoney"),rs("power"))
    rs.movenext
  loop
  rs.close
  response.write vbcrlf&gsjs_bar_end("",1)
end sub

function gsjs_bar_top(tvar,tt)
  dim temp1
  temp1=temp1&vbcrlf&"<table cellspacing=0 cellpadding=1>" & _
              vbcrlf&"<tr><td align=center>"
  if tt=1 then temp1=temp1&vbcrlf&"  <table border=0 width='100%'>"
  gsjs_bar_top=temp1
end function

function gsjs_bar_end(mvar,tt)
  dim temp1
  if tt=1 then temp1=temp1&vbcrlf&"  </table>"
  temp1=temp1&vbcrlf&"</td></tr>"
  if mvar<>"" and var_null(mvar)<>"" then temp1=temp1&vbcrlf&"<tr class=bg_tds height="&m_hei&"><td align=right>"&mvar&"&nbsp;&nbsp;</td></tr>"
  temp1=temp1&vbcrlf&"</table>"
  gsjs_bar_end=temp1&ukong
end function

function gsjs_topic_type(b_c_num,b_id,b_username,b_topic,b_tim,b_counter,b_ispic,b_tim_type,b_emoney,b_power)
  dim n_url,n_jt
  n_url="gsjs_view.asp?id="&b_id
  n_jt=img_skin(web_img_h)
  gsjs_topic_type=format_gsjs_topic_type(n_jt,b_username,b_topic,b_c_num,n_url,b_tim,b_counter,b_ispic,"文章标题","阅读次数",b_tim_type,b_emoney,b_power)
end function

function format_gsjs_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,b_emoney,b_power)
  dim n_img,tim_type,n_c_num
  n_c_num=b_c_num
  if b_ispic then
    n_img="&nbsp;<img src='"&joekoe_cms.web_dir_skin&"small/img.gif' border=0>"
    n_c_num=n_c_num-2
  end if
  if b_tim_type>0 then
    if b_tim_type=2 then tim_type=tim_type&"</td><td align=right>"
    tim_type=tim_type&"&nbsp;<font class=tims>"&mid(b_tim,6,5)&"</font>"
  end if
  format_gsjs_topic_type="<tr><td>"&b_jt&"<a href='javascript:;' onclick=""javascript:article_view_return('"&b_emoney&"','"&b_power&"','"&b_url&"');"" alt='"&b_tit&":"&joekoe_cms.code_html(b_topic,1,0)&"<br>发 布 人:"&b_username&"<br>"&b_count&":"&b_counter&" 人次<br>整理时间:"&b_tim&"'>"&joekoe_cms.code_html(b_topic,1,n_c_num)&"</a>"&n_img&tim_type&"</td></tr>"
end function

function gsjs_label_list()
  dim temp1
  temp1=temp1&vbcrlf&"<table border=0 cellspacing=0 cellpadding=4>" & _
              vbcrlf&"<tr><td>&nbsp;"&img_skin("label_"&m_channel)&"&nbsp;<a href='gsjs_list.asp?action=good'"
  if action="good" then temp1=temp1&" class=red"
  temp1=temp1&">推荐文章</a></td></tr>" & _
        vbcrlf&"<tr><td>&nbsp;"&img_skin("label_"&m_channel)&"&nbsp;<a href='gsjs_list.asp?action=hot'"
  if action="hot" then temp1=temp1&" class=red"
  temp1=temp1&">热门文章</a></td></tr>" & _
        vbcrlf&"</table>"
  gsjs_label_list=temp1
end function

function gsjs_list_pagecute(p_nummer,p_rssum,p_viewpage,p_thepages,p_pageurl)
  dim temp1
  temp1=temp1&vbcrlf&"<table border=0 width='98%' cellspacing=0 cellpadding=2>" & _
             vbcrlf&"<tr>" & _
             vbcrlf&"<td height=25>" & _
             vbcrlf&"&nbsp;本栏共有 <font class=red>"&p_rssum&"</font> 篇文章" & _
             vbcrlf&"页次:<font class=red>"&p_viewpage&"</font>/<font class=red>"&p_thepages&"</font>&nbsp;" & _
             vbcrlf&"&nbsp;分页:"&jk_pagecute(p_nummer,p_thepages,p_viewpage,p_pageurl,5,"#ff0000") & _
             vbcrlf&"</td>" & _
             vbcrlf&"</table>"&ukong
  gsjs_list_pagecute=temp1
end function

function gsjs_search_list(stit)
  dim keyvar,temp1
  keyvar="请输入关键字"
  temp1=temp1&vbcrlf&"<table border=0>" & _
              vbcrlf&"<form name=gsjs_sea_frm action='gsjs_list.asp' method=get onsubmit=""javascript:frm_submitonce(this);"">" & _
              vbcrlf&"<input type=hidden name=action value='search'>" & _
              vbcrlf&"<tr height=30>" & _
              vbcrlf&"<td>"&img_skin("new")&"</td>" & _
              vbcrlf&"<td wdith=5></td>" & _
              vbcrlf&"<td>"&select_type(stit,0,0)&"</td>" & _
              vbcrlf&"<td wdith=5></td>" & _
              vbcrlf&"<td><select name=sea_type sizs=1><option value='topic'>"&stit&"标题</option><option value='username'>发布人</option></seelct></td>" & _
              vbcrlf&"<td wdith=5></td>" & _
              vbcrlf&"<td><select name=sea_term sizs=1><option value='all'>满足所有条件</option><option value='only'>满足一个条件</option></seelct></td>" & _
              vbcrlf&"<td wdith=5></td>" & _
              vbcrlf&"<td><input type=text name=keyword value='"&keyvar&"' onfocus=""if (value =='请输入关键字'){value =''}"" onblur=""if (value ==''){value='请输入关键字'}"" size=20 maxlength=20 title='多个关键字请用 空格 格开'></td>" & _
              vbcrlf&"<td wdith=5></td>" & _
              vbcrlf&"  <td><input type=submit value='搜索' onclick=""javascript:return gsjs_sea('"&stit&"');""></td>" & _
              vbcrlf&"</tr></form></table>" & _
              vbcrlf&"<script language=javascript>" & _
              vbcrlf&"function gsjs_sea(stit)" & _
              vbcrlf&"{" & _
              vbcrlf&"  if (document.gsjs_sea_frm.keyword.value==""请输入关键字"")" & _
              vbcrlf&"  {" & _
              vbcrlf&"    alert('请在搜索"&stit&"前先输入要查询的 关键字 !');" & _
              vbcrlf&"    document.gsjs_sea_frm.keyword.focus();" & _
              vbcrlf&"    return false;" & _
              vbcrlf&"  }" & _
              vbcrlf&"}" & _
              vbcrlf&"</script>"
  gsjs_search_list=temp1
end function

function gsjs_view1(v_id,v_topic,v_tim,v_comto,v_author)
  dim temp1
  temp1=temp1&vbcrlf&"<table cellspacing=0 cellpadding=1 class=table0>" & _
              vbcrlf&"<tr><td align=center height=40><font color=red size=4><b>"+v_topic+"</b></font></td></tr>" & _
vbcrlf&"<tr><td height=1 bgColor=9b9aa2></td></tr>" & _
              vbcrlf&"<tr class=bg_tds><td align=right height="&m_hei&" bgColor=#dfdfdf>作者:"&v_author&"&nbsp;&nbsp;出处:"&v_comto&"&nbsp;&nbsp;更新时间: "&v_tim&"&nbsp;</td></tr>" & _
              vbcrlf&"<tr class=bg_td><td align=center>" & _
              vbcrlf&"  <table border=0 class=tablew><tr><td>" & _
              vbcrlf&"    <table border=0 width='100%' class=tf><tr><td class=bw><table align=left float=left border=0><tr><td><script language=javascript src='ads/ads_gsjs.js'></script></td></tr></table>"
  gsjs_view1=temp1
end function

function gsjs_view2(v_id,v_topic,v_counter,v_username,v_id1,v_topic1,v_id2,v_topic2)
  dim temp1
  temp1=temp1&vbcrlf&"&nbsp;<font class=gray>(本文已被浏览&nbsp;"&v_counter&"&nbsp;次)</font>" & _
              vbcrlf&"    </td></tr></table>" & _
              vbcrlf&"  </td></tr></table>" & _
              vbcrlf&"</td></tr>" & _
              vbcrlf&"<tr class=bg_tds><td>" & _
              vbcrlf&"  <table border=0 width='100%'>" & _
              vbcrlf&"  <tr>" & _
              vbcrlf&"  <td width='25%' class=htd>&nbsp;发布人:"&format_user_name(v_username,0,"")&"<br>&nbsp;"&commend_friend(tit,v_topic,"gsjs_view.asp?id="&v_id)&"</td>" & _
              vbcrlf&"  <td width='75%' class=htd>" & _
              vbcrlf&"上篇文章:"
  if v_topic1<>"" and var_null(v_topic1)<>"" then
    temp1=temp1&"<a href='gsjs_view.asp?id="&v_id1&"' title='"&joekoe_cms.code_html(v_topic2,1,0)&"'>"&joekoe_cms.code_html(v_topic1,1,25)&"</a>"
  else
    temp1=temp1&"<font class=gray>没有找到相关文章</font>"
  end if
  temp1=temp1&"<br>下篇文章:"
  if v_topic2<>"" and var_null(v_topic2)<>"" then
    temp1=temp1&"<a href='gsjs_view.asp?id="&v_id2&"' title='"&joekoe_cms.code_html(v_topic2,1,0)&"'>"&joekoe_cms.code_html(v_topic2,1,25)&"</a>"
  else
    temp1=temp1&"<font class=gray>没有找到相关文章</font>"
  end if
  temp1=temp1&vbcrlf&"  </td></tr></table>" & _
              vbcrlf&"</td></tr>" & _
              vbcrlf&"</table>"
  gsjs_view2=temp1&ukong
end function
%>

⌨️ 快捷键说明

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