Exemplo n.º 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";
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";
Exemplo n.º 2
0
$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");
end($HD_Form->model)->SetRefEntityL("A2B_entity_card.php");
end($HD_Form->model)->SetEditTitle(_("Card ID"));
$HD_Form->model[] = dontAdd(dontEdit(new DateTimeField(_("Creation Date"), "creationdate", _("Date the voucher was created (entered into this system)"))));
$HD_Form->model[] = dontAdd(dontEdit(new DateTimeField(_("Used Date"), "usedate", _("Date the voucher has been used."))));
$HD_Form->model[] = new DateTimeFieldN(_("Expiry date"), "expirationdate", _("Date the voucher will expire."));
end($HD_Form->model)->def_date = '+6 month 1 day';
$actived_list = array();
$actived_list[] = array('t', _("Active"));
$actived_list[] = array('f', _("Inactive"));
$HD_Form->model[] = new RefField(_("Activated"), "activated", $actived_list, _("Enable or disable the voucher"), "4%");
end($HD_Form->model)->fieldacr = gettext("ACT");
$HD_Form->model[] = new DelBtnField();
// SEARCH SECTION
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->enable($HD_Form->getAction() == 'list');
// todo: search in use
$SEL_Form->model[] = new TextSearchField(_("Voucher"), 'voucher');
$SEL_Form->model[] = new TextSearchField(_("Tag"), 'tag');
Exemplo n.º 3
0
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.")));
require "PP_page.inc.php";
Exemplo n.º 4
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";