-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
371 lines (301 loc) · 13.3 KB
/
index.html
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<!--
<?php
session_start();
// Load the database configuration file
include_once 'db_conn.php';
// Get status message
if(!empty($_GET['status'])){
switch($_GET['status']){
case 'succ':
$statusType = 'alert-success';
$statusMsg = 'Call data has been imported successfully.';
break;
case 'err':
$statusType = 'alert-danger';
$statusMsg = 'Some problem occurred, please try again.';
break;
case 'sent':
$statusType = 'alert-success';
$statusMsg = 'Records sent successfully to client.';
break;
case 'failed':
$statusType = 'alert-danger';
$statusMsg = 'Records failed to send.';
break;
case 'upd':
$statusType = 'alert-success';
$statusMsg = 'Row updated successfully.';
break;
case 'updfail':
$statusType = 'alert-danger';
$statusMsg = 'Records failed to send.';
break;
case 'invalid_file':
$statusType = 'alert-danger';
$statusMsg = 'Please upload a valid CSV file.';
break;
case 'cleared':
$statusType = 'alert-success';
$statusMsg = 'Table successfully cleared';
break;
case 'save_loc_fail':
$statusType = 'alert-danger';
$statusMsg = 'System was unable to save table data to Altria database. If records were sent successfully to client, please try to manually save the record below by clicking the save to logs button';
break;
default:
$statusType = '';
$statusMsg = '';
}
}
?> -->
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet">
<link rel="stylesheet" href="fonts/icomoon/style.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Style -->
<link rel="stylesheet" href="style/style3.css">
<title>Rapid Inbound API</title>
</head>
<style type="text/css">
html{
margin: 0px !important;
}
body{
}
.container{
max-width: 100%;
background-color: white !important;
}
ul{
margin-left: none !important;
margin-right: none !important;
}
.row{
/* margin-left: 5%;
margin-right: 5%;*/
}
.button-container{
}
.float-right_1{
background-color: red;
margin-right: 1vw;
}
.float-right_2{
background-color: blue;
}
thead{
font-size: 10px;
font-weight: 100;
text-align: center;
}
label{
text-align: center;
}
th{
text-align: center !important;
}
td{
font-size: 12px !important;
text-align: center;
}
input{
background-color: transparent;
border: none;
}
.import-toggle{
margin-bottom: 1vw;
}
.responsive {
width: 100%;
max-width: 400px;
height: auto;
}
.modal{
z-index: 1999 !important;
}
#double-scroll{
width: 400px;
}
</style>
<body>
<div class="nav-header">
<header class="site-navbar js-sticky-header site-navbar-target" role="banner">
<div class="container">
<div class="row align-items-center position-relative">
<div class="site-logo">
<a href="index.php" class="text-black"><span class="text-primary responsive"><img src="altria.png" height="70px;" width="120px;"></a>
</div>
<div class="col-12">
<nav class="site-navigation text-right ml-auto " role="navigation">
<ul class="site-menu main-menu js-clone-nav ml-auto d-none d-lg-block">
<li><a href="index.php" class="nav-link">API</a></li>
<li><a href="logs.php" class="nav-link">Logs</a></li>
<li><a href="logout.php" class="nav-link">Logout</a></li>
</ul>
</nav>
</div>
<div class="toggle-button d-inline-block d-lg-none"><a href="#" class="site-menu-toggle py-5 js-menu-toggle text-black"><span class="icon-menu h3"></span></a></div>
</div>
</div>
</header>
</div>
<!-- IMPORT TABLE -->
<!-- Display status message -->
<!-- <?php if(!empty($statusMsg)){ ?> -->
<div class="col-xs-12">
<div class="alert <?php echo $statusType; ?>"><?php echo $statusMsg; ?></div>
</div>
<!-- <?php } ?>
<?php
if (isset($_SESSION['result'])) {
}
else {
}
?> -->
<div class="row">
<!-- Import link -->
<div class="col-md-6 head">
<div class="float-left">
<a href="javascript:void(0);" class="btn btn-success btn-sm import-toggle" onclick="formToggle('importFrm');"><i class="fa fa-plus"></i> Import</a>
</div>
</div>
<div class="col-md-3">
</div>
<div class="col-md-1">
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-sm " data-toggle="modal" data-target="#exampleModal">
<i class="fa fa-paper-plane" aria-hidden="true"></i> SEND DATA
</button>
</div>
<div class="col-md-1">
<form action="clear_table.php" method="post">
<button type="submit" class="btn btn-danger btn-sm">
<i class="fa fa-trash" aria-hidden="true"></i> Clear Table
</button>
</form>
</div>
<!-- CSV file upload form -->
<div class="col-md-12 import-toggle" id="importFrm" style="display: none;">
<form action="importData.php" method="post" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" class="btn btn-primary btn-sm" name="importSubmit" value="IMPORT">
</form>
</div>
</div>
<!-- Data list table -->
<div class="double-scroll">
<div class="table-responsive">
<table class="table table-striped table-bordered" id="tableId">
<thead class="thead-dark">
<tr>
<th scope='col'><label>Call Date</label></th>
<th scope='col'><label>Talk Time</label></th>
<th scope='col'><label>CX Phone</label> </th>
<th scope='col'> <label>Zip Code</label> </th>
<th scope='col'> <label>Country</label> </th>
<th scope='col'> <label>Answer Time</label> </th>
<th scope='col'> <label>Hold Time</label> </th>
<th scope='col'> <label>Status of Call</label> </th>
<th scope='col'> <label>Order Status</label> </th>
<th scope='col'> <label>Agent Name</label> </th>
<th scope='col'> <label>Drop Time</label> </th>
<th scope='col'> <label>Wrap up Time</label> </th>
<th scope='col'> <label>Acct ID</label> </th>
<th scope='col'> <label>Save Edit</label> </th>
</tr>
</thead>
<tbody>
<!-- <?php
// Get member rows
$result = $db->query("SELECT * FROM calls_temp");
if($result->num_rows > 0){
while($row = $result->fetch_assoc()){
?> -->
<tr>
<!-- <?php echo"
<form action='update.php' method='POST'>
<td scope='col'> <input type='text' id='fullname' size='19' name='call_date' class='hidden' value=\"" . $row["call_date"] . "\" required> </td>
<td scope='col'> <input type='text' id='order_id' size='5' name='talk_time' class='hidden' value=\"" . $row["talk_time"] . "\" required> </td>
<td scope='col'> <input type='text id='cx_phone' size='9' name='cx_phone' class='hidden' value=".$row['cx_phone']." required></td>
<td scope='col'> <input type='text' id='disposition' size='5' name='zipcode' class='hidden' value='12345' required></td>
<td scope='col'> <input type='text' id='amount' size='2' name='amount' class='hidden' value='US' required></td>
<td scope='col'> <input type='text' id='date' size='8' name='answer_time' class='hidden' value=".$row['answer_time']." required></td>
<td scope='col'> <input type='text' id='time' size='8' name='talk_time' class='hidden' value='0' required></td>
<td scope='col'> <input type='text' id='time' size='8' name='time' class='hidden' value='answered' required></td>
<td scope='col'> <input type='text' id='time' size='4' name='time' class='hidden' value='n/a' required></td>
<td scope='col'> <input type='text' id='time' size='14' name='agent_name' class='hidden' value=\"" . $row["agent_name"] . "\" required></td>
<td scope='col'> <input type='text' id='time' size='1' name='time' class='hidden' value='0' required></td>
<td scope='col'> <input type='text' id='time' size='1' name='time' class='hidden' value='0' required></td>
<td scope='col'> <input type='text' id='time' size='1' name='acct_id' class='hidden' value=".$row['acct_id']." required></td>
<td scope='col'> <button name='reg_user' class='btn btn-sm btn-dark'> save </button> </td>
</form>
"
?> -->
</tr>
<!-- <?php } }else{ ?>
<tr><td colspan="14">No record(s) found...</td></tr>
<?php } ?> -->
</tbody>
</table>
</div>
</div>
<!-- END OF IMPORT TABLE -->
<!-- CONFIRM SEND MODAL -->
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<!-- <div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Confirm sending API data to client?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div> -->
<div class="modal-body">
Confirm sending API data to client?
</div>
<div class="modal-footer">
<form action="index.php" method="post" enctype="multipart/form-data">
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">Close</button>
</form>
<form action="api.php" method="post" enctype="multipart/form-data">
<button type="button" class="btn btn-primary btn-sm"><a href="api.php" style="color: white">Confirm</a></button>
</form>
</div>
</div>
</div>
</div>
<script>
function formToggle(ID){
var element = document.getElementById(ID);
if(element.style.display === "none"){
element.style.display = "block";
}else{
element.style.display = "none";
}
}
$(document).ready(function(){
$('#double-scroll').doubleScroll();
});
</script>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.sticky.js"></script>
<script src="js/main.js"></script>
</body>
</html>