forked from bofhgit/web_meetme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplay.php
31 lines (23 loc) · 838 Bytes
/
play.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
<?php
include ("./lib/defines.php");
include ("./lib/functions.php");
include ("./lib/database.php");
session_start();
getpost_ifset(array('confno', 'bookId'));
/* The db for Version 4 uses bookid, while the app uses bookId */
$query = "SELECT confOwner from " . DB_TABLESCHED . " WHERE bookId='$bookId'";
$result = $db->query($query);
$row = $result->fetchRow();
if (($_SESSION['privilege'] == "Admin" || $row[0] == $_SESSION['userid'])) {
if (is_numeric($confno) && is_numeric($bookId)) {
$file = $confno . "-" . $bookId . ".wav";
$playfile = RECORDING_PATH . "meetme-conf-rec-" . $file;
$mimetype = "audio/x-wav";
$content_len = filesize($playfile);
header("Content-Length: ".$content_len);
header("Content-type: $mimetype");
header('Content-Disposition: inline; filename=$file');
readfile($playfile);
}
}
?>