Пример #1
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.RefField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
$menu_section = 'menu_cront';
HelpElem::DoHelp(_("Data from run or pending alarms."));
$HD_Form = new FormHandler('cc_alarm_run', _("Alarm Data"), _("Alarm Data"));
$HD_Form->checkRights(ACX_CRONT_SERVICE);
$HD_Form->default_order = 'id';
$HD_Form->default_sens = 'DESC';
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new SqlRefField(_("Alarm"), 'alid', 'cc_alarm', 'id', 'name');
$HD_Form->model[] = dontAdd(dontList(new DateTimeField(_("Creation"), "tcreate", _("Creation date"))));
$HD_Form->model[] = dontAdd(new DateTimeField(_("Modify"), "tmodify", _("Last modification date")));
$mstates = array();
$mstates[] = array(0, _("Unknown"));
$mstates[] = array(1, _("Run"));
$mstates[] = array(2, _("Failed to run"));
$mstates[] = array(3, _("Raised Error"));
$mstates[] = array(10, _("Request to run"));
$mstates[] = array(12, _("Auto-ceased"));
$HD_Form->model[] = new RefField(_("Status"), 'status', $mstates);
end($HD_Form->model)->def_value = 10;
Пример #2
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
$menu_section = 'menu_billing';
HelpElem::DoHelp(_("Subscriptions are customers (cards) being attached to a recurring fee or special service."));
$HD_Form = new FormHandler('card_subscription', _("Subscriptions"), _("Subscription"));
$HD_Form->checkRights(ACX_BILLING);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new SqlBigRefField(_("Card"), "card", "cc_card", "id", "username");
$HD_Form->model[] = new SqlRefField(_("Kind"), "template", "subscription_template", "id", "name");
$cs_list = array();
$cs_list[] = array("0", _("Inactive"));
$cs_list[] = array("1", _("Active"));
//$cs_list[]  = array("2", _("..."));
$HD_Form->model[] = dontAdd(new RefField(_("Status"), 'status', $cs_list));
$HD_Form->model[] = dontAdd(dontList(new DateTimeField(_("Creation date"), "creationdate", _("Date the subscription was registered"))));
end($HD_Form->model)->fieldacr = _("Creat");
$HD_Form->model[] = new DateTimeFieldN(_("Activation date"), "activedate", _("Date it becomes active"));
end($HD_Form->model)->fieldacr = _("Activ");
$HD_Form->model[] = new DateTimeFieldN(_("Expire date"), "expiredate", _("After this date it is no longer charged or used."));
end($HD_Form->model)->fieldacr = _("Exp.");
// $HD_Form->model[] = dontList(new SqlRefFieldN(_("CLID Rules"), "rnplan","cc_re_numplan", "id", "name"));
Пример #3
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.SqlRefField.inc.php";
// require_once ("a2blib/Form/Class.TabField.inc.php");
require_once "a2blib/Form/Class.TimeField.inc.php";
// require_once ("a2blib/Class.JQuery.inc.php");
$menu_section = 'menu_queues';
HelpElem::DoHelp(_("Logs are the technical entries, directly from asterisk, of queue events."));
$HD_Form = new FormHandler('ast_queue_log', _("Logs"), _("Log"));
$HD_Form->checkRights(ACX_QUEUES);
$HD_Form->default_order = 'tstamp';
$HD_Form->default_sens = 'DESC';
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
// $PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new DateTimeFieldDH(_("Date"), "tstamp", _("Event date"));
$HD_Form->model[] = new TextFieldN(_("Call"), 'callid', _("Asterisk call identifier."));
$HD_Form->model[] = new TextFieldN(_("Queue"), 'queuename', _("Queue name."));
$HD_Form->model[] = new TextFieldN(_("Agent"), 'agent', _("Agent which served the call, if any."));
$HD_Form->model[] = new TextFieldN(_("Event"), 'event', _("Asterisk event code."));
$HD_Form->model[] = dontList(new TextFieldN(_("P 1"), 'parm1', _("Event parameter 1.")));
$HD_Form->model[] = dontList(new TextFieldN(_("P 2"), 'parm2', _("Event parameter 2.")));
$HD_Form->model[] = dontList(new TextFieldN(_("P 3"), 'parm3', _("Event parameter 3.")));
// $HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Пример #4
0
                        echo htmlspecialchars("{$key}={$val}") . "<br>\n";
                    }
                }
            }
            echo _("Success!") . "<br>\n";
            if ($this->FG_DEBUG > 2) {
                echo "<br>";
            }
            if ($fd) {
                fclose($fd);
            }
        }
        if (isset($this->afterContentString)) {
            echo $this->afterContentString;
        }
        echo '</div>' . "\n";
    }
}
HelpElem::DoHelp(_("Here you can generate the peer.conf files for the statically set users/servers."), 'vcard.png');
$HD_Form = new GenPeerActionForm();
$HD_Form->checkRights(ACX_CUSTOMER);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$HD_Form->model[] = new SqlRefField(_("Server Group"), "srvgrp", "cc_server_group", "id", "name", _("Generate configs for all servers in group."));
$HD_Form->model[] = new BoolField(_("Reset instances"), 'reset', _("If true, the db will also be reset with the corresponding cards/booths"));
$HD_Form->model[] = new SqlRefField(_("Agent id"), "agentid", "cc_agent", "id", "name", _("Put all cards/booths of agent in conf."));
$HD_Form->model[] = new BoolField(_("Do SIP"), 'do_sip', _("Use SIP, generate additional_sip.conf"));
end($HD_Form->model)->def_value = 't';
$HD_Form->model[] = new BoolField(_("Do IAX"), 'do_iax', _("Use, generate IAX"));
end($HD_Form->model)->def_value = 't';
require "PP_page.inc.php";
Пример #5
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Form/Class.SqlActionForm.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
/*require_once ("a2blib/Form/Class.RevRef.inc.php");*/
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
require_once "a2blib/Class.JQuery.inc.php";
$menu_section = 'menu_ratecard';
HelpElem::DoHelp(_("Simulate DID engine behaviour: this page will assist you in debugging which number will be called when some DID call comes in."), 'vcard.png');
$HD_Form = new SqlTableActionForm();
$HD_Form->checkRights(ACX_RATECARD);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$HD_Form->model[] = new TextField(_("DID"), 'didstring', _("Put here the string asterisk would deliver to the DID engine."));
$HD_Form->model[] = new TextField(_("Cod"), 'didcode', _("If you are using 'codes' to differentiate DIDs, put here the code by which the AGI would be called."));
$HD_Form->model[] = new DateTimeField(_("Time"), 'curtime', _("The date/time the call is supposed to take place. This helps us predict tomorrow's rates"));
end($HD_Form->model)->def_date = 'now';
/* Note: the secondary tables (sellrate, buyrate) *must* be queried inline, in the fields clause,
 (rather than the tables clause), because we have to preserve the order of Re3 rows. */
