diff --git a/app/fax/fax_active.php b/app/fax/fax_active.php deleted file mode 100644 index affb7df254..0000000000 --- a/app/fax/fax_active.php +++ /dev/null @@ -1,146 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -//set the include path - $conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE); - set_include_path(parse_ini_file($conf[0])['document.root']); - -//includes files; - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('fax_active_view')) { - //access granted - } - else { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//get the HTTP values and set as variables - $show = $_REQUEST["show"]; - $fax_uuid = $_REQUEST["id"]; - -//load gateways into a session variable - $sql = "select gateway_uuid, domain_uuid, gateway from v_gateways where enabled = 'true'"; - $database = new database; - $result = $database->select($sql, null, 'all'); - if (is_array($result) && @sizeof($result) != 0) { - foreach ($result as $row) { - $_SESSION['gateways'][$row['gateway_uuid']] = $row['gateway']; - } - } - unset($sql, $result, $row); - -//show the header - $document['title'] = $text['title']; - require_once "resources/header.php"; - -//ajax for refresh - ?> - -\n"; -echo "\n"; -echo "


"; - -require_once "resources/footer.php"; - -/* -// deprecated functions for this page - - function get_park_cmd(uuid, context) { - cmd = \"uuid_transfer \"+uuid+\" -bleg *6000 xml \"+context; - return escape(cmd); - } - - function get_record_cmd(uuid, prefix, name) { - cmd = \"uuid_record \"+uuid+\" start ".$_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".date("Y")."/".date("M")."/".date("d")."/\"+uuid+\".wav\"; - return escape(cmd); - } -*/ -?> \ No newline at end of file diff --git a/app/fax/fax_active_exec.php b/app/fax/fax_active_exec.php deleted file mode 100644 index 652170cc18..0000000000 --- a/app/fax/fax_active_exec.php +++ /dev/null @@ -1,71 +0,0 @@ -add('fax_task_delete', 'temp'); - - $database = new database; - $database->app_name = 'fax'; - $database->app_uuid = '24108154-4ac3-1db6-1551-4731703a4440'; - $database->delete($array); - unset($array); - - $p->delete('fax_task_delete', 'temp'); - } -?> \ No newline at end of file diff --git a/app/fax/fax_active_inc.php b/app/fax/fax_active_inc.php deleted file mode 100644 index 2e7846a2ac..0000000000 --- a/app/fax/fax_active_inc.php +++ /dev/null @@ -1,210 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -//set the include path - $conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE); - set_include_path(parse_ini_file($conf[0])['document.root']); - -//includes files - require_once "resources/require.php"; - require_once "resources/check_auth.php"; - -//check permissions - if (permission_exists('fax_active_view')) { - //access granted - } - else { - echo "access denied"; - exit; - } - - if (!permission_exists('fax_active_all') && $show == 'all') { - echo "access denied"; - exit; - } - -//add multi-lingual support - $language = new text; - $text = $language->get(); - -//get submitted values - $fax_uuid = $_REQUEST["id"]; - $show = $_REQUEST["show"]; - -//include theme config for button images - include_once("themes/".$_SESSION['domain']['template']['name']."/config.php"); - -//construct query - $sql = "select "; - $sql .= "t1.fax_task_uuid as uuid, "; - $sql .= "t1.fax_uuid as fax_uuid, "; - $sql .= "t3.domain_name, "; - $sql .= "t3.domain_uuid, "; - $sql .= "t1.task_next_time as next_time, "; - $sql .= "t1.task_interrupted as interrupted, "; - $sql .= "t1.task_status as status, "; - $sql .= "t1.task_uri as uri, "; - $sql .= "t1.task_dial_string as dial_string, "; - $sql .= "t1.task_dtmf as dtmf, "; - $sql .= "t1.task_fax_file as fax_file, "; - $sql .= "t1.task_wav_file as wav_file, "; - $sql .= "t1.task_reply_address as reply_address, "; - $sql .= "t1.task_no_answer_counter as no_answer_counter, "; - $sql .= "t1.task_no_answer_retry_counter as no_answer_retry_counter, "; - $sql .= "t1.task_retry_counter as retry_counter, "; - $sql .= "t2.fax_send_greeting as greeting, "; - $sql .= "t2.fax_name as fax_server_name "; - $sql .= "from v_fax_tasks t1 "; - $sql .= "inner join v_fax t2 on t2.fax_uuid = t1.fax_uuid "; - $sql .= "inner join v_domains t3 on t2.domain_uuid = t3.domain_uuid "; - $sql .= "where true "; - if ($show !== 'all'){ - $sql .= "and t3.domain_name = :domain_name "; - $parameters['domain_name'] = $_SESSION['domain_name']; - } - else if (is_uuid($fax_uuid)) { - if (!permission_exists('fax_active_all')) { - $sql .= "and t3.domain_name = :domain_name "; - $parameters['domain_name'] = $_SESSION['domain_name']; - } - $sql .= "and t1.fax_uuid = :fax_uuid "; - $parameters['fax_uuid'] = $fax_uuid; - } - $sql .= "order by domain_name, fax_server_name, next_time "; - $database = new database; - $result = $database->select($sql, $parameters, 'all'); - $message = $database->message; - unset($sql, $parameters); - - if (is_array($result) && @sizeof($result) != 0) { - //define js function call var - $onhover_pause_refresh = " onmouseover='refresh_stop();' onmouseout='refresh_start();'"; - - //show buttons - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo " \"".$text['label-refresh_pause']."\""; - echo " "; - if (permission_exists('fax_active_all')) { - if ($show == "all") { - echo " \n"; - } - else { - echo " \n"; - } - } - echo "
"; - - // show title - echo "".$text['fax-active_title'].""; - echo "

