From 5ee1d567bf59955aaf58f32f61d95c6b4bbaa50a Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 22 Jan 2015 11:51:26 +0000 Subject: [PATCH] Add a the beginning of a gui for ACL. --- app/acl/acl_delete.php | 70 ++++++++++ app/acl/acl_edit.php | 233 ++++++++++++++++++++++++++++++++++ app/acl/acl_node_delete.php | 64 ++++++++++ app/acl/acl_node_edit.php | 233 ++++++++++++++++++++++++++++++++++ app/acl/acl_nodes.php | 174 +++++++++++++++++++++++++ app/acl/acls.php | 179 ++++++++++++++++++++++++++ app/acl/app_acl_languages.php | 114 +++++++++++++++++ app/acl/app_config.php | 121 ++++++++++++++++++ app/acl/app_languages.php | 185 +++++++++++++++++++++++++++ app/acl/root.php | 50 ++++++++ 10 files changed, 1423 insertions(+) create mode 100644 app/acl/acl_delete.php create mode 100644 app/acl/acl_edit.php create mode 100644 app/acl/acl_node_delete.php create mode 100644 app/acl/acl_node_edit.php create mode 100644 app/acl/acl_nodes.php create mode 100644 app/acl/acls.php create mode 100644 app/acl/app_acl_languages.php create mode 100644 app/acl/app_config.php create mode 100644 app/acl/app_languages.php create mode 100644 app/acl/root.php diff --git a/app/acl/acl_delete.php b/app/acl/acl_delete.php new file mode 100644 index 0000000000..6a6e7a30c0 --- /dev/null +++ b/app/acl/acl_delete.php @@ -0,0 +1,70 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane + James Rose +*/ +require_once "root.php"; +require_once "resources/require.php"; +require_once "resources/check_auth.php"; +if (permission_exists('acl_delete')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//get the id + if (count($_GET) > 0) { + $id = check_str($_GET["id"]); + } + +//delete the record + if (strlen($id) > 0) { + //delete the node + $sql = "delete from v_acl_nodes "; + $sql .= "where acl_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); + //delete acl + $sql = "delete from v_acl "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and acl_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); + } + +//redirect the user + $_SESSION['message'] = $text['message-delete']; + header('Location: acls.php'); + +?> \ No newline at end of file diff --git a/app/acl/acl_edit.php b/app/acl/acl_edit.php new file mode 100644 index 0000000000..09d76af3d4 --- /dev/null +++ b/app/acl/acl_edit.php @@ -0,0 +1,233 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane + James Rose +*/ +require_once "root.php"; +require_once "resources/require.php"; +require_once "resources/check_auth.php"; +if (permission_exists('acl_add') || permission_exists('acl_edit')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//action add or update + if (isset($_REQUEST["id"])) { + $action = "update"; + $acl_uuid = check_str($_REQUEST["id"]); + } + else { + $action = "add"; + } + +//get http post variables and set them to php variables + if (count($_POST) > 0) { + $acl_name = check_str($_POST["acl_name"]); + $acl_type = check_str($_POST["acl_type"]); + $acl_description = check_str($_POST["acl_description"]); + } + +if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { + + if ($action == "update") { + $acl_uuid = check_str($_POST["acl_uuid"]); + } + + //check for all required data + $msg = ''; + if (strlen($acl_name) == 0) { $msg .= $text['message-required']." ".$text['label-acl_name']."
\n"; } + if (strlen($acl_type) == 0) { $msg .= $text['message-required']." ".$text['label-acl_type']."
\n"; } + if (strlen($acl_description) == 0) { $msg .= $text['message-required']." ".$text['label-acl_description']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "resources/header.php"; + require_once "resources/persist_form_var.php"; + echo "
\n"; + echo "
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "resources/footer.php"; + return; + } + + //add or update the database + if ($_POST["persistformvar"] != "true") { + if ($action == "add" && permission_exists('acl_add')) { + $sql = "insert into v_acl "; + $sql .= "("; + $sql .= "domain_uuid, "; + $sql .= "acl_uuid, "; + $sql .= "acl_name, "; + $sql .= "acl_type, "; + $sql .= "acl_description "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'$domain_uuid', "; + $sql .= "'".uuid()."', "; + $sql .= "'$acl_name', "; + $sql .= "'$acl_type', "; + $sql .= "'$acl_description' "; + $sql .= ")"; + $db->exec(check_sql($sql)); + unset($sql); + + $_SESSION['message'] = $text['message-add']; + header('Location: acls.php'); + return; + + } //if ($action == "add") + + if ($action == "update" && permission_exists('acl_edit')) { + $sql = "update v_acl set "; + $sql .= "acl_name = '$acl_name', "; + $sql .= "acl_type = '$acl_type', "; + $sql .= "acl_description = '$acl_description' "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and acl_uuid = '$acl_uuid'"; + $db->exec(check_sql($sql)); + unset($sql); + + $_SESSION['message'] = $text['message-update']; + header('Location: acls.php'); + return; + + } //if ($action == "update") + } //if ($_POST["persistformvar"] != "true") +} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) + +//pre-populate the form + if (count($_GET) > 0 && $_POST["persistformvar"] != "true") { + $acl_uuid = check_str($_GET["id"]); + $sql = "select * from v_acl "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and acl_uuid = '$acl_uuid' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as &$row) { + $acl_name = $row["acl_name"]; + $acl_type = $row["acl_type"]; + $acl_description = $row["acl_description"]; + break; //limit to 1 row + } + unset ($prep_statement); + } + +//show the header + require_once "resources/header.php"; + +//show the content + echo "
"; + echo "\n"; + echo "\n"; + echo " "; + echo " "; + echo "
\n"; + echo "
"; + + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " "; + echo "
".$text['title-acl']."\n"; + echo " "; + echo " "; + echo "
\n"; + echo " ".$text['label-acl_name']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-acl_name']."\n"; + echo "
\n"; + echo " ".$text['label-acl_type']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-acl_type']."\n"; + echo "
\n"; + echo " ".$text['label-acl_description']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-acl_description']."\n"; + echo "
\n"; + if ($action == "update") { + echo " \n"; + } + echo " \n"; + echo "
"; + echo ""; + + echo "
"; + echo "
"; + +//include the footer + require_once "resources/footer.php"; +?> \ No newline at end of file diff --git a/app/acl/acl_node_delete.php b/app/acl/acl_node_delete.php new file mode 100644 index 0000000000..0175144c95 --- /dev/null +++ b/app/acl/acl_node_delete.php @@ -0,0 +1,64 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane + James Rose +*/ +require_once "root.php"; +require_once "resources/require.php"; +require_once "resources/check_auth.php"; +if (permission_exists('acl_node_delete')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//get the id + if (count($_GET)>0) { + $id = check_str($_GET["id"]); + } + +//delete the record +if (strlen($id) > 0) { + $sql = "delete from v_acl_nodes "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and acl_node_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); +} + +//redirect the user + $_SESSION['message'] = $text['message-delete']; + header('Location: acl_nodes.php'); + + +?> \ No newline at end of file diff --git a/app/acl/acl_node_edit.php b/app/acl/acl_node_edit.php new file mode 100644 index 0000000000..4b2521073b --- /dev/null +++ b/app/acl/acl_node_edit.php @@ -0,0 +1,233 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane + James Rose +*/ +require_once "root.php"; +require_once "resources/require.php"; +require_once "resources/check_auth.php"; +if (permission_exists('acl_node_add') || permission_exists('acl_node_edit')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//action add or update + if (isset($_REQUEST["id"])) { + $action = "update"; + $acl_node_uuid = check_str($_REQUEST["id"]); + } + else { + $action = "add"; + } + +//get http post variables and set them to php variables + if (count($_POST)>0) { + $node_type = check_str($_POST["node_type"]); + $nod_cidr = check_str($_POST["nod_cidr"]); + $nod_description = check_str($_POST["nod_description"]); + } + +if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { + + $msg = ''; + if ($action == "update") { + $acl_node_uuid = check_str($_POST["acl_node_uuid"]); + } + + //check for all required data + if (strlen($node_type) == 0) { $msg .= $text['message-required']." ".$text['label-node_type']."
\n"; } + if (strlen($nod_cidr) == 0) { $msg .= $text['message-required']." ".$text['label-nod_cidr']."
\n"; } + //if (strlen($nod_description) == 0) { $msg .= $text['message-required']." ".$text['label-nod_description']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "resources/header.php"; + require_once "resources/persist_form_var.php"; + echo "
\n"; + echo "
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "resources/footer.php"; + return; + } + + //add or update the database + if ($_POST["persistformvar"] != "true") { + if ($action == "add" && permission_exists('acl_node_add')) { + $sql = "insert into v_acl_nodes "; + $sql .= "("; + $sql .= "domain_uuid, "; + $sql .= "acl_node_uuid, "; + $sql .= "node_type, "; + $sql .= "nod_cidr, "; + $sql .= "nod_description "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'$domain_uuid', "; + $sql .= "'".uuid()."', "; + $sql .= "'$node_type', "; + $sql .= "'$nod_cidr', "; + $sql .= "'$nod_description' "; + $sql .= ")"; + $db->exec(check_sql($sql)); + unset($sql); + + $_SESSION['message'] = $text['message-add']; + header('Location: acl_nodes.php'); + return; + + } //if ($action == "add") + + if ($action == "update" && permission_exists('acl_node_edit')) { + $sql = "update v_acl_nodes set "; + $sql .= "node_type = '$node_type', "; + $sql .= "nod_cidr = '$nod_cidr', "; + $sql .= "nod_description = '$nod_description' "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and acl_node_uuid = '$acl_node_uuid'"; + $db->exec(check_sql($sql)); + unset($sql); + + $_SESSION['message'] = $text['message-update']; + header('Location: acl_nodes.php'); + return; + + } //if ($action == "update") + } //if ($_POST["persistformvar"] != "true") +} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) + +//pre-populate the form + if (count($_GET)>0 && $_POST["persistformvar"] != "true") { + $acl_node_uuid = check_str($_GET["id"]); + $sql = "select * from v_acl_nodes "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and acl_node_uuid = '$acl_node_uuid' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach ($result as &$row) { + $node_type = $row["node_type"]; + $nod_cidr = $row["nod_cidr"]; + $nod_description = $row["nod_description"]; + break; //limit to 1 row + } + unset ($prep_statement); + } + +//show the header + require_once "resources/header.php"; + +//show the content + echo "
"; + echo "\n"; + echo "\n"; + echo " "; + echo " "; + echo "
\n"; + echo "
"; + + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " "; + echo "
".$text['title-acl_node']."\n"; + echo " "; + echo " "; + echo "
\n"; + echo " ".$text['label-node_type']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-node_type']."\n"; + echo "
\n"; + echo " ".$text['label-nod_cidr']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-nod_cidr']."\n"; + echo "
\n"; + echo " ".$text['label-nod_description']."\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-nod_description']."\n"; + echo "
\n"; + if ($action == "update") { + echo " \n"; + } + echo " \n"; + echo "
"; + echo ""; + + echo "
"; + echo "
"; + +//include the footer + require_once "resources/footer.php"; +?> \ No newline at end of file diff --git a/app/acl/acl_nodes.php b/app/acl/acl_nodes.php new file mode 100644 index 0000000000..7f9302ad10 --- /dev/null +++ b/app/acl/acl_nodes.php @@ -0,0 +1,174 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane + James Rose +*/ +require_once "root.php"; +require_once "resources/require.php"; +require_once "resources/check_auth.php"; +if (permission_exists('acl_node_view')) { + //access granted +} +else { + echo "access denied"; + exit; +} +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//get variables used to control the order + $order_by = $_GET["order_by"]; + $order = $_GET["order"]; + +//additional includes + require_once "resources/header.php"; + require_once "resources/paging.php"; + +//show the content + echo "
"; + echo "\n"; + echo "\n"; + echo " "; + echo ""; + echo "
\n"; + echo "
"; + + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['title-acl_nodes']." 
\n"; + + //prepare to page the results + $sql = "select count(*) as num_rows from v_acl_nodes "; + $sql .= "where domain_uuid = '$domain_uuid' "; + if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } + $prep_statement = $db->prepare($sql); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['num_rows'] > 0) { + $num_rows = $row['num_rows']; + } + else { + $num_rows = '0'; + } + } + + //prepare to page the results + $rows_per_page = 10; + $param = ""; + $page = $_GET['page']; + if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } + list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); + $offset = $rows_per_page * $page; + + //get the list + $sql = "select * from v_acl_nodes "; + $sql .= "where domain_uuid = '$domain_uuid' "; + if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } + $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); + + $c = 0; + $row_style["0"] = "row_style0"; + $row_style["1"] = "row_style1"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo th_order_by('node_type', $text['label-node_type'], $order_by, $order); + echo th_order_by('nod_cidr', $text['label-nod_cidr'], $order_by, $order); + echo th_order_by('nod_description', $text['label-nod_description'], $order_by, $order); + echo "\n"; + echo "\n"; + + if ($result_count > 0) { + foreach($result as $row) { + if (permission_exists('acl_node_edit')) { + $tr_link = "href='acl_node_edit.php?id=".$row['acl_node_uuid']."'"; + } + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + if ($c==0) { $c=1; } else { $c=0; } + } //end foreach + unset($sql, $result, $row_count); + } //end if results + + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
"; + if (permission_exists('acl_node_add')) { + echo "$v_link_label_add"; + } + else { + echo " \n"; + } + echo "
".$row['node_type']." ".$row['nod_cidr']." ".$row['nod_description']." "; + if (permission_exists('acl_node_edit')) { + echo "$v_link_label_edit"; + } + if (permission_exists('acl_node_delete')) { + echo "$v_link_label_delete"; + } + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
 $paging_controls"; + if (permission_exists('acl_node_add')) { + echo "$v_link_label_add"; + } + else { + echo " "; + } + echo "
