home.asp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!--#include file="Conn.asp"--><%Checklogin()%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>管理区域</title>
  7. <link rel="stylesheet" href="css/common.css" type="text/css" />
  8. <link rel="stylesheet" href="css/alert.css" type="text/css" />
  9. <script language="javascript" src="system/js/jquery-1.7.2.min.js"></script>
  10. <script type="text/javascript" src="js/js.js"></script>
  11. </head>
  12. <body class="clear">
  13. <!--#include file="panel.asp"-->
  14. <div id="man_zone">
  15. <div class="searchForm homeSearch">
  16. <form method="post" action="/searchResult.asp" accept-charset="UTF-8">
  17. <input class="keywords " id="keyword" name="keywords" placeholder="请输入联系人 / 电话 / 邮箱 / 微信 / WhatsApp.." >
  18. <input class="searchSubmit" type="submit" value="客户检索">
  19. </form>
  20. </div>
  21. </div>
  22. <%
  23. Set Rs=Server.CreateObject("ADODB.RecordSet")
  24. sqlstr="select cs_code,em_user,cs_claimdate from customer left join employee on customer.cs_belong=employee.id where customer.id in(select cs_id from claimRecord where isread=0 and originalEmp='"&Session("employee_name")&"')"
  25. Rs.open sqlstr,conn,1,1
  26. If Not Rs.bof and Not Rs.eof Then
  27. %>
  28. <div class="modal" id="modal">
  29. <div class="modal-wraper">
  30. <div class="modal-content">
  31. <div class="popup-title">距离上次登录之后,以下客户已经被认领</div>
  32. <div class="popup-content">
  33. <ul>
  34. <% For i=1 to Rs.Recordcount %>
  35. <li><span class="prominent"><%=TextUncode(Rs("cs_code"))%></span> 被 <span class="prominent"><%=TextUncode(Rs("em_user"))%></span> 于 <span><%=TextUncode(Rs("cs_claimdate"))%></span> 认领</li>
  36. <%
  37. Rs.moveNext
  38. Next
  39. %>
  40. </ul>
  41. </div>
  42. <div class="close" onclick="closePopup()">已读</div>
  43. </div>
  44. </div>
  45. </div>
  46. <%
  47. End If
  48. Rs.close
  49. conn.execute("update claimRecord set isread=1 where originalEmp='"&Session("employee_name")&"' and isread=0")
  50. Set Rs=Nothing
  51. %>
  52. <script>
  53. // 检查是否首次登陆或是否过期
  54. const em = localStorage.getItem('em');
  55. const currentTime = new Date().getTime();
  56. const expirationTime = 24 * 60 * 60 * 1000; // 24小时的有效时间
  57. console.log(em);
  58. if (!em || em!=='em<%=Session("employee_id")%>' ) {
  59. // 如果是首次登陆或已过期,显示弹窗
  60. $("#modal").addClass("active");
  61. setTimeout(function() {
  62. $("#modal").find(".modal-content").addClass("active");
  63. }, 0);
  64. // 存储当前时间戳
  65. localStorage.setItem('em', 'em<%=Session("employee_id")%>');
  66. }
  67. // 关闭弹窗的函数
  68. function closePopup() {
  69. $("#modal").removeClass("active");
  70. }
  71. </script>
  72. </body>
  73. </html>