$HD_Form->QueryString = 'SELECT de.*, username(de.card) AS crd_username, id(de.card) AS crd_id,
	id(de.card) AS crd,
	(SELECT name FROM cc_didgroup WHERE id = de.dgid) AS dgid_name,
	(SELECT name FROM cc_tariffgroup WHERE id = de.tgid) AS tgid_name,
	(SELECT name FROM cc_numplan WHERE id = de.nplan) AS nplan_name,
	(SELECT destination FROM cc_buyrate WHERE id = de.brid2) AS brid2_destination,
	alert_info
	FROM DIDEngine(%didstring,%didcode,%curtime) AS de;';
Пример #6
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.RevRef.inc.php";
require_once "a2blib/Form/Class.TextSearchField.inc.php";
require_once "a2blib/Form/Class.ClauseField.inc.php";
require_once "a2blib/Form/Class.SelectionForm.inc.php";
$menu_section = 'menu_ratecard';
HelpElem::DoHelp(gettext("Sell rates are the prices the end customers will pay us."));
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->model[] = new TextSearchField(_("Destination"), 'destination');
$SEL_Form->model[] = new SqlRefField(_("Plan"), 'idrp', 'cc_retailplan', 'id', 'name', _("Retail plan"));
end($SEL_Form->model)->does_add = false;
$HD_Form = new FormHandler('cc_sellrate', _("Sell rates"), _("Sell rate"));
$HD_Form->checkRights(ACX_RATECARD);
$HD_Form->init();
$HD_Form->views['tooltip'] = new DetailsMcView();
$PAGE_ELEMS[] =& $SEL_Form;
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$SEL_Form->enable($HD_Form->getAction() == 'list');
$clauses = $SEL_Form->buildClauses();
foreach ($clauses as $cla) {
    $HD_Form->model[] = new FreeClauseField($cla);
}
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
Пример #7
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.SqlRefField.inc.php";
// require_once ("a2blib/Form/Class.TabField.inc.php");
require_once "a2blib/Form/Class.TimeField.inc.php";
// require_once ("a2blib/Class.JQuery.inc.php");
$menu_section = 'menu_netmon';
HelpElem::DoHelp(_("Systems are any hardware or software entity."));
$HD_Form = new FormHandler('nm.system', _("Systems"), _("System"));
$HD_Form->checkRights(ACX_NETMON);
$HD_Form->default_order = 'id';
$HD_Form->default_sens = 'ASC';
$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');
$HD_Form->model[] = new SqlRefFieldN(_("Parent"), "par_id", "nm.system", "id", "name");
//$HD_Form->model[] = new TextAreaField(_("Comment"),'comment');
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Пример #8
0
<?php