\n"; + echo "
"; + echo "
"; + echo "

"; + + echo "
"; + echo "
"; + echo "

"; + +//include the footer + require_once "resources/footer.php"; +?> \ No newline at end of file diff --git a/app/acl/acls.php b/app/acl/acls.php new file mode 100644 index 0000000000..face93711a --- /dev/null +++ b/app/acl/acls.php @@ -0,0 +1,179 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane + James Rose +*/ +require_once "root.php"; +require_once "resources/require.php"; +require_once "resources/check_auth.php"; +if (permission_exists('acl_view')) { + //access granted +} +else { + echo "access denied"; + exit; +} +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +//get variables used to control the order + $order_by = $_GET["order_by"]; + $order = $_GET["order"]; + +//additional includes + require_once "resources/header.php"; + require_once "resources/paging.php"; + +//show the content + echo "
"; + echo "\n"; + echo "\n"; + echo " "; + echo ""; + echo "
\n"; + echo "
"; + + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['title-acls']." 
\n"; + echo " ".$text['description-acl']."

\n"; + echo "
\n"; + + //prepare to page the results + $sql = "select count(*) as num_rows from v_acl "; + $sql .= "where domain_uuid = '$domain_uuid' "; + if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } + $prep_statement = $db->prepare($sql); + if ($prep_statement) { + $prep_statement->execute(); + $row = $prep_statement->fetch(PDO::FETCH_ASSOC); + if ($row['num_rows'] > 0) { + $num_rows = $row['num_rows']; + } + else { + $num_rows = '0'; + } + } + + //prepare to page the results + $rows_per_page = 10; + $param = ""; + $page = $_GET['page']; + if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } + list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); + $offset = $rows_per_page * $page; + + //get the list + $sql = "select * from v_acl "; + $sql .= "where domain_uuid = '$domain_uuid' "; + if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } + $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); + + $c = 0; + $row_style["0"] = "row_style0"; + $row_style["1"] = "row_style1"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo th_order_by('acl_name', $text['label-acl_name'], $order_by, $order); + echo th_order_by('acl_type', $text['label-acl_type'], $order_by, $order); + echo th_order_by('acl_description', $text['label-acl_description'], $order_by, $order); + echo "\n"; + echo "\n"; + + if ($result_count > 0) { + foreach($result as $row) { + if (permission_exists('acl_edit')) { + $tr_link = "href='acl_edit.php?id=".$row['acl_uuid']."'"; + } + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n"; + if ($c==0) { $c=1; } else { $c=0; } + } //end foreach + unset($sql, $result, $row_count); + } //end if results + + echo "\n"; + echo "\n"; + echo "\n"; + + echo "
"; + if (permission_exists('acl_add')) { + echo "$v_link_label_add"; + } + else { + echo " \n"; + } + echo "
".$row['acl_name']." ".$row['acl_type']." ".$row['acl_description']." "; + if (permission_exists('acl_edit')) { + echo "$v_link_label_edit"; + } + if (permission_exists('acl_delete')) { + echo "$v_link_label_delete"; + } + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
 $paging_controls"; + if (permission_exists('acl_add')) { + echo "$v_link_label_add"; + } + else { + echo " "; + } + echo "
\n"; + echo "
"; + echo "
"; + echo "

"; + + echo "
"; + echo "
"; + echo "

"; + +//include the footer + require_once "resources/footer.php"; +?> \ No newline at end of file diff --git a/app/acl/app_acl_languages.php b/app/acl/app_acl_languages.php new file mode 100644 index 0000000000..797fbd3a81 --- /dev/null +++ b/app/acl/app_acl_languages.php @@ -0,0 +1,114 @@ + \ No newline at end of file diff --git a/app/acl/app_config.php b/app/acl/app_config.php new file mode 100644 index 0000000000..8c58411fee --- /dev/null +++ b/app/acl/app_config.php @@ -0,0 +1,121 @@ + \ No newline at end of file diff --git a/app/acl/app_languages.php b/app/acl/app_languages.php new file mode 100644 index 0000000000..a6f1220423 --- /dev/null +++ b/app/acl/app_languages.php @@ -0,0 +1,185 @@ + \ No newline at end of file diff --git a/app/acl/root.php b/app/acl/root.php new file mode 100644 index 0000000000..4a9f1d5520 --- /dev/null +++ b/app/acl/root.php @@ -0,0 +1,50 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2014 + 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