Call Flows - directs calls to a destination or alternate destination. A phone call to the feature code will toggle the call between the two destinations. Commonly used for Day/Night mode.

This commit is contained in:
Mark Crane 2012-09-14 20:50:34 +00:00
parent 9d91ee1963
commit 79b6aba199
5 changed files with 650 additions and 0 deletions

View File

@ -0,0 +1,92 @@
<?php
//application details
$apps[$x]['name'] = 'Call Flows';
$apps[$x]['uuid'] = 'b1b70f85-6b42-429b-8c5a-60c8b02b7d14';
$apps[$x]['category'] = '';
$apps[$x]['subcategory'] = '';
$apps[$x]['version'] = '';
$apps[$x]['license'] = 'Mozilla Public License 1.1';
$apps[$x]['url'] = 'http://www.fusionpbx.com';
$apps[$x]['description']['en'] = '';
//menu details
$apps[$x]['menu'][0]['title']['en'] = 'Call Flows';
$apps[$x]['menu'][0]['uuid'] = 'b0939384-7055-44e8-8b4c-9f72293e1878';
$apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
$apps[$x]['menu'][0]['category'] = 'internal';
$apps[$x]['menu'][0]['path'] = '/app/call_flows/call_flows.php';
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
$apps[$x]['menu'][0]['groups'][] = 'admin';
//permission details
$y = 0;
$apps[$x]['permissions'][$y]['name'] = 'call_flow_view';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'call_flow_add';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'call_flow_edit';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'call_flow_delete';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
$y++;
//schema details
$y = 0; //table array index
$z = 0; //field array index
$apps[$x]['db'][$y]['table'] = 'v_call_flows';
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key'] = 'foreign';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key'] = 'primary';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_extension';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Enter the extension number.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_feature_code';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Enter the feature code.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_status';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Select the status.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_app';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Enter the application.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_pin_number';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Enter the PIN number.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_data';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Enter the application data.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_anti_app';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Enter the alternate application';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_anti_data';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Enter the alernate application data.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_flow_description';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = 'Enter the description.';
$z++;
?>

View File

@ -0,0 +1,36 @@
<?php
require_once "root.php";
require_once "includes/require.php";
require_once "includes/checkauth.php";
if (permission_exists('call_flow_delete')) {
//access granted
}
else {
echo "access denied";
exit;
}
if (count($_GET)>0) {
$id = check_str($_GET["id"]);
}
if (strlen($id)>0) {
//delete call_flow
$sql = "delete from v_call_flows ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and call_flow_uuid = '$id' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
unset($sql);
}
//redirect the user
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_flows.php\">\n";
echo "<div align='center'>\n";
echo "Delete Complete\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
?>

View File

