diff --git a/sip_trace.phtml b/sip_trace.phtml index 4a2de99..3590bef 100644 --- a/sip_trace.phtml +++ b/sip_trace.phtml @@ -1,70 +1,68 @@ -query($query)) { // if ($db->num_rows()) { // $authorize=0; // } else { // $authorize=1; // } // } else { // $authorize=1; // } // } else { // $authorize=1; // } // if ($authorize==1) { // page_open(array( // "sess" => "CDRTool_Session", // "auth" => "CDRTool_Auth", // "perm" => "CDRTool_Perm") // ); // } else { // unset($auth); // unset($sess); // unset($perm); // } $proxyIP = $_REQUEST['proxyIP']; $callid = $_REQUEST['callid']; $fromtag = $_REQUEST['fromtag']; $totag = $_REQUEST['totag']; $cdr_source = $_REQUEST['cdr_source']; $format = isset($_REQUEST['format']) ? $_REQUEST['format'] : 'html'; $title = sprintf("CDRTool SIP trace for session %s", $callid); include("header.phtml"); require("cdr_generic.php"); -if (!$authorize || in_array($cdr_source,$CDRTool['dataSourcesAllowed'])) { - +if (!$authorize || in_array($cdr_source, $CDRTool['dataSourcesAllowed'])) { $sipTrace = new SIP_trace($cdr_source); if ($format == 'html') { $sipTrace->show($proxyIP, $callid, $fromtag, $totag); } elseif ($format == 'text') { $sipTrace->showText($proxyIP, $callid, $fromtag, $totag); } - } else { - printf ("Error: Invalid datasource '%s' for user '%s'" ,$cdr_source,$auth->auth["uname"]); + printf("Error: Invalid datasource '%s' for user '%s'", $cdr_source, $auth->auth["uname"]); } print " - + "; if ($authorize=1) { - page_close(); + page_close(); } ?>