include "./lib/defines.php";
include "./lib/module.access.php";
include "a2blib/Form.inc.php";
include "a2blib/Class.HelpElem.inc.php";
$menu_section = 'menu_billing';
HelpElem::DoHelp(gettext("Currency data are automaticaly updated from Yahoo Financial." . "<br>For more information please visite the website http://finance.yahoo.com." . "<br>The list below is based over your currency base :") . ' <b>' . BASE_CURRENCY . '</b>', 'favorites.png');
$HD_Form = new FormHandler('cc_currencies', _("Currencies"), _("Currency"));
$HD_Form->checkRights(ACX_AGENTS);
$HD_Form->default_order = 'id';
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
//$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyField(_("ID"), 'id');
$HD_Form->model[] = new TextField(_("Currency"), 'currency', _("Currency code"));
$HD_Form->model[] = new TextField(_("Name"), 'name', _("Currency name"));
$HD_Form->model[] = new FloatField(_("Value"), 'value', _("Rate to base currency"));
$HD_Form->model[] = new TextFieldN(_("Sign"), 'csign', _("Currency special symbol"));
end($HD_Form->model)->does_list = false;
$HD_Form->model[] = new BoolField(_("Prepend sign"), 'sign_pre', _("If true, symbol prepends amount, like USD \$ 1.00"));
end($HD_Form->model)->does_list = false;
$HD_Form->model[] = new TextField(_("Format"), 'cformat', _("SQL visual format"));
end($HD_Form->model)->does_list = false;
$HD_Form->model[] = new TextField(_("Format 2"), 'cformat2', _("SQL visual format for small amounts (eg. rates), use more precision here."));
end($HD_Form->model)->does_list = false;
$HD_Form->model[] = new EditBtnField();
//$HD_Form->model[] = new GroupField(array(new EditBtnField(),new DelBtnField()));
require "PP_page.inc.php";
// eof !
if (false) {
Пример #9
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.SelectionForm.inc.php";
require_once "a2blib/Form/Class.TextSearchField.inc.php";
require_once "a2blib/Form/Class.ClauseField.inc.php";
$menu_section = 'menu_customers';
HelpElem::DoHelp(_("Here you can see the current registration of VoIP devices in the system (in the servers that support realtime)."));
$HD_Form = new FormHandler('cc_ast_instance', _("Instances"), _("Instance"));
$HD_Form->checkRights(ACX_CUSTOMER);
$HD_Form->init();
$HD_Form->model[] = dontList(new PKeyFieldEH(_("UserID"), 'userid'));
$HD_Form->model[] = dontList(new PKeyField(_("ServerID"), 'srvid'));
$HD_Form->model[] = dontList(new PKeyField(_("Mode"), 'sipiax'));
$HD_Form->model[] = new SqlRefField(_("Server"), "srvid", "cc_a2b_server", "id", "host");
$HD_Form->model[] = new BoolField(_("Dynamic"), dyn);
end($HD_Form->model)->def_value = false;
end($HD_Form->model)->does_list = false;
end($HD_Form->model)->does_edit = false;
//	end($HD_Form->model)->does_add=false;
$HD_Form->model[] = new SqlBigRefField(_("User"), "userid", "cc_ast_users_v", "id", "name");
$HD_Form->model[] = new TextField(_("User Name"), 'username');
$sipiax_list = array();
$sipiax_list[] = array('1', 'SIP');
$sipiax_list[] = array('2', 'IAX');
$sipiax_list[] = array('5', 'SIP register');
$HD_Form->model[] = new RefField(_("Mode"), "sipiax", $sipiax_list);
Пример #10
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.ClauseField.inc.php";
require_once "a2blib/Form/Class.TextSearchField.inc.php";
require_once "a2blib/Form/Class.SelectionForm.inc.php";
require_once "a2blib/Form/Class.ListTeXView.inc.php";
require_once "a2blib/Form/Class.ListCsvView.inc.php";
$menu_section = 'menu_billing';
HelpElem::DoHelp(gettext("Vouchers, Create a single voucher, defining such properties as credit, tag, currency etc, click confirm when finished. " . "<br/> The customer applies voucher credit to their card via the customer interface or via an IVR menu."));
$HD_Form = new FormHandler('vouchers', _("Vouchers"), _("Voucher"));
$HD_Form->checkRights(ACX_BILLING);
$HD_Form->init();
$HD_Form->views['exportLT'] = new ListTeXView();
$HD_Form->views['exportCSV'] = new ListCsvView();
$HD_Form->model[] = new PKeyFieldEH(_("Id"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Voucher"), 'voucher');
$HD_Form->model[] = new TextFieldEH(_("Tag"), 'tag', _("Enter the tag."));
$HD_Form->model[] = new SqlRefField(_("Card group"), 'card_grp', 'cc_card_group', 'id', 'name', _("Cards in this group will be able to use the voucher. Also set the currency here!"));
/*end($HD_Form->model)->refexpr =*/
end($HD_Form->model)->combofield = "name || COALESCE( ' (' || def_currency || ')', '')";
$HD_Form->model[] = new FloatField(_("Credit"), 'credit', _("Money in the voucher. Positive is credit. It is in group's currency!"));
// $HD_Form->model[] = new SqlRefFieldN(_("Currency"),'currency','cc_currencies','currency','name', _("Default currency for this voucher."));
$HD_Form->model[] = new SqlBigRefField(_("Card Number"), "card_id", "cc_card", "id", "username");
end($HD_Form->model)->SetRefEntity("A2B_entity_card.php");
Пример #11
0
<?php

include "./lib/defines.php";
include "./lib/module.access.php";
include "a2blib/Form.inc.php";
include "a2blib/Class.HelpElem.inc.php";
include "a2blib/Form/Class.SqlRefField.inc.php";
$menu_section = 'menu_servers';
HelpElem::DoHelp(gettext("Server are used by the callback system through the asterisk manager in order to initiate the callback and outbound a call to your customers. You can add/modify the callback server here that are going to be use here. The AGI and callback mode need to be install on those machine."), 'network_local.png');
$HD_Form = new FormHandler('cc_a2b_server', _("Servers"), _("Server"));
$HD_Form->checkRights(ACX_ADMINISTRATOR);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id', '5%');
$HD_Form->model[] = new TextFieldEH(_("Host"), 'host', _("Host name"));
$HD_Form->model[] = new SqlRefField(_("Group"), 'grp', 'cc_server_group', 'id', 'name', _("Server group"));
$HD_Form->model[] = new TextField(_("IP"), 'ip', _("IPv4 address of server"));
$HD_Form->model[] = new TextField(_("Login"), 'manager_username', _("Username of manager for that host"));
$HD_Form->model[] = new PasswdField(_("Secret"), 'manager_secret', 'alnum');
$HD_Form->model[] = new TextField(_("DB user"), 'db_username', _("The database username used by this host. This field must match the connection settings of the asterisk realtime."));
// $HD_Form->model[] = new GroupField(array(new EditBtnField(),new DelBtnField()));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Пример #12
0
<?php

include "./lib/defines.php";
include "./lib/module.access.php";
include "a2blib/Form.inc.php";
include "a2blib/Class.HelpElem.inc.php";
include "a2blib/Form/Class.SqlRefField.inc.php";
$menu_section = 'menu_admin';
HelpElem::DoHelp(_("Configuration entries"), 'network_local.png');
$HD_Form = new FormHandler('cc_sysconf', _("Configs"), _("Config"));
$HD_Form->checkRights(ACX_ADMINISTRATOR);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id', '5%');
$HD_Form->model[] = new TextField(_("Group"), 'grp');
$HD_Form->model[] = new TextFieldEH(_("Name"), 'name');
$HD_Form->model[] = new TextField(_("Value"), 'val');
// $HD_Form->model[] = new GroupField(array(new EditBtnField(),new DelBtnField()));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
$menu_section = 'menu_did';
HelpElem::DoHelp(_("DID reservations are DID numbers explicitly attached to customers."));
$HD_Form = new FormHandler('did_reservation', _("Reservations"), _("Reservation"));
$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(_("DID"), 'did', _("The last digits of the DID (after the batch head)."));
$HD_Form->model[] = new TextFieldN(_("Target"), 'target', _("The number to call for that DID. Use internal format or leave blank for peer search."));
$HD_Form->model[] = new SqlBigRefField(_("Card"), "card", "cc_card", "id", "username");
$HD_Form->model[] = new SqlRefField(_("Template"), "template", "ONLY subscription_template", "id", "name");
$HD_Form->model[] = new SqlRefField(_("Batch"), "batch", "did_batch", "id", "name");
$cs_list = array();
$cs_list[] = array("0", _("Inactive"));
$cs_list[] = array("1", _("Active"));
//$cs_list[]  = array("2", _("..."));
$HD_Form->model[] = dontAdd(new RefField(_("Status"), 'status', $cs_list));
$HD_Form->model[] = dontAdd(dontList(new DateTimeField(_("Creation date"), "creationdate", _("Date the subscription was registered"))));
end($HD_Form->model)->fieldacr = _("Creat");
$HD_Form->model[] = dontList(new DateTimeFieldN(_("Activation date"), "activedate", _("Date it becomes active")));
end($HD_Form->model)->fieldacr = _("Activ");
Пример #14
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.SelectionForm.inc.php";
require_once "a2blib/Form/Class.ClauseField.inc.php";
$menu_section = 'menu_agents';
HelpElem::DoHelp(gettext("Callshop essions. Each session starts when the customer enters a booth and ends when he leaves (preferably having paid the account)."));
$HD_Form = new FormHandler('cc_shopsessions', _("Sessions"), _("Session"));
$HD_Form->checkRights(ACX_AGENTS);
$HD_Form->default_order = 'starttime';
$HD_Form->default_sens = 'DESC';
$HD_Form->init();
// $PAGE_ELEMS[] = new AddNewButton($HD_Form); No, we don't open them this way!
$HD_Form->model[] = new PKeyField(_("ID"), 'id');
$HD_Form->model[] = new DateTimeField(_("Start"), 'starttime');
$HD_Form->model[] = new DateTimeField(_("End"), 'endtime');
$HD_Form->model[] = new TextField(_("State"), 'state');
$HD_Form->model[] = new SqlRefField(_("Booth"), "booth", "cc_booth", "id", "name");
$HD_Form->model[] = new SqlRefField(_("Card"), "card", "cc_card", "id", "username");
$detbtn = new OtherBtnField();
$detbtn->title = _("Details");
$detbtn->url = "invoices_cshop.php?";
$detbtn->extra_params = array('sid' => 'id');
$HD_Form->model[] =& $detbtn;
//$HD_Form->model[] = new DelBtnField();
$SEL_Form = new SelectionForm();
Пример #15
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once DIR_COMMON . "Form.inc.php";
require_once DIR_COMMON . "Class.HelpElem.inc.php";
require_once DIR_COMMON . "Form/Class.SqlRefField.inc.php";
require_once DIR_COMMON . "Form/Class.VolField.inc.php";
require_once DIR_COMMON . "Form/Class.ClauseField.inc.php";
$menu_section = 'menu_booths';
HelpElem::DoHelp(_("Booths are the physical phones where a customer can enter and make calls."));
$HD_Form = new FormHandler('cc_booth_v', _("Booths"), _("Booth"));
$HD_Form->checkRights(ACX_ACCESS);
$HD_Form->init(null, false);
$HD_Form->views['list'] = new ListView();
$HD_Form->views['details'] = new DetailsView();
$PAGE_ELEMS[] =& $HD_Form;
$HD_Form->model[] = new PKeyField(_("ID"), 'id');
$HD_Form->model[] = new FreeClauseField('agentid = \'' . $_SESSION['agent_id'] . '\'');
$HD_Form->model[] = new TextField(_("Name"), 'name');
$HD_Form->model[] = new TextAreaField(_("Location"), 'location');
$cs_list = array();
$cs_list[] = array('0', _("N/A"));
$cs_list[] = array('1', _("Empty"));
$cs_list[] = array('2', _("Idle"));
$cs_list[] = array('3', _("Ready"));
$cs_list[] = array('4', _("Active"));
$cs_list[] = array('5', _("Disabled"));
$cs_list[] = array('6', _("Stopped"));
$HD_Form->model[] = dontEdit(new RefField(_("State"), 'state', $cs_list));
$HD_Form->model[] = dontEdit(new MoneyField(_("Credit"), 'credit', _("Money now in the card inside the booth.")));
Пример #16
0
<?php

include "./lib/defines.php";
include "./lib/module.access.php";
include "a2blib/Form.inc.php";
include "a2blib/Class.HelpElem.inc.php";
include "a2blib/Form/Class.SqlRefField.inc.php";
include "a2blib/Form/Class.ListBitField.inc.php";
$menu_section = 'menu_admin';
HelpElem::DoHelp(_("Adminstrators"));
$HD_Form = new FormHandler('cc_ui_authen', _("Administrators"), _("Administrator"));
$HD_Form->checkRights(ACX_ADMINISTRATOR);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'userid', '5%');
$HD_Form->model[] = new TextFieldEH(_("Login"), 'login');
$HD_Form->model[] = dontList(new PasswdField(_("Password"), 'password', 'alnum'));
$HD_Form->model[] = new TextField(_("Name"), 'name');
$HD_Form->model[] = new IntField(_("Group"), 'groupid');
end($HD_Form->model)->def_value = 1;
$right_list[] = array(ACX_CUSTOMER, _("Customers"));
$right_list[] = array(ACX_BILLING, _("Billing"));
$right_list[] = array(ACX_RATECARD, _("Ratecard"));
$right_list[] = array(ACX_TRUNK, _("Trunk"));
$right_list[] = array(ACX_CALL_REPORT, _("Call report"));
$right_list[] = array(ACX_CRONT_SERVICE, _("Cron service"));
$right_list[] = array(ACX_ADMINISTRATOR, _("Administrator"));
$right_list[] = array(ACX_FILE_MANAGER, _("File manager"));
$right_list[] = array(ACX_MISC, _("Misc"));
$right_list[] = array(ACX_DID, _("Did"));
Пример #17
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Class.JQuery.inc.php";
$menu_section = 'menu_customers';
HelpElem::DoHelp(gettext("Speed Dial <br> This section allows you to define the Speed dials for the customer. A Speed Dial will be entered on the IVR in order to make a shortcut to their preferred dialed phone number."));
$HD_Form = new FormHandler('speeddials', _("SpeedDials"), _("SpeedDial"));
$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(_("SpeedDial"), 'speeddial');
$HD_Form->model[] = new TextFieldEH(_("Phone Number"), 'phone', _("Enter the phone number for the speed dial."));
$HD_Form->model[] = new TextFieldEH(_("Name"), 'name', _("Enter the name or label that will identify this speed dial."));
//$HD_Form->model[] = new SqlBigRefField(_("CardNumber"), "card_id","cc_card", "id", "username");
$HD_Form->model[] = new SqlRefFieldToolTip(_("CardNumber"), "card_id", "cc_card", "id", "username");
end($HD_Form->model)->SetRefEntity("A2B_entity_card.php");
end($HD_Form->model)->SetRefEntityL("A2B_entity_card.php");
end($HD_Form->model)->SetEditTitle(_("Card ID"));
end($HD_Form->model)->SetCaptionTooltip(_("Information about the card holder :"));
end($HD_Form->model)->SetRefTooltip("A2B_entity_card.php");
$HD_Form->model[] = dontAdd(dontEdit(new DateTimeField(_("Creation date"), "creationdate", _("Date the card was created (entered into this system)"))));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Пример #18
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once DIR_COMMON . "Form.inc.php";
require_once DIR_COMMON . "Class.HelpElem.inc.php";
/*require_once (DIR_COMMON."Form/Class.RevRef.inc.php");*/
require_once DIR_COMMON . "Form/Class.TimeField.inc.php";
require_once DIR_COMMON . "Form/Class.SqlRefField.inc.php";
require_once DIR_COMMON . "Provi/Class.ProvisionActionForm.inc.php";
$menu_section = 'menu_sipiax';
if (!DynConf::GetCfg(CUSTOMER_CFG, 'menu_sipiax', true)) {
    exit;
}
HelpElem::DoHelp(_("Here you can get example settings you can use in your devices. Select the kind of device (phone) you have and settings will appear."), 'phone.png');
$pr_list = array();
$pr_list[] = array("0", _("Asterisk sip friend"), 'ast-ini', 'sip-peer');
$pr_list[] = array("1", _("Asterisk iax friend"), 'ast-ini', 'iax-peer');
$HD_Form = new ProvisionActionForm();
$HD_Form->checkRights(ACX_ACCESS);
$HD_Form->init($pr_list);
$HD_Form->setArg('cardid', $_SESSION['card_id']);
$PAGE_ELEMS[] =& $HD_Form;
require "PP_page.inc.php";
Пример #19
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.ClauseField.inc.php";
$menu_section = 'menu_invoicing';
HelpElem::DoHelp(gettext("Invoices for regular clients"));
$HD_Form = new FormHandler('cc_invoices', _("Invoices"), _("Invoice"));
$HD_Form->checkRights(ACX_INVOICING);
$HD_Form->default_order = 'id';
$HD_Form->default_sens = 'DESC';
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
// $PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new FreeClauseField('agentid IS NULL');
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new SqlRefField(_("Card"), "cardid", "cc_card", "id", "username");
$HD_Form->model[] = new TextField(_("Ref"), "orderref");
$HD_Form->model[] = new DateTimeFieldDH(_("Start"), 'cover_startdate');
$HD_Form->model[] = new DateTimeField(_("Finish"), 'cover_enddate');
$HD_Form->model[] = dontList(new DateTimeField(_("Created"), 'created', _("Date this invoice was registered")));
$HD_Form->model[] = dontList(new MoneyField(_("Amount"), 'amount'));
$HD_Form->model[] = dontList(new MoneyField(_("Tax"), 'tax'));
$HD_Form->model[] = new MoneyField(_("Total"), 'total');
$HD_Form->model[] = new IntFieldN(_("Type"), "invoicetype");
//end($HD_Form->model)->refclause = "lang = 'C'";
$HD_Form->model[] = dontList(new TextFieldN(_("Filename"), "filename"));
Пример #20
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";
$menu_section = 'menu_ratecard';
HelpElem::DoHelp(gettext("Tariff groups define which rates will apply to each group of customers."));
$HD_Form = new FormHandler('cc_tariffgroup', _("Tariff Groups"), _("Tariff group"));
$HD_Form->checkRights(ACX_RATECARD);
$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(_("Public Name"), 'pubname', _("Public name is displayed to customers, agents. You may want it to be different than the internal name above."));
end($HD_Form->model)->fieldacr = _("P Name");
$HD_Form->model[] = new IntField(_("LCR type"), "lcrtype", _("LCR mode") . " (deprecated?)");
//$HD_Form->model[] = new TextField(_("xx"),'xx');
$HD_Form->model[] = new RevRef2(_("Sell plans"), 'tplans', 'id', 'cc_tariffgroup_plan', 'tgid', 'rtid', 'cc_retailplan', 'id', 'name', _("Customer of this group will use those selling plans."));
//RevRef2::html_body($action);
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Пример #21
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.RevRefForm.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
$menu_section = 'menu_did';
HelpElem::DoHelp(_("DID phonebooks help associate incoming CLIDs with names"));
$HD_Form = new FormHandler('did_phonebook', _("DID Phonebooks"), _("DID phonebook"));
$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 TextFieldN(_("Code"), 'code', _("A code, for syncing it with foreign ones."));
$HD_Form->model[] = dontList(new SqlRefFieldN(_("CLID Rules"), "rnplan", "cc_re_numplan", "id", "name", _("Use this book in those CLIDs only")));
$HD_Form->model[] = dontList(new SqlRefFieldN(_("Card Group"), "card_group", "cc_card_group", "id", "name", _("Use this book in that card group only")));
$HD_Form->model[] = dontList(new SqlBigRefField(_("Card"), "cardid", "cc_card", "id", "name", _("Use this book only for that card: private one.")));
$HD_Form->model[] = new DelBtnField();
$tmp = new RevRefForm(_("Entries"), 'ints', 'id', 'did_pb_entry', 'pb');
$HD_Form->meta_elems[] = $tmp;
$tmp->Form->checkRights(ACX_DID);
$tmp->Form->init();
$tmp->Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$tmp->Form->model[] = new TextField(_("Name"), 'name');
$tmp->Form->model[] = new TextField(_("Number"), 'dnum', _('Number, in intermediate incoming format.'));
Пример #22
0
<?php

include "./lib/defines.php";
include "./lib/module.access.php";
include "a2blib/Form.inc.php";
include "a2blib/Class.HelpElem.inc.php";
$menu_section = 'menu_servers';
HelpElem::DoHelp(gettext("Group of server define the set of servers that are going to be used by the callback system. A callback is bound to a group of server, those server will be used to dispatch the callback requests."), 'yast_multihead.png');
$HD_Form = new FormHandler('cc_server_group', _("Server Groups"), _("Server group"));
$HD_Form->checkRights(ACX_ADMINISTRATOR);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id', '5%');
$HD_Form->model[] = new TextFieldEH(_("Name"), 'name', _("Group name"));
$HD_Form->model[] = new TextAreaField(_("Description"), 'description', 35);
// $HD_Form->model[] = new GroupField(array(new EditBtnField(),new DelBtnField()));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Пример #23
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Class.JQuery.inc.php";
$menu_section = 'menu_customers';
HelpElem::DoHelp(_("Asterisk users are the entries that provide SIP/IAX peers for asterisk."), 'vcard.png');
$HD_Form = new FormHandler('cc_ast_users', _("Users"), _("User"));
$HD_Form->checkRights(ACX_CUSTOMER);
$HD_Form->init();
$HD_Form->views['tooltip'] = new DetailsMcView();
$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")));
}
Пример #24
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.SqlRefField.inc.php";
// require_once ("a2blib/Form/Class.TabField.inc.php");
require_once "a2blib/Form/Class.TimeField.inc.php";
// require_once ("a2blib/Class.JQuery.inc.php");
$menu_section = 'menu_queues';
HelpElem::DoHelp(_("Lists the calls that have been processed by the queue module, and their result."));
$HD_Form = new FormHandler('ast_queue_callers', _("Calls"), _("Call"));
$HD_Form->checkRights(ACX_QUEUES);
$HD_Form->default_order = 'id';
$HD_Form->default_sens = 'DESC';
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
// $PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new SqlRefFieldN(_("Queue"), 'queue', 'ast_queue', 'id', 'name');
$HD_Form->model[] = new DateTimeFieldDH(_("Join"), "ts_join", _("Time the call reached our system"));
$HD_Form->model[] = dontList(new DateTimeFieldN(_("Connect"), "ts_connect", _("When the call started being serviced by an agent.")));
$HD_Form->model[] = dontList(new DateTimeFieldN(_("End"), "ts_end", _("Time the call ended")));
$HD_Form->model[] = new TextFieldN(_("Status"), 'status', _("Outcome of the call."));
$HD_Form->model[] = dontList(new TextFieldN(_("Hangup Cause"), 'hupcause', _("Hangup cause, as reported by asterisk.")));
$HD_Form->model[] = new TextFieldN(_("CLID"), 'callerid', _("Caller ID reported to asterisk."));
$HD_Form->model[] = dontList(new TextFieldN(_("UID"), 'uniqueid', _("Asterisk unique call id.")));
$HD_Form->model[] = new TextFieldN(_("Agent"), 'agent', _("Agent which serves the call, if any."));
$HD_Form->model[] = dontList(new SecondsField(_("Hold"), 'holdtime', _("How much did the caller wait.")));
$HD_Form->model[] = dontList(new SecondsField(_("Talk"), 'talktime', _("How long did the caller talk to our agent.")));
Пример #25
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.VolField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.ClauseField.inc.php";
require_once "a2blib/Form/Class.TextSearchField.inc.php";
require_once "a2blib/Form/Class.SelectionForm.inc.php";
require_once "a2blib/Form/Class.TabField.inc.php";
require_once "a2blib/Class.JQuery.inc.php";
$menu_section = 'menu_customers';
HelpElem::DoHelp(gettext("Customers are listed below by card number. Each row corresponds to one customer, along with information such as their call plan, credit remaining, etc.</br>" . "The SIP and IAX buttons create SIP and IAX entries to allow direct VoIP connections to the Asterisk server without further authentication."), 'vcard.png');
$HD_Form = new FormHandler('cc_card', _("Customers"), _("Customer"));
$HD_Form->checkRights(ACX_CUSTOMER);
$HD_Form->init();
$HD_Form->views['tooltip'] = new DetailsMcView();
$HD_Form->model[] = new TabField(_("Card information"));
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Card number"), 'username', _('Card username. Also the PIN for callingcards'));
$HD_Form->model[] = new TextField(_("Card alias"), 'useralias', _("Alias, also the number  *-*"));
$HD_Form->model[] = new SqlRefField(_("Group"), "grp", "cc_card_group", "id", "name");
if ($HD_Form->getAction() != 'tooltip') {
    $HD_Form->model[] = dontList(new PasswdField(_("Card pass"), 'userpass', 'alnum', _("PIN")));
}
$HD_Form->model[] = new FloatVolField(_("Credit"), 'credit', _("Money now in the card. Positive is credit, negative owes us."));
$HD_Form->model[] = new FloatVolField(_("Credit Limit"), 'creditlimit', _("Maximum (negative) credit this card can reach, if postpaid."));
end($HD_Form->model)->fieldacr = _("CLim");
Пример #26
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";
Пример #27
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once DIR_COMMON . "Form.inc.php";
require_once DIR_COMMON . "Class.HelpElem.inc.php";
require_once DIR_COMMON . "Form/Class.SqlRefField.inc.php";
require_once DIR_COMMON . "Form/Class.TimeField.inc.php";
require_once DIR_COMMON . "Form/Class.ClauseField.inc.php";
$menu_section = 'menu_charge';
HelpElem::DoHelp(_("Charges are money transactions apart from calls. They are used to indicate that the customer should pay or receive extra money."));
$HD_Form = new FormHandler('cc_card_charge', _("Charges"), _("Charge"));
$HD_Form->checkRights(ACX_ACCESS);
$HD_Form->init();
// $HD_Form->views['list']=new ListView();
// $HD_Form->views['details'] = new DetailsView();
$PAGE_ELEMS[] =& $HD_Form;
//$PAGE_ELEMS[] = new AddNewButton($HD_Form);
// TODO: put static fields and fix them!
$HD_Form->views['ask-del'] = $HD_Form->views['delete'] = null;
$HD_Form->views['ask-add'] = $HD_Form->views['add'] = null;
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new ClauseField('agentid', $_SESSION['agent_id']);
$HD_Form->model[] = new SqlBigRefField(_("Card"), "card", "cc_card", "id", "username");
$HD_Form->model[] = new DateTimeFieldDH(_("Date"), 'creationdate');
$HD_Form->model[] = new SqlRefField(_("Type"), "chargetype", "cc_texts", "id", "txt");
$lng = getenv('LANG');
if (empty($lng) || $lng == 'en_US') {
    $lng = 'C';
}
end($HD_Form->model)->refclause = "lang = '{$lng}'";
Пример #28
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.SqlRefField.inc.php";
$menu_section = 'menu_config';
HelpElem::DoHelp(_("Mail templates are preset messages to be sent on alerts etc."));
$HD_Form = new FormHandler('cc_templatemail', _("Templates"), _("Template"));
$HD_Form->checkRights(ACX_MISC);
$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(_("Type"), 'mtype');
$HD_Form->model[] = new RefField(_("Lang"), 'lang', get_locales(true));
$HD_Form->model[] = dontList(new TextField(_("From Name"), 'fromname', _("Human name of sender")));
$HD_Form->model[] = new TextField(_("From"), 'fromemail', _("Email of sender"));
$HD_Form->model[] = new TextField(_("Subject"), 'subject');
$HD_Form->model[] = dontList(new TextAreaField(_("Message"), 'message', _("The message, arguments are %-quoted")));
$HD_Form->model[] = dontList(new TextAreaField(_("Default args."), 'defargs', _("Default values for arguments, in URL parameter format.")));
$HD_Form->model[] = new DelBtnField();
require_once "a2blib/Form/Class.ImportView.inc.php";
require_once "a2blib/Class.DynConf.inc.php";
$HD_Form->views['ask-import'] = new AskImportView();
$HD_Form->views['import-analyze'] = new ImportMailAView($HD_Form->views['ask-import']);
// $HD_Form->views['import'] = new ImportView($HD_Form->views['ask-import']);
//$HD_Form->views['ask-import']->common = array('idrp');
$HD_Form->views['ask-import']->csvmode = false;
$HD_Form->views['ask-import']->mandatory = array('mtype', 'lang', 'fromemail', 'subject', 'message');
Пример #29
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.SqlRefField.inc.php";
$menu_section = 'menu_customers';
HelpElem::DoHelp(gettext("CallerID <br> Set the caller ID so that the customer calling in is authenticated on the basis of the callerID rather than with account number."));
$HD_Form = new FormHandler('cc_callerid', _("CallerIDs"), _("CallerID"));
$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(_("Caller ID"), 'cid', _("Insert the CallerID"));
$HD_Form->model[] = new SqlBigRefField(_("CardNumber"), "cardid", "cc_card", "id", "username");
end($HD_Form->model)->SetRefEntity("A2B_entity_card.php");
end($HD_Form->model)->SetRefEntityL("A2B_entity_card.php");
end($HD_Form->model)->SetEditTitle(_("Card ID"));
$actived_list = array();
$actived_list[] = array('t', gettext("Active"));
$actived_list[] = array('f', gettext("Inactive"));
$HD_Form->model[] = new RefField(_("ACTIVATED"), "activated", $actived_list, _("Allow the callerID to operate"), "4%");
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
?>

Пример #30
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once DIR_COMMON . "Form.inc.php";
require_once DIR_COMMON . "Class.HelpElem.inc.php";
require_once DIR_COMMON . "Form/Class.SqlRefField.inc.php";
require_once DIR_COMMON . "Form/Class.VolField.inc.php";
require_once DIR_COMMON . "Form/Class.ClauseField.inc.php";
$menu_section = 'menu_customers';
HelpElem::DoHelp(_("Customers represent the accounts that get charged for calls."));
$HD_Form = new FormHandler('cc_card', _("Cards"), _("Card"));
$HD_Form->checkRights(ACX_ACCESS);
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new FreeClauseField('grp IN (SELECT id FROM cc_card_group WHERE agentid = \'' . $_SESSION['agent_id'] . '\')');
$HD_Form->model[] = new TextRoFieldEH(_("Card number"), 'username', _('Card username. Also the PIN for callingcards'));
$HD_Form->model[] = new TextRoFieldEH(_("Card alias"), 'useralias', _("Alias, also the internal number"));
$HD_Form->model[] = new TextFieldN(_("First name"), 'firstname');
$HD_Form->model[] = new TextFieldN(_("Last name"), 'lastname');
$cs_list = array();
$cs_list[] = array("0", _("CANCELLED"));
$cs_list[] = array("1", _("ACTIVE"));
$cs_list[] = array("2", _("NEW"));
$cs_list[] = array("3", _("MAIL-WAIT"));
$cs_list[] = array("4", _("RESERVED"));
$cs_list[] = array("5", _("EXPIRED"));
$cs_list[] = array("6", _("UNDERPAY"));
$cs_list[] = array("7", _("LITIGATION"));
$cs_list[] = array("8", _("STOPPED"));