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

📄 default.asp

📁 就业信息服务网
💻 ASP
字号:
<%
IF session("KEY")="2" THEN
   response.redirect "../nopass.asp"
   response.end
END IF
%>
<!--#include file="../config.asp"-->
<!--#include file="DBconn.asp"-->
<link rel="stylesheet" type="text/css" href="../style.css">
<body bgcolor="#4473A5" marginheight=0 marginwidth=0 leftmargin=0>
<SCRIPT>
  function view(url){  
  var url;          window.open(url,'_blank','status=no,scrollbars=yes,top=20,left=110,width=600,height=460');  
  }
</SCRIPT>
<%
   DIM totalPut
   DIM CurrentPage
   DIM TotalPages
   DIM i,j
   if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
   if not isempty(request("selAnnounce")) then
     idlist=request("selAnnounce")
     if instr(idlist,",")>0 then
       dim idarr
       idArr=split(idlist)
       dim id
       for i = 0 to ubound(idarr)
         id=clng(idarr(i))
         call deleteannounce(id)
       next
     else
       call deleteannounce(clng(idlist))
     end if
   end if 
   dim rs
   dim sql
  sql ="select * from company order by ID 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'>对不起,没有您要查询的信息</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 
               showContent  totalput,MaxPerPage
               showpage totalput,MaxPerPage,"default.asp"
           else 
               if (currentPage-1)*MaxPerPage<totalPut then 
                     rs.move  (currentPage-1)*MaxPerPage 
                     dim bookmark 
                     bookmark=rs.bookmark 
                     showContent  totalput,MaxPerPage
                     showpage totalput,MaxPerPage,"default.asp"
                else 
                     currentPage=1 
                     showContent  totalput,MaxPerPage
                     showpage totalput,MaxPerPage,"default.asp"
               end if 
           end if 
           rs.close 
       end if 
       set rs=nothing
       sub showContent (totalput,MaxPerPage)
%>
<CENTER>
<font color="#FFFFFF">===单位用户管理===</font><BR>
<TABLE>
<CENTER>
<Form name="searchuser" method="POST" action="default.asp">
<TABLE border="0" cellspacing="1" width="600" cellpadding="4" bgcolor="efefef">
  <TBODY>
  <TR height=25 bgcolor="#235497"> 
    <TD width="109" align="left">
    <p align="center"><font color="#FFFFFF"><b>用户名</b></font></TD>
    <TD width="117" align="center"><font color="#FFFFFF"><b>密&nbsp;&nbsp; 码</b></TD>
    <TD width="135" align="center"><font color="#FFFFFF"><b>单位名称</b></TD>
    <TD width="168" align="center"><font color="#FFFFFF"><b>注册时间</b></font></TD>
    <TD width="146" align="center"><font color="#FFFFFF">联系电话</font></TD>
    <TD width="55" align="center"><input type='submit' value='删除'></TD>
  </TR>
<%do while not rs.eof%>
  <TR height="20" bgcolor="#ffffff"> 
    <TD width="109" align="center"><font face="Arial"><b><%=rs("uname")%></b></font></td>
    <TD width="127" align="center"><a href="mailto:<%=rs("email")%>"><%=rs("pwd")%></a></td>
    <TD width="145" align="center"><%=rs("cname")%></td>
    <TD width="168" align="center"><%=rs("idate")%></td>
    <TD width="146" align="center"><%=rs("rstel")%></td>
    <%if Session("KEY")="1" then%>
    <TD width="55" align="center"><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("ID"))%>'></td>
    <%else%>
    <TD width="55" align="center"><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("ID"))%>' Disabled></td>
    <%end if%> 
  </TR>
<% i=i+1
   if i>=MaxPerPage then exit do
   rs.movenext
   loop
%>
</TABLE>
</CENTER>
<%
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     
   if CurrentPage<2 then 
       response.write "<table border=0 width=600 cellspacing=0 cellpadding=0>" 
       response.write "<tr height=30>"
       response.write "<td align=left>"
       response.write "共<font color=#ff6600><b>"&n&"</b></font>页&nbsp;第<font color=#ff6600><b>"&CurrentPage&"</b></font>页&nbsp;共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条信息</td>" 
       response.write "<td align=right>"
       response.write "【最前页】【上一页】" 
   else 
       response.write "<table border=0 width=600 cellspacing=0 cellpadding=0>"
       response.write "<tr height=30>"
       response.write "<td align=left>"
       response.write "共<font color=#ff6600><b>"&n&"</b></font>页&nbsp;第<font color=#ff6600><b>"&CurrentPage&"</b></font>页&nbsp;共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条信息</td>"
       response.write "<td align=right>"
       response.write "【<a href="&filename&"?page=1&search="&tyeid&"&txtitle="&request("txtitle")&">最前页</a>】" 
       response.write "【<a href="&filename&"?page="&CurrentPage-1&"&search="&search&"&txtitle="&request("txtitle")&">上一页</a>】" 
   end if 
   if n-currentpage<1 then 
       response.write "【下一页】【最后页】" 
   else 
       response.write "【<a href="&filename&"?page="&(CurrentPage+1)&"&search="&search&"&txtitle="&request("txtitle")&">" 
       response.write "下一页</a>】【<a href="&filename&"?page="&n&"&search="&search&"&txtitle="&request("txtitle")&">最后页</a>】" 
   end if 
  response.write "</td>"
  response.write "</tr>"
  response.write "</table>"
  response.write "</form>"
end function
sub deleteannounce(id)
  dim rs,sql
  set rs=server.createobject("adodb.recordset")
  sql="delete from [company] where id="&cstr(id)
  conn.execute sql
   if err.Number<>0 then
     err.clear
     response.write "删 除 失 败 !<br>"
   end if
End sub
%>

⌨️ 快捷键说明

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