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

📄 index.asp

📁 红金羚v1.5办公自动化软件是基于大型数据库系统开发的应用系统
💻 ASP
字号:
<%
'session.abandon
'Server.ScriptTimeOut=500
function opendb(DBPath,sessionname,dbsort)
dim conn
'if not isobject(session(sessionname)) then
Set conn=Server.CreateObject("ADODB.Connection")
'if dbsort="accessdsn" then conn.Open "DSN=" & DBPath
'if dbsort="access" then conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath 
'if dbsort="sqlserver" then conn.Open "DSN=" & DBPath & ";uid=wsw;pwd=wsw"
DBPath1=server.mappath("../db/lmtof.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
set session(sessionname)=conn
'end if
set opendb=session(sessionname)
end function
%>
<%
'-----------------------------------------
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then 
	response.write("<script language=""javascript"">")
	response.write("window.top.location.href='../default.asp';")
	response.write("</script>")
	response.end
end if
%>
<!--#include file="dbpath/dbpath.asp"-->
<%
   const MaxPerPage=20
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   dim typename
   
   typename=" 常用网址 "
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=typename%></title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script language="javascript">
function popwin2(id,path)
{		window.open("openarticle.asp?id="+id+"&ppath="+path,"","height=450,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<%
   if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
   dim sql
   dim rs
   dim rstype
   dim typesql
   dim typeid,typename1
   if not isEmpty(request("typeid")) then
	typeid=request("typeid")
   else
	typeid=1
   end if
 set rstype=server.createobject("adodb.recordset")
  typesql="select * from linktype where typeID="&cstr(typeid)
  rstype.open typesql,conn,1,1
  typename1=rstype("type")
  rstype.close
%>

<body>
<div align="center"><center>
  </center></div><div align="center"><center>

<table border="0" width="92%" cellspacing="0" cellpadding="0">
  <tr>
        <td width="100%" bgcolor="#FFFFFF" >
<p align="center"><br>
            <%=typename%>&gt;&gt;<font color="#7C96B8"><%response.write ""&typename1&""%></font><br>
<center>
<%
dim rst,tsql
dim k
Set rst= Server.CreateObject("ADODB.Recordset")
tsql="select * from linktype order by typeid"
rst.open tsql,conn,1,1
 if rst.EOF then
	response.write "没有类别!"
	else
%>
|<%
k=1
do while NOT rst.EOF
   if k>8 then
     k=1 
%>
<br>
              | 
              <% end if%>
              <a href="index.asp?typeid=<%=rst("typeid")%>"><%=rst("type")%></a>| 
              <%
    k=k+1
	rst.MoveNext
	loop
	end if
rst.close
%>
            </center>
    <div align="center">
<%
sql="select * from yqlink where webname like '%"&request("txtitle")&"%' and typeid="+cstr(typeid)+" order by articleid desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
  if rs.eof and rs.bof then
       response.write "<p align='center'>[<a href='addarticle.asp?typeid="&typeid&"'>加入新网址</font></a>]"
       response.write "<p align='center'>没有或没有找到任何链接!</p>"
   else
	  totalPut=rs.recordcount
        if currentpage<1 then
          currentpage=1
      end if
      if (currentpage-1)*MaxPerPage>totalput then
	   if (totalPut mod MaxPerPage)=0 then
	     currentpage= totalPut \ MaxPerPage
	   else
	      currentpage= totalPut \ MaxPerPage + 1
	   end if

      end if
       if currentPage=1 then
           showpage totalput,MaxPerPage,"index.asp"
            showContent
            showpage totalput,MaxPerPage,"index.asp"
       else
          if (currentPage-1)*MaxPerPage<totalPut then
            rs.move  (currentPage-1)*MaxPerPage
            dim bookmark
            bookmark=rs.bookmark
           showpage totalput,MaxPerPage,"index.asp"
            showContent
             showpage totalput,MaxPerPage,"index.asp"
        else
	        currentPage=1
           showpage totalput,MaxPerPage,"index.asp"
           showContent
           showpage totalput,MaxPerPage,"index.asp"
	      end if
	   end if
   rs.close
   end if
	        
   set rs=nothing
  
   sub showContent
       dim i
       dim logo
	   i=0
%>
      <div align="center"><center>
                <table border="1" cellspacing="3" width="750" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0">
                  <tr bgcolor="#CCCCCC"> 
                    <td width="150" height="20" align="center"><strong>站名</strong></td>
                    <td width="100" height="20" align="center"><b>图标</b></td>
                    <td width="100" height="20" align="center"><b>站长</b></td>
                    <td width="250" align="center"><strong>网站简介</strong></td>
                    <td width="100" align="center"><strong>加入日期</strong></td>
                    <td width="50" align="center"><strong>点击</strong></td>
                  </tr>
                  <%do while not rs.eof%> 
                  <tr bgcolor="#FFFFFF"> 
                    <td height="35"> 
                      <div align="center"><a href="<%=rs("homepage")%>" target="_blank"><%=rs("webname")%></a></div> 
                    </td>
                  <% if rs("homelogo")="" then
                        logo="images/nologo.gif"
                     elseif rs("homelogo")="http://" then
                        logo="images/nologo.gif"
                     else
                        logo=rs("homelogo")
                     end if %>
                    <td height="35" valign="middle" align="center"> 
                      <div align="center"><img src="<%=logo%>" width="88" height="31"></div>
                    </td>
                    <td height="35"> 
                      <div align="center"><a href=mailto:<%=rs("email")%>><%=rs("name")%></a></div>
                    </td>
                    <td height="35"> &nbsp;&nbsp;<a href="javascript:popwin2(<%=rs("articleid")%>)"><%=rs("title")%></a> 
                    </td>
                    <td height="35"> 
                      <p align="center"><font color="#0000ff"><%=rs("dateandtime")%></font> 
                    </td>
                    <td height="35"> 
                      <p align="center"><%=rs("hits")%> 
                    </td>
                  </tr>
                  <% i=i+1
	      if i>=MaxPerPage then exit do
	      rs.movenext
	   loop
		  %> 
                </table>
      </center></div>
            <%
   end sub 

function showpage(totalnumber,maxperpage,filename)
  dim n
  if totalnumber mod maxperpage=0 then
     n= totalnumber \ maxperpage
  else
     n= totalnumber \ maxperpage+1
  end if
  response.write "<form method=Post action="&filename&"?typeid="&typeid&">"
  response.write "<p align='center'>[<a href='addarticle.asp?typeid="&typeid&"'>加入新网址</font></a>]"
  if CurrentPage<>1 then
    response.write "<a href="&filename&"?page=1&typeid="&typeid&">首页</a>&nbsp;"
    response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&typeid&">上一页</a>&nbsp;"
  end if
  if currentpage<>n then
    response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&typeid&">"
    response.write "下一页</a> <a href="&filename&"?page="&n&"&typeid="&typeid&">尾页</a>"
  end if
   response.write "&nbsp;页次:<font color=red>"&CurrentPage&"</font>/"&n&"页 "
    response.write "&nbsp;共"&totalnumber&"个网站 "&maxperpage&"个/页 "
   response.write " 转到:<select name='page' size=1 class=smallselsect style='BACKGROUND-COLOR:#7C96B8;'>"
 for i=1 to n
   response.write "<option value="& i 
   if currentpage=i then 
     response.write " selected"
   end if
   response.write ">"& i &"</option>"
 next
  response.write "</select>"
   response.write "&nbsp;<input class=buttonface type='submit'  value='确 定'  name='cndok' style='BACKGROUND-COLOR:#CCCCCC;font-family: 宋体; font-size: 9pt;'></span></p></form>"     
end function
%>
<form name="searchtitle" method="POST" action="index.asp">
              网站搜索: 
              <input class="smallInput" type="text" name="txtitle" size="13" style="BACKGROUND-COLOR:#FFFFFF;font-family: 宋体; font-size: 9pt">
              <select class="smallSel" name="typeid" size="1" style="BACKGROUND-COLOR:#FFFFFF;font-family: 宋体; font-size: 9pt">
                <%
  typesql="select * from linktype"
 rstype.open typesql,conn,1,1
			  do while not rstype.eof
                                sel="selected"    
		             response.write "<option " & sel & " value='"+CStr(rstype("typeID"))+"' name=typeid>"+rstype("type")+"</option>"+chr(13)+chr(10)
		             rstype.movenext
    		          loop
			rstype.close
set conn=nothing
%> 
              </select>
              <input class="buttonface" type="submit" value="查 询" name="title" style="BACKGROUND-COLOR:#CCCCCC;font-family: 宋体; font-size: 9pt;">
              <p> &nbsp;[<a href="top10.asp" title="电击人数排在前10名的网站">前10名网站</a>][<a href="Login.asp" title="自动链接系统的管理员登陆维护界面" >管理员登陆</a>] 
              </p>
            </form>
            
          </div>
        </td>
  </tr>
</table>
</center></div>
</body>
</html>

⌨️ 快捷键说明

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