useradm.asp
Upload User: jinglin
Upload Date: 2021-12-20
Package Size: 545k
Code Size: 10k
Development Platform:

VBScript

  1. <!--#include file="dbconn.asp"-->
  2. <% if session("ifadm")="" then
  3.    response.redirect "admlogin.asp"
  4.    end if
  5. %>   
  6. <html>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  9. <title>海脉管理员工作室</title>
  10. <link rel="stylesheet" type="text/css" href="../style.css">
  11. <script language="javascript">
  12. <!--
  13. function openwin1(id)
  14. {
  15. window.open("moreinfo.asp?eventid="+id,"info","width=550,height=470,resizable=no,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no,left=15,top=20");
  16. }
  17. function openwin3(id)
  18. {
  19. window.open("feedback.asp?eventid="+id,"view","width=700,height=470,resizable=no,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no,left=15,top=20");
  20. }
  21. function poppub(url){
  22. window.open(url,"pub","width=650,height=470,resizable=no,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no,left=0,top=0");
  23. }
  24. //-->
  25. </script>
  26. </head>
  27. <%
  28.    response.buffer=true
  29.    const MaxPerPage=25
  30.    dim totalPut   
  31.    dim CurrentPage
  32.    dim TotalPages
  33.    dim i,j
  34.    if not isempty(request("page")) then
  35.       currentPage=cint(request("page"))
  36.    else
  37.       currentPage=1
  38.    end if
  39.    
  40. %>
  41. <body leftmargin=0 topmargin=3>
  42. <center><big><b>海脉管理员工作室</b></big></center><br>
  43. <%
  44. dim sql,rsnum,rs
  45. sql="select num=count(*) from userinfo where porc=1"
  46. Set rsnum= Server.CreateObject("ADODB.Recordset")
  47. rsnum.open sql,conn,1,1
  48. sql="select * from userinfo where porc=1 order by loginname"
  49. Set rs= Server.CreateObject("ADODB.Recordset")
  50. rs.open sql,conn,1,1
  51.   if rs.eof and rs.bof then
  52.  
  53.        response.write "<p align='center'>   还 没 有 任 何 活 动 信 息</p>"
  54.    
  55.    else
  56.  
  57.       totalPut=rs.recordcount
  58.       if currentpage<1 then
  59.           currentpage=1
  60.       end if
  61.       if (currentpage-1)*MaxPerPage>totalput then
  62.    if (totalPut mod MaxPerPage)=0 then
  63.      currentpage= totalPut  MaxPerPage
  64.    else
  65.       currentpage= totalPut  MaxPerPage + 1
  66.    end if
  67.       end if
  68.                if currentPage=1 then
  69.                     showpages
  70.                     showContent
  71. showpages
  72.            else
  73.          if (currentPage-1)*MaxPerPage<totalPut then
  74.             rs.move  (currentPage-1)*MaxPerPage
  75.             dim bookmark
  76.             bookmark=rs.bookmark
  77.                     showpages
  78.                     showContent
  79. showpages
  80.                   else
  81.         currentPage=1
  82.                    showpages
  83.                     showContent
  84.                    showpages
  85.       end if
  86.    end if
  87.    rs.close
  88.    end if
  89.         
  90.    set rs=nothing  
  91.    conn.close
  92.    set conn=nothing
  93.   
  94.    sub showContent
  95.        dim i
  96.    i=0
  97.   
  98. %>
  99. <div align="center"><center>
  100. <table width=260%>
  101. <tr>
  102. <td align=right>共有<font color=red><%=rsnum("num")%></font>个个人注册用户 </td>
  103. </tr>
  104. </table>
  105. <table border="1" cellspacing="0" width=260% bgcolor="#F0F8FF" bordercolorlight="#4DA6FF"
  106. bordercolordark="#ECF5FF">
  107.   <tr bgcolor="#0080C0">
  108.    <td  align="center"><font color="#ffffff">修改</font></td>
  109.    <td  align="center"><font color="#ffffff">删除</font></td>
  110.   <td  align="center"><font color="#ffffff">ID</font></td>
  111.     <td  align="center"><font color="#ffffff">登录名</font> </td>
  112.     <td  align="center"><font color="#ffffff">密码</font></td>
  113.     <td  align="center"><font color="#ffffff">姓名</font></td>
  114.     <td  align="center"><font color="#ffffff">年龄</strong></td>
  115. <td  align="center"><font color="#ffffff">性别</font></td>
  116.  <td  align="center"><font color="#ffffff">学历</font></td>
  117.  <td  align="center"><font color="#ffffff">职务</font></td>
  118.  <td  align="center"><font color="#ffffff">月薪</font></td>
  119.   <td  align="center"><font color="#ffffff">公司名称</font></td>
  120.  <td  align="center"><font color="#ffffff">公司类型</font></td>
  121.  <td  align="center"><font color="#ffffff">从事领域</font></td>
  122.  <td  align="center"><font color="#ffffff">公司规模</font></td>
  123.   <td  align="center"><font color="#ffffff">所在地</font></td>
  124.  <td  align="center"><font color="#ffffff">详细地址</font></td>
  125.  <td  align="center"><font color="#ffffff">邮编</font></td>
  126.  <td  align="center"><font color="#ffffff">电话</font></td>
  127.  <td  align="center"><font color="#ffffff">传真</font></td>
  128.  <td  align="center"><font color="#ffffff">email</font></td>
  129.   <td  align="center"><font color="#ffffff">公司主营</font></td>
  130.    <td  align="center"><font color="#ffffff">备注</font></td>
  131.    <td  align="center"><font color="#ffffff">修改</font></td>
  132.    <td  align="center"><font color="#ffffff">删除</font></td>
  133. </tr>
  134. <%do while not rs.eof
  135. dim vcompanytype,vcompanyfield,vcompanysize,vage,vedu,vtitle,vsex
  136. select case rs("companytype")
  137.   case 1 
  138.     vcompanytype="国家机关"
  139.   case 2 
  140.     vcompanytype="国企"
  141.   case 3 
  142.     vcompanytype="外企"
  143.   case 4 
  144.     vcompanytype="中外合资"
  145.   case 5 
  146.     vcompanytype="私营企业"
  147.  
  148. end select  
  149. select case rs("companyfield")
  150.   case 1 
  151.     vcompanyfield="金融"
  152.   case 2 
  153.     vcompanyfield="电信"
  154.   case 3 
  155.     vcompanyfield="机械"
  156.   case 4 
  157.     vcompanyfield="交通"
  158.   case 5 
  159.     vcompanyfield="计算机"
  160.   case 6 
  161.     vcompanyfield="服务业"
  162.   case 7
  163.     vcompanyfield="流通业"
  164.   case 8 
  165.     vcompanyfield="政府部门"
  166.   case 9 
  167.     vcompanyfield="其它"    
  168. end select  
  169. select case rs("companysize")
  170.   case 0
  171.     vcompanysize="少于10人"
  172.   case 1 
  173.     vcompanysize="10-99人"
  174.   case 2 
  175.     vcompanysize="100-499人"
  176.   case 3 
  177.     vcompanysize="500-999人"
  178.   case 4 
  179.     vcompanysize="1000-9999人"
  180.   case 5 
  181.     vcompanysize="10000人以上"
  182.   
  183. end select  
  184. select case rs("age")
  185.   case 1 
  186.     vage="20岁以下"
  187.   case 2 
  188.     vage="20-24岁"
  189.   case 3 
  190.     vage="25-29岁"
  191.   case 4 
  192.     vage="30-34岁"
  193.   case 5 
  194.     vage="35-39岁"
  195.   case 6 
  196.     vage="40-44岁"
  197.   case 7
  198.     vage="44-49岁"
  199.   case 8 
  200.     vage="50岁以上"
  201.     
  202. end select  
  203. select case rs("edu")
  204.   case 1 
  205.     vedu="大专以下"
  206.   case 2 
  207.     vedu="大专"
  208.   case 3 
  209.     vedu="大学本科"
  210.   case 4 
  211.     vedu="研究生"
  212.   case 5 
  213.     vedu="博士以上"
  214.   case 6 
  215.     vedu="留学国外"
  216.   case 7
  217.     vedu="其它"
  218. end select  
  219. select case rs("title")
  220.   case 1 
  221.     vtitle="企业经理"
  222.   case 2 
  223.     vtitle="高级管理人员"
  224.   case 3 
  225.     vtitle="部门主管"
  226.   case 4 
  227.     vtitle="技术主管"
  228.   case 5 
  229.     vtitle="一般员工"
  230.   case 6 
  231.     vtitle="公务员"
  232.   case 7
  233.     vtitle="讲师教授"
  234.   case 8 
  235.     vtitle="其它"
  236.   
  237. end select  
  238. select case rs("salary")
  239.   case 1 
  240.     vsalary="1000元以下"
  241.   case 2 
  242.     vsalary="1000-3000元"
  243.   case 3 
  244.     vsalary="3000-5000元"
  245.   case 4 
  246.     vsalary="5000-8000元"
  247.   case 5 
  248.     vsalary="8000-15000元"
  249.   case 6 
  250.     vsalary="15000元以上"
  251.  
  252. end select 
  253. if rs("sex")="True" then
  254.  vsex="女"
  255. else
  256.  vsex="男"
  257. end if 
  258. %>
  259.   <tr>
  260.    <td  align="center">
  261.     <a href="useredit.asp?userid=<%=rs("userid")%>&page=<%=currentpage%>">修改</a></td>
  262.     <td  align="center">
  263.     <a href="userdelete.asp?userid=<%=rs("userid")%>&page=<%=currentpage%>">删除</a></td> 
  264.     <td ><p align="center"><%=rs("userid")%> &nbsp</td>
  265.     <td ><p align="center"><%=rs("loginname")%>&nbsp </td>
  266.     <td ><p align="center"><%=rs("pw") %>&nbsp </td>
  267.     <td ><p align="center"><%=rs("name") %>&nbsp </td>
  268.     <td ><p align="center"><%=vage %> &nbsp</td>
  269.     <td ><p align="center"><%=vsex %>&nbsp </td>
  270.     <td ><p align="center"><%=vedu %>&nbsp </td>
  271.     <td ><p align="center"><%=vtitle %>&nbsp </td>
  272.     <td ><p align="center"><%=vsalary %>&nbsp </td>
  273.     <td ><p align="center"><%=rs("companyname") %> &nbsp</td>
  274.     <td ><p align="center"><%=vcompanytype %> &nbsp</td>
  275.     <td ><p align="center"><%=vcompanyfield %> &nbsp</td>
  276.     <td ><p align="center"><%=vcompanysize %>&nbsp </td>
  277.     <td ><p align="center"><%=rs("city") %> &nbsp</td>
  278.     <td ><p align="center"><%=rs("address") %>&nbsp </td>
  279.     <td ><p align="center"><%=rs("zip")%>&nbsp </td>
  280.     <td ><p align="center"><%=rs("tel")%> &nbsp</td>
  281.     <td ><p align="center"><%=rs("fax")%>&nbsp </td>
  282.     <td ><p align="center"><%=rs("email")%> &nbsp</td>
  283.     <td ><p align="center"><%=rs("project")%> &nbsp</td>
  284.     <td ><p align="center"><%=rs("remark")%>&nbsp </td>
  285.     <td  align="center">
  286.     <a href="useredit.asp?userid=<%=rs("userid")%>&page=<%=currentpage%>">修改</a></td>
  287.     <td  align="center">
  288.     <a href="userdelete.asp?userid=<%=rs("userid")%>&page=<%=currentpage%>">删除</a></td>  
  289.   </tr>
  290. <% i=i+1
  291.       if i>=MaxPerPage then exit do
  292.       rs.movenext
  293.    loop
  294.   %>
  295.   </table>
  296. </center></div>
  297. <%
  298.    end sub 
  299.    sub showpages()
  300.           dim n
  301.    if (totalPut mod MaxPerPage)=0 then
  302.       n= totalPut  MaxPerPage
  303.    else
  304.       n= totalPut  MaxPerPage + 1
  305.    end if
  306.    if n=1 then 
  307.      
  308.         exit sub
  309.        end if
  310.    dim k
  311.    response.write "<p align='left'> 分页: "
  312.    for k=1 to n
  313.        if k=currentPage then
  314.           response.write "[<b>"+Cstr(k)+"</b>] "
  315.    else
  316.     response.write "[<b>"+"<a href='useradm.asp?page="+Cstr(k)+"'>"+Cstr(k)+"</a></b>] "
  317.    end if
  318.    next
  319.      
  320.    end sub
  321. %>
  322. <p align="center"><br>     
  323. </p>     
  324. <div align="center"><center>     
  325.      
  326. <table border="0" width="70%" cellspacing="2" cellpadding="0">     
  327.   <tr>     
  328.     <td bgcolor="#ffffff" width="100%" height="60" align="center" valign="buttom">北京海脉互联网技术有限公司<br>     
  329.     Copyright &copy; 1999-2000 Hermes Corporation,All Rights Reserved<br>              
  330.     <hr noshade width="400" color="#000000">              
  331.     <p>联系电话:(010)66056839 66056239 FAX:(010)66056214
  332. <br>              
  333.     E-mail:<a href="mailto:suggest@hermes.com.cn">suggest@hermes.com.cn</a><br>              
  334.     </td>              
  335.   </tr>              
  336. </table>              
  337. </center></div>  
  338. </body>
  339. </html>