forked from catch-design/php-js-dev-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
173 lines (157 loc) · 5.34 KB
/
index.php
File metadata and controls
173 lines (157 loc) · 5.34 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?php
define('PAGE_ID', 'index');
require_once('core/require.php');
?><!DOCTYPE html>
<html lang="en">
<head>
<title>Users</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.min.css">
</head>
<body>
<div id="loader">
<h5>Loading...</h5>
</div>
<header>
<div class="navbar navbar-dark bg-dark">
<div class="container d-flex justify-content-between">
<a href="#" class="navbar-brand">Users</a>
</div>
</div>
</header>
<main role="main">
<section class="jumbotron text-center">
<div class="container">
<h1 class="jumbotron-heading">Admin / Users</h1>
<p class="lead text-muted">Below is a list of all registered users.</p>
</div>
</section>
<div id="content" class="container">
<table class="table table-striped" id="users">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Gender</th>
<th scope="col"> </th>
</tr>
</thead>
<script type="text/template7" id="usersListTmpl">
<tbody id="usersList">
{{#each users}}
<tr data-user="{{id}}">
<th scope="row">{{id}}</th>
<td>{{first_name}}</td>
<td>{{last_name}}</td>
<td>{{gender}}</td>
<td class="text-right">
<button type="button" class="btn btn-link" data-action="info">Info</button>
</td>
</tr>
{{/each}}
</tbody>
</script>
</table>
<div class="card card-default" id="load">
<div class="card-body text-center">
<button class="btn btn-lg btn-secondary">Load users...</button>
</div>
</div>
<div id="usersPagination">
<select class="form-control"></select>
</div>
</div>
</main>
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" id="userInfoModal">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="mySmallModalLabel">Info</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="modal-load">
Loading...
</div>
<div id="userInfo">
<script type="text/template7" id="userInfoTmpl">
<div>
<strong>First name:</strong>
<p>{{first_name}}</p>
<strong>Last name:</strong>
<p>{{last_name}}</p>
<strong>Email:</strong>
<p>
{{#if email}}
<a href="mailto:{{email}}">{{email}}</a>
{{else}}
<em>No email</em>
{{/if}}
</p>
<strong>Gender:</strong>
<p>
{{#if gender}}
{{gender}}
{{else}}
<em>No gender</em>
{{/if}}
</p>
<strong>IP Address:</strong>
<p>
{{#if ip_address}}
{{ip_address}}
{{else}}
<em>No ip_address</em>
{{/if}}
</p>
<strong>Company:</strong>
<p>
{{#if company}}
{{company}}
{{else}}
<em>No company</em>
{{/if}}
</p>
<strong>City:</strong>
<p>
{{#if city}}
{{city}}
{{else}}
<em>No city</em>
{{/if}}
</p>
<strong>Title:</strong>
<p>
{{#if title}}
{{title}}
{{else}}
<em>No title</em>
{{/if}}
</p>
<strong>Website:</strong>
<p>
{{#if website}}
<a href="{{website}}" target="_blank">View website</a>
{{else}}
<em>No website</em>
{{/if}}
</p>
</div>
</script>
</div>
</div>
</div>
</div>
</div>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/popper.js/dist/umd/popper.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="node_modules/template7/dist/template7.min.js"></script>
<script src="js/script.min.js"></script>
</body>
</html>