コード例 #1
0
ファイル: call-comp.php プロジェクト: shinichi85/voiperopen
<?php

/* $Id: call-comp.php,v 1.6 2005/04/24 18:12:25 julianjm Exp $ */
include_once dirname(__FILE__) . "/lib/defines.php";
include_once dirname(__FILE__) . "/lib/Class.Table.php";
getpost_ifset(array('current_page', 'fromstatsday_sday', 'fromstatsmonth_sday', 'days_compare', 'min_call', 'posted', 'dsttype', 'sourcetype', 'clidtype', 'channel', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'dst', 'src', 'clid', 'userfieldtype', 'userfield', 'accountcodetype', 'accountcode'));
if (!isset($current_page) || $current_page == "") {
    $current_page = 0;
}
// this variable specifie the debug type (0 => nothing, 1 => sql result, 2 => boucle checking, 3 other value checking)
$FG_DEBUG = 0;
// The variable FG_TABLE_NAME define the table name to use
$FG_TABLE_NAME = DB_TABLENAME;
// THIS VARIABLE DEFINE THE COLOR OF THE HEAD TABLE
$FG_TABLE_HEAD_COLOR = "#D1D9E7";
$FG_TABLE_EXTERN_COLOR = "#7F99CC";
//#CC0033 (Rouge)
$FG_TABLE_INTERN_COLOR = "#EDF3FF";
//#FFEAFF (Rose)
// THIS VARIABLE DEFINE THE COLOR OF THE HEAD TABLE
$FG_TABLE_ALTERNATE_ROW_COLOR[] = "#FFFFFF";
$FG_TABLE_ALTERNATE_ROW_COLOR[] = "#F2F8FF";
//$link = DbConnect();
$DBHandle = DbConnect();
// The variable Var_col would define the col that we want show in your table
// First Name of the column in the html page, second name of the field
$FG_TABLE_COL = array();
/*******
Calldate Clid Src Dst Dcontext Channel Dstchannel Lastapp Lastdata Duration Billsec Disposition Amaflags Accountcode Uniqueid Serverid
*******/
$FG_TABLE_COL[] = array("Calldate", "calldate", "18%", "center", "SORT", "19");
コード例 #2
0
ファイル: A2B_ticket_view.php プロジェクト: saydulk/a2billing
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/agent.defines.php';
include '../lib/agent.module.access.php';
include '../lib/agent.smarty.php';
include '../lib/support/classes/ticket.php';
include '../lib/support/classes/comment.php';
include '../lib/epayment/includes/general.php';
if (!has_rights(ACX_SUPPORT)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('result', 'id', 'action', 'status', 'comment', 'idc'));
if ($result == "success") {
    $message = gettext("Ticket updated successfully");
}
if (isset($id)) {
    $ticketID = $id;
} else {
    exit(gettext("Ticket ID not found"));
}
if (tep_not_null($action)) {
    switch ($action) {
        case 'change':
            $DBHandle = DbConnect();
            $instance_sub_table = new Table("cc_ticket", "*");
            $instance_sub_table->Update_table($DBHandle, "status = '" . $status . "'", "id = '" . $id . "'");
            $ticket = new Ticket($ticketID);
コード例 #3
0
} elseif (!isset($_SESSION["ui_language"])) {
    if (!isset($_COOKIE["ui_language"])) {
        $_SESSION["ui_language"] = 'english';
    } else {
        $_SESSION["ui_language"] = $_COOKIE["ui_language"];
    }
}
define("LANGUAGE", $_SESSION["ui_language"]);
define("BINDTEXTDOMAIN", '../../common/admin_ui_locale');
require "languageSettings.php";
SetLocalLanguage();
// Open menu
if (!empty($section)) {
    $_SESSION["menu_section"] = $section;
}
getpost_ifset(array('cssname'));
if (isset($cssname) && $cssname != "") {
    $_SESSION["stylefile"] = $cssname;
}
if (isset($cssname) && $cssname != "") {
    if ($_SESSION["stylefile"] != $cssname) {
        foreach (glob("./templates_c/*.*") as $filename) {
            unlink($filename);
        }
    }
    $_SESSION["stylefile"] = $cssname;
}
if (!isset($_SESSION["stylefile"]) || $_SESSION["stylefile"] == '') {
    $_SESSION["stylefile"] = 'default';
}
//Images Path
コード例 #4
0
		"COST A",
		"TIME FOR A",
		"ENTRANCE CHARGE B",
		"COST B",
		"TIME FOR B",
		"ENTRANCE CHARGE C",
		"COST C",
		"TIME FOR C",
		"ANNOUNCE TIME CORRECTION"
	);
};

