-
Notifications
You must be signed in to change notification settings - Fork 1
/
f_query.php
217 lines (190 loc) · 9.7 KB
/
f_query.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?php
include './include/check_login.php';
include './include/connection.php';
include_once 'include/admin-main.php';
include('access_control.php');
$from_date = isset($_POST['from_date']) ? $_POST['from_date'] : '';
$to_date = isset($_POST['to_date']) ? $_POST['to_date'] : '';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php include('include/title.php');?> Football Contact Query</title>
<link rel="icon" type="image/x-icon" href="assets/images/favicon.png">
<!-- Global stylesheets -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="assets/css/core.css" rel="stylesheet" type="text/css">
<link href="assets/css/components.css" rel="stylesheet" type="text/css">
<link href="assets/css/colors.css" rel="stylesheet" type="text/css">
<!-- /global stylesheets -->
<!-- Core JS files -->
<script type="text/javascript" src="assets/js/plugins/loaders/pace.min.js"></script>
<script type="text/javascript" src="assets/js/core/libraries/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/core/libraries/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/loaders/blockui.min.js"></script>
<!-- /core JS files -->
<!-- Theme JS files -->
<script type="text/javascript" src="assets/js/plugins/tables/datatables/datatables.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/selects/select2.min.js"></script>
<script type="text/javascript" src="assets/js/core/app.js"></script>
<script type="text/javascript" src="assets/js/pages/datatables_sorting.js"></script>
<!-- /theme JS files -->
</head>
<body>
<!-- Main navbar -->
<?php include('include/top.php'); ?>
<!-- /main navbar -->
<!-- Page container -->
<div class="page-container">
<!-- Page content -->
<div class="page-content">
<!-- Main sidebar -->
<?php include('include/left_menu.php'); ?>
<!-- Main content -->
<div class="content-wrapper">
<!-- Page header -->
<div class="page-header page-header-default">
<div class="page-header-content">
<div class="page-title">
<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold">Football Contact Query</span></h4>
</div>
</div>
<div class="breadcrumb-line">
<ul class="breadcrumb">
<li><a href="dashboard.php"><i class="icon-home2 position-left"></i> Home</a></li>
<li class="active"><a href="f_query.php" class="btn bg-indigo-300" >Football Contact Query</a></li>
</ul>
</div>
</div>
<!-- /page header -->
<!-- Filter and Print form -->
<div class="content">
<div class="pad margin no-print">
<div class="callout callout-info">
<form action="f_query.php" method="POST" class="form-horizontal" enctype="multipart/form-data" autocomplete="off">
<div class="box-body">
<div class="form-group">
<label for="inputEmail3" class="col-sm-1 control-label">From Date</label>
<div class="col-sm-2">
<input type="date" class="form-control datepicker" name="from_date" id="startdate" value="<?php echo $from_date; ?>">
</div>
<label for="inputEmail3" class="col-sm-1 control-label">To Date</label>
<div class="col-sm-2">
<input type="date" class="form-control" name="to_date" id="enddate" value="<?php echo $to_date; ?>">
</div>
<div class="col-sm-2">
<button type="submit" name="filter" class="btn btn-primary">Filter</button>
</div>
<div class="col-sm-2">
<button type="submit" formaction="fquery_print.php" formtarget="_blank" name="print" class="btn btn-warning">Print</button>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- /Filter and Print form -->
<!-- Table of football contact query -->
<div class="panel panel-flat" style="overflow: auto;">
<div class="panel-heading">
<h5 class="panel-title">Football Contact Query</h5>
<div class="heading-elements">
<ul class="icons-list">
<li><a data-action="collapse"></a></li>
<li><a data-action="reload"></a></li>
<li><a data-action="close"></a></li>
</ul>
</div>
</div>
<table class="table datatable-multi-sorting">
<thead>
<tr>
<th>Sn.</th>
<th>Product Code</th>
<th>Name</th>
<th>Mobile</th>
<th>Email</th>
<th>City</th>
<th>State</th>
<th>Details</th>
<th class="text-center">Actions</th>
</tr>
</thead>
<tbody>
<?php
$sn=1;
$query = "SELECT * FROM contact WHERE product = 'Football'";
if (!empty($from_date) && !empty($to_date)) {
$query .= " AND sub_time BETWEEN '$from_date' AND '$to_date'";
}
$result = mysqli_query($con, $query);
while($data = mysqli_fetch_array($result)) {
?>
<tr>
<td><?php echo $sn; ?>.</td>
<td><?php echo $data['pcode']; ?></td>
<td><?php echo ucfirst($data['name']); ?></td>
<td><?php echo ucfirst($data['mobile']); ?></td>
<td><?php echo $data['email']; ?></td>
<td><?php echo $data['city']; ?></td>
<td><?php echo $data['state']; ?></td>
<td>
<a href="cust_query_more_dtls.php?id=<?php echo $data['id']; ?>">
<input type="button" value="Details" class="btn bg-teal-400">
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="include/delete_cust_query.php?id=<?php echo $data['id']; ?>" onClick="return del();">
<img src="assets/images/del.png" style="width:20px;">
</a>
</li>
</ul>
</td>
</tr>
<?php
$sn++;
}
?>
</tbody>
</table>
</div>
</div>
<!-- /Table of football contact query -->
<!-- Footer -->
<?php include('include/footer.php'); ?>
<!-- /footer -->
</div>
<!-- /main content -->
</div>
<!-- /page content -->
</div>
<!-- /page container -->
<!-- Delete/Edit validation -->
<script>
function del() {
var r = confirm('Are you sure want to delete ? ');
if (!r) {
return false;
} else {
return true;
}
}
function edit() {
var r = confirm('Are you sure want to edit ?');
if (!r) {
return false;
} else {
return true;
}
}
</script>
<!-- /Delete/Edit validation -->
</body>
</html>