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

📄 cen.asp

📁 一个简单的ASP和ACCESS连接的范例,实现简单的生日登记显示功能.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
          <td valign="top" bgcolor="<%=m_main%>"> 
            <%     
		 t3=split(images_bh,",")
          t4=split(images_mc,",")
         for n=0 to ubound(t3)
          if t4(n)="栏目底" then     
             images_show=t3(n)
            if len(trim(images_show))>3 then
              images_show="<img src=../images/go/"&images_show&">"
             else
               images_show="<b>"&images_show&"</b>"
            end if
          end if 
         next
            set rs3=server.CreateObject("ADODB.RecordSet")
            rs3.Source="select top " & topclass_news & " pcs,bm,NewsID,Title,open_blank,hottop,UpdateTime,BigClassName,SmallClassName,SpecialID,image,click,dwoskey from News where  "&sql11&" and ("&office2&" ) "&bigclass_condition&smallclass_condition&" and send='1' order by "&smallclass_order&"hottop DESC,NewsID DESC"
            rs3.Open rs3.Source,conn,1,1            
            while not rs3.EOF
                          newsurl="ReadNews.asp?bm="& rs3("bm") &"&pcs="&rs3("pcs")&"&NewsID=" & rs3("NewsID") & "&BigClassName=" & rs3("BigClassName") & "&SmallClassName=" & rs3("SmallClassName") & "&SpecialID=" & rs3("SpecialId")
                         if  title_time=1 then
						     datetime="<font class=middle>(" & Month(rs3("UpdateTime"))  &"月"& Day(rs3("UpdateTime")) &"日)</font>"
						   else
						    datetime=""
						 end if
						 if  title_click=1 and filetype=1 then
						      datetime=datetime+"<font class=middle>[<font color=#FF0000>" & rs3("click") &"</font>]</font>" 		   
						 end if
						' datetime="<font class=middle>(" & Month(rs3("UpdateTime"))  &"月"& Day(rs3("UpdateTime")) &"日)[<font color=#FF0000>" & rs3("click") &"</font>]</font>"
                         if rs3("image")=>1 then
                             img="<img src='images/img.gif' height='10' border='0'>"
                            else
                              img=""
                        end if                      
						if (session("office")<>"") and (instr(rs3("dwoskey"),session("office"))>0) then
						else
							if filetype=2 then
								 newsurl="../images/news/"+rs3("content")
							end if
							if filetype=3 then
							   newsurl=rs3("content")
							end if
						end if
					    images_show1=images_show
						if rs3("hottop")=1 then 	images_show1="<img src=../images/go/locktop.gif>"                       
                   %>
        <tr> 
          <td height=18><%=images_show1%>&nbsp;<% if smallclassname="〖空〗" then  response.write "〖"&rs3("smallclassname")&"〗" end if%>
          <%if oskey_show="1" then%>
			 <a onclick="javascript:alert('内部信息,仅对有权限者开放')">
		  <%elseif oskey_show="0" then %>
			<a href="<%=newsurl%>" title="<%=rs3("title")%>" <%if rs3("open_blank")="1" then response.write "target='_blank'"%> class=middle <%=font2_content%>> 
            <%end if%>
			<%if index_style="2" then %>
				<%if len(rs3("title"))>22 then%>
					<%=left(rs3("title"),20)%>...
				<%else%>
				<%=rs3("title")%> 
				<%end if%>
			<%else%>
				<%if len(rs3("title"))>13 then%>
					<%=left(rs3("title"),10)%>...
				<%else%>
				<%=rs3("title")%>
				<%end if%>
			<%end if%>
            </a><%=datetime%><%=img%>
            <%if year(rs3("updatetime"))=year(date()) and month(rs3("updatetime"))=month(date()) and day(rs3("updatetime"))=day(date()) then%>
            <img src="../images/new.gif" width="27" height="10"> 
            <%end if%>
          </td>
        </tr>
        <%
        rs3.MoveNext
        wend
        rs3.close
		set rs3=nothing%>
        <tr> 
          <td width=100% align=right height=18 ><a class=class href='<%=bigsmallclass_link%>'>[更多]</a></td>
        </tr>
      </table></td>
    <td width="34%"> 
      <%   
    sql_pic="select top 1 NewsID,Title,Content,UpdateTime,Image,BigClassName,SmallClassName,SpecialID  from News where  "&sql11&" and ("&office2&" )"&bigclass_condition&smallclass_condition&" and send='1' and (image>0 and goodnews=1) order by "&smallclass_order&"hottop DESC,NewsID DESC"
     %>
      <!--#include file=public/hotpicture1.asp -->
    </td>
    <td width="1%">&nbsp;</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
    <td colspan="2">&nbsp;</td>
  </tr>
  <%end if%>
