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

📄 con_news.asp

📁 ..不怎么明白。不知道这个市什么只想下个服务端
💻 ASP
字号:
<!-- #include file="../../include/skin.asp" -->
<!-- #include file="../../include/jk_nsort.asp" -->
<!-- #include file="../../style/data_sort_news.asp" -->

<%
'****************************************************
' Web: http://www.aouoo.com , http://www.aouoo.net
' Copyright (C) 2007 Aouoo.com All Rights Reserved.
'****************************************************

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

sub news_load(t1,t2,t3)

end sub

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

sub news_search(t_title)
  response.write news_bar_top(t_title,0,1,"") & _
		 vbcrlf&news_search_list("新闻") & _
		 vbcrlf&news_bar_end("",0)
end sub

sub news_label(t_title)
  response.write vbcrlf&news_bar_top(t_title,0,2,"") & _
		 vbcrlf&news_label_list() & _
		 vbcrlf&news_bar_end("",0)
end sub

sub news_sort(t_url,t1,t2,t_title)
  response.write vbcrlf&news_bar_top(t_title,0,1,"") & _
		 vbcrlf&sort_type(t_url,t1,t2) & _
		 vbcrlf&news_bar_end("",0)
end sub

sub news_left(nt,n_num,c_num,n_title)
  dim n_username,n_topic,n_tim
  response.write vbcrlf&news_bar_top(n_title,1,2,"")
  sql="select top "&n_num&" id,username,topic,tim,counter,ispic from news 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&news_topic_type(c_num,rs("id"),n_username,n_topic,n_tim,rs("counter"),rs("ispic"),0)
    rs.movenext
  loop
  rs.close
  response.write vbcrlf&news_bar_end("",1)
end sub

function news_bar_top(tvar,tt,ttype,tmore)
  dim w_wid,more_var,temp1
  w_wid="20%"
  if len(tvar)>10 then w_wid="45%"
  if len(tvar)>25 then w_wid="70%"
  if int(ttype)=2 then w_wid="45%"
  more_var="<img src='"&joekoe_cms.web_dir_skin&"main/"&m_channel&"_more_0"&ttype&".gif' border=0>"
  if tmore<>"" or var_null(tmore)<>"" then
    more_var="<a href='"&tmore&"'><img src='"&joekoe_cms.web_dir_skin&"main/"&m_channel&"_more_1"&ttype&".gif' border=0 alt='点击浏览更多……'></a>"
  end if
  web_img_h=tmp_img_h&ttype
  temp1=vbcrlf&"<table border=0 cellspacing=1 cellpadding=0 width='100%' bgcolor='#990000'>" & _
        vbcrlf&"<tr><td height=29 background='/skin/aouoo_skin/index/bar_bg.jpg'>" & _
        vbcrlf&"  <table border=0 cellspacing=0 cellpadding=0 width='100%'>" & _
        vbcrlf&"  <tr height=29>" & _
        vbcrlf&"  <td>&nbsp;&nbsp;<img src='/skin/aouoo_skin/index/class3_gold.gif' align='absmiddle' />&nbsp;<font color='#FFFFFF'>"&tvar&"</font></td>" & _
        vbcrlf&"  </tr>" & _
        vbcrlf&"  </table>" & _
        vbcrlf&"</td></tr>" & _
        vbcrlf&"<tr><td align=center valign=top bgcolor='#ffffff'>"
  if tt=1 then temp1=temp1&vbcrlf&"  <table border=0 width='98%'>"
  news_bar_top=temp1
end function

function news_bar_end(mvar,tt)
  dim temp1
  if tt=1 then temp1=temp1&vbcrlf&"  </table>"
  temp1=temp1&vbcrlf&"</td></tr>" & _
              vbcrlf&"</table>"
  news_bar_end=temp1
end function

function news_topic_type(b_c_num,b_id,b_username,b_topic,b_tim,b_counter,b_ispic,b_tim_type)
  dim n_url,n_jt
  n_url="view.asp?id="&b_id
  n_jt=img_skin(web_img_h)
  news_topic_type=format_topic_type(n_jt,b_username,b_topic,b_c_num,n_url,b_tim,b_counter,b_ispic,"新闻标题","浏览人次",b_tim_type)
end function

function news_label_list()
  dim temp1
  temp1=temp1&"<table border=0 cellspacing=0 cellpadding=4>" & _
       vbcrlf&"<tr><td>&nbsp;"&img_skin("label_"&m_channel)&"&nbsp;<a href='news_list.asp?action=pic'"
  if action="pic" then temp1=temp1&" class=red"
  temp1=temp1&">图片新闻</a></td></tr>" & _
       vbcrlf&"<tr><td>&nbsp;"&img_skin("label_"&m_channel)&"&nbsp;<a href='news_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='news_list.asp?action=hot'"
  if action="hot" then temp1=temp1&" class=red"
  temp1=temp1&">热门新闻</a></td></tr>" & _
       vbcrlf&"</table>"
  news_label_list=temp1
