forked from sa2blv/SVXportal
-
Notifications
You must be signed in to change notification settings - Fork 2
/
recording.php
55 lines (41 loc) · 892 Bytes
/
recording.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
<?php
include 'config.php';
$svx_folder="./svxrecording/";
$site_adress="";
function check_login()
{
// Start the session
session_start();
if($_SESSION["loginid"] >0)
{
return true;
}
return false;
}
function scan_dir($dir) {
if($_GET['date'])
{
$date = $_GET['date'];
}
else
{
$date = date("Y-m-d");
}
// echo $dir."qsorec_RepeaterLogic_".$date."*.ogg";
$filelist = glob($dir."qsorec_SimplexLogic_".$date."*");
return $filelist;
}
if ($use_logein == null || check_login() > 0 ) {
$files = (scan_dir($svx_folder));
$array_json =array();
$i=0;
$array_json['length'] = sizeof($files);
foreach($files as $key => $val)
{
$array_json[$i]['text'] = date ("F d Y H:i:s.", filemtime($val));
$array_json[$i]['file'] = $val;
$i++;
}
echo json_encode($array_json);
}
?>