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_once "includes/require.php"; require_once "includes/checkauth.php"; require_once "includes/header.php"; require_once "includes/paging.php"; //check permissions if (permission_exists('hunt_group_call_forward')) { $order_by = $_GET["order_by"]; $order = $_GET["order"]; echo "
"; echo "\n"; echo "\n"; echo "
\n"; if ($is_included != "true") { echo "
"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
Hunt Group Call Forward
\n"; echo " Use the links to configure hunt group call forward.\n"; echo " The following hunt groups have been assigned to this user account. \n"; echo "
\n"; echo "
"; } $sql = "select * from v_hunt_groups "; $sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "and hunt_group_type <> 'dnd' "; $sql .= "and hunt_group_type <> 'call_forward' "; $sql .= "and hunt_group_type <> 'follow_me_simultaneous' "; $sql .= "and hunt_group_type <> 'follow_me_sequence' "; if (!(permission_exists('hunt_group_add') || permission_exists('hunt_group_edit'))) { $sql .= "and hunt_group_user_list like '%|".$_SESSION["username"]."|%' "; } if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } else { $sql .= "order by hunt_group_extension asc "; } $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); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; if ($is_included == "true" && $result_count == 0) { //hide this when there is no result } else { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } if ($result_count > 0) { foreach($result as $row) { echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; if ($c==0) { $c=1; } else { $c=0; } } unset($sql, $result, $row_count); } //end if results if ($is_included == "true" && $result_count == 0) { //hide this when there is no result } else { echo "
Hunt Group ExtensionToolsDescription
".$row['hunt_group_extension']."\n"; echo " Call Forward \n"; echo " ".$row['hunt_group_description']." 
"; echo "
"; echo "
"; echo "
"; } echo "
"; echo "
"; if ($is_included != "true") { require_once "includes/footer.php"; } } ?>