getpost_ifset($update_fields);

if (ADVANCED_MODE) {
	getpost_ifset($charges_abc);
};

/***********************************************************************************/

$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();

// CHECK IF REQUEST OF BATCH UPDATE
if ($batchupdate == 1 && is_array($check)) {

	check_demo_mode();

	$HD_Form->prepare_list_subselection('list');

	// Array ( [upd_simultaccess] => on [upd_currency] => on )
コード例 #5
0
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_card_seria.inc';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_CUSTOMER)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('popup_select', 'popup_formname', 'popup_fieldname'));
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
$smarty->display('main.tpl');
コード例 #6
0
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_card.inc';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_CUSTOMER)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('nb_to_create', 'creditlimit', 'cardnum', 'addcredit', 'choose_tariff', 'gen_id', 'cardnum', 'choose_simultaccess', 'choose_currency', 'choose_typepaid', 'creditlimit', 'enableexpire', 'expirationdate', 'expiredays', 'runservice', 'sip', 'iax', 'cardnumberlenght_list', 'tag', 'id_group', 'discount', 'id_seria', 'id_didgroup', 'vat', 'id_country'));
$HD_Form->FG_FILTER_SEARCH_FORM = false;
$HD_Form->FG_EDITION = false;
$HD_Form->FG_DELETION = false;
$HD_Form->FG_OTHER_BUTTON1 = false;
$HD_Form->FG_OTHER_BUTTON2 = false;
$HD_Form->FG_FILTER_APPLY = false;
$HD_Form->FG_LIST_ADDING_BUTTON1 = false;
$HD_Form->FG_LIST_ADDING_BUTTON2 = false;
$HD_Form->setDBHandler(DbConnect());
$nb_error = 0;
$msg_error = '';
$group_error = false;
$tariff_error = false;
$credit_error = false;
$number_error = false;
コード例 #7
0
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include './lib/customer.defines.php';
include './lib/customer.module.access.php';
include './lib/Form/Class.FormHandler.inc.php';
include './lib/epayment/includes/general.php';
include './lib/epayment/includes/configure.php';
include './lib/epayment/includes/html_output.php';
$popup_select = 1;
include './lib/customer.smarty.php';
//include("./lib/epayment/includes/PP_header.php");
getpost_ifset(array('errcode'));
// #### HEADER SECTION
$smarty->display('main.tpl');
?>

<br>
<br>
<table width=80% align=center class="infoBox">
<tr height="15">
    <td colspan=2 class="infoBoxHeading">&nbsp;<?php 
echo gettext("Message");
?>
</td>
</tr>
<tr>
    <td width=50%>&nbsp;</td>
コード例 #8
0
        &resulttitle : tible that will show up above the rates array : can set to &nbsp; to not display anything
        &lcr : (0 or 1) to enable or disable the LCR, by default 0

 ****************************************************************************/
include 'lib/admin.defines.php';
// The wrapper variables for security
$security_key = API_SECURITY_KEY;
// The name of the log file
$logfile = API_LOGFILE;
// recipient email to send the alarm
$email_alarm = EMAIL_ADMIN;
$FG_DEBUG = 0;
$caching_query = 1800;
// caching for 30 minutes
getpost_ifset(array('key', 'tariffgroupid', 'ratecardid', 'css_url', 'nb_display_lines', 'filter', 'field_to_display', 'column_name', 'field_type', 'browse_letter', 'prefix_select', 'page_url', 'resulttitle', 'current_page', 'order', 'sens', 'choose_currency', 'choose_country', 'letter', 'searchpre', 'currency_select', 'merge_form', 'fullhtmlpage', 'lcr'));
$ip_remote = getenv('REMOTE_ADDR');
$mail_content = "[" . date("Y/m/d G:i:s", mktime()) . "] " . "Request asked from:{$ip_remote} with key:{$key} \n";
// CHECK KEY
if ($FG_DEBUG > 0) {
    echo "<br> md5(" . md5($security_key) . ") !== {$key}";
}
if ((!isset($_SESSION["access_display"]) || !$_SESSION["access_display"]) && (md5($security_key) !== $key || strlen($security_key) == 0)) {
    a2b_mail($email_alarm, "ALARM : RATE CARD API - CODE_ERROR 2", $mail_content);
    if ($FG_DEBUG > 0) {
        echo "[" . date("Y/m/d G:i:s", mktime()) . "] " . "[{$productid}] - CODE_ERROR 2" . "\n";
    }
    echo "400 Bad Request";
    $_SESSION["access_display"] = 0;
    exit;
} else {
コード例 #9
0
ファイル: get_rates.php プロジェクト: saydulk/a2billing
 *
 *
**/
/*
Result :
    Send the Customer's Rates using the LCR/LCD Logic

Parameters :
    activation_code : Concatenation of Customer's Account code + '_' + Customer's password
    html : to display with <pre> tag

Usage :
    http://localhost/customer/webservice/Get_Rates.php?activation_code=XXXXXXXXXXX
*/
include '../lib/customer.defines.php';
getpost_ifset(array('activation_code', 'html'));
if ($activation_code) {
    $activation_code = trim($activation_code);
}
$rates = Service_Get_Rates($activation_code);
if (isset($html)) {
    echo "<pre>";
}
echo $rates[0];
if (isset($html)) {
    echo "</pre>";
}
/*
 *		Function for the Service Callback : it will call a phonenumber and redirect it into the BCB application
 */
function Service_Get_Rates($activation_code)
コード例 #10
0
ファイル: A2B_support.php プロジェクト: pearlvoip/a2billing
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include './lib/customer.defines.php';
include './lib/customer.module.access.php';
include './lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_ticket.inc';
include './lib/customer.smarty.php';
if (!has_rights(ACX_SUPPORT)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('title', 'description', 'priority', 'component'));
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
// ADD TICKET
if ((strlen($description) > 0 || strlen($title) > 0) && is_numeric($priority) && is_numeric($component)) {
    $fields = "creator,title, description, id_component, priority, viewed_cust";
    $ticket_table = new Table('cc_ticket', $fields);
    $values = "'" . $_SESSION["card_id"] . "', '" . $title . "', '" . $description . "', '" . $component . "', '" . $priority . "' ,'0'";
    $id_ticket = $ticket_table->Add_table($HD_Form->DBHandle, $values, null, null, "id");
    NotificationsDAO::AddNotification("ticket_added_cust", Notification::$LOW, Notification::$CUST, $_SESSION['card_id'], Notification::$LINK_TICKET_CUST, $id_ticket);
    $table_card = new Table("cc_card", "firstname, lastname, language, email");
    $card_clause = "id = " . $_SESSION["card_id"];
    $result = $table_card->Get_list($HD_Form->DBHandle, $card_clause);
    $owner = $_SESSION["pr_login"] . " (" . $result[0]['firstname'] . " " . $result[0]['lastname'] . ")";
    try {
        $mail = new Mail(Mail::$TYPE_TICKET_NEW, null, $result[0]['language']);
コード例 #11
0
ファイル: index.php プロジェクト: nixonch/a2billing
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * 
**/


$disable_load_conf = true;

include ("../lib/agent.defines.php");
include ("../lib/agent.smarty.php");

getpost_ifset(array (
	'error'
));

$smarty -> assign("error", $error);
$smarty -> display('index.tpl');


コード例 #12
0
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_PACKAGEOFFER)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('id', 'addrate', 'delallrate', 'addbatchrate', 'delrate', 'id_trunk', 'id_tariffplan', 'tag', 'prefix', 'destination', 'rbDestination', 'rbPrefix'));
if (empty($id)) {
    Header("Location: A2B_entity_package.php?atmenu=package&section=12");
}
$table_pack = new Table("cc_package_offer ", "*");
$pack_clauses = "id = {$id}";
$result_pack = $table_pack->Get_list(DbConnect(), $pack_clauses);
if (!is_array($result_pack) || sizeof($result_pack) != 1) {
    Header("Location: A2B_entity_package.php?atmenu=package&section=12");
}
if (isset($addbatchrate) && $addbatchrate) {
    $DBHandle = DbConnect();
    $rates_clauses = "";
    $table_rates = new Table("cc_ratecard", " DISTINCT COUNT(destination)");
    if (isset($id_trunk)) {
        $rates_clauses = " id_trunk = '{$id_trunk}'";
コード例 #13
0
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * 
**/
include "lib/customer.defines.php";
include "lib/customer.module.access.php";
include "lib/customer.smarty.php";
if (!has_rights(ACX_CALL_HISTORY)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'phonenumbertype', 'sourcetype', 'clidtype', 'channel', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'phonenumber', 'src', 'clid', 'choose_currency', 'terminatecauseid', 'choose_calltype', 'download', 'file'));
if ($download == "file" && $file && $ACXSEERECORDING) {
    if (strpos($file, '/') !== false) {
        exit;
    }
    $value_de = base64_decode($file);
    $dl_full = MONITOR_PATH . "/" . $value_de;
    $dl_name = $value_de;
    if (!file_exists($dl_full)) {
        echo gettext("ERROR: Cannot download file " . $dl_full . ", it does not exist.<br>");
        exit;
    }
    header("Content-Type: application/octet-stream");
    header("Content-Disposition: attachment; filename={$dl_name}");
    header("Content-Length: " . filesize($dl_full));
    header("Accept-Ranges: bytes");
コード例 #14
0
ファイル: index.php プロジェクト: pearlvoip/a2billing
 * @copyright   Copyright (C) 2004-2014 - Star2billing S.L.
 * @author      Belaid Arezqui <*****@*****.**>
 * @license     http://www.fsf.org/licensing/licenses/agpl-3.0.html
 * @package     A2Billing
 *
 * Software License Agreement (GNU Affero General Public License)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
$disable_load_conf = true;
include 'lib/customer.defines.php';
include 'lib/customer.module.access.php';
include 'lib/customer.smarty.php';
getpost_ifset(array('error', 'password', 'username'));
$smarty->assign("error", $error);
$smarty->assign("username", $username);
$smarty->assign("password", $password);
$smarty->display('index.tpl');
コード例 #15
0
$DBHandle = DbConnect();
// The variable Var_col would define the col that we want show in your table
// First Name of the column in the html page, second name of the field
$FG_TABLE_COL = array();
$FG_TABLE_DEFAULT_ORDER = "starttime";
$FG_TABLE_DEFAULT_SENS = "DESC";
$FG_COL_QUERY_GRAPH = 'starttime, sessiontime';
if ($FG_DEBUG == 3) {
    echo "<br>Table : {$FG_TABLE_NAME}  \t- \tCol_query : {$FG_COL_QUERY_GRAPH}";
}
$instance_table_graph = new Table($FG_TABLE_NAME, $FG_COL_QUERY_GRAPH);
if (is_null($order) || is_null($sens)) {
    $order = $FG_TABLE_DEFAULT_ORDER;
    $sens = $FG_TABLE_DEFAULT_SENS;
}
getpost_ifset(array('before', 'after'));
$SQLcmd = '';
if ($before) {
    if (strpos($SQLcmd, 'WHERE') > 0) {
        $SQLcmd = "{$SQLcmd} AND ";
    } else {
        $SQLcmd = "{$SQLcmd} WHERE ";
    }
    $SQLcmd = "{$SQLcmd} starttime <'" . $before . "'";
}
if ($after) {
    if (strpos($SQLcmd, 'WHERE') > 0) {
        $SQLcmd = "{$SQLcmd} AND ";
    } else {
        $SQLcmd = "{$SQLcmd} WHERE ";
    }
コード例 #16
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/agent.defines.php';
include '../lib/agent.module.access.php';
include '../lib/regular_express.inc';
include '../lib/phpagi/phpagi-asmanager.php';
include '../lib/agent.smarty.php';
$FG_DEBUG = 0;
getpost_ifset(array('action', 'atmenu'));
if (!has_rights(ACX_CUSTOMER)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$DBHandle = DbConnect();
if ($action == "reload") {
    $as = new AGI_AsteriskManager();
    // && CONNECTING  connect($server=NULL, $username=NULL, $secret=NULL)
    $res = $as->connect(MANAGER_HOST, MANAGER_USERNAME, MANAGER_SECRET);
    if ($res) {
        if ($atmenu == "sipfriend") {
            $res = $as->Command('sip reload');
        } else {
            $res = $as->Command('iax2 reload');
コード例 #17
0
if (!has_rights(ACX_CUSTOMER)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
if ($form_action == "add_sip" || $atmenu == "sip" || $form_action == "add_iax" || $atmenu == "iax") {
    if (!has_rights(ACX_VOIPCONF)) {
        Header("HTTP/1.0 401 Unauthorized");
        Header("Location: PP_error.php?c=accessdenied");
        die;
    }
}
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
/********************************* ADD SIP / IAX FRIEND ***********************************/
getpost_ifset(array("id_cc_card", "cardnumber", "useralias"));
if (isset($id_cc_card) && is_numeric($id_cc_card) != "" && ($form_action == "add_sip" || $form_action == "add_iax")) {
    $HD_Form->FG_GO_LINK_AFTER_ACTION = "A2B_entity_card.php?atmenu=card&stitle=Customers_Card&id=";
    if ($form_action == "add_sip") {
        $friend_param_update = " sip_buddy='1' ";
        if (!USE_REALTIME) {
            $key = "sip_changed";
        }
    } else {
        $friend_param_update = " iax_buddy='1' ";
        if (!USE_REALTIME) {
            $key = "iax_changed";
        }
    }
    if (!USE_REALTIME) {
        $who = Notification::$AGENT;
コード例 #18
0
<?php

include "../lib/defines.php";
include "../lib/module.access.php";
include "../lib/Form/Class.FormHandler.inc.php";
include "./form_data/FG_var_list_invoice.inc";
include "../lib/smarty.php";
include "../lib/A2B_invoice.php";
if (!has_rights(ACX_BILLING)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
// TODO: ajouter le menu custom template
getpost_ifset(array('tocustomer', 'forcustomer', 'customer', 'rangeradio', 'sendemail', 'billcalls', 'billcharges', 'enableminimalamount', 'customtemplate', 'choose_currency', 'minimalamount'));
$HD_Form->setDBHandler(DbConnect());
$nowdate = date('Y-m-d H:i:s');
$verbose_level = 0;
$groupcard = 100;
$instance_table = new Table();
$currencies_list = get_currencies($HD_Form->DBHandle);
// Set Default Values
if ($rangeradio == "") {
    $billcalls = true;
    $billcharges = true;
    $choose_currency = '';
}
// Count how many cards to bill
if ($rangeradio == "one") {
    $tocustomer = $forcustomer = $customer;
}
コード例 #19
0
ファイル: PP_error.php プロジェクト: pearlvoip/a2billing
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
session_destroy();
getpost_ifset(array('err_type', 'c'));
if (!isset($err_type)) {
    $err_type = 0;
}
//Error Type == 0 Mean Critical Error dont need to show left menu.
//Error Type == 1 Mean User generated error.and it will show menu to him too.
include '../lib/admin.smarty.php';
if ($err_type == 0) {
    $smarty->display('header.tpl');
} else {
    include '../lib/admin.module.access.php';
    $smarty->display('main.tpl');
}
if (!isset($c)) {
    $c = "0";
}
コード例 #20
0
include ("../lib/admin.defines.php");
include ("../lib/admin.module.access.php");
include ("../lib/Form/Class.FormHandler.inc.php");
include ("./form_data/FG_var_phonenumber.inc");
include ("../lib/admin.smarty.php");

if (!has_rights(ACX_PREDICTIVE_DIALER)) {
	Header("HTTP/1.0 401 Unauthorized");
	Header("Location: PP_error.php?c=accessdenied");
	die();
}

getpost_ifset(array (
	'action',
	'campaign',
	'check', 'type', 'mode', 'batchupdate',
	'upd_id_phonebook', 'upd_number', 'upd_name', 'upd_amount', 'upd_status'
));

if (!empty ($action) && !empty ($campaign) && is_numeric($campaign) && ($action == "run" || $action == "hold" || $action == "stop")) {
	$DBHandle = DbConnect();
	$status = 0;
	if ($action == "stop")
		$status = 2;
	elseif ($action == "hold") 
		$status = 1;
	
	$table = new Table();
	$table->SQLExec($DBHandle, "UPDATE cc_campaign_phonestatus SET status = $status WHERE id_phonenumber =$id AND id_campaign = $campaign ");
	
	Header("Location: A2B_entity_phonenumber.php?form_action=ask-edit&id=$id");
コード例 #21
0
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_BILLING)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('id'));
if (empty($id)) {
    header("Location: A2B_entity_logrefill.php?atmenu=payment&section=10");
}
$DBHandle = DbConnect();
$remittance_table = new Table('cc_remittance_request', '*');
$remittance_clause = "id = " . $id;
$remittance_result = $remittance_table->Get_list($DBHandle, $remittance_clause, 0);
$remittance = $remittance_result[0];
if (empty($remittance)) {
    header("Location: A2B_entity_remittance_request.php?atmenu=payment&section=10");
}
// #### HEADER SECTION
$smarty->display('main.tpl');
?>
<br/>
コード例 #22
0
<?php

include "../lib/defines.php";
include "../lib/module.access.php";
if (!has_rights(ACX_CRONT_SERVICE)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('id', 'displayheader', 'displayfooter', 'popup_select'));
$FG_DEBUG = 0;
$FG_TABLE_ALTERNATE_ROW_COLOR[] = "#F2F2EE";
$FG_TABLE_ALTERNATE_ROW_COLOR[] = "#FCFBFB";
$FG_TABLE_COL = array();
$FG_TABLE_COL[] = array(gettext("DATE"), "daterun", "50%", "center", "sort", "30", "", "", "", "", "", "display_dateformat");
$FG_TABLE_COL[] = array(gettext("CALCULTED VALUE"), "calcultedvalue", "50%", "center", "sort");
$FG_NB_TABLE_COL = count($FG_TABLE_COL);
if (!isset($current_page) || $current_page == "") {
    $current_page = 0;
}
$DBHandle = DbConnect();
/*******************   ALARM INFO  *****************************************/
$QUERY = "SELECT id, name, type, numberofrun, substring(datelastrun,0,20), numberofalarm from cc_alarm WHERE id='{$id}'";
$res = $DBHandle->Execute($QUERY);
if ($res) {
    $num = $res->RecordCount();
    for ($i = 0; $i < $num; $i++) {
        $list_alarm[] = $res->fetchRow();
    }
}
/*******************  LIST REFILL  *****************************************/
コード例 #23
0
<?php

// Hack to allow PHP4 use stripos() that is only supported in PHP5
if (!function_exists("stripos")) {
	function stripos($str,$needle) {
		return strpos(strtolower($str),strtolower($needle));
	}
}


// ******************** END IF $topviewer *******************************

getpost_ifset(array('stitle', 'letter', 'current_page', 'popup_select'));

$processed = $this->getProcessed();


if( !($popup_select>=1) &&($this->FG_LIST_ADDING_BUTTON1 || $this->FG_LIST_ADDING_BUTTON2)) {
	?>
	<table align="right"><tr align="right">
        <td align="right"> 
		<?php if($this->FG_LIST_ADDING_BUTTON1) {?>
			<a href="<?php echo $this -> FG_LIST_ADDING_BUTTON_LINK1	?>"> <?php echo $this -> FG_LIST_ADDING_BUTTON_MSG1?>&nbsp;&nbsp;<img src="<?php echo $this -> FG_LIST_ADDING_BUTTON_IMG1?>" border="0" title="<?php echo $this->FG_LIST_ADDING_BUTTON_ALT1?>" alt="<?php echo $this->FG_LIST_ADDING_BUTTON_ALT1?>"></a>
		<?php  } //END IF ?>
		&nbsp;
		<?php if($this->FG_LIST_ADDING_BUTTON2) {?>
			<a href="<?php echo $this -> FG_LIST_ADDING_BUTTON_LINK2	?>"> <?php echo $this -> FG_LIST_ADDING_BUTTON_MSG2?>&nbsp;&nbsp;<img src="<?php echo $this -> FG_LIST_ADDING_BUTTON_IMG2?>" border="0" title="<?php echo $this->FG_LIST_ADDING_BUTTON_ALT2?>" alt="<?php echo $this->FG_LIST_ADDING_BUTTON_ALT2?>"></a>
		<?php  } //END IF ?>
		  </td>
	 </tr></table>
<?php  } //END IF ?>
コード例 #24
0
ファイル: activate.php プロジェクト: saydulk/a2billing
session_name("UISIGNUP");
session_start();
// check if the script has been already called in the previous minute, no multiple signup
if (!isset($_SESSION["date_activation"]) || time() - $_SESSION["date_activation"] > 0) {
    $_SESSION["date_activation"] = time();
} else {
    sleep(3);
    echo gettext("Sorry the activation has been sent already, please wait 1 minute before making any other try !");
    exit;
}
// get include
include './lib/customer.defines.php';
include './lib/customer.module.access.php';
include './lib/Form/Class.FormHandler.inc.php';
include './lib/customer.smarty.php';
getpost_ifset(array('key'));
$HD_Form = new FormHandler("cc_card", "User");
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
// HEADER SECTION
$smarty->display('signup_header.tpl');
if (empty($key)) {
    $key = null;
}
$result = null;
$instance_sub_table = new Table('cc_card', "username, lastname, firstname, email, uipass, credit, useralias, loginkey, status, id");
$QUERY = "( loginkey = '" . $key . "' )";
$list = $instance_sub_table->Get_list($HD_Form->DBHandle, $QUERY);
if (isset($key) && $list[0][8] != "1") {
    if ($A2B->config["signup"]['activated']) {
        // Status : 1 - Active
コード例 #25
0
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/admin.smarty.php';
include '../lib/support/classes/receipt.php';
include '../lib/support/classes/receiptItem.php';
if (!has_rights(ACX_INVOICING)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('date', 'id', 'action', 'price', 'description', 'idc'));
if (empty($id)) {
    Header("Location: A2B_entity_receipt.php?atmenu=payment&section=13");
}
if (!empty($action)) {
    switch ($action) {
        case 'add':
            if (empty($date) || strtotime($date) === FALSE) {
                $error_msg .= gettext("Date inserted is invalid, it must respect a date format YYYY-MM-DD HH:MM:SS (time is optional).<br/>");
            }
            if (empty($price) || !is_numeric($price)) {
                $error_msg .= gettext("Amount inserted is invalid, it must be a number. Check the format.");
            }
            if (!empty($error_msg)) {
                break;
            }
コード例 #26
0
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include './lib/customer.defines.php';
include './lib/customer.module.access.php';
include './lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_ratecard.inc';
include './lib/customer.smarty.php';
if (!has_rights(ACX_RATECARD)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('letter', 'posted_search'));
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if (strlen($letter) == 1) {
    $HD_Form->FG_TABLE_CLAUSE .= " AND (SUBSTRING(destination,1,1)='" . strtolower($letter) . "' OR SUBSTRING(destination,1,1)='" . $letter . "')";
}
// sort by first letter
$FG_LIMITE_DISPLAY = 10;
if (isset($mydisplaylimit) && (is_numeric($mydisplaylimit) || $mydisplaylimit == 'ALL')) {
    if ($mydisplaylimit == 'ALL') {
        $FG_LIMITE_DISPLAY = 5000;
    } else {
        $FG_LIMITE_DISPLAY = $mydisplaylimit;
    }
}
if ($id != "" || !is_null($id)) {
コード例 #27
0
ファイル: A2B_admin_info.php プロジェクト: nixonch/a2billing
 * 
 * 
**/


include ("../lib/admin.defines.php");
include ("../lib/admin.module.access.php");
include ("../lib/admin.smarty.php");

if (! has_rights (ACX_ADMINISTRATOR)) { 
	Header ("HTTP/1.0 401 Unauthorized");
	Header ("Location: PP_error.php?c=accessdenied");	   
	die();	   
}

getpost_ifset(array('id','groupID'));

if(!is_numeric($groupID) || ($groupID != 0 && $groupID != 1)) $groupID =0;

if (empty($id)) {
	header("Location: A2B_entity_user.php?atmenu=user&groupID=$groupID&section=3");
}

$DBHandle  = DbConnect();

$admin_table = new Table('cc_ui_authen','*');
$admin_clause = "userid = ".$id;
$admin_result = $admin_table -> Get_list($DBHandle, $admin_clause, 0);
$admin = $admin_result[0];

if (empty($admin)) {
コード例 #28
0
ファイル: call-pnl-report.php プロジェクト: nixonch/a2billing
if (!has_rights(ACX_CALL_REPORT)) {
	Header("HTTP/1.0 401 Unauthorized");
	Header("Location: PP_error.php?c=accessdenied");
	die();
}

getpost_ifset(array (
	'posted',
	'Period',
	'frommonth',
	'fromstatsmonth',
	'tomonth',
	'tostatsmonth',
	'fromday',
	'fromstatsday_sday',
	'fromstatsmonth_sday',
	'today',
	'tostatsday_sday',
	'tostatsmonth_sday',
	'current_page',
	'lst_time',
	'group_id',
	'report_type'
));

//     Initialization of variables	///////////////////////////////

$condition = "";
$QUERY = '';
$from_to = '';
$bool = false;
コード例 #29
0
$currencies_list = get_currencies();
$two_currency = false;
if (!isset ($currencies_list[strtoupper($_SESSION['currency'])][2]) || !is_numeric($currencies_list[strtoupper($_SESSION['currency'])][2])) {
	$mycur = 1;
} else {
	$mycur = $currencies_list[strtoupper($_SESSION['currency'])][2];
	$display_currency = strtoupper($_SESSION['currency']);
	if (strtoupper($_SESSION['currency']) != strtoupper(BASE_CURRENCY))
		$two_currency = true;
}

$HD_Form = new FormHandler("cc_payment_methods", "payment_method");

getpost_ifset(array (
	'item_id',
	'item_type',
	'payment_error'
));

$DBHandle = DbConnect();
$HD_Form->setDBHandler($DBHandle);
$HD_Form->init();

// #### HEADER SECTION

$static_amount = false;
$amount = 0;
if ($item_type = "invoice" && is_numeric($item_id)) {
	$table_invoice = new Table("cc_invoice", "status,paid_status");
	$clause_invoice = "id = " . $item_id;
	$result = $table_invoice->Get_list($DBHandle, $clause_invoice);
コード例 #30
0
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/admin.smarty.php';
include '../lib/support/classes/invoice.php';
include '../lib/support/classes/invoiceItem.php';
if (!has_rights(ACX_INVOICING)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('id', 'addpayment', 'delpayment', 'status'));
if (empty($id)) {
    Header("Location: A2B_entity_invoice.php?atmenu=payment&section=13");
}
$invoice = new invoice($id);
$items = $invoice->loadItems();
if (isset($addpayment) && is_numeric($addpayment)) {
    $invoice->addPayment($addpayment);
    Header("Location: A2B_invoice_manage_payment.php?id={$id}");
}
if (isset($delpayment) && is_numeric($delpayment)) {
    $invoice->delPayment($delpayment);
    Header("Location: A2B_invoice_manage_payment.php?id={$id}");
}
if (isset($status) && is_numeric($status)) {
    $invoice->changeStatus($status);