@ -0,0 +1,307 @@
<?php
require_once "root.php";
require_once "includes/require.php";
require_once "includes/checkauth.php";
if (permission_exists('call_flow_add') || permission_exists('call_flow_edit')) {
//access granted
}
else {
echo "access denied";
exit;
}
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
$call_flow_uuid = check_str($_REQUEST["id"]);
}
else {
$action = "add";
}
//get http post variables and set them to php variables
if (count($_POST)>0) {
$call_flow_extension = check_str($_POST["call_flow_extension"]);
$call_flow_feature_code = check_str($_POST["call_flow_feature_code"]);
$call_flow_status = check_str($_POST["call_flow_status"]);
$call_flow_app = check_str($_POST["call_flow_app"]);
$call_flow_pin_number = check_str($_POST["call_flow_pin_number"]);
$call_flow_data = check_str($_POST["call_flow_data"]);
$call_flow_anti_app = check_str($_POST["call_flow_anti_app"]);
$call_flow_anti_data = check_str($_POST["call_flow_anti_data"]);
$call_flow_description = check_str($_POST["call_flow_description"]);
}
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$msg = '';
if ($action == "update") {
$call_flow_uuid = check_str($_POST["call_flow_uuid"]);
}
//check for all required data
//if (strlen($call_flow_extension) == 0) { $msg .= "Please provide: Extension<br>\n"; }
//if (strlen($call_flow_feature_code) == 0) { $msg .= "Please provide: Feature Code<br>\n"; }
//if (strlen($call_flow_status) == 0) { $msg .= "Please provide: Status<br>\n"; }
//if (strlen($call_flow_app) == 0) { $msg .= "Please provide: Application<br>\n"; }
//if (strlen($call_flow_pin_number) == 0) { $msg .= "Please provide: PIN Number<br>\n"; }
//if (strlen($call_flow_data) == 0) { $msg .= "Please provide: Application Data<br>\n"; }
//if (strlen($call_flow_anti_app) == 0) { $msg .= "Please provide: Alternate Application<br>\n"; }
//if (strlen($call_flow_anti_data) == 0) { $msg .= "Please provide: Application Data<br>\n"; }
//if (strlen($call_flow_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
require_once "includes/persistformvar.php";
echo "<div align='center'>\n";
echo "<table><tr><td>\n";
echo $msg."<br />";
echo "</td></tr></table>\n";
persistformvar($_POST);
echo "</div>\n";
require_once "includes/footer.php";
return;
}
//add or update the database
if ($_POST["persistformvar"] != "true") {
if ($action == "add" && permission_exists('call_flow_add')) {
$sql = "insert into v_call_flows ";
$sql .= "(";
$sql .= "domain_uuid, ";
$sql .= "call_flow_uuid, ";
$sql .= "call_flow_extension, ";
$sql .= "call_flow_feature_code, ";
$sql .= "call_flow_status, ";
$sql .= "call_flow_app, ";
$sql .= "call_flow_pin_number, ";
$sql .= "call_flow_data, ";
$sql .= "call_flow_anti_app, ";
$sql .= "call_flow_anti_data, ";
$sql .= "call_flow_description ";
$sql .= ")";
$sql .= "values ";
$sql .= "(";
$sql .= "'$domain_uuid', ";
$sql .= "'".uuid()."', ";
$sql .= "'$call_flow_extension', ";
$sql .= "'$call_flow_feature_code', ";
$sql .= "'$call_flow_status', ";
$sql .= "'$call_flow_app', ";
$sql .= "'$call_flow_pin_number', ";
$sql .= "'$call_flow_data', ";
$sql .= "'$call_flow_anti_app', ";
$sql .= "'$call_flow_anti_data', ";
$sql .= "'$call_flow_description' ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_flows.php\">\n";
echo "<div align='center'>\n";
echo "Add Complete\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} //if ($action == "add")
if ($action == "update" && permission_exists('call_flow_edit')) {
$sql = "update v_call_flows set ";
$sql .= "call_flow_extension = '$call_flow_extension', ";
$sql .= "call_flow_feature_code = '$call_flow_feature_code', ";
$sql .= "call_flow_status = '$call_flow_status', ";
$sql .= "call_flow_app = '$call_flow_app', ";
$sql .= "call_flow_pin_number = '$call_flow_pin_number', ";
$sql .= "call_flow_data = '$call_flow_data', ";
$sql .= "call_flow_anti_app = '$call_flow_anti_app', ";
$sql .= "call_flow_anti_data = '$call_flow_anti_data', ";
$sql .= "call_flow_description = '$call_flow_description' ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and call_flow_uuid = '$call_flow_uuid'";
$db->exec(check_sql($sql));
unset($sql);
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_flows.php\">\n";
echo "<div align='center'>\n";
echo "Update Complete\n";
echo "</div>\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") {
$call_flow_uuid = check_str($_GET["id"]);
$sql = "select * from v_call_flows ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and call_flow_uuid = '$call_flow_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll();
foreach ($result as &$row) {
$call_flow_extension = $row["call_flow_extension"];
$call_flow_feature_code = $row["call_flow_feature_code"];
$call_flow_status = $row["call_flow_status"];
$call_flow_app = $row["call_flow_app"];
$call_flow_pin_number = $row["call_flow_pin_number"];
$call_flow_data = $row["call_flow_data"];
$call_flow_anti_app = $row["call_flow_anti_app"];
$call_flow_anti_data = $row["call_flow_anti_data"];
$call_flow_description = $row["call_flow_description"];
break; //limit to 1 row
}
unset ($prep_statement);
}
//show the header
require_once "includes/header.php";
//show the content
echo "<div align='center'>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n";
echo "<tr class='border'>\n";
echo " <td align=\"left\">\n";
echo " <br>";
echo "<form method='post' name='frm' action=''>\n";
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td align='left' width='30%' nowrap='nowrap'><b>Call Flow</b></td>\n";
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='call_flows.php'\" value='Back'></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Extension:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_extension' maxlength='255' value=\"$call_flow_extension\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Feature Code:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_feature_code' maxlength='255' value=\"$call_flow_feature_code\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Status:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='call_flow_status'>\n";
echo " <option value=''></option>\n";
if ($call_flow_status == "true") {
echo " <option value='true' SELECTED >on</option>\n";
}
else {
echo " <option value='true'>on</option>\n";
}
if ($call_flow_status == "false") {
echo " <option value='false' SELECTED >off</option>\n";
}
else {
echo " <option value='false'>off</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Application:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_app' maxlength='255' value=\"$call_flow_app\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " PIN Number:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_pin_number' maxlength='255' value=\"$call_flow_pin_number\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Application Data:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_data' maxlength='255' value=\"$call_flow_data\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Alternate Application:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_anti_app' maxlength='255' value=\"$call_flow_anti_app\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Application Data:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_anti_data' maxlength='255' value=\"$call_flow_anti_data\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " Description:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='call_flow_description' maxlength='255' value=\"$call_flow_description\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo " <tr>\n";
echo " <td colspan='2' align='right'>\n";
if ($action == "update") {
echo " <input type='hidden' name='call_flow_uuid' value='$call_flow_uuid'>\n";
}
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
echo " </td>\n";
echo " </tr>";
echo "</table>";
echo "</form>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</div>";
//include the footer
require_once "includes/footer.php";
?>

View File

@ -0,0 +1,165 @@
<?php
require_once "root.php";
require_once "includes/require.php";
require_once "includes/checkauth.php";
if (permission_exists('call_flow_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
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 "<div align='center'>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
echo "<tr class='border'>\n";
echo " <td align=\"center\">\n";
echo " <br />";
echo "<table width='100%' border='0'>\n";
echo " <tr>\n";
echo " <td width='50%' align='left' nowrap='nowrap'><b>Call Flows</b></td>\n";
echo " <td width='50%' align='right'>&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align='left' colspan='2'>\n";
echo " Direct calls between two destinations by calling a feature code.<br /><br />\n";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
//prepare to page the results
$sql = "select count(*) as num_rows from v_call_flows ";
$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_call_flows ";
$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();
$result_count = count($result);
unset ($prep_statement, $sql);
$c = 0;
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo th_order_by('call_flow_status', 'Status', $order_by, $order);
echo th_order_by('call_flow_extension', 'Extension', $order_by, $order);
echo th_order_by('call_flow_feature_code', 'Feature Code', $order_by, $order);
echo th_order_by('call_flow_app', 'Application', $order_by, $order);
//echo th_order_by('call_flow_pin_number', 'PIN Number', $order_by, $order);
echo th_order_by('call_flow_data', 'Application Data', $order_by, $order);
echo th_order_by('call_flow_anti_app', 'Alternate Application', $order_by, $order);
echo th_order_by('call_flow_anti_data', 'Application Data', $order_by, $order);
echo th_order_by('call_flow_description', 'Description', $order_by, $order);
echo "<td align='right' width='42'>\n";
if (permission_exists('call_flow_add')) {
echo " <a href='call_flow_edit.php' alt='add'>$v_link_label_add</a>\n";
}
else {
echo " &nbsp;\n";
}
echo "</td>\n";
echo "<tr>\n";
if ($result_count > 0) {
foreach($result as $row) {
echo "<tr >\n";
echo " <td valign='top' class='".$row_style[$c]."'>";
if ($row['call_flow_status'] != "false") {
echo "On";
}
else {
echo "Off";
}
echo "&nbsp;\n";
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_flow_extension']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_flow_feature_code']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_flow_app']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_flow_pin_number']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_flow_data']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_flow_anti_app']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_flow_anti_data']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['call_flow_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
if (permission_exists('call_flow_edit')) {
echo " <a href='call_flow_edit.php?id=".$row['call_flow_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
}
if (permission_exists('call_flow_delete')) {
echo " <a href='call_flow_delete.php?id=".$row['call_flow_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; }
} //end foreach
unset($sql, $result, $row_count);
} //end if results
echo "<tr>\n";
echo "<td colspan='10' align='left'>\n";
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td width='33.3%' nowrap>&nbsp;</td>\n";
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
echo " <td width='33.3%' align='right'>\n";
if (permission_exists('call_flow_add')) {
echo " <a href='call_flow_edit.php' alt='add'>$v_link_label_add</a>\n";
}
else {
echo " &nbsp;\n";
}
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>";
echo "</div>";
echo "<br /><br />";
echo "<br /><br />";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "<br /><br />";
//include the footer
require_once "includes/footer.php";
?>

50
app/call_flows/root.php Normal file
View File

@ -0,0 +1,50 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// 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"]."<br />\n";
//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\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'] );
}
?>