diff --git a/app/voicemail_status/app_config.php b/app/voicemail_status/app_config.php deleted file mode 100644 index c5e84c9f29..0000000000 --- a/app/voicemail_status/app_config.php +++ /dev/null @@ -1,48 +0,0 @@ - \ No newline at end of file diff --git a/app/voicemail_status/app_languages.php b/app/voicemail_status/app_languages.php deleted file mode 100644 index 985574ebd4..0000000000 --- a/app/voicemail_status/app_languages.php +++ /dev/null @@ -1,36 +0,0 @@ - \ No newline at end of file diff --git a/app/voicemail_status/root.php b/app/voicemail_status/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/voicemail_status/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/voicemail_status/voicemail.php b/app/voicemail_status/voicemail.php deleted file mode 100644 index ea0f4c5635..0000000000 --- a/app/voicemail_status/voicemail.php +++ /dev/null @@ -1,200 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('voicemail_status_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - -//add multi-lingual support - echo "\n"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - -//show the content - echo "
"; - echo "\n"; - echo "\n"; - echo " "; -echo ""; -echo "
\n"; - echo "
"; - - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
".$text['title-voicemail']."
\n"; - echo " ".$text['description-voicemail']."\n"; - echo "
\n"; - echo "
"; - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo th_order_by('extension', $text['label-extension'], $order_by, $order); - echo th_order_by('vm_mailto', $text['label-voicemail'], $order_by, $order); - echo "\n"; - echo th_order_by('enabled', $text['label-enabled'], $order_by, $order); - echo th_order_by('description', $text['label-description'], $order_by, $order); - echo "\n"; - - $sql = "select * from v_extensions "; - $sql .= "where domain_uuid = '$domain_uuid' "; - if (!(if_group("admin") || if_group("superadmin"))) { - if (count($_SESSION['user']['extension']) > 0) { - $sql .= "and ("; - $x = 0; - foreach($_SESSION['user']['extension'] as $row) { - if ($x > 0) { $sql .= "or "; } - $sql .= "extension = '".$row['user']."' "; - $x++; - } - $sql .= ")"; - } - else { - //hide any results when a user has not been assigned an extension - $sql .= "and extension = 'disabled' "; - } - } - if (strlen($order_by)> 0) { - $sql .= "order by $order_by $order "; - } - else { - $sql .= "order by extension asc "; - } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $num_rows = count($result); - unset ($prep_statement, $result, $sql); - - $rows_per_page = 100; - $param = ""; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - $sql = "select * from v_extensions "; - $sql .= "where domain_uuid = '$domain_uuid' "; - if (!(if_group("admin") || if_group("superadmin"))) { - if (count($_SESSION['user']['extension']) > 0) { - $sql .= "and ("; - $x = 0; - foreach($_SESSION['user']['extension'] as $row) { - if ($x > 0) { $sql .= "or "; } - $sql .= "extension = '".$row['user']."' "; - $x++; - } - $sql .= ")"; - } - else { - //hide any results when a user has not been assigned an extension - $sql .= "and extension = 'disabled' "; - } - } - if (strlen($order_by)> 0) { - $sql .= "order by $order_by $order "; - } - else { - $sql .= "order by extension asc "; - } - $sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - //pdo voicemail database connection -// include "includes/lib_pdo_vm.php"; - - if ($result_count > 0) { - foreach($result as $row) { - - $sql = "select count(*) as count from voicemail_msgs "; - $sql .= "where domain = '".$_SESSION['domains'][$domain_uuid]['domain_name']."' "; - $sql .= "and username = '".$row['extension']."' "; -// $prep_statement = $db->prepare(check_sql($sql)); -// $prep_statement->execute(); -// $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); -// foreach ($result as &$row2) { -// $count = $row2["count"]; -// break; //limit to 1 row -// } -// unset ($prep_statement); - - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - - unset($count); - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - -echo "
".$text['label-messages']."
".$row['extension']."".$row['vm_mailto']." ".$count." ".($row['vm_enabled']?"true":"false")."".$row['description']." \n"; - if (permission_exists('voicemail_status_delete')) { - echo " $v_link_label_delete\n"; - } - echo "
"; -echo "
"; -echo "

"; -echo "

"; - -echo "
"; -echo "
"; -echo "

"; - -//show the footer - require "includes/require.php"; - require_once "includes/footer.php"; -?> \ No newline at end of file diff --git a/app/voicemail_status/voicemail_prefs_delete.php b/app/voicemail_status/voicemail_prefs_delete.php deleted file mode 100644 index cc35e54d54..0000000000 --- a/app/voicemail_status/voicemail_prefs_delete.php +++ /dev/null @@ -1,71 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -include "root.php"; -require "includes/require.php"; -require_once "includes/checkauth.php"; -if (permission_exists('voicemail_status_delete')) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_GET)>0) { - $id = $_GET["id"]; -} - -//pdo voicemail database connection - include "includes/lib_pdo_vm.php"; - -//delete the data - if (strlen($id)>0) { - $sql = "delete from voicemail_prefs "; - $sql .= "where domain = '".$_SESSION['domains'][$domain_uuid]['domain_name']."' "; - $sql .= "and username = '$domain_uuid' "; - $count = $db->exec(check_sql($sql)); - unset($sql); - } - -//add multi-lingual support - echo "\n"; - foreach($text as $key => $value) { - $text[$key] = $value[$_SESSION['domain']['language']['code']]; - } - -//redirect the user - require "includes/require.php"; - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo $text['label-prefs-delete']."\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - -?> \ No newline at end of file