</table>
<%end if
if font2_style="4" then %>
<table border=0 cellpadding=3 cellspacing=0 width="98%">
    <%if oskey_show="2" then   '没有权限,是屏,还是隐藏
		response.write hidetitle %>
   <%else%>
 <tbody>
 
    <tr> 
      <td valign=middle width="1" align="center"></td>
      <td valign=middle width="2" align="center"> 
        <%   
    sql_pic="select top 1 NewsID,Title,Content,UpdateTime,Image,BigClassName,SmallClassName,SpecialID  from News where  "&sql11&" and ("&office2&" ) "&bigclass_condition&smallclass_condition&" and send='1' and (image>0 and goodnews=1) order by "&smallclass_order&"hottop DESC,NewsID DESC"
     %>
        <!--#include file=public/hotpicture1.asp -->
      </td>
      <td valign=middle width="1" align="center"></td>
      <td valign=top class="hottop"> <div style="overflow: hidden;<%if index_style="2" then response.write " width:240pt;height:120pt;" else response.write " width:160pt;height:80pt;"%>">
        <%set rs3=server.CreateObject("ADODB.RecordSet")
			rs3.Source ="select top 1 NewsID,Title,Content,UpdateTime,Image,BigClassName,SmallClassName,SpecialID from News where  "&sql11&" and (image>0 and  goodnews=1) "&bigclass_condition&smallclass_condition&" order by NewsID DESC"
			rs3.Open rs3.Source,conn,1,1%>
        <%if not rs3.eof then%>
        <%=rs3("Content")%>... 
        <%end if
		
		rs3.close
		set rs3=nothing%></div>
        <br> <table width="100%" border="0">
          <tr> 
            <td align="right">&nbsp; </td>
          </tr>
        <tr> 
          <td width=100% align=right height=18 ><a class=class href='<%=bigsmallclass_link%>'>[更多]</a></td>
        </tr>
        </table></td>
    </tr>

  </tbody>
  <%end if %>
</table>
<%end if
if font2_style="5" then %>
<table border=0 cellpadding=3 cellspacing=0 width="98%">
   <%if oskey_show="2" then   '没有权限,是屏,还是隐藏
		response.write hidetitle %>
   <%else%>
  <tbody>
     <tr> 
      <td valign=middle width="5" align="center"></td>
      <td valign=top align="left"><div style="overflow: hidden;<%if index_style="2" then response.write " width:240pt;height:120pt;" else response.write " width:160pt;height:80pt;"%>">
        <%set rs3=server.CreateObject("ADODB.RecordSet")
			rs3.Source ="select top 1 NewsID,Title,Content,UpdateTime,Image,BigClassName,SmallClassName,SpecialID from News where  "&sql11&" and (image>0 and  goodnews=1) order by NewsID DESC"
			rs3.Open rs3.Source,conn,1,1%>
        <%if not rs3.eof then%>
        <%=rs3("Content")%>... 
        <%end if
		
		rs3.close
		set rs3=nothing%></div><br><table width="100%" border="0">
          <tr> 
            <td align="right">&nbsp; </td>
          </tr>
        <tr> 
          <td width=100% align=right height=18 ><a class=class href='<%=bigsmallclass_link%>'>[更多]</a></td>
        </tr>
        </table> </td>
      <td valign=middle width="34%">
        <%   
			sql_pic="select top 1 NewsID,Title,Content,UpdateTime,Image,BigClassName,SmallClassName,SpecialID  from News where  "&sql11&" and ("&office2&" ) "&bigclass_condition&smallclass_condition&" and send='1' and (image>0 and goodnews=1) order by hottop DESC,NewsID DESC"
		 %>
        <!--#include file=public/hotpicture1.asp -->
      </td>
      <td width="4" valign=top class="hottop">&nbsp; </td>
    </tr>
  </tbody>
  <%end if%>
