From ebbfbafc678ec80559fc62d431c338b0b2c4086a Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 25 Jan 2007 21:03:24 +0000 Subject: [PATCH] removed AST_timeoncall.php, depricated now that AST_timeonVDADall.php can show manual dial calls git-svn-id: svn://192.168.202.10@482 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/AST_timeoncall.php | 202 -------------------------------- www/vicidial/admin.php | 3 +- 2 files changed, 1 insertion(+), 204 deletions(-) delete mode 100644 www/vicidial/AST_timeoncall.php diff --git a/www/vicidial/AST_timeoncall.php b/www/vicidial/AST_timeoncall.php deleted file mode 100644 index 9a92a86c..00000000 --- a/www/vicidial/AST_timeoncall.php +++ /dev/null @@ -1,202 +0,0 @@ - LICENSE: GPLv2 -### -# CHANGES -# -# 60620-1043 - Added variable filtering to eliminate SQL injection attack threat -# - Added required user/pass to gain access to this page -# - -require("dbconnect.php"); - -$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; -$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; -$PHP_SELF=$_SERVER['PHP_SELF']; -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} - elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} -if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} -if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} - -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; - - if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) - { - Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); - Header("HTTP/1.0 401 Unauthorized"); - echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; - exit; - } - -$NOW_TIME = date("Y-m-d H:i:s"); -$STARTtime = date("U"); - -?> - - - - - -\n"; -echo"\n"; -echo "VICIDIAL: Time On Call\n"; -echo "
\n\n";
-
-echo "VICIDIAL: Time On Call                        $NOW_TIME    REPORTS\n\n";
-echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
-echo "| STATION    | SESSIONID | CHANNEL   | NUMBER DIALED    | START TIME          | MINUTES |\n";
-echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
-
-$stmt="SELECT count(*) from live_sip_channels where server_ip='" . mysql_real_escape_string($server_ip) . "';";
-$rslt=mysql_query($stmt, $link);
-if ($DB) {echo "$stmt\n";}
-$row=mysql_fetch_row($rslt);
-$parked_count = $row[0];
-	if ($parked_count > 0)
-	{
-	$stmt="select extension from live_channels where server_ip='" . mysql_real_escape_string($server_ip) . "';";
-	$rslt=mysql_query($stmt, $link);
-	if ($DB) {echo "$stmt\n";}
-	$ext_to_print = mysql_num_rows($rslt);
-	$i=0;
-	$live_zap_counter=0;
-	$sessions = '';
-	while ($i < $ext_to_print)
-		{
-		$row=mysql_fetch_row($rslt);
-		if (preg_match("/^8600/i",$row[0]))
-			{
-			$sessions .= "$row[0]|";
-			}
-		$i++;
-		}
-	$sessions = preg_replace("/\|$/",'',$sessions);
-
-	if ($DB) {echo "SESSIONS: -$sessions-\n";}
-
-	$stmt="select * from live_sip_channels where server_ip='" . mysql_real_escape_string($server_ip) . "' order by channel;";
-	$rslt=mysql_query($stmt, $link);
-	if ($DB) {echo "$stmt\n";}
-	$parked_to_print = mysql_num_rows($rslt);
-	$i=0;
-	$live_calls_counter=0;
-	while ($i < $parked_to_print)
-		{
-		$row=mysql_fetch_row($rslt);
-		if ( (preg_match("/Zap\/|internal|ring/i",$row[3])) or (preg_match("/Local\//i",$row[0])) )
-			{
-			if ($DB) {echo "NOT STATION |$row[0]|$row[3]|\n";}
-			$session_id = '';
-			}
-		else 
-			{
-			if (preg_match("/$row[3]/i",$sessions))
-				{
-				if ($DB) {echo "LIVE STATION|$row[0]|$row[3]|\n";}
-				$session_id = $row[3];
-				$station = preg_replace("/SIP\//",'',$row[0]);
-				$station = preg_replace("/-.*/",'',$station);
-			
-				$LIVE_sessions[$live_calls_counter] =			"$session_id";
-				$LIVE_sessions_FORMAT[$live_calls_counter] =	sprintf("%-9s", $session_id);
-				$LIVE_stations[$live_calls_counter] =			"$station";
-				$LIVE_stations_FORMAT[$live_calls_counter] =	sprintf("%-10s", $station);
-
-		#		echo "| $station | $session_id | \n";
-
-				$live_calls_counter++;
-				}
-			else
-				{
-				if ($DB) {echo "NOT STATIONZ|$row[0]|$row[3]|\n";}
-				$session_id = '';
-				}
-			}
-
-		$i++;
-		}
-
-		if ($live_calls_counter > 0)
-		{
-		$i=0;
-		$LC_counter = $live_calls_counter;
-
-		while ($i < $live_calls_counter)
-			{
-			$stmt="select channel,extension,number_dialed,start_time,start_epoch from call_log where extension='$LIVE_stations[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "' order by uniqueid desc LIMIT 1;";
-			$rslt=mysql_query($stmt, $link);
-			if ($DB) {echo "$stmt\n";}
-			$parked_to_print = mysql_num_rows($rslt);
-			$row=mysql_fetch_row($rslt);
-
-			$channel =			sprintf("%-9s", $row[0]);
-			$number_dialed =	sprintf("%-16s", $row[2]);
-			$start_time =		sprintf("%-19s", $row[3]);
-			$call_time_S = ($STARTtime - $row[4]);
-
-			$call_time_M = ($call_time_S / 60);
-			$call_time_M = round($call_time_M, 2);
-			$call_time_M_int = intval("$call_time_M");
-			$call_time_SEC = ($call_time_M - $call_time_M_int);
-			$call_time_SEC = ($call_time_SEC * 60);
-			$call_time_SEC = round($call_time_SEC, 0);
-			if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
-			$call_time_MS = "$call_time_M_int:$call_time_SEC";
-			$call_time_MS =		sprintf("%7s", $call_time_MS);
-			$G = '';		$EG = '';
-			if ($call_time_M_int >= 12) {$G=''; $EG='';}
-			if ($call_time_M_int >= 31) {$G=''; $EG='';}
-
-			echo "| $G$LIVE_stations_FORMAT[$i]$EG | $G$LIVE_sessions_FORMAT[$i]$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
-
-			$i++;
-			}
-
-		echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
-		echo "  $i stations on live calls on server $server_ip\n\n";
-
-		echo "             - 12 minutes or more on live call\n";
-		echo "             - Over 30 minutes on live call\n";
-
-		}
-		else
-		{
-		echo "*****************************************************************************************\n";
-		echo "*****************************************************************************************\n";
-		echo "*************************************** NO LIVE STATIONS ********************************\n";
-		echo "*****************************************************************************************\n";
-		echo "*****************************************************************************************\n";
-		}
-
-	}
-	else
-	{
-	echo "*****************************************************************************************\n";
-	echo "*****************************************************************************************\n";
-	echo "*************************************** NO LIVE STATIONS ********************************\n";
-	echo "*****************************************************************************************\n";
-	echo "*****************************************************************************************\n";
-	}
-
-?>
-
- - \ No newline at end of file diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 1e1b6b24..0931d61b 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -9510,7 +9510,7 @@ if ($ADD==999999)

-	
+	$server_ip[$o]\n";
 		echo "\n";
 		echo "\n";
-		echo "\n";
 		echo "\n";
 		echo "\n";
 		echo "\n";
SERVERDESCRIPTIONIP ADDRESSACTIVEVDAD timeVDcall timePARK timeCLOSER/INBOUND time
SERVERDESCRIPTIONIP ADDRESSACTIVEVDAD timePARK timeCLOSER/INBOUND time
$active[$o]LINKLINKLINKLINK