[ * Filter statistics depending on CDRTool login rights Adrian Georgescu **20061119122714 * Add links to statistrics screen from main menu * removed /var/www/CDRTool/scripts/generateHTMLUsageIndexFile.php /var/www/CDRTool/status/usage/index.phtml is generated on the fly ] hunk ./cdrlib_ser.phtml 4536 - global $verbose; hunk ./cdrlib_ser.phtml 4539 + global $CDRTool; + + if (strlen($CDRTool['filter']['domain'])) { + $this->allowedDomains=explode(" ",$CDRTool['filter']['domain']); + $allowed_domains_sql=""; + $j=0; + foreach ($this->allowedDomains as $_domain) { + if ($j>0) $allowed_domains_sql.=","; + $allowed_domains_sql.="'".addslashes($_domain)."'"; + $j++; + } + } hunk ./cdrlib_ser.phtml 4561 - $this->verbose = $verbose; hunk ./cdrlib_ser.phtml 4567 + + if ($allowed_domains_sql) { + $where.= sprintf("and domain in (%s)",$allowed_domains_sql) ; + } + hunk ./cdrlib_ser.phtml 4576 + hunk ./debian/changelog 5 - * Show protocol in sip online + * Show transport protocol in SIP online hunk ./debian/changelog 7 + * Filter statistics depending on CDRTool login rights + * Add links to statistrics screen from main menu + * removed /var/www/CDRTool/scripts/generateHTMLUsageIndexFile.php + /var/www/CDRTool/status/usage/index.phtml is generated on the fly hunk ./debian/changelog 12 - -- Adrian Georgescu Sun, 19 Nov 2006 12:11:20 +0100 + -- Adrian Georgescu Sun, 19 Nov 2006 13:24:40 +0100 hunk ./phplib/local.inc 597 - print " Call search "; + print " Search "; hunk ./phplib/local.inc 600 - print "| Rating tables"; + print "| Rating"; hunk ./phplib/local.inc 603 + if ($perm->have_perm("statistics")) { + print "| Registrar"; + print "| Media"; + print "| Usage"; + } + hunk ./phplib/local.inc 612 - if ($perm->have_perm("statistics") && $perm->have_perm("admin")) { - print "| Usage"; - } - hunk ./scripts/generateHTMLUsageIndexFile.php 1 -#!/usr/bin/php -generateHTMLUsageIndexPage(); - -?> rmfile ./scripts/generateHTMLUsageIndexFile.php hunk ./sip_statistics_lib.phtml 27 - $path = dirname(realpath($_SERVER['PHP_SELF'])); - include($path."/../status/config/media_servers.php"); - - $this->mediaServers=$servers; hunk ./sip_statistics_lib.phtml 98 - \$perm->check(\"statistics\",\"admin\"); + \$perm->check(\"statistics\"); + + global \$CDRTool; + + if (strlen(\$CDRTool['filter']['domain'])) { + \$allowedDomains=explode(' ',\$CDRTool['filter']['domain']); + } + hunk ./sip_statistics_lib.phtml 121 + + have_perm('admin')) { ?> + hunk ./sip_statistics_lib.phtml 141 + + hunk ./sip_statistics_lib.phtml 164 + hunk ./sip_statistics_lib.phtml 170 + hunk ./sip_statistics_lib.phtml 183 + hunk ./sip_statistics_lib.phtml 338 + $path = dirname(realpath($_SERVER['PHP_SELF'])); + include($path."/../status/config/media_servers.php"); + + $this->mediaServers=$servers; + hunk ./status/sip_online.phtml 8 -$perm->check("admin"); + +$perm->check("statistics"); hunk ./status/sip_online.phtml 24 +$expandAll=$_REQUEST['expandAll']; + addfile ./status/usage/index.phtml hunk ./status/usage/index.phtml 1 + "CDRTool_Session", + "auth" => "CDRTool_Auth", + "perm" => "CDRTool_Perm" + )); + +$perm->check("statistics"); + +include($path."../../sip_statistics_lib.phtml"); + +$SIPstatistics=new SIPstatistics (); +$SIPstatistics->getSipEnabledZones(); + +global $CDRTool; + +if (strlen($CDRTool['filter']['domain'])) { + $allowedDomains=explode(' ',$CDRTool['filter']['domain']); +} + +?> + + + + AG Projects SIP statistics + + + + + + + + +
AG Projects SIP statistics
+ + + +have_perm('admin')) { ?> + + + + + +SipEnabledZones)); +} else { + $domains=array_keys($SIPstatistics->SipEnabledZones); +} + +foreach ($domains as $key) { + printf (" + + + + ", + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key, + $key + ); +} + +?> + +
Online Users for total
+
total_users Traffic Graph +
+
Active Sessions for total
+
total_sessions Traffic Graph +
+
IP Traffic for total
+
total_traffic Traffic Graph +
+
Online Users for %s
+
%s_users Traffic Graph +
+
Active Sessions for %s
+
%s_sessions Traffic Graph +
+
IP Traffic for %s
+
%s_traffic Traffic Graph +
+
+ + +