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

📄 config_news.asp

📁 这是一个师姐请我做的英语爱好者的毕业设计 已经通过东北大学的毕业答辩 有论文数据库结构分析等全套 已经是可以直接用的毕业设计!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
  loop
  temp1=temp1&"</table>"
  response.write kong & "<table border=0 width='96%' cellspacing=0 cellpadding=0 align=center><tr><td align=center>"&format_bar("<font class="&sk_class&"><b>图片新闻</b></font>",temp1,sk_bar,0,0,"|"&web_var(web_color,pc)&"|","")&"</td></tr></table>"
end sub

sub news_main(n_jt,n_num,c_num,et,ct,tt,pn,pl,pc)
  dim ccid,ccname,sqla,crs,csql,nn,temp1,tim,cnum:nn=0
  csql="select c_id,c_name from jk_class where nsort='"&n_sort&"' order by c_order"
  set crs=conn.execute(csql)
  do while not crs.eof
    temp1="<table border=0 width='100%'><tr><td height=1></td><td wdith=50></td></tr>"
    ccid=crs("c_id"):ccname=crs("c_name"):sqla=" and c_id="&ccid
    sql="select top "&n_num&" id,topic,tim,username,counter,ispic from news where hidden=1 and c_id="&ccid&" order by id desc"
    set rs=conn.execute(sql)
    do while not rs.eof
      cnum=c_num:ispic="":topic=rs("topic"):tim=rs("tim")
      if rs("ispic")=true then cnum=cnum-2:ispic=sk_img
      temp1=temp1&vbcrlf&"<tr><td height="&space_mod&">"&img_small(n_jt)&"<a href='news_view.asp?id="&rs("id")&"'"&atb&" title='新闻标题:"&code_html(topic,1,0)&"<br>发 布 人:"&rs("username")&"<br>浏览人次:"&rs("counter")&"<br>整理时间:"&tim&"'>"&code_html(topic,1,cnum)&"</a>"&ispic&"</td><td>"&format_end(et,time_type(tim,tt))&"</td></tr>"
      rs.movenext
    loop
    rs.close
    temp1=temp1&vbcrlf&"</table>"
    response.write vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=0><tr valign=top>"
    if nn=0 then
      response.write vbcrlf&"<td width='67%'>"
      response.write kong&format_bar("<a href='news_list.asp?c_id="&ccid&"'><b><font class="&sk_class&">"&ccname&"</font></b></a>",temp1,sk_bar,0,0,"||","<a href='news_list.asp?c_id="&ccid&"&action=more'><font class="&sk_class&">浏览更多</font></a>")
      response.write vbcrlf&"</td><td width='1%'></td><td width='32%'>"
      call news_pic(sqla,pn,pl,pc)
      nn=1
    else
      response.write vbcrlf&"<td width='32%'>"
      call news_pic(sqla,pn,pl,pc)
      response.write vbcrlf&"</td><td width='1%'></td><td width='67%'>"
      response.write kong&format_bar("<a href='news_list.asp?c_id="&ccid&"'><b><font class="&sk_class&">"&ccname&"</font></b></a>",temp1,sk_bar,0,0,"||","<a href='news_list.asp?c_id="&ccid&"&action=more'><font class="&sk_class&">浏览更多</font></a>")
      nn=0
    end if
    response.write vbcrlf&"</td></tr></table>"
    crs.movenext
  loop
  crs.close:set crs=nothing
end sub

sub news_more(n_jt,c_num,et,ct,tt,pn,pl,pc)
  dim temp1,tim,cnum,sql2,mhead,cname,sname
  pageurl="?action=more&"
  keyword=code_form(request.querystring("keyword"))
  sea_type=trim(request.querystring("sea_type"))
  if sea_type<>"username" then sea_type="topic"
  call cid_sid_sql(2,sea_type)
  
  temp1="<table border=0 width='100%'><tr><td height=1 width='5%'></td><td width='77%'></td><td wdith='18%'></td></tr>"
  sql="select id,topic,tim,username,counter,ispic from news where hidden=1"&sqladd
  if cid>0 then
    sql=sql&" and c_id="&cid
    if sid>0 then
      sql=sql&" and s_id="&sid
      sql2="select jk_class.c_name,jk_sort.s_name from jk_sort inner join jk_class on jk_sort.c_id=jk_class.c_id where jk_sort.c_id="&cid&" and jk_sort.s_id="&sid
    else
      sql2="select c_name from jk_class where c_id="&cid
    end if
  end if
  sql=sql&" order by id desc"
  
  cname="搜索结果":sname=""
  if len(sql2)>1 then
    set rs=conn.execute(sql2)
    if rs.eof and rs.bof then
      rs.close
      call news_main("jt0",16,20,1,6,33,2,10,1)
      exit sub
    end if
    cname=rs("c_name")
    if sid>0 then sname=rs("s_name")
    rs.close
  end if
  mhead="<a href='news_list.asp?c_id="&cid&"'><b><font class="&sk_class&">"&cname&"</font></b></a>"
  if sid>0 and sname<>"" then mhead=mhead&"&nbsp;<font class="&sk_class&">→</font>&nbsp;<a href='news_list.asp?c_id="&cid&"&s_id="&sid&"'><b><font class="&sk_class&">"&sname&"</font></b></a>"
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,1,1
  if rs.eof and rs.bof then
    rssum=0
  else
    rssum=rs.recordcount
  end if
  call format_pagecute()
  if int(viewpage)>1 then
    rs.move (viewpage-1)*nummer
  end if
  for i=1 to nummer
    if rs.eof then exit for
    cnum=c_num:ispic="":topic=rs("topic"):tim=rs("tim")
    if rs("ispic")=true then cnum=cnum-2:ispic=sk_img
    temp1=temp1&vbcrlf&"<tr><td height="&space_mod&">"&i+(viewpage-1)*nummer&".</td><td><a href='news_view.asp?id="&rs("id")&"'"&atb&" title='新闻标题:"&code_html(topic,1,0)&"<br>发 布 人:"&rs("username")&"<br>浏览人次:"&rs("counter")&"<br>整理时间:"&tim&"'>"&code_html(topic,1,cnum)&"</a>"&ispic&"</td><td>"&format_end(et,time_type(tim,tt))&"</td></tr>"
    rs.movenext
  next
  rs.close
  temp1=temp1&vbcrlf&"</table>"
  response.write kong&format_bar(mhead,temp1,sk_bar,0,0,"||","<a href='news_list.asp?c_id="&cid&"&s_id="&sid&"&action=more'><font class="&sk_class&">浏览更多</font></a>")
