예제 #1
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Class.CallShop.inc.php";
require_once "a2blib/Form/Class.SelectionForm.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
$menu_section = 'menu_agents';
$CS_Form = new CallshopPage();
$CS_Form->checkRights(ACX_AGENTS);
$CS_Form->init();
// TODO: select agent!
$CS_Form->ask_agent = true;
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->model[] = new SqlRefField(_("Agent"), 'agentid', 'cc_agent', 'id', 'name');
$CS_Form->agentid = $SEL_Form->getpost_single('agentid');
$PAGE_ELEMS[] =& $SEL_Form;
if (!empty($CS_Form->agentid)) {
    $PAGE_ELEMS[] =& $CS_Form;
}
require "PP_page.inc.php";
예제 #2
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once DIR_COMMON . "Form.inc.php";
require_once DIR_COMMON . "Form/Class.TimeField.inc.php";
require_once DIR_COMMON . "Form/Class.ClauseField.inc.php";
require_once DIR_COMMON . "Form/Class.SqlRefField.inc.php";
require_once DIR_COMMON . "Form/Class.SelectionForm.inc.php";
require_once DIR_COMMON . "AgentMoney.inc.php";
$menu_section = 'menu_agents';
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->model[] = new SqlRefField(_("Agent"), 'agentid', 'cc_agent', 'id', 'name');
$SEL_Form->model[] = new DateTimeField(_("Period from"), 'date_from');
end($SEL_Form->model)->does_add = false;
end($SEL_Form->model)->def_date = '00:00 today';
end($SEL_Form->model)->def_value = 'aaa';
end($SEL_Form->model)->fieldexpr = 'date';
$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 = 'date';
$SEL_Form->search_exprs['date_from'] = '>=';
$SEL_Form->search_exprs['date_to'] = '<=';
//$CS_Form->agentid=$SEL_Form->getpost_single('agentid');
$PAGE_ELEMS[] =& $SEL_Form;
$s_agentid = $SEL_Form->getpost_single('agentid');
if (!empty($s_agentid)) {
    AgentMoney($s_agentid, $SEL_Form, false, ACX_AGENTS);
}
예제 #3
0
// // $HD_Form->model[] = new RefField(_("LANGUAGE"), "language");
// $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";
예제 #4
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once "a2blib/Form.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
require_once "a2blib/Form/Class.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');
예제 #5
0
$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');
$SEL_Form->model[] = new TextSearchField(_("User Agent"), 'useragent');
//$CS_Form->agentid=$SEL_Form->getpost_single('agentid');
$PAGE_ELEMS[] =& $SEL_Form;
$PAGE_ELEMS[] =& $HD_Form;
예제 #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.RevRef.inc.php";
require_once "a2blib/Form/Class.TimeField.inc.php";
require_once "a2blib/Form/Class.SqlRefField.inc.php";
require_once "a2blib/Form/Class.RevRefForm.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";
require_once "a2blib/Form/Class.SumMultiView.inc.php";
$menu_section = 'menu_invoicing';
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->model[] = new DateTimeField(_("Period from"), 'date_from');
end($SEL_Form->model)->does_add = false;
end($SEL_Form->model)->def_date = '00:00 last month';
end($SEL_Form->model)->fieldexpr = 'starttime';
$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 = 'starttime';
$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'] = '<=';
$PAGE_ELEMS[] =& $SEL_Form;
// HelpElem::DoHelp(gettext("*-*"),'vcard.png');
예제 #7
0
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.SelectionForm.inc.php";
require_once "a2blib/Class.HelpElem.inc.php";
$menu_section = 'menu_config';
HelpElem::DoHelp(_("Templates for subscription services."));
/* We will be using different tables, fields, according to one selection box
   at the top of the page: */
$sub_cats = array();
$sub_cats[] = array("all", _("All"));
$sub_cats[] = array("only", _("Generic only"));
$sub_cats[] = array("feature", _("Features"));
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->model[] = new RefField(_("Category"), 'cat', $sub_cats, _("Select the category of templates."));
// Prepare the model for the base table.
$HD_Form = new FormHandler('subscription_template', _("Templates"), _("Template"));
$HD_Form->checkRights(ACX_MISC);
$HD_Form->init();
$HD_Form->addAllFollowParam($SEL_Form->prefix . 'cat', $SEL_Form->getpost_dirty('cat'), false);
// Modify the model according to the selection:
switch ($SEL_Form->getpost_single('cat')) {
    case 'all':
    default:
        $HD_Form->views['ask-edit'] = $HD_Form->views['ask-edit2'] = $HD_Form->views['edit'] = $HD_Form->views['ask-add'] = $HD_Form->views['ask-add2'] = $HD_Form->views['add'] = $HD_Form->views['ask-delete'] = $HD_Form->views['delete'] = new IdleView();
        break;
    case 'feature':
        $HD_Form->model_table = 'subscription_feature_templ';
예제 #8
0
<?php

require_once "./lib/defines.php";
require_once "./lib/module.access.php";
require_once DIR_COMMON . "Form.inc.php";
require_once DIR_COMMON . "Form/Class.TimeField.inc.php";
require_once DIR_COMMON . "Form/Class.ClauseField.inc.php";
require_once DIR_COMMON . "Form/Class.SqlRefField.inc.php";
require_once DIR_COMMON . "Form/Class.SelectionForm.inc.php";
require_once DIR_COMMON . "AgentMoney.inc.php";
$menu_section = 'menu_reports';
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->model[] = new DateTimeField(_("Period from"), 'date_from');
end($SEL_Form->model)->does_add = false;
end($SEL_Form->model)->def_date = '00:00 today';
end($SEL_Form->model)->def_value = 'aaa';
end($SEL_Form->model)->fieldexpr = 'date';
$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 = 'date';
$SEL_Form->search_exprs['date_from'] = '>=';
$SEL_Form->search_exprs['date_to'] = '<=';
//$CS_Form->agentid=$SEL_Form->getpost_single('agentid');
$PAGE_ELEMS[] =& $SEL_Form;
AgentMoney($_SESSION['agent_id'], $SEL_Form, true, ACX_ACCESS);
require "PP_page.inc.php";