forked from goautodial/v4.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
46 lines (34 loc) · 1.09 KB
/
search.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
<?php
require_once('./php/UIHandler.php');
include('./php/Session.php');
$ui = \creamy\UIHandler::getInstance();
$user = \creamy\CreamyUser::currentUser();
if(isset($_POST['search_contacts'])){
$output = $ui->GetContacts($_SESSION['user'], $_POST['search_contacts'], $_POST['disposition'], $_POST['list'], $_POST['address'], $_POST['city'], $_POST['state'], 500, $_POST['search_customers']);
echo $output;
}
if(isset($_POST['search_recordings'])){
$agent_filter = "";
$start = "";
$end = "";
if(isset($_POST['agent_filter'])){
$agent_filter = $_POST['agent_filter'];
}
if(isset($_POST['start_filterdate'])){
if($_POST['start_filterdate'] != ""){
$start = date('Y-m-d H:i:s', strtotime($_POST['start_filterdate']));
}else{
$start = "";
}
}
if(isset($_POST['end_filterdate'])){
if($_POST['start_filterdate'] != ""){
$end = date('Y-m-d H:i:s', strtotime($_POST['start_filterdate']));
}else{
$end = "";
}
}
$table_list = $ui->getListAllRecordings($_POST['search_recordings'], $start, $end, $agent_filter);
echo $table_list;
}
?>