Add reload facility with image from http://www.veryicon.com/icon/png/Internet%20...
[infodrom/phone] / index.php
index 7525c2a..b227cf5 100644 (file)
--- a/index.php
+++ b/index.php
@@ -7,8 +7,16 @@ if (!empty($_POST['func'])) {
     $data['incoming'] = read_directory('incoming');
   } elseif ($_POST['func'] == 'archive') {
     $data['archive'] = read_directory('archive');
+  } elseif ($_POST['func'] == 'archive_call') {
+    archive_call($_POST['call']);
+  } elseif ($_POST['func'] == 'delete_call') {
+    delete_call($_POST['dir'],$_POST['call']);
   } elseif ($_POST['func'] == 'callinfo') {
     $data = callinfo($_POST['dir'],$_POST['call']);
+    $data['dir'] = $_POST['dir'];
+    $data['call'] = $_POST['call'];
+  } elseif ($_POST['func'] == 'save') {
+    save_call();
   }
   header('Content-type: application/json; charset=UTF-8');
   echo json_encode($data);
@@ -51,6 +59,10 @@ if (!empty($_POST['func'])) {
 
 </div>
 
+<div class="controls">
+<img src="lib/reload.png" onclick="reload()" title="Check phone box">
+</div>
+
 <div class="phonecall">
 <p class="title">Play message</p>
 <p id="callspeaker">&nbsp;</p>
@@ -59,5 +71,20 @@ if (!empty($_POST['func'])) {
 <p id="callnote"></p>
 </div>
 
+<div class="editcall">
+<p class="title">Edit message</p>
+<div style="padding-left: 5px;">
+<form id="edit_form">
+<span id="edit_date">&nbsp;</span><br>
+<input id="edit_dir" type="hidden">
+<input id="edit_call" type="hidden">
+Name<br><input id="edit_name" type="text" size="31"><br>
+Note<br><input id="edit_note" type="text" size="31"><br>
+<input type="button" class="button" value="Save" onclick="save()" style="margin-top: 5px;">
+<span id="edit_status"></span>
+</form>
+</div>
+</div>
+
 </body>
 </html>