diff --git a/app/time_conditions/time_conditions.php b/app/time_conditions/time_conditions.php index 38be51e712..67fc7d813b 100644 --- a/app/time_conditions/time_conditions.php +++ b/app/time_conditions/time_conditions.php @@ -23,16 +23,20 @@ Contributor(s): Mark J Crane */ -include "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('time_condition_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + include "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('time_condition_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -63,38 +67,12 @@ else { require_once "resources/paging.php"; $document['title'] = $text['title-time_conditions']; -//show the content - echo "\n"; - echo "\n"; - echo " \n"; +//set the alternating styles + $c = 0; + $row_style["0"] = "row_style0"; + $row_style["1"] = "row_style1"; - echo " \n"; - - echo "\n"; - echo "
\n"; - echo " \n"; - echo " ".$text['header-time_conditions']."\n"; - echo " \n"; - echo "

\n"; - echo " \n"; - echo $text['description-time_conditions']; - echo " \n"; - echo "
\n"; - echo "
\n"; - echo " "; - if (strlen($app_uuid) > 0) { - echo " "; - } - if (strlen($order_by) > 0) { - echo " "; - echo " "; - } - echo " "; - echo "
\n"; - echo "
"; - echo "
"; - - //get the number of rows in the dialplan +//get the number of rows in the dialplan $sql = "select count(*) as num_rows from v_dialplans "; $sql .= "where (domain_uuid = '$domain_uuid' or domain_uuid is null) "; $sql .= "and app_uuid = '4b821450-926b-175a-af93-a03c441818b1' "; @@ -132,6 +110,7 @@ else { list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); $offset = $rows_per_page * $page; +//get the data $sql = "select * from v_dialplans "; $sql .= "where (domain_uuid = '$domain_uuid' or domain_uuid is null) "; $sql .= "and app_uuid = '4b821450-926b-175a-af93-a03c441818b1' "; @@ -156,10 +135,40 @@ else { $result_count = count($result); unset ($prep_statement, $sql); - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; +//show the content + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "\n"; + echo "
\n"; + echo " \n"; + echo " ".$text['header-time_conditions']."\n"; + echo " \n"; + echo "

\n"; + echo "
\n"; + echo "
\n"; + echo " "; + if (strlen($app_uuid) > 0) { + echo " "; + } + if (strlen($order_by) > 0) { + echo " "; + echo " "; + } + echo " "; + echo "
\n"; + echo "
\n"; + echo " \n"; + echo $text['description-time_conditions']; + echo " \n"; + echo "
"; + echo "
"; +//show the content echo "
\n"; echo "\n"; echo "\n"; @@ -259,4 +268,4 @@ else { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>