-
Notifications
You must be signed in to change notification settings - Fork 1
/
customersslist.php
167 lines (136 loc) · 5.9 KB
/
customersslist.php
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
<?php
date_default_timezone_set("Asia/Karachi");
SESSION_START();
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 600)) { // 30mins
session_unset();
session_destroy();
}
$_SESSION['LAST_ACTIVITY'] = time();
if($_SESSION["login"]==true){
}
else{
echo "<script> window.location.assign('index.php')</script>";
}
include 'include/conn.php';
?>
<!doctype html>
<html class="fixed">
<head>
<!-- Basic -->
<meta charset="UTF-8">
<title>H2O Customers List</title>
<meta name="keywords" content="HTML5 Admin Template" />
<meta name="description" content="Porto Admin - Responsive HTML5 Template">
<meta name="author" content="okler.net">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- Web Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">
<!-- Vendor CSS -->
<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="assets/vendor/magnific-popup/magnific-popup.css" />
<link rel="stylesheet" href="assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
<!-- Specific Page Vendor CSS -->
<link rel="stylesheet" href="assets/vendor/select2/select2.css" />
<link rel="stylesheet" href="assets/vendor/jquery-datatables-bs3/assets/css/datatables.css" />
<!-- Theme CSS -->
<link rel="stylesheet" href="assets/stylesheets/theme.css" />
<!-- Skin CSS -->
<link rel="stylesheet" href="assets/stylesheets/skins/default.css" />
<!-- Theme Custom CSS -->
<link rel="stylesheet" href="assets/stylesheets/theme-custom.css">
<!-- Head Libs -->
<script src="assets/vendor/modernizr/modernizr.js"></script>
</head>
<body>
<section class="body">
<?php include('include/header.php')?>
<?php include('include/sidebar.php')?>
<section role="main" class="content-body">
<header class="page-header">
<h2>Customers/Packages List</h2>
</header>
<section class="panel">
<div class="panel-body">
<table class="table table-bordered table-striped mb-none" id="datatable-tabletools" data-swf-path="assets/vendor/jquery-datatables/extras/TableTools/swf/copy_csv_xls_pdf.swf">
<thead>
<tr>
<th>No.</th>
<th>Id</th>
<th>Full Name</th>
<th>QID</th>
<th>Mobile</th>
<th>Nationality</th>
<th>Adress</th>
<th>Email</th>
<th>Location</th>
<th>Start</th>
<th>End</th>
<th>Package</th>
<th>Employee</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
include 'include/conn.php';
$sql='SELECT `c_id`, `c_name`, `qid`, `mobile`, `nationality`, `adress`, `c_email`, `start`, `end`, `location`, `date`, `employee_id`, `package_id`, `name` FROM `customers`, employees WHERE customers.employee_id=employees.id';
$result = mysqli_query($conn, $sql);
$counter = 1;
while($row=mysqli_fetch_assoc($result))
{
$t_Id = $row['id'];
echo "<tr class='gradeX'>";
echo " <td>".$counter."</td>";
echo " <td>".$row['c_id']."</td>";
echo " <td>".$row['c_name']."</td>";
echo " <td>".$row['qid']."</td>";
echo " <td>".$row['mobile']."</td>";
echo " <td>".$row['nationality']."</td>";
echo " <td>".$row['adress']."</td>";
echo " <td>".$row['c_email']."</td>";
echo " <td>".$row['location']."</td>";
echo " <td>".$row['start']."</td>";
echo " <td>".$row['end']."</td>";
echo " <td>".$row['package_id']."</td>";
echo " <td>".$row['name']."</td>";
echo " <td> <a href='edit_employee.php?id=".$row['id']."'class='btn btn-primary'>Edit</a></td>";
echo " <td><a href='del_employee.php?id=".$t_Id."' class='btn btn-primary'>Delete</a></td>";
echo "</tr>";
$counter++;
}
?>
</tbody>
</table>
</div>
</section>
</section>
</div>
</section>
<!-- Vendor -->
<script src="assets/vendor/jquery/jquery.js"></script>
<script src="assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.js"></script>
<script src="assets/vendor/nanoscroller/nanoscroller.js"></script>
<script src="assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="assets/vendor/magnific-popup/magnific-popup.js"></script>
<script src="assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
<!-- Specific Page Vendor -->
<script src="assets/vendor/select2/select2.js"></script>
<script src="assets/vendor/jquery-datatables/media/js/jquery.dataTables.js"></script>
<script src="assets/vendor/jquery-datatables/extras/TableTools/js/dataTables.tableTools.min.js"></script>
<script src="assets/vendor/jquery-datatables-bs3/assets/js/datatables.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="assets/javascripts/theme.js"></script>
<!-- Theme Custom -->
<script src="assets/javascripts/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="assets/javascripts/theme.init.js"></script>
<!-- Examples -->
<script src="assets/javascripts/tables/examples.datatables.default.js"></script>
<script src="assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
<script src="assets/javascripts/tables/examples.datatables.tabletools.js"></script>
</body>
</html>