Ejemplo n.º 1
0
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new SqlBigRefField(_("Card"), 'card_id', 'cc_card', 'id', 'username', _("Corresponding card"));
$HD_Form->model[] = new SqlBigRefField(_("Booth"), 'booth_id', 'cc_booth', 'id', 'peername', _("Booth (if no card)"));
$HD_Form->model[] = new SqlRefField(_("Config"), "config", "cc_ast_users_config", "id", "cfg_name");
$HD_Form->model[] = new BoolField(_("SIP"), 'has_sip', _("If true, the peer will have a SIP entry"));
$HD_Form->model[] = new BoolField(_("IAX"), 'has_iax', _("If true, the peer will have a IAX2 entry"));
$HD_Form->model[] = DontList(new TextFieldN(_("Default IP"), 'defaultip', _("Default IP to ring user at.")));
$HD_Form->model[] = new TextField(_("Host"), 'host', _("Statically bind user with some IP/DNS or 'dynamic' for users that will register."));
end($HD_Form->model)->def_value = 'dynamic';
$HD_Form->model[] = new TextFieldN(_("Name B"), 'peernameb', _("Override asterisk username, so that a second device can be registered"));
if (!session_readonly()) {
    $HD_Form->model[] = dontList(new TextFieldN(_("Secret B"), 'secretb', _("Override asterisk secret from card/booth, so that a second device can be registered")));
}
$HD_Form->model[] = dontList(new TextFieldN(_("Callerid B"), 'callerid', _("Override callerid.")));
$HD_Form->model[] = DontList(new TextFieldN(_("From user"), 'fromuser', _("Override user string.")));
$HD_Form->model[] = DontList(new TextFieldN(_("Call group"), 'callgroup', _("When this device is called, set the call group so that others can pick it up.")));
$HD_Form->model[] = DontList(new TextFieldN(_("Pickup group"), 'pickupgroup', _("Allow this device to pick up calls made to those groups.")));
$HD_Form->model[] = DontList(new TextFieldN(_("Device Model"), 'devmodel', _("Provision model of device.")));
$HD_Form->model[] = DontList(new TextFieldN(_("MAC"), 'macaddr', _("MAC address of provisioned device.")));
$HD_Form->model[] = DontList(new TextField(_("D Secret"), 'devsecret', _("Device secret, provision safety.")));
$HD_Form->model[] = DontList(new IntFieldN(_("Provision Name"), 'provi_name', _("Provisioned name (display text)")));
$HD_Form->model[] = DontList(new IntFieldN(_("Provision Num"), 'provi_num', _("Provision configuration number")));
$HD_Form->model[] = DontList(new DateTimeFieldN(_("Last provisioned"), 'provi_date', _("Last provision timestamp")));
$HD_Form->model[] = new DelBtnField();
if ($HD_Form->getAction() == 'tooltip') {
    require "PP_bare_page.inc.php";
} else {
    require "PP_page.inc.php";
}
Ejemplo n.º 2
0
$tmp->Form->init();
$tmp->Form->model[] = new ClauseField('uniqueid', null, 'uniqueid');
$tmp->Form->model[] = new ClauseField('cardid', null, 'cardid');
$tmp->Form->model[] = new IntField(_("Attempt"), 'attempt');
end($tmp->Form->model)->fieldacr = _("At");
$tmp->Form->model[] = new PKeyFieldTxt(_("ID"), 'id');
$tmp->Form->model[] = new DateTimeFieldDH(_("Start Time"), 'starttime');
$tmp->Form->model[] = new DateTimeField(_("Stop Time"), 'stoptime');
$tmp->Form->model[] = DontList(new SqlRefFieldN(_("Server"), 'srvid', 'cc_a2b_server', 'id', 'host'));
// $tmp->Form->model[] = new TextField(_("Called station"),'calledstation');
$tmp->Form->model[] = DontList(new TextField(_("Destination"), 'destination'));
$tmp->Form->model[] = new IntField(_("Duration"), 'sessiontime');
end($tmp->Form->model)->fieldacr = _("Dur");
$tmp->Form->model[] = new IntField(_("Start Delay"), 'startdelay');
end($tmp->Form->model)->fieldacr = _("SD");
$tmp->Form->model[] = DontList(new IntField(_("Stop Delay"), 'stopdelay'));
end($tmp->Form->model)->fieldacr = _("TD");
$tmp->Form->model[] = new SqlRefFieldN(_("Sell Rate"), 'srid', 'cc_sellrate', 'id', 'destination', _("Selling rate"));
end($tmp->Form->model)->fieldacr = _("SRate");
$tmp->Form->model[] = new SqlRefFieldN(_("Buy Rate"), 'brid', 'cc_buyrate', 'id', 'destination', _("Buying rate"));
end($tmp->Form->model)->fieldacr = _("BRate");
$tmp->Form->model[] = new TextField(_("Result"), 'tcause');
$tmp->Form->model[] = new IntField(_("ISDN Hangup Cause"), 'hupcause');
end($tmp->Form->model)->fieldacr = _("Hu");
$tmp->Form->model[] = DontList(new TextField(_("Cause ext."), 'cause_ext'));
end($tmp->Form->model)->fieldacr = _("Ce");
$tmp->Form->model[] = DontList(new SqlRefFieldN(_("Trunk"), 'trunk', 'cc_trunk', 'id', 'trunkcode', _("Trunk used for the call")));
$tmp->Form->model[] = new MoneyField(_("Bill"), 'sessionbill', _("How much the customer was charged for the call."));
$tmp->Form->model[] = DontList(new MoneyField(_("Cost"), 'buycost', _("How much we were charged for the call.")));
$tmp->Form->model[] = DontList(new TextField(_("Source"), 'src'));
require "PP_page.inc.php";
Ejemplo n.º 3
0
HelpElem::DoHelp(gettext("Common settings for a group of cards (customers)"), 'vcard.png');
$HD_Form = new FormHandler('cc_card_group', _("Card groups"), _("Card group"));
$HD_Form->checkRights(ACX_CUSTOMER);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Name"), 'name', _('Name of group'));
$HD_Form->model[] = new SqlRefFieldN(_("Agent"), 'agentid', 'cc_agent', 'id', 'name', _("If cards belong to an agent."));
$HD_Form->model[] = new SqlRefField(_("Numbering plan"), 'numplan', 'cc_numplan', 'id', 'name', _("Numbering plan"));
end($HD_Form->model)->fieldacr = _("Nplan");
$HD_Form->model[] = DontList(new TextField(_("Pattern"), 'uname_pattern', _('Pattern of username for new cards of this group. Use "%#10" for a 10-digit random number, "card%1" for card+useralias etc.')));
end($HD_Form->model)->def_value = "%#10";
$HD_Form->model[] = new IntField(_("Parallel access"), 'simultaccess', _("Number of simultaneous calls a card can make, -1 for unlimited. Beware of negative credit!"));
end($HD_Form->model)->fieldacr = _("P/A");
$tpaid_list = array();
$tpaid_list[] = array('0', _("Prepaid"));
$tpaid_list[] = array('1', _("Postpay"));
$HD_Form->model[] = new RefField(_("Pay type"), "typepaid", $tpaid_list);
end($HD_Form->model)->fieldacr = _("Pay");
$HD_Form->model[] = new SqlRefFieldN(_("Tariff group"), 'tariffgroup', 'cc_tariffgroup', 'id', 'name');
end($HD_Form->model)->fieldacr = _("Tariff");
$HD_Form->model[] = DontList(new SqlRefFieldN(_("Currency"), 'def_currency', 'cc_currencies', 'currency', 'name', _("Default currency for new cards in this group. This can later change per card.")));
$HD_Form->model[] = DontList(new FloatField(_("VAT"), 'vat', _("Value Added Tax")));
$HD_Form->model[] = DontList(new IntField(_("Invoice day"), 'invoiceday', _("Day of month to issue invoice at *-*")));
$HD_Form->model[] = DontList(new IntField(_("Initial limit"), 'initiallimit', _("Credit limit for new cards")));
$HD_Form->model[] = DontList(new IntField(_("Expire days"), 'expiredays'));
//TODO more fields
//$HD_Form->model[] = new TextField(_("Username"),'login',_("Login name"));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Ejemplo n.º 4
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
require_once "a2blib/Form/Class.RevRef2.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
$menu_section = 'menu_did';
HelpElem::DoHelp(_("DID groups allow a group of customers to use incoming calls."));
$HD_Form = new FormHandler('cc_didgroup', _("DID Groups"), _("DID group"));
$HD_Form->checkRights(ACX_DID);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Name"), 'name');
$HD_Form->model[] = new TextField(_("Code"), 'code', _("Code matched against the source (trunk) that delivers the DID."));
$HD_Form->model[] = new RevRef2(_("Batches"), 'bts', 'id', 'did_group_batch', 'btid', 'dbid', 'did_batch', 'id', 'name', _("These DID batches will be available and/or matched against the incoming DIDs."));
$HD_Form->model[] = new SqlRefField(_("Sell Tariff group"), 'tgid', 'cc_tariffgroup', 'id', 'name', _("Tariff group which will define final retail prices and route availability."));
end($HD_Form->model)->fieldacr = _("Sell");
$HD_Form->model[] = dontList(new SqlRefFieldN(_("CLID Rules"), "rnplan", "cc_re_numplan", "id", "name", _("Reverse translating rules for incoming CLID")));
$HD_Form->model[] = DontList(new TextFieldN(_("Ring style"), 'alert_info', _("Selects the ring pattern to use on the phone being dialled.")));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Ejemplo n.º 5
0
$HD_Form->default_order = 'starttime';
$HD_Form->default_sens = 'DESC';
$HD_Form->init(null, false);
// beware!
$HD_Form->views['list'] = new ListView();
$HD_Form->views['details'] = new DetailsView();
$PAGE_ELEMS[] =& $HD_Form;
$SEL_Form->enable($HD_Form->getAction() == 'list');
$HD_Form->model[] = new ClauseField("cardid", $_SESSION['card_id']);
$HD_Form->model[] = DontList(new PKeyFieldTxt(_("Session ID"), 'sessionid'));
$HD_Form->model[] = DontList(new PKeyFieldTxt(_("Unique ID"), 'uniqueid'));
$HD_Form->model[] = DontList(new PKeyField(_("Card ID"), 'cardid'));
$SEL_Form->appendClauses($HD_Form);
$HD_Form->model[] = new DateTimeFieldDH(_("Start Time"), 'starttime');
$HD_Form->model[] = new TextField(_("Mode"), 'cmode');
$HD_Form->model[] = DontList(new DateTimeField(_("Stop Time"), 'stoptime'));
$HD_Form->model[] = new TextField(_("Called station"), 'calledstation');
$HD_Form->model[] = new TextField(_("Destination"), 'destination');
//end($HD_Form->model)->fieldexpr=
$HD_Form->model[] = new IntField(_("Duration"), 'sessiontime');
end($HD_Form->model)->fieldacr = _("Dur");
$HD_Form->model[] = new TextField(_("Result"), 'tcause');
$HD_Form->model[] = new MoneyField(_("Bill"), 'sessionbill', _("The amount you have been charged for the call."));
// do we? $HD_Form->model[] = DontList(new SqlRefFieldN(_("Tariff group"),'tgid','cc_tariffgroup','id','name', _("Tariff group used by the rate engine.")));
require "PP_page.inc.php";
if (false) {
    $QUERY = "SELECT  username, credit, lastname, firstname, address, city, state, country, zipcode, phone, email, fax, lastuse, activated, status FROM cc_card WHERE username = '******' AND uipass = '******'";
    $DBHandle_max = DbConnect();
    $numrow = 0;
    $resmax = $DBHandle_max->Execute($QUERY);
    if ($resmax) {