end function

function news_list_pagecute(p_nummer,p_rssum,p_viewpage,p_thepages,p_pageurl)
  dim temp1
  temp1=temp1&vbcrlf&"<table border=0 cellspacing=1 cellpadding=0 width='100%' bgcolor='#990000'>" & _
             vbcrlf&"<tr>" & _
             vbcrlf&"<td height=25 bgcolor='#FF9900'>" & _
             vbcrlf&"&nbsp;共有 <font class=pgcut>"&p_rssum&"</font> 条记录," & _
             vbcrlf&"页次:<font class=pgcut>"&p_viewpage&" / "&p_thepages&"</font>&nbsp;" & _
             vbcrlf&"&nbsp;分页:"&jk_pagecute(p_nummer,p_thepages,p_viewpage,p_pageurl,5,"#330000") & _
             vbcrlf&"</td>" & _
             vbcrlf&"</table>"
  news_list_pagecute=temp1
end function

function news_search_list(stit)
  dim keyvar,temp1
  keyvar="请输入关键字"
  temp1=temp1&vbcrlf&"<table border=0>" & _
              vbcrlf&"<form name=news_sea_frm action='news_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 news_sea('"&stit&"');""></td>" & _
              vbcrlf&"</tr></form></table>" & _
              vbcrlf&"<script language=javascript>" & _
              vbcrlf&"function news_sea(stit)" & _
              vbcrlf&"{" & _
              vbcrlf&"  if (document.news_sea_frm.keyword.value==""请输入关键字"")" & _
              vbcrlf&"  {" & _
              vbcrlf&"    alert('请在搜索"&stit&"前先输入要查询的 关键字 !');" & _
              vbcrlf&"    document.news_sea_frm.keyword.focus();" & _
              vbcrlf&"    return false;" & _
              vbcrlf&"  }" & _
              vbcrlf&"}" & _
              vbcrlf&"</script>"
  news_search_list=temp1
end function

function news_view1(v_id,v_topic,v_tim,v_comto,v_pic,v_ispic)
  dim n_pic,temp1
  if v_ispic=true and v_pic<>"" and var_null(v_pic)<>"" then n_pic="<tr><td align=center><img src='"&pic_url(v_pic,0)&"' border=0 onload=""javascript:if(this.width>"&max_w&")this.width="&max_w&";""></td></tr>"
  temp1=temp1&vbcrlf&"<table border=0 cellspacing=1 cellpadding=0 width='100%' bgcolor='#990000' height=660><tr><td bgcolor='#ffffff' valign=top>" & _
              vbcrlf&"<table border=0 cellspacing=0 cellpadding=0 width='100%'>" & _
              vbcrlf&"<tr><td height=29 background='/skin/aouoo_skin/index/bar_bg.jpg'>&nbsp;&nbsp;<img src='/skin/aouoo_skin/index/class3_gold.gif' align='absmiddle' />&nbsp;<font color=#ffffff>新 闻 浏 览</font></td></tr>" & _
			  vbcrlf&"<tr><td align=center height=30 bgcolor='#f0f0f0'>"&v_topic&"</td></tr>" & _
              vbcrlf&"<tr><td align=center height=30>"&v_tim&"&nbsp;&nbsp;"&joekoe_cms.web_name&"</td></tr>" & _
              vbcrlf&"<tr><td height=1 bgcolor='#cccccc'></td></tr>" & _
              vbcrlf&"<tr><td valign=top><br>" & _
              vbcrlf&"  <table border=0 class=tablew>"&n_pic&"<tr><td>" & _
              vbcrlf&"    <table border=0 width='100%' class=tf><tr><td class=bw>"
  news_view1=temp1
end function

function news_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><td height=10></td></tr>" & _
              vbcrlf&"<tr><td>" & _
              vbcrlf&"  <table border=0 width='100%'>" & _
              vbcrlf&"  <tr>" & _
              vbcrlf&"  <td width='75%' class=htd>" & _
              vbcrlf&"上篇新闻:"
  if v_topic1<>"" and var_null(v_topic1)<>"" then
    temp1=temp1&"<a href='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='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></td></tr></table></td></tr></table>"
  news_view2=temp1
end function

'****************************************************
' Web: http://www.aouoo.com , http://www.aouoo.net
' Copyright (C) 2007 Aouoo.com All Rights Reserved.
'****************************************************
%>

⌨️ 快捷键说明

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