diff --git a/app/conferences/app_config.php b/app/conferences/app_config.php new file mode 100644 index 0000000000..d0e5fece9f --- /dev/null +++ b/app/conferences/app_config.php @@ -0,0 +1,157 @@ + \ No newline at end of file diff --git a/app/conferences/app_languages.php b/app/conferences/app_languages.php new file mode 100644 index 0000000000..4f451c876e --- /dev/null +++ b/app/conferences/app_languages.php @@ -0,0 +1,123 @@ + \ No newline at end of file diff --git a/app/conferences/conference_delete.php b/app/conferences/conference_delete.php new file mode 100644 index 0000000000..f67530a044 --- /dev/null +++ b/app/conferences/conference_delete.php @@ -0,0 +1,97 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ +require_once "root.php"; +require_once "includes/require.php"; +require_once "includes/checkauth.php"; +if (permission_exists('conference_delete')) { + //access granted +} +else { + echo "access denied"; + exit; +} + +//add multi-lingual support + require_once "app/calls/app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + +if (count($_GET)>0) { + $id = check_str($_GET["id"]); +} + +if (strlen($id)>0) { + + //get the dialplan uuid + $sql = "select * from v_conferences "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and conference_uuid = '$id' "; + $prep_statement = $db->prepare($sql); + $prep_statement->execute(); + while($row = $prep_statement->fetch(PDO::FETCH_ASSOC)) { + $dialplan_uuid = $row['dialplan_uuid']; + } + + //delete conference + $sql = "delete from v_conferences "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and conference_uuid = '$id' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + unset($sql); + + //delete the dialplan entry + $sql = "delete from v_dialplans "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and dialplan_uuid = '$dialplan_uuid' "; + $db->query($sql); + unset($sql); + + //delete the dialplan details + $sql = "delete from v_dialplan_details "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and dialplan_uuid = '$dialplan_uuid' "; + $db->query($sql); + unset($sql); + + //syncrhonize configuration + save_dialplan_xml(); + + //apply settings reminder + $_SESSION["reload_xml"] = true; +} + +//redirect the user + require_once "includes/header.php"; + echo "\n"; + echo "
\n"; + echo "".$text['confirm-delete']."\n"; + echo "
\n"; + require_once "includes/footer.php"; + return; + +?> \ No newline at end of file diff --git a/app/conferences/conference_edit.php b/app/conferences/conference_edit.php new file mode 100644 index 0000000000..1f8b2a10eb --- /dev/null +++ b/app/conferences/conference_edit.php @@ -0,0 +1,551 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ +require_once "root.php"; +require_once "includes/require.php"; +require_once "includes/checkauth.php"; +if (permission_exists('conference_add') || permission_exists('conference_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"; + $conference_uuid = check_str($_REQUEST["id"]); + } + else { + $action = "add"; + } + +//get http post variables and set them to php variables + if (count($_POST)>0) { + $dialplan_uuid = check_str($_POST["dialplan_uuid"]); + $conference_name = check_str($_POST["conference_name"]); + $conference_extension = check_str($_POST["conference_extension"]); + $conference_pin_number = check_str($_POST["conference_pin_number"]); + $conference_profile = check_str($_POST["conference_profile"]); + $conference_flags = check_str($_POST["conference_flags"]); + $conference_order = check_str($_POST["conference_order"]); + $conference_description = check_str($_POST["conference_description"]); + $conference_enabled = check_str($_POST["conference_enabled"]); + + //sanitize the conference name + $conference_name = preg_replace("/[^A-Za-z0-9\- ]/", "", $conference_name); + $conference_name = str_replace(" ", "-", $conference_name); + } + +//delete the user from the v_conference_users + if ($_GET["a"] == "delete" && permission_exists("conference_delete")) { + //set the variables + $user_uuid = check_str($_REQUEST["user_uuid"]); + $conference_uuid = check_str($_REQUEST["id"]); + //delete the group from the users + $sql = "delete from v_conference_users "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and conference_uuid = '".$conference_uuid."' "; + $sql .= "and user_uuid = '".$user_uuid."' "; + $db->exec(check_sql($sql)); + //redirect the browser + require_once "includes/header.php"; + echo "\n"; + echo "
".$text['confirm-delete']."
"; + require_once "includes/footer.php"; + return; + } + +//add the user to the v_conference_users + if (strlen($_REQUEST["user_uuid"]) > 0 && strlen($_REQUEST["id"]) > 0 && $_GET["a"] != "delete") { + //set the variables + $user_uuid = check_str($_REQUEST["user_uuid"]); + $conference_uuid = check_str($_REQUEST["id"]); + //assign the user to the extension + $sql_insert = "insert into v_conference_users "; + $sql_insert .= "("; + $sql_insert .= "conference_user_uuid, "; + $sql_insert .= "domain_uuid, "; + $sql_insert .= "conference_uuid, "; + $sql_insert .= "user_uuid "; + $sql_insert .= ")"; + $sql_insert .= "values "; + $sql_insert .= "("; + $sql_insert .= "'".uuid()."', "; + $sql_insert .= "'".$_SESSION['domain_uuid']."', "; + $sql_insert .= "'".$conference_uuid."', "; + $sql_insert .= "'".$user_uuid."' "; + $sql_insert .= ")"; + $db->exec($sql_insert); + //redirect the browser + require_once "includes/header.php"; + echo "\n"; + echo "
".$text['confirm-add']."
"; + require_once "includes/footer.php"; + return; + } + +if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { + + $msg = ''; + if ($action == "update") { + $conference_uuid = check_str($_POST["conference_uuid"]); + } + + //check for all required data + //if (strlen($dialplan_uuid) == 0) { $msg .= "Please provide: Dialplan UUID
\n"; } + if (strlen($conference_name) == 0) { $msg .= "".$text['confirm-name']."
\n"; } + if (strlen($conference_extension) == 0) { $msg .= "".$text['confirm-extension']."
\n"; } + //if (strlen($conference_pin_number) == 0) { $msg .= "Please provide: Pin Number
\n"; } + if (strlen($conference_profile) == 0) { $msg .= "".$text['confirm-profile']."
\n"; } + //if (strlen($conference_flags) == 0) { $msg .= "Please provide: Flags
\n"; } + //if (strlen($conference_order) == 0) { $msg .= "Please provide: Order
\n"; } + //if (strlen($conference_description) == 0) { $msg .= "Please provide: Description
\n"; } + if (strlen($conference_enabled) == 0) { $msg .= "".$text['confirm-enabled']."
\n"; } + if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { + require_once "includes/header.php"; + require_once "includes/persistformvar.php"; + echo "
\n"; + echo "
\n"; + echo $msg."
"; + echo "
\n"; + persistformvar($_POST); + echo "
\n"; + require_once "includes/footer.php"; + return; + } + + //add or update the database + if ($_POST["persistformvar"] != "true") { + if ($action == "add") { + //prepare the uuids + $conference_uuid = uuid(); + $dialplan_uuid = uuid(); + //add the conference + $sql = "insert into v_conferences "; + $sql .= "("; + $sql .= "domain_uuid, "; + $sql .= "conference_uuid, "; + $sql .= "dialplan_uuid, "; + $sql .= "conference_name, "; + $sql .= "conference_extension, "; + $sql .= "conference_pin_number, "; + $sql .= "conference_profile, "; + $sql .= "conference_flags, "; + $sql .= "conference_order, "; + $sql .= "conference_description, "; + $sql .= "conference_enabled "; + $sql .= ")"; + $sql .= "values "; + $sql .= "("; + $sql .= "'$domain_uuid', "; + $sql .= "'$conference_uuid', "; + $sql .= "'$dialplan_uuid', "; + $sql .= "'$conference_name', "; + $sql .= "'$conference_extension', "; + $sql .= "'$conference_pin_number', "; + $sql .= "'$conference_profile', "; + $sql .= "'$conference_flags', "; + $sql .= "'$conference_order', "; + $sql .= "'$conference_description', "; + $sql .= "'$conference_enabled' "; + $sql .= ")"; + $db->exec(check_sql($sql)); + unset($sql); + + //create the dialplan entry + $dialplan_name = $conference_name; + $dialplan_order ='333'; + $dialplan_context = $_SESSION['context']; + $dialplan_enabled = 'true'; + $dialplan_description = $conference_description; + $app_uuid = 'b81412e8-7253-91f4-e48e-42fc2c9a38d9'; + dialplan_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_name, $dialplan_order, $dialplan_context, $dialplan_enabled, $dialplan_description, $app_uuid); + + // + $dialplan_detail_tag = 'condition'; //condition, action, antiaction + $dialplan_detail_type = 'destination_number'; + $dialplan_detail_data = '^'.$conference_extension.'$'; + $dialplan_detail_order = '000'; + $dialplan_detail_group = '2'; + dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data); + + // + $dialplan_detail_tag = 'action'; //condition, action, antiaction + $dialplan_detail_type = 'answer'; + $dialplan_detail_data = ''; + $dialplan_detail_order = '010'; + $dialplan_detail_group = '2'; + dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data); + + // + $dialplan_detail_tag = 'action'; //condition, action, antiaction + $dialplan_detail_type = 'conference'; + $pin_number = ''; if (strlen($conference_pin_number) > 0) { $pin_number = "+".$conference_pin_number; } + $flags = ''; if (strlen($conference_flags) > 0) { $flags = "+flags{".$conference_flags."}"; } + $dialplan_detail_data = $conference_name.'-'.$_SESSION['domain_name']."@".$conference_profile.$pin_number.$flags; + $dialplan_detail_order = '020'; + $dialplan_detail_group = '2'; + dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data); + + //save the xml + save_dialplan_xml(); + + //apply settings reminder + $_SESSION["reload_xml"] = true; + + //redirect the browser + require_once "includes/header.php"; + echo "\n"; + echo "
\n"; + echo "".$text['confirm-add']."\n"; + echo "
\n"; + require_once "includes/footer.php"; + return; + } //if ($action == "add") + + if ($action == "update") { + //update the conference extension + $sql = "update v_conferences set "; + $sql .= "conference_name = '$conference_name', "; + $sql .= "conference_extension = '$conference_extension', "; + $sql .= "conference_pin_number = '$conference_pin_number', "; + $sql .= "conference_profile = '$conference_profile', "; + $sql .= "conference_flags = '$conference_flags', "; + $sql .= "conference_order = '$conference_order', "; + $sql .= "conference_description = '$conference_description', "; + $sql .= "conference_enabled = '$conference_enabled' "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and conference_uuid = '$conference_uuid'"; + $db->exec(check_sql($sql)); + unset($sql); + + //udpate the conference dialplan + $sql = "update v_dialplans set "; + $sql .= "dialplan_name = '$conference_name', "; + if (strlen($dialplan_order) > 0) { + $sql .= "dialplan_order = '333', "; + } + $sql .= "dialplan_context = '".$_SESSION['context']."', "; + $sql .= "dialplan_enabled = 'true', "; + $sql .= "dialplan_description = '$conference_description' "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and dialplan_uuid = '$dialplan_uuid' "; + $db->query($sql); + unset($sql); + + //update dialplan detail condition + $sql = "update v_dialplan_details set "; + $sql .= "dialplan_detail_data = '^".$conference_extension."$' "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and dialplan_detail_tag = 'condition' "; + $sql .= "and dialplan_detail_type = 'destination_number' "; + $sql .= "and dialplan_uuid = '$dialplan_uuid' "; + $db->query($sql); + unset($sql); + + //update dialplan detail action + $pin_number = ''; if (strlen($conference_pin_number) > 0) { $pin_number = "+".$conference_pin_number; } + $flags = ''; if (strlen($conference_flags) > 0) { $flags = "+flags{".$conference_flags."}"; } + $dialplan_detail_data = $conference_name.'-'.$_SESSION['domain_name']."@".$conference_profile.$pin_number.$flags; + $sql = "update v_dialplan_details set "; + $sql .= "dialplan_detail_data = '".$dialplan_detail_data."' "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and dialplan_detail_tag = 'action' "; + $sql .= "and dialplan_detail_type = 'conference' "; + $sql .= "and dialplan_uuid = '$dialplan_uuid' "; + $db->query($sql); + + //save the xml + save_dialplan_xml(); + + //apply settings reminder + $_SESSION["reload_xml"] = true; + + //redirect the browser + require_once "includes/header.php"; + echo "\n"; + echo "
\n"; + echo "".$text['confirm-update']."\n"; + echo "
\n"; + require_once "includes/footer.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") { + $conference_uuid = $_GET["id"]; + $sql = "select * from v_conferences "; + $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "and conference_uuid = '$conference_uuid' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(); + foreach ($result as &$row) { + $dialplan_uuid = $row["dialplan_uuid"]; + $conference_name = $row["conference_name"]; + $conference_extension = $row["conference_extension"]; + $conference_pin_number = $row["conference_pin_number"]; + $conference_profile = $row["conference_profile"]; + $conference_flags = $row["conference_flags"]; + $conference_order = $row["conference_order"]; + $conference_description = $row["conference_description"]; + $conference_enabled = $row["conference_enabled"]; + $conference_name = str_replace("-", " ", $conference_name); + } + unset ($prep_statement); + } + +//set defaults + if (strlen($conference_enabled) == 0) { $conference_enabled = "true"; } + +//show the header + require_once "includes/header.php"; + +//show the content + echo "
"; + echo "\n"; + echo "\n"; + echo " "; + echo " "; + echo "
\n"; + echo "
"; + + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + if ($action == "add") { + echo "\n"; + } + if ($action == "update") { + 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"; + + if (if_group("admin") || if_group("superadmin")) { + if ($action == "update") { + echo " "; + echo " "; + echo " "; + 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 " \n"; + echo " "; + echo "
".$text['label-conference-add']."".$text['label-conference-edit']."
\n"; + echo "".$text['description']." \n"; + echo "Click on ".$text['title-3']." \n"; + echo "".$text['description-3']."

\n"; + echo "
\n"; + echo " ".$text['label-name'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-name']."\n"; + echo "
\n"; + echo " ".$text['label-extension'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-extension']."\n"; + echo "
\n"; + echo " ".$text['label-pin'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-pin']."\n"; + echo "
User List:"; + + echo " \n"; + $sql = "SELECT * FROM v_conference_users as e, v_users as u "; + $sql .= "where e.user_uuid = u.user_uuid "; + $sql .= "and u.user_enabled = 'true' "; + $sql .= "and e.domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and e.conference_uuid = '".$conference_uuid."' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); + $result_count = count($result); + foreach($result as $field) { + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + } + echo "
".$field['username']."\n"; + echo " $v_link_label_delete\n"; + echo "
\n"; + + echo "
\n"; + $sql = "SELECT * FROM v_users "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and user_enabled = 'true' "; + $prep_statement = $db->prepare(check_sql($sql)); + $prep_statement->execute(); + echo " "; + echo " \n"; + unset($sql, $result); + echo "
\n"; + echo " ".$text['description-user-add']."\n"; + echo "
\n"; + echo "
\n"; + echo " ".$text['table-profile'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-profile']."\n"; + echo "
\n"; + echo " Flags:\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-flags']."\n"; + echo "
\n"; + echo " ".$text['label-order'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-order']."\n"; + echo "
\n"; + echo " ".$text['table-enabled'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-conference-enable']."\n"; + echo "
\n"; + echo " ".$text['label-description'].":\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo "".$text['description-info']."\n"; + echo "
\n"; + if ($action == "update") { + echo " \n"; + echo " \n"; + } + echo " \n"; + echo "
"; + echo ""; + + echo "
"; + echo "
"; + +//include the footer + require_once "includes/footer.php"; +?> diff --git a/app/conferences/conferences.php b/app/conferences/conferences.php new file mode 100644 index 0000000000..fa060e4f2c --- /dev/null +++ b/app/conferences/conferences.php @@ -0,0 +1,209 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane +*/ +require_once "root.php"; +require_once "includes/require.php"; +require_once "includes/checkauth.php"; +if (permission_exists('conference_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']]; + } + +require_once "includes/header.php"; +require_once "includes/paging.php"; + +//get variables used to control the order + $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 " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
".$text['title']." 
\n"; + echo " ".$text['description']." \n"; + if (permission_exists('conferences_active_advanced_view')) { + echo " Show ".$text['title-2']." ".$text['description-2']."

\n"; + } + echo "
\n"; + + //prepare to page the results + if (if_group("superadmin") || if_group("admin")) { + //show all extensions + $sql = "select count(*) as num_rows from v_conferences "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + } + else { + //show only assigned extensions + $sql = "select count(*) as num_rows from v_conferences as c, v_conference_users as u "; + $sql .= "where c.conference_uuid = u.conference_uuid "; + $sql .= "and c.domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and u.user_uuid = '".$_SESSION['user_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 + if (if_group("superadmin") || if_group("admin")) { + //show all extensions + $sql = "select * from v_conferences "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + } + else { + //show only assigned extensions + $sql = "select * from v_conferences as c, v_conference_users as u "; + $sql .= "where c.conference_uuid = u.conference_uuid "; + $sql .= "and c.domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and u.user_uuid = '".$_SESSION['user_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(); + $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('conference_name', $text['table-name'], $order_by, $order); + echo th_order_by('conference_extension', $text['table-extension'], $order_by, $order); + echo th_order_by('conference_profile', $text['table-profile'], $order_by, $order); + //echo th_order_by('conference_flags', 'Flags', $order_by, $order); + echo th_order_by('conference_order', $text['table-order'], $order_by, $order); + echo th_order_by('conference_enabled', $text['table-enabled'], $order_by, $order); + echo th_order_by('conference_description', $text['table-description'], $order_by, $order); + echo "\n"; + echo "\n"; + + if ($result_count > 0) { + foreach($result as $row) { + $conference_name = $row['conference_name']; + $conference_name = str_replace("-", " ", $conference_name); + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + //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 "
\n"; + if (permission_exists('conference_add')) { + echo " $v_link_label_add\n"; + } + else { + echo "  \n"; + } + echo "
".$conference_name." ".$row['conference_extension']." ".$row['conference_profile']." ".$row['conference_flags']." ".$row['conference_order']." ".$row['conference_enabled']." ".$row['conference_description']." \n"; + if (permission_exists('conference_edit')) { + echo " $v_link_label_edit\n"; + } + if (permission_exists('conference_delete')) { + echo " $v_link_label_delete\n"; + } + echo "
\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
 $paging_controls\n"; + if (permission_exists('conference_add')) { + echo " $v_link_label_add\n"; + } + else { + echo "  \n"; + } + echo "
\n"; + echo "
"; + echo "
"; + echo "

"; + echo "

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

"; + +//include the footer + require_once "includes/footer.php"; +?> diff --git a/app/conferences/root.php b/app/conferences/root.php new file mode 100644 index 0000000000..7b882438ea --- /dev/null +++ b/app/conferences/root.php @@ -0,0 +1,50 @@ + + 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