Activate player, resize iframe
[infodrom/phone] / index.php
1 <?
2 include_once('phone.php');
3
4 if (!empty($_POST['func'])) {
5   $data = array();
6   if ($_POST['func'] == 'incoming') {
7     $data['incoming'] = get_incoming();
8   } elseif ($_POST['func'] == 'callinfo') {
9     $data = callinfo($_POST['dir'],$_POST['call']);
10   }
11   header('Content-type: application/json; charset=UTF-8');
12   echo json_encode($data);
13   exit;
14 } elseif (!empty($_GET['dir']) && !empty($_GET['call'])) {
15   send_call($_GET['dir'], $_GET['call']);
16   exit;
17 }
18
19 ?>
20 <html>
21 <head>
22 <title>Infodrom Phone Answering Machine</title>
23 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24 <link href="phone.css" rel="stylesheet" type="text/css">
25 </head>
26 <script type="text/javascript" src="lib/json_parse.js"></script>
27 <script type="text/javascript" src="lib/basics.js"></script>
28 <script type="text/javascript" src="phone.js"></script>
29 <script type="text/javascript" src="lib/debug_joey.js"></script>
30
31 <body onload="page_init()">
32 <div style="margin-top: -5px">
33 </div>
34
35 <div>
36 <div class="phonelist" id="incoming">
37 <p class="title">Incoming Calls</p>
38 <ul class="phonelist" id="incoming_calls">
39 <li>Loading data...</li>
40 </ul>
41 </div>
42
43 <div class="phonelist" id="archive">
44 <p class="title">Archived Calls</p>
45 <ul class="phonelist" id="archive_calls">
46 <li>Loading data...</li>
47 </ul>
48 </div>
49
50 </div>
51
52 <div class="phonecall">
53 <p class="title">Play message</p>
54 <p id="callspeaker">&nbsp;</p>
55 <iframe class="phonecall" id="phonecall"></iframe>
56 <p id="calldate">&nbsp;</p>
57 <p id="callnote"></p>
58 </div>
59
60 </body>
61 </html>