-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcommunications_export.php
More file actions
50 lines (50 loc) · 2.12 KB
/
communications_export.php
File metadata and controls
50 lines (50 loc) · 2.12 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
<?php
/**
* @file
* Form to export communications to CSV file
*
* The export.php file performs the export.
*
* Variables:
* $export[]
* 'earliest' => Earliest date/time to include
* 'latest' => Latest date/time to include
* 'phone' => If set, limits the export to records to or from this number
* 'type'' => If set, limits the export to this type of record
*/
$export = array("earliest"=>"", "latest"=>"", "phone"=>"", "type"=>"");
?>
<h3>Export to CSV</h2>
<p class="help-block">Use <b>all_broadcast</b> as the phone number to include all broadcast numbers.</p>
<form class="form-inline" action="export.php?type=communications" method="POST">
<div class="form-group">
<label for="export_earliest">Earliest: </label>
<input type="text" class="form-control" name="export[earliest]" id="export_earliest"
placeholder="<?php echo date("m/d/y") ?>"
value="<?php echo $export['earliest'] ?>">
</div>
<div class="form-group">
<label for="export_latest">Latest: </label>
<input type="text" class="form-control" name="export[latest]" id="export_latest"
placeholder="<?php echo date("m/d/y"); ?>"
value="<?php echo $export['latest'] ?>">
</div>
<div class="form-group">
<label for="export_phone">Limit to phone: </label>
<input type="text" class="form-control" name="export[phone]" id="export_phone"
placeholder="<?php echo sms_getFirstHotline($hotline_number, $hotline, $error) ? $hotline_number : reset($BROADCAST_CALLER_IDS) ?>"
value="<?php echo $export['phone'] ?>">
</div>
<div class="form-group">
<label for="export_type">Type: </label>
<select class="form-control" name="export[type]" id="export_type">
<option value="">(all types)</option>
<option value="text">text</option>
<option value="call in progress">call in progress</option>
<option value="call answered">call answered</option>
<option value="voicemail">voicemail</option>
<option value="call ended">call ended</option>
</select>
</div>
<button type="submit" class="btn btn-default">Export</button>
</form>