File size: 1,853 Bytes
02724dc
 
 
 
 
 
c2e6dc3
02724dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c2e6dc3
 
 
 
 
 
 
 
 
 
 
 
02724dc
c2e6dc3
 
02724dc
c2e6dc3
 
 
 
 
 
57e3685
c2e6dc3
 
 
 
57e3685
 
02724dc
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Contacts</title>
    <link href="https://cdn.datatables.net/1.10.25/css/jquery.dataTables.min.css" rel="stylesheet">
    <style>
      body {
        font-family: Arial, sans-serif;
        text-align: center;
        background-color: #f0f0f0;
        margin: 0;
        padding: 0;
      }
      h1 {
        background-color: #4CAF50;
        color: white;
        padding: 20px;
        margin: 0;
        border-bottom: 2px solid #388E3C;
      }
      #table {
        width: 70%;
        margin: 20px auto;
      }
      p {
        margin-top: 20px;
        font-size: 18px;
        color: #333;
      }
    </style>
  </head>
  <body>
    <h1>База синзронизации с Getcurse</h1>
    <p>Total users: <span id="total-users">{{ total_users }}</span></p>
    <table id="contactsTable" class="display" style="width:100%">
      <thead>
        <tr>
          <th>Имя</th>
          <th>Телефон</th>
          <th>Почта</th>
        </tr>
      </thead>
      <tbody>
        <!-- Данные будут загружены через AJAX -->
      </tbody>
    </table>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
    <script>
      $(document).ready(function() {
        $('#contactsTable').DataTable({
          ajax: {
            url: "https://dmtuit-gc-api-ras.hf.space/data_gc_tab_out?api_sys=fasSd345D",
            dataSrc: ''
          },
          columns: [
            { data: 'name' },
            { data: 'phone' },
            { data: 'email' }
          ]
        });
      });
    </script>
  </body>
</html>