</table>
<%end if
if font2_style="6" then %>
<table width="98%" border="0" align="center" cellspacing="1" cellpadding="0">
   <%if oskey_show="2" then   '没有权限,是屏,还是隐藏
		response.write hidetitle %>
   <%else%>
 <!--  <tr> 
    <td width="20%" height="9" bgcolor="<%=m_main%>" style="border-bottom:1pt solid #000000;font-size:12pt;bold;font-family:华文新魏"">发表时间</td>
    <td width="20%" bgcolor="<%=m_main%>" style="border-bottom:1pt solid #000000;font-size:12pt;bold;font-family:华文新魏"">单位</td> 
   <td width="14%" bgcolor="<%=m_main%>" style="border-bottom:1pt solid #000000;font-size:12pt;bold;font-family:华文新魏"">作者</td> 
    <td width="60%" bgcolor="<%=m_main%>" style="border-bottom:1pt solid #000000;font-size:12pt;bold;font-family:华文新魏"">文件名称</td> 
  <tr>  -->
    <tr align="center" height="2" style="border-top:1pt solid #000000"> 
    <td colspan="3" bgcolor="<%=m_main%>"></td>
  </tr>
<%
	set rs3=server.CreateObject("ADODB.RecordSet")
	rs3.Source="select top " & topclass_news & " pcs,bm,NewsID,Title,open_blank,UpdateTime,BigClassName,SmallClassName,SpecialID,original,author,image,click from News  where  "&sql11&" and ("&office2&" ) "&bigclass_condition&smallclass_condition&" and send='1' order by "&smallclass_order&"hottop DESC,NewsID DESC"
	rs3.Open rs3.Source,conn,1,1
	while not rs3.EOF
		  newsurl="ReadNews.asp?bm="& rs3("bm") &"&pcs="&rs3("pcs")&"&NewsID=" & rs3("NewsID") & "&BigClassName=" & rs3("BigClassName") & "&SmallClassName=" & rs3("SmallClassName") & "&SpecialID=" & rs3("SpecialId")
		  datetime="<font class=middle>(" & Month(rs3("UpdateTime"))  &"月"& Day(rs3("UpdateTime")) &"日)"
		 ' [<font color=#FF0000>" & rs3("click") &"</font>]</font>"
		 if rs3("image")=>1 then
			 img="<img src='images/img.gif' height='10' border='0'>"
			else
			  img=""
		end if

		 t3=split(images_bh,",")
		t4=split(images_mc,",")
	   for n=0 to ubound(t3)
		 if t4(n)="栏目底" then     
			images_show=t3(n)
			if len(trim(images_show))>3 then
			 images_show="<img src=../images/go/"&images_show&">"
		   else
			 images_show="<b>"&images_show&"</b>"
		   end if
		 end if 
	   next
   %>
  <tr> 
    <td height="4" bgcolor="<%=m_main%>" width="20%"><%=datetime%><%=img%></td>
    <td height="4" bgcolor="<%=m_main%>" width="20%">&nbsp;<%=rs3("original")%></td> 
   <!--  <td height="4" bgcolor="<%=m_main%>">&nbsp;<%=rs3("author")%></td>  -->
    <td height="4" bgcolor="<%=m_main%>" width="40%">&nbsp;
	<%if oskey_show="1" then%>
	<a onclick="javascript:alert('内部信息,仅对有权限者开放')">
	<%elseif oskey_show="0" then %>
		<a href="<%=newsurl%>" title="<%=rs3("title")%>" <%if rs3("open_blank")="1" then response.write "target='_blank'"%> class=middle > 
		<%if len(rs3("title"))>15 then%>
			 <%=left(rs3("title"),15)%>... 
		 <%else%>
			<%=rs3("title")%> 
		<%end if%>
      </a> 
	  <%end if%>
	 <%if year(rs3("updatetime"))=year(date()) and month(rs3("updatetime"))=month(date()) and day(rs3("updatetime"))=day(date()) then%>
      <img src="../images/new.gif" width="27" height="10"> 
      <%end if%>	  </td>
	  <tr>
     <%
     rs3.MoveNext
     wend
	 rs3.close
	 set rs3=nothing
    %>
<%end if%>
</table>
<%end if%>

⌨️ 快捷键说明

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