FROM calls, users, devices WHERE calls.deviceid = devices.deviceid AND devices.userid = users.userid AND calls.callid = :cid'); $st_getcall->bindParam(':cid', $_GET['id']); $st_getcall->execute(); // Return false if there are no returning rows. $callinfo = $st_getcall->fetchAll(); pageheader(0, "Antwoorden"); ?> <p>Send your reply here.</p> <p class="title">Details:</p> <table> <tr> <th>Reason</th><td><?php echo converttypetostring($callinfo[0]['type']); ?> </td> </tr> <tr> <th>Message</th><td><?php $msg = $callinfo[0]['message']; if ($msg == "") { $msg = "*No Message*"; } echo $msg; ?> </td> </tr> <tr> <th>Time</th><td><?php
function push($deviceid, $callid, $typeid, $time, $msg, $remind) { global $webroot; $names = getnames($deviceid); $username = $names[0]; $devicename = $names[1]; $sender = "{$username} ({$devicename})"; $formattedtime = date('H:i.s \\(D\\)', $time); $type = converttypetostring($typeid); if (empty($msg)) { $newmsg = "*No message*"; } else { $newmsg = $msg; } $body = "Message: {$newmsg}\nBy: {$sender}\nTime: {$formattedtime}"; $url = $webroot . 'reply.php?id=' . $callid; $title = "Called! {$username}: {$type}"; if ($remind == true) { $title = "Reminder: " . $title; } pushlink($title, $body, $url); }