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

📄 cen.asp

📁 一个简单的ASP和ACCESS连接的范例,实现简单的生日登记显示功能.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
 if topclass_news=0 then
	topclass_news=top_news
 end if
 bigsmallclass_link=""
 bigclass_condition=" and bigclassname='"&bigclassname&"' "
 if smallClassName="〖空〗" then 
	smallclass_condition=""
	smallclass_order=""
	bigsmallclass_link="bigclass.asp?pcs="&pcs&"&bigclassname="&bigclassname
 else
	smallclass_order=""
	smallclass_condition=" and smallclassname='"&smallclassname&"' "
	bigsmallclass_link="smallClass.asp?pcs="&pcs&"&bigclassname="&bigclassname&"&smallclassname="&smallclassname
 end if

 hidetitle=""   '"<tr><td bgcolor="""&m_main&""">此栏目信息处于隐藏状态</td></tr>"

 if font2_style="1" or font2_style="" then %>
   <table width="98%" border="0" align="center" cellspacing="1" cellpadding="0">
   <%if oskey_show="2" then   '没有权限,是屏,还是隐藏
		response.write hidetitle %>
   <%else%>
                <tr> 
                  <td 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,content,filetype,open_blank,UpdateTime,BigClassName,SmallClassName,SpecialID,image,click,dwoskey,hottop 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
					
					 if rs3.EOF then
                         rs3eof=1
	                   else
	                      rs3eof=0
                     end if
                     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")
                          filetype=rs3("filetype")
						  '-----------------------------
						  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                        
						 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" and session("qpcs")="") or (filetype="2") or (filetype="3") then response.write "target='_blank'"%> class=middle <%=font2_content%> ><%end if%>
					<%if index_style="2" then
						  if len(rs3("title"))>34 then%>
							<%=left(rs3("title"),33)%>... 
						<%else%>
							<%=rs3("title")%> 
						<%end if
					  else
						  if len(rs3("title"))>19 then%>
							<%=left(rs3("title"),18)%>... 
						<%else%>
							<%=rs3("title")%> 
						<%end if
					  end if 
					  %>
                    </a><%=datetime%><%=img%> 
                    <%if year(rs3("updatetime"))=year(date()) and month(rs3("updatetime"))=month(date()) and (day(date())-day(rs3("updatetime"))>=0 and day(date())-day(rs3("updatetime"))<newsimage )then%><img src="../images/new.gif" width="27" height="10"> 
                    <%end if%>
                  </td>
                </tr>
                <%
                  rs3.MoveNext
                  wend
				  rs3.close
				  set rs3=nothing
              %>
			  <%if rs3eof=1 then%>
	    	    <tr>
                 <td width="98%" height="18">暂无信息</td>
               </tr>
		      <%else%>
                <tr> 
                  <td width=100% align=right height=18  ><a class=class href='<%=bigsmallclass_link%>'>[更多]</a></td>
                </tr>
			<%end if%>
	<%end if%>
   </table>
<%end if
if font2_style="2" then %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <%if oskey_show="2" then   '没有权限,是屏,还是隐藏
		response.write hidetitle %>
 <%else%>
  <tr> 
    <td colspan="2">&nbsp;</td>
    <td width="91%">&nbsp;</td>
  </tr>
  <%   
    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"
     %>
  <tr> 
    <td width="1%">&nbsp; </td>
    <td width="8%">
      <!--#include file=public/hotpicture1.asp -->
    </td>
    <td valign="top"><table width="98%" border="0" align="center" cellspacing="1" cellpadding="0">
        <tr> 
          <td valign="top" bgcolor="<%=m_main1%>"> 
            <%     
		 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,filetype,content,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")
                        
					         filetype=rs3("filetype")						   
						   
						   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%><%=datetime%>&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"))>12 then%>
					<%=left(rs3("title"),11)%>..
				<%else%>
					<%=rs3("title")%>
				<%end if%>
			<%end if%>
				<%=img%>
            </a></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>
  </tr>
  <tr> 
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
 <%end if%>
</table>
<%end if
if font2_style="3" then %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <%if oskey_show="2" then   '没有权限,是屏,还是隐藏
		response.write hidetitle %>
   <%else%>
<tr> 
    <td width="65%">&nbsp;</td>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr> 
    <td><table width="98%" border="0" align="center" cellspacing="1" cellpadding="0">
        <tr> 

⌨️ 快捷键说明

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