%>
<table border=0 width='100%' align=center>
<tr><td align=center><table border=0 width='100%'><tr><td height=1 background='images/bg_dian.gif'></td></tr></table></td></tr>
<tr><td>&nbsp;
本栏共有&nbsp;<font class=red><%response.write rssum%></font>&nbsp;条新闻&nbsp;
页次:<font class=red><%response.write viewpage%></font>/<font class=red><%response.write thepages%></font>&nbsp;
分页:<%response.write jk_pagecute(nummer,thepages,viewpage,pageurl,8,"#ff0000")%>
</td></tr>
</table>
<%
end sub

sub news_list(n_jt,n_num,c_num,et,ct,tt,pn,pl,pc)
  dim ssid,ssname,sqla,srs,ssql,nn,temp1,tim,cnum:nn=0
  ssql="select s_id,s_name from jk_sort where c_id="&cid
  if sid<>0 then ssql=ssql&" and s_id="&sid
  ssql=ssql&" order by s_order"
  set srs=conn.execute(ssql)
  do while not srs.eof
    temp1="<table border=0 width='100%'><tr><td height=1></td><td wdith=50></td></tr>"
    ssid=srs("s_id"):ssname=srs("s_name"):sqla=" and c_id="&cid&" and s_id="&ssid
    sql="select top "&n_num&" id,topic,tim,username,counter,ispic from news where hidden=1 and c_id="&cid&" and s_id="&ssid&" order by id desc"
    set rs=conn.execute(sql)
    do while not rs.eof
      cnum=c_num:ispic="":topic=rs("topic"):tim=rs("tim")
      if rs("ispic")=true then cnum=cnum-2:ispic=sk_img
      temp1=temp1&vbcrlf&"<tr><td height="&space_mod&">"&img_small(n_jt)&"<a href='news_view.asp?id="&rs("id")&"'"&atb&" title='新闻标题:"&code_html(topic,1,0)&"<br>发 布 人:"&rs("username")&"<br>浏览人次:"&rs("counter")&"<br>整理时间:"&tim&"'>"&code_html(topic,1,cnum)&"</a>"&ispic&"</td><td>"&format_end(et,time_type(tim,tt))&"</td></tr>"
      rs.movenext
    loop
    rs.close
    temp1=temp1&vbcrlf&"</table>"
    response.write vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=0><tr valign=top>"
    if nn=0 then
      response.write vbcrlf&"<td width='67%'>"
      response.write kong&format_bar("<a href='news_list.asp?c_id="&cid&"&s_id="&ssid&"'><b><font class="&sk_class&">"&ssname&"</font></b></a>",temp1,sk_bar,0,0,"||","<a href='news_list.asp?c_id="&cid&"&s_id="&ssid&"&action=more'><font class="&sk_class&">浏览更多</font></a>")
      response.write vbcrlf&"</td><td width='1%'></td><td width='32%'>"
      call news_pic(sqla,pn,pl,pc)
      nn=1
    else
      response.write vbcrlf&"<td width='32%'>"
      call news_pic(sqla,pn,pl,pc)
      response.write vbcrlf&"</td><td width='1%'></td><td width='67%'>"
      response.write kong&format_bar("<a href='news_list.asp?c_id="&cid&"&s_id="&ssid&"'><b><font class="&sk_class&">"&ssname&"</font></b></a>",temp1,sk_bar,0,0,"||","<a href='news_list.asp?c_id="&cid&"&s_id="&ssid&"&action=more'><font class="&sk_class&">浏览更多</font></a>")
      nn=0
    end if
    response.write vbcrlf&"</td></tr></table>"
    srs.movenext
  loop
  srs.close:set srs=nothing
end sub
%>

⌨️ 快捷键说明

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