Beispiel #1
0
function handler()
{
    global $ARI_VERSION;
    // version
    $ari_version = $ARI_VERSION;
    // check error
    $error = $_SESSION['ari_error'];
    // load modules
    loadModules();
    // login to database
    $success = databaseLogon();
    if ($success) {
        // check if login is needed
        $content = loginBlock();
        if (!isset($content)) {
            list($nav_menu, $subnav_menu, $content) = handleBlock();
        }
    } else {
        $display = new Display();
        $content .= $display->displayHeaderText("ARI");
        $content .= $display->displayLine();
        $content .= checkErrorMessage();
    }
    // log off any databases needed
    databaseLogoff();
    // check for ajax request and refresh or if not build the page
    if (isset($_REQUEST['ajax_refresh'])) {
        echo "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n      <response>\n        <nav_menu><![CDATA[" . $nav_menu . "]]></nav_menu>\n        <subnav_menu><![CDATA[" . $subnav_menu . "]]></subnav_menu>\n        <content><![CDATA[" . $content . "]]></content>\n      </response>";
    } else {
        // build the page
        include_once "./theme/page.tpl.php";
    }
}
Beispiel #2
0
    die;
    // Prevent malicious injection of extra lines in AMI packet
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <TITLE>Voicemail Message Call Me Control</TITLE>
    <link rel="stylesheet" href="../theme/main.css" type="text/css">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>

<?php 
// login to database
$success = databaseLogon();
if ($success) {
    $path = $_SESSION['ari_user']['recfiles'][$_REQUEST['recindex']];
    $pageaction = $_REQUEST['action'];
    $to = $_REQUEST['callmenum'];
    $msgFrom = $_REQUEST['msgFrom'];
    $new_path = substr($path, 0, -4);
    /* Without the sound file extension. */
    $matches[0] = '';
    /* init the $matches array. */
    /* Either start or end the call me call */
    switch ($pageaction) {
        case "c":
            /* Call me. */
            $call_status = callme_startcall($to, $msgFrom, $new_path);
            echo "<table class='voicemail' style='width: 100%; height: 100%; margin: 0 0 0 0; border: 0px; padding: 0px'><tr><td valign='middle' style='border: 0px'>";