Change $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH to $_SERVER["PROJECT_ROOT"].

This commit is contained in:
markjcrane
2016-01-17 00:01:13 -07:00
parent b95e134578
commit 23b4b7c9bf
23 changed files with 68 additions and 69 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ else {
if (if_group("superadmin")){
$broadcast_accountcode = check_str($_POST["broadcast_accountcode"]);
}
elseif (if_group("admin") && file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
elseif (if_group("admin") && file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
$sql_accountcode = "SELECT COUNT(*) as count FROM v_billings WHERE domain_uuid = '".$_SESSION['domain_uuid']."' AND type_value='".$_POST["accountcode"]."'";
$prep_statement_accountcode = $db->prepare(check_sql($sql_accountcode));
$prep_statement_accountcode->execute();
@@ -277,7 +277,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo $text['description-accountcode']."\n";
echo "</td>\n";
echo "</tr>\n";
}elseif (if_group("admin") && file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
}elseif (if_group("admin") && file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
$sql_accountcode = "SELECT type_value FROM v_billings WHERE domain_uuid = '".$_SESSION['domain_uuid']."'";
echo "<tr>\n";
+2 -1
View File
@@ -266,7 +266,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
$_SESSION["message"] = $text['message-add'];
//set the message
$_SESSION["message"] = $text['message-add'];
} //if ($action == "add")
if ($action == "update") {
+1 -1
View File
@@ -106,7 +106,7 @@ if (strlen($contact_uuid) > 0) {
$prep_statement->execute();
unset($prep_statement, $sql);
//delete groups
//delete contact groups
$sql = "delete from v_contact_groups ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and contact_uuid = '".$contact_uuid."' ";
+5 -5
View File
@@ -35,7 +35,7 @@ else {
exit;
}
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")) {
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")) {
require_once "app/billing/resources/functions/currency.php";
require_once "app/billing/resources/functions/rating.php";
}
@@ -432,7 +432,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "add") {
$_SESSION["message"] = $text['message-add'];
// billing
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
$db2 = new database;
$db2->sql = "select currency, billing_uuid, balance from v_billings where type_value='$destination_accountcode'";
$db2->result = $db2->execute();
@@ -706,7 +706,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/fax/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/fax/app_config.php")){
$sql = "select * from v_fax ";
$sql .= "where domain_uuid = '".$domain_uuid."' ";
$sql .= "order by fax_name asc ";
@@ -750,7 +750,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</tr>\n";
// billing
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
echo "<tr id='tr_sell'>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-monthly_price']."\n";
@@ -797,7 +797,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo " <input class='formfld' type='text' name='destination_accountcode' maxlength='255' value=\"$destination_accountcode\">\n";
echo "<br />\n";
echo $text['description-account_code']."\n";
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
echo " ".$text['billing-warning'];
}
echo "</td>\n";
+1 -1
View File
@@ -786,7 +786,7 @@ else {
echo "<br><br>\n";
echo "</form>";
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
echo "<p>".$text['billing-warning']."</p>";
}
+1 -1
View File
@@ -35,7 +35,7 @@ else {
}
//detect billing app
$billing_app_exists = file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php");
$billing_app_exists = file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php");
if ($billing_app_exists) {
require_once "app/billing/resources/functions/currency.php";
require_once "app/billing/resources/functions/rating.php";
+1 -1
View File
@@ -36,7 +36,7 @@ else {
}
//detect billing app
$billing_app_exists = file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php");
$billing_app_exists = file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php");
if ($billing_app_exists) {
require_once "app/billing/resources/functions/currency.php";
+2 -2
View File
@@ -70,7 +70,7 @@
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//add rating functions if the billing is installed
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
require_once "app/billing/resources/functions/rating.php";
}
@@ -246,7 +246,7 @@
}
//billing information
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
$db2 = new database;
$lcr_currency = (strlen($_SESSION['billing']['currency']['text'])?$_SESSION['billing']['currency']['text']:'USD');
$accountcode = (strlen(urldecode($xml->variables->accountcode)))?check_str(urldecode($xml->variables->accountcode)):$domain_name;
+3 -3
View File
@@ -339,7 +339,7 @@ else {
echo th_order_by('start_stamp', $text['label-start'], $order_by, $order, null, "style='text-align: center;'", $param);
echo th_order_by('tta', $text['label-tta'], $order_by, $order, null, "style='text-align: right;'", $param);
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "style='text-align: center;'", $param);
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
// billing collumns
echo "<th>".$text['label-price']."</th>\n";
$col_count++;
@@ -362,7 +362,7 @@ else {
$col_count++;
}
echo "</tr>\n";
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
require_once "app/billing/resources/functions/rating.php";
require_once "resources/classes/database.php";
$database = new database;
@@ -543,7 +543,7 @@ else {
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;'>".gmdate("G:i:s", $seconds)."</td>\n";
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
$database->table = "v_xml_cdr";
$accountcode = (strlen($row["accountcode"])?$row["accountcode"]:$_SESSION[domain_name]);
+1 -1
View File
@@ -299,7 +299,7 @@ else {
$sql .= "caller_id_number, ";
$sql .= "destination_number, ";
$sql .= "accountcode, ";
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/billing/app_config.php")){
$sql .= "call_sell, ";
}
if (permission_exists("xml_cdr_pdd")) {