Beispiel #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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
$menu_section = 'menu_agents';
HelpElem::DoHelp(gettext("Booths are public phones, where the customer can make calls using any/some of our cards."));
$HD_Form = new FormHandler('cc_booth', _("Booths"), _("Booth"));
$HD_Form->checkRights(ACX_AGENTS);
$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', _("Human readable name for the booth"));
$HD_Form->model[] = new TextAreaField(_("Location"), 'location', 30, _("Helps us remember where the booth is."));
$HD_Form->model[] = new SqlRefField(_("Agent"), 'agentid', 'cc_agent', 'id', 'name', _("Agent the booth belongs to"));
$HD_Form->model[] = dontList(new DateTimeField(_("Creation"), 'datecreation', _("When the booth was created.")));
$HD_Form->model[] = dontAdd(new BoolField(_("Disabled"), 'disabled', _("If true, booth is unusable. eg. broken")));
end($HD_Form->model)->fieldacr = _("Dis");
$HD_Form->model[] = dontList(dontAdd(new IntFieldN(_("Default card"), 'def_card_id', _("Default card. Must exist for booth to be usable."))));
$HD_Form->model[] = dontAdd(new IntFieldN(_("Current card"), 'cur_card_id', _("Current card making calls in booth.")));
end($HD_Form->model)->fieldacr = _("CurC");
$HD_Form->model[] = dontList(new TextField(_("Caller ID"), 'callerid', _("*-*")));
$HD_Form->model[] = new TextField(_("Peer Name"), 'peername', _("Asterisk peer name for authentication"));
$HD_Form->model[] = dontList(new TextField(_("Peer Secret"), 'peerpass', _("Asterisk secret for peer")));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Beispiel #2
0
$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"));
$right_list[] = array(ACX_CALLBACK, _("Call back"));
$right_list[] = array(ACX_OUTBOUNDCID, _("Outbound CID"));
$right_list[] = array(ACX_PACKAGEOFFER, _("Package offer"));
$right_list[] = array(ACX_PRED_DIALER, _("Predictive dialer"));
$right_list[] = array(ACX_INVOICING, _("Invoicing"));
$right_list[] = array(ACX_AGENTS, _("Agents"));
$right_list[] = array(ACX_NUMPLAN, _("Numplans"));
$right_list[] = array(ACX_SERVERS, _("Servers"));
$right_list[] = array(ACX_PRICING, _("Pricing"));
$right_list[] = array(ACX_QUEUES, _("Queues"));
$right_list[] = array(ACX_NETMON, _("Net Mon"));
$HD_Form->model[] = dontList(new ListBitField(_("Permissions"), 'perms', $right_list));
$HD_Form->model[] = dontList(dontAdd(new BoolField(_("Read Only"), 'readonly')));
$HD_Form->model[] = new TextField(_("Direction"), 'direction');
// $HD_Form->model[] = new GroupField(array(new EditBtnField(),new DelBtnField()));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.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"));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Beispiel #4
0
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}'";
$HD_Form->model[] = new MoneyField(_("Amount"), 'amount', _("Positive charge is when the customer should pay more. Negative means the customer gets refunded."));
$HD_Form->model[] = dontList(new TextAreaField(_("Description"), 'description'));
$HD_Form->model[] = new SqlBigRefField(_("Invoice"), "invoice_id", "cc_invoices", "id", "orderref");
end($HD_Form->model)->does_list = false;
end($HD_Form->model)->does_add = false;
end($HD_Form->model)->does_edit = false;
require "PP_page.inc.php";
$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"));
//$HD_Form->model[] = new SqlBigRefField(_("Invoice"), "invoice_id","cc_invoices", "id", "orderref");
//end($HD_Form->model)->refclause = "agentid IS NOT NULL";
//$HD_Form->model[] = dontList( new TextAreaField(_("Description"),'descr'));
$ilist = array();
$ilist[] = array("0", _("Unpaid"));
$ilist[] = array('1', _('Sent-unpaid'));
$ilist[] = array('2', _('Sent-paid'));
$ilist[] = array('3', _('Paid'));
$HD_Form->model[] = new RefField(_("Status"), 'payment_status', $ilist);
$detBtn = new OtherBtnField();
$detBtn->title = _("View");
$detBtn->url = "invoices_card.php?";
$detBtn->extra_params = array('id' => 'id');
$HD_Form->model[] = new GroupField(array($detBtn, new DelBtnField()));
require "PP_page.inc.php";
$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";
}
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 users (aka. agents) which are subscribed into queues."));
$HD_Form = new FormHandler('ast_queue_member', _("Members"), _("Member"));
$HD_Form->checkRights(ACX_QUEUES);
$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 SqlRefField(_("Queue"), 'que', 'ast_queue', 'id', 'name');
// SqlRefFieldToolTip
$HD_Form->model[] = new SqlBigRefField(_("User"), "usr", "cc_ast_users_v", "id", "name");
end($HD_Form->model)->SetRefEntity("A2B_entity_astuser.php");
end($HD_Form->model)->SetRefEntityL("A2B_entity_astuser.php");
end($HD_Form->model)->SetEditTitle(_("Ast. User"));
//end($HD_Form->model)->SetCaptionTooltip(_("Information about the card holder :"));
// 	end($HD_Form->model)->SetRefTooltip("A2B_entity_astuser.php");
// TODO: refField
$HD_Form->model[] = new IntFieldN(_("Mod"), 'mode', _("Mode ..."));
$HD_Form->model[] = new IntFieldN(_("Penalty"), 'penalty', _("Penalty"));
$HD_Form->model[] = new BoolField(_("Paused"), 'paused', _("If this member is currently paused."));
$HD_Form->model[] = new TextFieldN(_("Period"), 'tperiod', _("Member will only participate at that time period."));
$HD_Form->model[] = dontList(new TextFieldN(_("Parameter"), 'parm', _("Additional parameter for some modes.")));
$HD_Form->model[] = new GroupField(array(new EditBtnField(), new DelBtnField()));
require "PP_page.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');
$HD_Form->views['ask-import']->optional = array('fromname', 'defargs');
$HD_Form->views['ask-import']->bodyfield = 'message';
// $HD_Form->views['ask-import']->examples = array( array(_('Simple'), "importsamples.php?sample=RateCard_Simple"),
// 					     array(_('Complex'),"importsamples.php?sample=RateCard_Complex"));
$HD_Form->views['import-analyze']->allowed_mimetypes = array('text/plain', 'application/octet-stream');
require "PP_page.inc.php";
$HD_Form->model[] = new TextAreaField(_("Description"), 'description');
$HD_Form->model[] = new IntField(_("Metric"), 'metric', _("Weight of plan, lower metrics will be preferred at the rate engine."));
end($HD_Form->model)->def_value = 10;
$HD_Form->model[] = new SqlRefField(_("Trunk"), 'trunk', 'cc_trunk', 'id', 'trunkcode', _("Trunk used by these rates"));
$HD_Form->model[] = new DateTimeField(_("Start date"), "start_date", _("Date these rates are valid from"));
end($HD_Form->model)->def_date = '+1 day';
$HD_Form->model[] = new DateTimeField(_("Stop date"), "stop_date", _("Date these rates are valid until."));
end($HD_Form->model)->def_date = '+1 month 1 day';
$HD_Form->model[] = dontList(new TimeOWField(_("Period begin"), "starttime", _("Time of week the rate starts to apply")));
end($HD_Form->model)->def_value = 0;
$HD_Form->model[] = dontList(new TimeOWField(_("Period end"), "endtime", _("Time of week the rate stops apply")));
end($HD_Form->model)->def_value = 10079;
//$HD_Form->model[] = new TextField(_("xx"),'xx');
$HD_Form->model[] = new SecVolField(_("Seconds used"), "secondusedreal", _("Duration of calls through trunk."));
end($HD_Form->model)->fieldacr = _("Used");
$HD_Form->model[] = dontList(new SqlRefFieldN(_("Negotiation Currency"), 'neg_currency', 'cc_currencies', 'id', 'name', _("The currency credit is at. Whenever a call is made, the plan is charged with an amount at that currency.")));
$HD_Form->model[] = new FloatVolField(_("Credit"), 'credit', _("Money remaining in deal with provider."));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
//// *-*
if (false) {
    //TODO: styles
    ?>
<table align="center" border="0" width="65%"  cellspacing="1" cellpadding="2">
<tbody>
	<form name="updateForm" action="tariffplan_export.php" method="post">
	<INPUT type="hidden" name="id_tp" value="<?php 
    echo $id_tp;
    ?>
">
	<tr> <td>#<?php 
Beispiel #10
0
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.SqlRefField.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
$menu_section = 'menu_admin';
HelpElem::DoHelp(_("Mails sent or queued."));
$HD_Form = new FormHandler('cc_mailings', _("Mails"), _("Mail"));
$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(_("To"), 'tomail', _("Name and mail of recepient"));
$HD_Form->model[] = new DateTimeField(_("Date"), "tstamp", _("Date and time the mail was posted."));
$HD_Form->model[] = new SqlRefField(_("Type"), 'tmail_id', 'cc_templatemail', 'id', 'mtype');
end($HD_Form->model)->combofield = "mtype || '/' ||lang";
$mstates = array();
$mstates[] = array(1, _("New, unsent"));
$mstates[] = array(2, _("New, halt"));
$mstates[] = array(3, _("Sent"));
$mstates[] = array(4, _("Failed"));
$mstates[] = array(5, _("Waiting resend"));
$mstates[] = array(11, _("New (special)"));
$mstates[] = array(13, _("Sent (special)"));
$mstates[] = array(14, _("Failed (special)"));
$HD_Form->model[] = new RefField(_("State"), 'state', $mstates);
$HD_Form->model[] = dontList(new TextAreaField(_("Args"), 'args'));
$HD_Form->model[] = dontList(new TextAreaField(_("Comments"), 'icomments', _("Machine comments, for internal use.")));
$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/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/Form/Class.RevRefForm.inc.php";
// require_once ("a2blib/Class.JQuery.inc.php");
$menu_section = 'menu_admin';
HelpElem::DoHelp(_("Time periods are named zones of time intervals."));
$HD_Form = new FormHandler('time_period_cache', _("Periods"), _("Period"));
$HD_Form->checkRights(ACX_ADMINISTRATOR);
$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[] = dontList(new PKeyFieldEH(_("ID"), 'id'));
$HD_Form->model[] = new SqlRefField(_("Period"), "idtp", "time_periods", "id", "name");
$HD_Form->model[] = new DateTimeField(_("Start Date"), "tstart", _("Moment since which this value is valid."));
$HD_Form->model[] = new DateTimeField(_("End Date"), "tend", _("Moment until which this value is valid."));
$HD_Form->model[] = new BoolField(_("Active"), 'status', _("Value of time period within this interval."));
$HD_Form->model[] = new GroupField(array(new EditBtnField(), new DelBtnField()));
require "PP_page.inc.php";
HelpElem::DoHelp(_("Provisions are rules that define how a settings (provisioning) script will be generated."));
$HD_Form = new FormHandler('provision_group', _("Provision Groups"), _("Provision 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');
$HD_Form->model[] = new TextFieldEH(_("Category"), 'categ', _('Category, the "file" which will be generated.'));
$HD_Form->model[] = new TextField(_("Model"), 'model', _('Engine used to generate the file.'));
$HD_Form->model[] = new TextField(_("Name"), 'name', _('Name of group'));
$HD_Form->model[] = new TextField(_("Sub Name"), 'sub_name', _('Second part of name'));
//$HD_Form->model[] = new SqlRefFieldN(_("Alias Length"),'agentid','cc_agent','id','name', _("If cards belong to an agent."));
$HD_Form->model[] = dontList(dontAdd(new IntField(_("Metric"), 'metric', _("By adjusting the metrics, order of the generated groups can be enforced."))));
$HD_Form->model[] = dontList(dontAdd(new IntField(_("Options"), 'options', _("Option flags for group."))));
$HD_Form->model[] = dontList(new DateTimeFieldN(_("Last changed"), 'mtime', _("Last change of group data. May determine whether a provision is needed.")));
//$HD_Form->model[] = new RevRefTxt(_("Patterns"),'pat','id','cc_numplan_pattern','nplan','nick',_("Dial patterns for this plan."));
$HD_Form->model[] = new DelBtnField();
$tmp = new RevRefForm(_("Rule"), 'rul', 'id', 'provisions', 'grp_id');
$HD_Form->meta_elems[] = $tmp;
$tmp->Form->checkRights(ACX_ADMINISTRATOR);
$tmp->Form->init();
$tmp->Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$tmp->Form->model[] = new TextFieldEH(_("Name"), 'name', _('Name of setting'));
$tmp->Form->model[] = new TextField(_("Sub Name"), 'sub_name', _('Second part of setting name'));
$tmp->Form->model[] = new TextField(_("Value"), 'valuef', _('Value, pattern of setting'));
$tmp->Form->model[] = new IntField(_("Metric"), 'metric', _("By adjusting the metrics, order of the generated fields can be enforced."));
end($tmp->Form->model)->def_value = 10;
$tmp->Form->model[] = dontList(dontAdd(new IntField(_("Options"), 'options')));
$tmp->Form->model[] = new DelBtnField();
$tmp->Form->meta_elems[] = new AddNewButton($tmp->Form);
require "PP_page.inc.php";
$HD_Form->checkRights(ACX_ACCESS);
$HD_Form->default_order = 'id';
$HD_Form->default_sens = 'DESC';
$HD_Form->init(null, false);
$HD_Form->views['list'] = new ListView();
$HD_Form->views['details'] = new DetailsView();
$PAGE_ELEMS[] =& $HD_Form;
// $PAGE_ELEMS[] = new AddNewButton($HD_Form);
$HD_Form->model[] = new ClauseField('agentid', $_SESSION['agent_id']);
$HD_Form->model[] = new PKeyField(_("ID"), 'id');
$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" /*,"cc_texts", "id", "txt"*/);
//end($HD_Form->model)->refclause = "lang = 'C'";
//$HD_Form->model[] = dontList(new TextFieldN(_("Filename"), "filename"));
//$HD_Form->model[] = new SqlBigRefField(_("Invoice"), "invoice_id","cc_invoices", "id", "orderref");
//end($HD_Form->model)->refclause = "agentid IS NOT NULL";
//$HD_Form->model[] = dontList( new TextAreaField(_("Description"),'descr'));
$ilist = array();
$ilist[] = array("0", _("Unpaid"));
$ilist[] = array('1', _('Sent-unpaid'));
$ilist[] = array('2', _('Sent-paid'));
$ilist[] = array('3', _('Paid'));
$HD_Form->model[] = new RefField(_("Status"), 'payment_status', $ilist);
$detBtn = new OtherBtnField();
$detBtn->title = _("View");
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.")));
$HD_Form->model[] = dontList(new TextFieldN(_("Br Channel"), 'brchannel', _("Technical name of bridged channel.")));
// $HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Beispiel #15
0
$HD_Form->model[] = new TextField(_("Public Name"), 'pname', _("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");
$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));
$dmode_list = array();
$dmode_list[] = array('1', _('Public DID'));
$dmode_list[] = array('2', _('Trunk head'));
$dmode_list[] = array('3', _('Charge one, dial other'));
//$dmode_list[] = array('3','<Tech>/<IP>');
$HD_Form->model[] = dontList(new RefField(_("Mode"), "dmode", $dmode_list, _("Select the operation mode.")));
$HD_Form->model[] = new SqlRefFieldN(_("Provider"), "provider", "cc_provider", "id", "provider_name");
$HD_Form->model[] = new IntField(_("Metric"), "metric", _("Weight of trunk in rate engine"));
end($HD_Form->model)->does_add = false;
$HD_Form->model[] = new TextField(_("Dial Head"), 'dialhead', _("The first, common digits of the DID range."));
$HD_Form->model[] = dontList(new TextField(_("Dial Add"), 'dialadd', _("Add these digits.")));
$HD_Form->model[] = dontList(new TextField(_("Dial Fld2"), 'dialfld2'));
$HD_Form->model[] = dontList(new IntField(_("Dial Len"), 'diallen', _("Length of remaining digits in DID.")));
$HD_Form->model[] = dontAdd(dontList(new DateTimeField(_("Creation date"), "creationdate", _("Date the card was created (entered into this system)"))));
$HD_Form->model[] = dontAdd(dontList(new DateTimeFieldN(_("Expire date"), "expiredate", _("Date the card should expire"))));
$HD_Form->model[] = new SqlRefField(_("Buy plan"), "idtp", "cc_tariffplan", "id", "tariffname", _("This defines the rules for rating the DID usage."));
$HD_Form->model[] = new SqlRefFieldN(_("Numbering plan"), 'nplan', 'cc_numplan', 'id', 'name', _("Numbering plan"));
end($HD_Form->model)->fieldacr = _("Nplan");
$HD_Form->model[] = dontList(new IntField(_("Flags"), 'flags', _("Mode-specific flags.")));
$HD_Form->model[] = new SecVolField(_("Seconds used"), "secondsused", _("Duration of calls through DID batch."));
end($HD_Form->model)->fieldacr = _("Used");
// $HD_Form->model[] = dontList(new SqlRefFieldN(_("CLID Rules"), "rnplan","cc_re_numplan", "id", "name"));
$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/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";
Beispiel #17
0
$trunkfmt_list[] = array('10', 'Email to local peer');
$trunkfmt_list[] = array('11', 'Email to cross numplan peer');
$trunkfmt_list[] = array('12', 'Voicemail to local peer');
$trunkfmt_list[] = array('13', 'Voicemail to cross numplan peer');
$trunkfmt_list[] = array('14', 'Voicemail Main');
$trunkfmt_list[] = array('15', 'Local Peer, auto answer');
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Label"), 'trunkcode', _("Human readable name for the agent"));
$HD_Form->model[] = new SqlRefFieldN(_("Provider"), "provider", "cc_provider", "id", "provider_name");
$HD_Form->model[] = new IntField(_("Metric"), "metric", _("Weight of trunk in rate engine"));
end($HD_Form->model)->does_add = false;
$HD_Form->model[] = dontList(new TextField(_("Prefix"), 'trunkprefix', _("Add a prefix to the dialled digits.")));
$HD_Form->model[] = dontList(new IntField(_("Strip Digits"), "stripdigits", _("Number of digits to strip from dialstring")));
end($HD_Form->model)->does_add = false;
// $HD_Form->model[] = new TextField(_("Remove Prefix"),'removeprefix',_("In case of the voip provider or the gateway doesnt want a dialed prefix (can be useful with local gateway)"));
$HD_Form->model[] = dontList(new RefField(_("Format"), "trunkfmt", $trunkfmt_list, _("Select the desired format for the Dial string")));
$HD_Form->model[] = new TextField(_("Tech"), 'providertech', _("Technology used on the trunk (SIP,IAX2,ZAP,H323)"));
$HD_Form->model[] = new TextField(_("Provider IP"), "providerip", _("Set the IP or URL of the VoIP provider. Alternatively, put in the name of a previously defined trunk in Asterisk. (MyVoiPTrunk, ZAP4G etc.) You can use the following tags to as variables: *-* %dialingnumber%, %cardnumber%. ie g2/1644787890wwwwwwwwww%dialingnumber%"));
// end($HD_Form->model)->fieldacr =  gettext("ACT");
$HD_Form->model[] = dontList(new TextField(_("Additional parameter"), "addparameter", _("Define any additional parameters that will be used when running the Dial Command in Asterisk. Use the following tags as variables  *-* %dialingnumber%, %cardnumber%. ie 'D(ww%cardnumber%wwwwwwwwww%dialingnumber%)'")));
$HD_Form->model[] = dontList(new TextFieldN(_("Feature"), 'feature', _("If set, only cards subscribed to this feature will be able to use the trunk.")));
$HD_Form->model[] = dontList(new SqlRefFieldN(_("CLID Rules"), "rnplan", "cc_re_numplan", "id", "name"));
$HD_Form->model[] = new IntVolField(_("In use"), "inuse", _("Number of calls currently through this trunk"));
end($HD_Form->model)->does_add = false;
// $HD_Form->model[] = new TextField(_("Additional parameter"), "addparam", _());
$HD_Form->model[] = new RefField(_("Status"), "status", $status_list, _("Allow the agent to operate"), "4%");
end($HD_Form->model)->does_add = false;
$HD_Form->model[] = new SecVolField(_("Seconds used"), "secondusedreal", _("Duration of calls through trunk."));
end($HD_Form->model)->fieldacr = _("Used");
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
$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');
$HD_Form->model[] = new TextFieldEH(_("Destination"), 'destination');
$HD_Form->model[] = new SqlRefField(_("Plan"), 'idrp', 'cc_retailplan', 'id', 'name', _("Retail plan"));
$HD_Form->model[] = new FloatField(_("Rate"), 'rateinitial', _("End rate, per minute"));
$HD_Form->model[] = new IntField(_("Init Block"), 'initblock', _("Set the minimum duration charged to the customer. (i.e. 30 secs)"));
end($HD_Form->model)->fieldacr = _("IBLK");
$HD_Form->model[] = new IntField(_("Increment"), 'billingblock', _("Set the billing increment, in seconds (billing block)"));
end($HD_Form->model)->fieldacr = _("Incr");
$HD_Form->model[] = new FloatField(_("Connect charge"), 'connectcharge', _("Fixed fee applied upon connection"));
end($HD_Form->model)->fieldacr = _("CChr");
$HD_Form->model[] = dontList(new FloatField(_("Disconnect charge"), 'disconnectcharge', _("Fixed fee applied <u>after the customer hangs up an answered call</u>")));
$HD_Form->model[] = new FloatField(_("Step A"), 'stepchargea', _("Fee charged at beginning of period A"));
$HD_Form->model[] = new FloatField(_("Charge A"), 'chargea', _("Charge (per minute) of period A"));
$HD_Form->model[] = new FloatField(_("Time charge A"), 'timechargea', _("Duration of period A, in seconds"));
$HD_Form->model[] = new FloatField(_("Block A"), 'billingblocka', _("Block, in seconds of charge during period A"));
$HD_Form->model[] = new FloatField(_("Step B"), 'stepchargeb');
$HD_Form->model[] = new FloatField(_("Charge B"), 'chargeb');
$HD_Form->model[] = new FloatField(_("Time charge B"), 'timechargeb');
$HD_Form->model[] = new FloatField(_("Block B"), 'billingblockb');
$HD_Form->model[] = new FloatField(_("Step C"), 'stepchargec');
$HD_Form->model[] = new FloatField(_("Charge C"), 'chargec');
$HD_Form->model[] = new FloatField(_("Time charge C"), 'timechargec');
$HD_Form->model[] = new FloatField(_("Block C"), 'billingblockc');
for ($i = 8; $i < count($HD_Form->model); $i++) {
    $HD_Form->model[$i]->does_add = $HD_Form->model[$i]->does_list = false;
}
Beispiel #19
0
$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"));
$HD_Form->model[] = dontEdit(new RefField(_("Status"), 'status', $cs_list));
$HD_Form->model[] = dontEdit(new MoneyField(_("Credit"), 'credit', _("Money now in the card. Positive is credit, negative owes us.")));
$HD_Form->model[] = dontList(new TextAreaField(_("Address"), 'address'));
$HD_Form->model[] = dontList(new TextFieldN(_("City"), 'city'));
$HD_Form->model[] = dontList(new TextFieldN(_("State"), 'state'));
$HD_Form->model[] = dontList(new TextFieldN(_("Country"), 'country'));
$HD_Form->model[] = dontList(new TextFieldN(_("Zipcode"), 'zipcode'));
$HD_Form->model[] = dontList(new TextFieldN(_("Phone"), 'phone'));
$HD_Form->model[] = dontList(new TextFieldN(_("email"), 'email'));
$HD_Form->model[] = dontList(new TextFieldN(_("Fax"), 'fax'));
$HD_Form->model[] = dontEdit(new IntVolField(_("In use"), 'inuse'));
$HD_Form->model[] = dontList(new SqlRefFieldN(_("Currency"), 'currency', 'cc_currencies', 'currency', 'name', _("This currency affects the invoice and the audible balance information.")));
$HD_Form->views['ask-del'] = $HD_Form->views['delete'] = null;
$HD_Form->views['ask-add'] = $HD_Form->views['add'] = null;
require "PP_page.inc.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.'));
$tmp->Form->model[] = new DelBtnField();
$tmp->Form->meta_elems[] = new AddNewButton($tmp->Form);
require "PP_page.inc.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;
$HD_Form->model[] = dontList(new TextAreaField(_("Parameters"), 'params'));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Beispiel #22
0
$HD_Form->model[] = new TextFieldN(_("Last name"), 'lastname');
if ($HD_Form->getAction() != 'tooltip') {
    $HD_Form->model[] = dontList(new TextAreaField(_("Address"), 'address'));
    $HD_Form->model[] = dontList(new TextFieldN(_("City"), 'city'));
    $HD_Form->model[] = dontList(new TextFieldN(_("State"), 'state'));
    $HD_Form->model[] = dontList(new TextFieldN(_("Country"), 'country'));
    $HD_Form->model[] = dontList(new TextFieldN(_("Zipcode"), 'zipcode'));
    $HD_Form->model[] = dontList(new TextFieldN(_("Phone"), 'phone'));
    $HD_Form->model[] = dontList(new TextFieldN(_("email"), 'email'));
    $HD_Form->model[] = dontList(new TextFieldN(_("Fax"), 'fax'));
    $HD_Form->model[] = new TabField(_("Extra Parameters"));
    $HD_Form->model[] = dontAdd(new IntVolField(_("In use"), 'inuse'));
    $HD_Form->model[] = dontList(new SqlRefFieldN(_("Currency"), 'currency', 'cc_currencies', 'currency', 'name', _("Default currency for new cards in this group. This can later change per card.")));
}
$HD_Form->model[] = dontAdd(dontList(new IntVolField(_("Times used"), 'nbused', _("Total times the card has been used"))));
$HD_Form->model[] = dontList(new DateTimeFieldN(_("Last service"), "servicelastrun", _("Service last run then")));
// TODO fields:
//     "language" text DEFAULT 'en'::text,
//     redial text,
//     nbservice integer DEFAULT 0,
//     id_campaign integer DEFAULT 0,
//     num_trials_done integer DEFAULT 0,
//     callback text,
//     servicelastrun timestamp without time zone,
//     loginkey text,
//end($HD_Form->model)->fieldname ='agent';
// $HD_Form->model[] = new PasswdField(_("Password"),'passwd','alnum',_("Password used by agent to login into the web interface"));
//
// $HD_Form->model[] = new IntField(gettext("OPTIONS"), "options", null, "7%");
// // $HD_Form->model[] = new RefField(_("LANGUAGE"), "language");
// $HD_Form->model[] = new FloatField(_("CREDIT"), "credit");
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");
$HD_Form->model[] = dontList(new DateTimeFieldN(_("Expire date"), "expiredate", _("After this date it is no longer charged or used.")));
end($HD_Form->model)->fieldacr = _("Exp.");
$HD_Form->model[] = new SecVolField(_("Seconds used"), "secondused", _("Duration of calls through DID batch."));
end($HD_Form->model)->fieldacr = _("Used");
// $HD_Form->model[] = dontList(new SqlRefFieldN(_("CLID Rules"), "rnplan","cc_re_numplan", "id", "name"));
$HD_Form->model[] = new DelBtnField();
require "PP_page.inc.php";
Beispiel #24
0
require_once "a2blib/Form/Class.SumMultiView.inc.php";
require_once "a2blib/Form/Class.RevRefForm.inc.php";
require_once "a2blib/Class.SqlActionElem.inc.php";
$menu_section = 'menu_invoicing';
// NOTE: for agents, we MUST put an agent clause in each (sub)form
// Use a detail view to list the invoice details
$dform = new FormHandler('cc_invoices', _("Transactions"), _("Transaction"));
$dform->checkRights(ACX_INVOICING);
$dform->init(null, false);
$dform->setAction('details');
$dform->views['details'] = new DetailsView();
$dform->model[] = new PKeyField(_("ID"), 'id');
$dform->model[] = new TextField(_("Ref"), "orderref");
$dform->model[] = new DateTimeFieldDH(_("Period begin"), 'cover_startdate');
$dform->model[] = new DateTimeField(_("Period end"), 'cover_enddate');
$dform->model[] = dontList(new DateTimeField(_("Invoice date"), 'created', _("Date this invoice was registered")));
$dform->model[] = new MoneyField(_("Amount"), 'amount');
$dform->model[] = new MoneyField(_("Tax"), 'tax');
$dform->model[] = new MoneyField(_("Total"), 'total');
//$dform->model[] = new IntField(_("Type"), "invoicetype" /*,"cc_texts", "id", "txt"*/);
//end($dform->model)->refclause = "lang = 'C'";
//$dform->model[] = dontList(new TextField(_("Filename"), "filename"));
//$dform->model[] = new SqlBigRefField(_("Invoice"), "invoice_id","cc_invoices", "id", "orderref");
//end($dform->model)->refclause = "agentid IS NOT NULL";
//$dform->model[] = dontList( new TextAreaField(_("Description"),'descr'));
$ilist = array();
$ilist[] = array("0", _("Unpaid"));
$ilist[] = array('1', _('Sent-unpaid'));
$ilist[] = array('2', _('Sent-paid'));
$ilist[] = array('3', _('Paid'));
$dform->model[] = new RefField(_("Status"), 'payment_status', $ilist);
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);
$HD_Form->model[] = new TextFieldN(_("IP"), 'ipaddr');
$HD_Form->model[] = dontList(new IntFieldN(_("Port"), 'port'));
$HD_Form->model[] = dontList(new EpochFieldN(_("Reg. Seconds"), 'regseconds', _("The timestamp the registration expires")));
//TODO: epochfield!
$HD_Form->model[] = dontList(new TextFieldN(_("Contact"), 'fullcontact'));
$HD_Form->model[] = dontList(new TextFieldN(_("Reg. server"), 'regserver', _("The name of the server which registered it, as defined in asterisk.conf")));
$HD_Form->model[] = new TextAreaField(_("User Agent"), 'useragent');
//RevRef2::html_body($action);
$HD_Form->model[] = new GroupField(array(new DelBtnField(), new DetailsBtnField()));
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->model[] = new SqlRefField(_("Server"), 'srvid', 'cc_a2b_server', 'id', 'host');
end($SEL_Form->model)->does_add = false;
$dyn_list = array();
$dyn_list[] = array('t', 'Dynamic');
$dyn_list[] = array('f', 'Static');
$SEL_Form->model[] = new RefField(_("Dynamic"), "dyn", $dyn_list);
end($SEL_Form->model)->does_add = false;
$SEL_Form->model[] = new RefField(_("Mode"), "sipiax", $sipiax_list);
end($SEL_Form->model)->does_add = false;
$SEL_Form->model[] = new TextSearchField(_("Username"), 'username');
<?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";
Beispiel #27
0
$SEL_Form->model[] = new TextSearchField(_("Action"), 'action');
$SEL_Form->model[] = new TextSearchField(_("Data"), 'data');
$SEL_Form->model[] = new TextSearchField(_("Table"), 'tablename');
$SEL_Form->model[] = new TextSearchField(_("Page"), 'pagename');
$SEL_Form->model[] = new TextSearchField(_("IP Address"), 'ipaddress');
$SEL_Form->model[] = dontAdd(new IntField(_("Level"), 'loglevel'));
/*$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_system_log', _("Logs"), _("Log"));
$HD_Form->checkRights(ACX_ADMINISTRATOR);
$HD_Form->default_order = 'creationdate';
$HD_Form->default_sens = 'DESC';
$HD_Form->init(null, false);
$HD_Form->views['list'] = new ListView();
$HD_Form->views['details'] = new DetailsView();
$PAGE_ELEMS[] =& $HD_Form;
// put the selection form *below* the table!
$PAGE_ELEMS[] =& $SEL_Form;
$SEL_Form->enable($HD_Form->getAction() == 'list');
$HD_Form->model[] = new PKeyField(_("ID"), 'id');
$HD_Form->model[] = new DateTimeFieldDH(_("Date"), "creationdate");
$HD_Form->model[] = new SqlRefFieldN(_("User"), 'iduser', 'cc_ui_authen', 'userid', 'login', _("User of the interface."));
$HD_Form->model[] = new IntField(_("Level"), 'loglevel');
$HD_Form->model[] = new TextField(_("Action"), 'action');
$HD_Form->model[] = new TextFieldN(_("Description"), 'description');
$HD_Form->model[] = dontList(new TextFieldN(_("Data"), 'data'));
$HD_Form->model[] = dontList(new TextFieldN(_("Table Name"), 'tablename'));
$HD_Form->model[] = new TextFieldN(_("Page Name"), 'pagename');
$HD_Form->model[] = new TextFieldN(_("IP Addr"), 'ipaddress');
$SEL_Form->appendClauses($HD_Form);
require "PP_page.inc.php";