From c6d44f9846d2c3f693a6b29732e8164d4581f649 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 4 Jan 2013 19:53:32 +0000 Subject: [PATCH] Remove line feeds after ?>. Remove mod_valet fusionpbx has a different park system. Minor adjustment to default permissions. --- app/calls_active/app_config.php | 2 +- .../calls_active_extensions_inc.php | 109 +++++++++--------- app/calls_active/calls_exec.php | 2 +- 3 files changed, 57 insertions(+), 56 deletions(-) diff --git a/app/calls_active/app_config.php b/app/calls_active/app_config.php index 6f4e5ecb94..25feb81d84 100644 --- a/app/calls_active/app_config.php +++ b/app/calls_active/app_config.php @@ -70,7 +70,7 @@ $apps[$x]['permissions'][4]['groups'][] = 'superadmin'; $apps[$x]['permissions'][5]['name'] = 'extensions_active_view'; - $apps[$x]['permissions'][5]['groups'][] = 'user'; + //$apps[$x]['permissions'][5]['groups'][] = 'user'; $apps[$x]['permissions'][5]['groups'][] = 'admin'; $apps[$x]['permissions'][5]['groups'][] = 'superadmin'; diff --git a/app/calls_active/calls_active_extensions_inc.php b/app/calls_active/calls_active_extensions_inc.php index 3c5b8a6143..4ac7b77761 100644 --- a/app/calls_active/calls_active_extensions_inc.php +++ b/app/calls_active/calls_active_extensions_inc.php @@ -108,6 +108,7 @@ else { echo "\n"; } else { + //get the agent list from event socket $switch_cmd = 'callcenter_config agent list'; $event_socket_str = trim(event_socket_request($fp, 'api '.$switch_cmd)); @@ -137,39 +138,39 @@ else { } //send the api command over event socket - $switch_cmd = 'valet_info'; - $valet_xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd)); + //$switch_cmd = 'valet_info'; + //$valet_xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd)); //parse the xml - try { - $valet_xml = new SimpleXMLElement($valet_xml_str); - } - catch(Exception $e) { - //echo $e->getMessage(); - } - $valet_xml = new SimpleXMLElement($valet_xml_str); - foreach ($valet_xml as $row) { - $valet_name = (string) $row->attributes()->name; - foreach ($row->extension as $row2) { - $extension = (string) $row2; - $uuid = (string) $row2->attributes()->uuid; - $uuid = trim($uuid); - $valet_array[$uuid]['name'] = $valet_name; - $valet_array[$uuid]['extension'] = $extension; - } - } + //try { + // $valet_xml = new SimpleXMLElement($valet_xml_str); + //} + //catch(Exception $e) { + // //echo $e->getMessage(); + //} + //$valet_xml = new SimpleXMLElement($valet_xml_str); + //foreach ($valet_xml as $row) { + // $valet_name = (string) $row->attributes()->name; + // foreach ($row->extension as $row2) { + // $extension = (string) $row2; + // $uuid = (string) $row2->attributes()->uuid; + // $uuid = trim($uuid); + // $valet_array[$uuid]['name'] = $valet_name; + // $valet_array[$uuid]['extension'] = $extension; + // } + //} //send the event socket command $switch_cmd = 'show channels as xml'; $xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd)); //parse the xml - try { - $xml = new SimpleXMLElement($xml_str); - } - catch(Exception $e) { - //echo $e->getMessage(); - } + try { + $xml = new SimpleXMLElement($xml_str); + } + catch(Exception $e) { + //echo $e->getMessage(); + } //active channels array $channels_array = ''; @@ -236,12 +237,12 @@ else { $channels_array[$x]['call_length'] = $call_length; //valet park - if (is_array($valet_array[$uuid])) { - $valet_array[$uuid]['context'] = $channels_array[$x]['context']; - $valet_array[$uuid]['cid_name'] = $channels_array[$x]['cid_name']; - $valet_array[$uuid]['cid_num'] = $channels_array[$x]['cid_num']; - $valet_array[$uuid]['call_length'] = $call_length; - } + //if (is_array($valet_array[$uuid])) { + // $valet_array[$uuid]['context'] = $channels_array[$x]['context']; + // $valet_array[$uuid]['cid_name'] = $channels_array[$x]['cid_name']; + // $valet_array[$uuid]['cid_num'] = $channels_array[$x]['cid_num']; + // $valet_array[$uuid]['call_length'] = $call_length; + //} //increment the array index $x++; } @@ -525,29 +526,29 @@ else { echo "\n"; echo "

\n"; - //valet park - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - foreach ($valet_array as $row) { - if (strlen($row['extension']) > 0) { - if ($row['context'] == $_SESSION['domain_name'] || $row['context'] == "default") { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - } - } - echo "
".$text['label-park-ext']."".$text['label-time']."".$text['label-cid-name']."".$text['label-cid-number']."
*".$row['extension']."".$row['call_length']."".$row['cid_name']."".$row['cid_num']."
\n"; - } + //echo "
\n"; + //echo "\n"; + //echo "\n"; + //echo "\n"; + //echo "\n"; + //echo "\n"; + //echo "\n"; + //foreach ($valet_array as $row) { + // if (strlen($row['extension']) > 0) { + // if ($row['context'] == $_SESSION['domain_name'] || $row['context'] == "default") { + // echo "\n"; + // echo "\n"; + // echo "\n"; + // echo "\n"; + // echo "\n"; + // echo "\n"; + // } + // } + //} + //echo "
".$text['label-park-ext']."".$text['label-time']."".$text['label-cid-name']."".$text['label-cid-number']."
*".$row['extension']."".$row['call_length']."".$row['cid_name']."".$row['cid_num']."
\n"; + + } //end permission echo "

\n"; @@ -559,4 +560,4 @@ else { echo "
\n"; echo "
\n"; } -?> +?> \ No newline at end of file diff --git a/app/calls_active/calls_exec.php b/app/calls_active/calls_exec.php index 40212b712c..33473710cf 100644 --- a/app/calls_active/calls_exec.php +++ b/app/calls_active/calls_exec.php @@ -255,4 +255,4 @@ if (count($_GET)>0) { } } -?> +?> \ No newline at end of file