\n"; - echo $text['fax-active_description']."\n"; - echo "

\n"; - - //set the alternating color for each row - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - //show the results - echo "
\n"; - - //show headers - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - - foreach ($result as &$row) { - $fax_uri = $row['uri']; - $domain_name = $row['domain_name']; - $task_enabled = ($row['interrupted'] == 'true') ? 'Disable': 'Enable'; - $task_status = $text['fax-active_status_wait']; - $task_next_time = $row['next_time']; - - if ($row['status'] > 0) { - if ($row['status'] <= 3) { - $task_status = $text['fax-active_status_execute']; - } - else if($row['status'] == 10){ - $task_status = $text['fax-active_status_success']; - } - else{ - $task_status = $text['fax-active_status_fail']; - } - } - - $fax_server = $row['fax_server_name']; - if ($show == 'all') { - $fax_server .= '@'.$domain_name; - } - - $task_files = ''; - if (!empty($row['fax_file'])) { - $task_files .= ' '.basename($row['fax_file']); - } - if (!empty($row['wav_file'])) { - $task_files .= '
 '.basename($row['wav_file']); - } - else if (!empty($row['greeting'])) { - $task_files .= '
 '.basename($row['greeting']); - } - - //replace gateway uuid with name - if (sizeof($_SESSION['gateways']) > 0) { - foreach ($_SESSION['gateways'] as $gateway_uuid => $gateway_name) { - $fax_uri = str_replace($gateway_uuid, $gateway_name, $fax_uri); - } - } - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - $c = ($c) ? 0 : 1; - } - - echo "\n"; - echo "\n"; - echo "
".$text['fax-active_title_fax_server']."".$text['fax-active_title_enabled']."".$text['fax-active_title_status']."".$text['fax-active_title_next_time']."".$text['fax-active_title_files']."".$text['fax-active_title_uri']."
".$fax_server." ".$task_enabled." ".$task_status." ".$task_next_time." ".$task_files." ".$fax_uri." ".$v_link_label_delete."
\n"; - } -?> \ No newline at end of file