forked from bofhgit/web_meetme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf_actions.php
44 lines (33 loc) · 1.03 KB
/
conf_actions.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
<?php
include (dirname(__FILE__)."/phpagi/phpagi-asmanager.php");
include ("./lib/defines.php");
include ("./lib/functions.php");
include ("./lib/database.php");
session_start();
getpost_ifset(array('confno','action','user_id'));
/* ACTION * * * * * * *********************************************************/
$temp = $confno;
if (!is_numeric(urlencode($temp)))
$confno = 0;
if (isset($confno)){
$as = new AGI_AsteriskManager();
// && CONNECTING
$res = $as->connect();
if (!$res){ echo _("Error connection to the manager")."!"; exit();}
if (($action=="mute") || ($action=="unmute") || ($action=="kick") ){
$res = $as->Command("meetme $action $confno $user_id");
sleep(1);
}
if (($action=="end") ){
$res = $as->Command("meetme kick $confno all");
if (FORCE_END == "YES"){
$now_datetime = getConfDate();
$FG_TABLE_NAME = DB_TABLESCHED;
$query = "UPDATE $FG_TABLE_NAME SET endtime=? WHERE confno=?";
$data = array($now_datetime, $confno);
$db->query($query, $data);
}
sleep(1);
}
}
?>