$rslt = mysql_to_mysqli($stmt, $link); $row = mysqli_fetch_row($rslt); $SNauth = $row[0]; if ($SNauth == 0) { echo _QXZ("Invalid session_name:") . " |{$session_name}|{$server_ip}|\n"; exit; } else { # do nothing for now } } } if ($format == 'debug') { echo "<html>\n"; echo "<head>\n"; echo "<!-- VERSION: {$version} BUILD: {$build} EXTEN: {$exten} server_ip: {$server_ip}-->\n"; echo "<title>" . QXZ("Call Log Display"); echo "</title>\n"; echo "</head>\n"; echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n"; } $row = ''; $rowx = ''; $channel_live = 1; if (strlen($exten) < 1 or strlen($protocol) < 3) { $channel_live = 0; echo _QXZ("Exten %1s is not valid or protocol %2s is not valid", 0, '', $exten, $protocol) . "\n"; exit; } else { ##### print outbound calls from the call_log table $stmt = "SELECT uniqueid,start_time,{$number_dialed},length_in_sec FROM call_log where server_ip = '{$server_ip}' and channel LIKE \"{$protocol}/{$exten}%\" order by start_time desc limit {$out_limit};"; if ($format == 'debug') {
<?php echo "<title>" . _QXZ("LIVE INBOUND CALL"); echo "</title>\n"; echo "</head>\n"; echo "<BODY BGCOLOR=\"#CCC2E0\" marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onload=\"link_timeout();\">\n"; echo "<CENTER><H2>" . _QXZ("LIVE INBOUND CALL") . "</H2>\n"; echo "<B>{$NOW_TIME}</B><BR><BR>\n"; } $MT[0] = ''; $row = ''; $rowx = ''; $channel_live = 1; if (strlen($uniqueid) < 9) { $channel_live = 0; echo QXZ("Uniqueid {$uniqueid} is not valid\n"); exit; } else { $stmt = "SELECT uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,acknowledged,inbound_number,comment_a,comment_b,comment_c,comment_d,comment_e FROM live_inbound where server_ip = '{$server_ip}' and uniqueid = '{$uniqueid}';"; if ($format == 'debug') { echo "\n<!-- {$stmt} -->"; } $rslt = mysql_to_mysqli($stmt, $link); $channels_list = mysqli_num_rows($rslt); if ($channels_list > 0) { $row = mysqli_fetch_row($rslt); # echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; # Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| if ($format == 'debug') { echo "\n<!-- {$row['0']}|{$row['1']}|{$row['2']}|{$row['3']}|{$row['4']}|{$row['5']}|{$row['6']}|{$row['7']}|{$row['8']}|{$row['9']}|{$row['10']}|{$row['11']}|{$row['12']}|{$row['13']}| -->"; }