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";
Exemple #2
0
end($SEL_Form->model)->fieldexpr = 'starttime';
$SEL_Form->fallbackClause = array('date_from');
/*$SEL_Form->model[] = new SqlRefFieldN(_("Agent"),'agentid','cc_agent','id','name');
	end($SEL_Form->model)->does_add = false;*/
$SEL_Form->search_exprs['date_from'] = '>=';
$SEL_Form->search_exprs['date_to'] = '<=';
$SEL_Form->model[] = new TextSearchField(_("Destination"), 'destination');
$SEL_Form->model[] = new TextSearchField(_("Called number"), 'calledstation');
$SEL_Form->model[] = dontAdd(new SqlRefFieldN(_("Agent"), 'agid', 'cc_agent', 'id', 'name'));
end($SEL_Form->model)->fieldexpr = '(SELECT agentid FROM cc_card,cc_card_group
		WHERE cc_card.grp = cc_card_group.id AND cc_card.id = cc_call_v.cardid)';
end($SEL_Form->model)->combofield = "name || ' ('|| login || ')'";
/*$SEL_Form->model[] = new SqlRefField(_("Plan"),'idrp','cc_retailplan','id','name', _("Retail plan"));
	end($SEL_Form->model)->does_add = false;*/
$SEL_Form->model[] = dontAdd(new SqlRefFieldN(_("Server"), 'srvid', 'cc_a2b_server', 'id', 'host'));
$SEL_Form->model[] = dontAdd(new SqlRefFieldN(_("Trunk"), 'trunk', 'cc_trunk', 'id', 'trunkcode', _("Trunk used for the call")));
$PAGE_ELEMS[] =& $SEL_Form;
// HelpElem::DoHelp(gettext("*-*"),'vcard.png');
$HD_Form = new FormHandler('cc_call_v', _("Calls"), _("Call"));
$HD_Form->checkRights(ACX_CALL_REPORT);
$HD_Form->default_order = 'starttime';
$HD_Form->default_sens = 'DESC';
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$SEL_Form->enable($HD_Form->getAction() == 'list');
$HD_Form->model[] = DontList(new PKeyFieldTxt(_("Session ID"), 'sessionid'));
$HD_Form->model[] = DontList(new PKeyFieldTxt(_("Unique ID"), 'uniqueid'));
$HD_Form->model[] = DontList(new PKeyField(_("Card ID"), 'cardid'));
// nasipaddress  | text                        |
// qval          | double precision            |
$SEL_Form->appendClauses($HD_Form);
Exemple #3
0
// $HD_Form->model[] = new FloatField(_("CREDIT"), "credit");
// $HD_Form->model[] = new FloatField(_("CLIMIT"), "climit",_("Credit limit of agent"));
// $HD_Form->model[] = new SqlRefField(_("TARIFFG"), "tariffgroup","cc_tariffgroup", "id", "tariffgroupname");
// // $HD_Form->model[] = new RefField(_("CURRENCY").gettext("CUR"), "currency", "5%");
//
// $actived_list = array();
// $actived_list[] = array('t',gettext("Active"));
// $actived_list[] = array('f',gettext("Inactive"));
//
// $HD_Form->model[] = new RefField(_("ACTIVATED"), "active", $actived_list,_("Allow the agent to operate"),"4%");
// end($HD_Form->model)->fieldacr =  gettext("ACT");
if ($HD_Form->getAction() != 'tooltip') {
    $HD_Form->model[] = new DelBtnField();
}
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->enable($HD_Form->getAction() == 'list');
// todo: search in use
$SEL_Form->model[] = new TextSearchField(_("Card number"), 'username');
$SEL_Form->model[] = dontAdd(new SqlRefField(_("Group"), "grp", "cc_card_group", "id", "name"));
$SEL_Form->model[] = dontAdd(new RefField(_("Status"), 'status', $cs_list));
$SEL_Form->model[] = new TextSearchField(_("Last Name"), 'lastname');
$PAGE_ELEMS[] =& $SEL_Form;
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$SEL_Form->appendClauses($HD_Form);
if ($HD_Form->getAction() == 'tooltip') {
    require "PP_bare_page.inc.php";
} else {
    require "PP_page.inc.php";
}
Exemple #4
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";
<?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";
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";
$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');
$SEL_Form->model[] = dontAdd(new SqlRefField(_("Group"), "card_grp", "cc_card_group", "id", "name"));
//$SEL_Form->model[] = dontAdd(new RefField(_("Status"),'status', $cs_list));
$SEL_Form->model[] = dontAdd(new RefField(_("Activated"), "activated", $actived_list, _("Enable or disable the voucher"), "4%"));
$SEL_Form->model[] = new TextSearchField(_("Last Name"), 'lastname');
$SEL_Form->appendClauses($HD_Form);
// BUILD PAGE ELEMENTS
$PAGE_ELEMS[] =& $SEL_Form;
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$PAGE_ELEMS[] = new AddExportButton($HD_Form, _("Export CSV"), 'exportCSV');
$PAGE_ELEMS[] = new AddExportButton($HD_Form, _("Export LaTeX"), 'exportLT');
if ($HD_Form->getAction() == 'exportLT') {
    require "PP_LaTeX.inc.php";
} elseif ($HD_Form->getAction() == 'exportCSV') {
    require "PP_ExportCSV.inc.php";
} else {
    require "PP_page.inc.php";
}
Exemple #8
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";
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_MISC);
$HD_Form->default_order = 'id';
$HD_Form->default_sens = 'ASC';
$HD_Form->init();
$PAGE_ELEMS[] =& $HD_Form;
$PAGE_ELEMS[] = new AddNewButton($HD_Form);
$status_list = array();
$status_list[] = array('1', gettext("Active"));
$status_list[] = array('0', gettext("Inactive"));
$percity_list = array();
$percity_list[] = array('weekly', gettext("Weekly"));
$percity_list[] = array('daily', gettext("Daily"));
$percity_list[] = array('monthly', gettext("Monthly"));
$percity_list[] = array('yearly', gettext("Yearly"));
$HD_Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$HD_Form->model[] = new TextFieldEH(_("Name"), 'name');
$HD_Form->model[] = dontAdd(new BoolField(_("Enabled"), 'enabled', _("If true, the time period will be considered valid and cached.")));
$HD_Form->model[] = new TextAreaField(_("Comment"), 'comment');
$tmp = new RevRefForm(_("Intervals"), 'ints', 'id', 'time_period_interval', 'idtp');
$HD_Form->meta_elems[] = $tmp;
$tmp->Form->checkRights(ACX_MISC);
$tmp->Form->init();
$tmp->Form->model[] = new PKeyFieldEH(_("ID"), 'id');
$tmp->Form->model[] = new RefField(_("Periodicity"), "percity", $percity_list);
//TODO: special "interval" fields:
$tmp->Form->model[] = new TextField(_("Start"), 'istart', _('Starting point. See Manual for syntax.'));
$tmp->Form->model[] = new TextField(_("End"), 'iend', _('End point'));
$tmp->Form->model[] = new DelBtnField();
$tmp->Form->meta_elems[] = new AddNewButton($tmp->Form);
$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.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";
Exemple #12
0
end($SEL_Form->model)->def_date = '00:00 last month';
end($SEL_Form->model)->fieldexpr = 'creationdate';
$SEL_Form->model[] = new DateTimeField(_("Period to"), 'date_to');
end($SEL_Form->model)->does_add = false;
end($SEL_Form->model)->def_date = 'now';
end($SEL_Form->model)->fieldexpr = 'creationdate';
$SEL_Form->search_exprs['date_from'] = '>=';
$SEL_Form->search_exprs['date_to'] = '<=';
$SEL_Form->fallbackClause = array('date_from');
$SEL_Form->model[] = dontAdd(new SqlRefFieldN(_("User"), 'iduser', 'cc_ui_authen', 'userid', 'login', _("User of the interface.")));
$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");