本文整理汇总了PHP中FormHandler::setAction方法的典型用法代码示例。如果您正苦于以下问题:PHP FormHandler::setAction方法的具体用法?PHP FormHandler::setAction怎么用?PHP FormHandler::setAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormHandler
的用法示例。
在下文中一共展示了FormHandler::setAction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DateTimeField
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');
$sform = new FormHandler('cc_call, cc_card, cc_card_group', _("Calls"), _("Call"));
$sform->checkRights(ACX_INVOICING);
$sform->init(null, false);
$sform->views['sums'] = new SumMultiView();
$sform->setAction('sums');
if ($FG_DEBUG) {
$sform->views['dump-form'] = new DbgDumpView();
}
$SEL_Form->appendClauses($sform);
$sform->model[] = new FreeClauseField('cc_call.cardid = cc_card.id');
$sform->model[] = new FreeClauseField('cc_card.grp = cc_card_group.id');
$sform->model[] = new FreeClauseField('cc_call.invoice_id IS NULL');
$sform->model[] = new DateField(_("Start"), 'starttime');
$sform->model[] = new DateField(_("End"), 'endtime');
end($sform->model)->fieldexpr = 'starttime';
$sform->model[] = new IntField(_("Calls"), 'uniqueid');
$sform->model[] = new SecondsField(_("Duration"), "sessiontime");
end($sform->model)->fieldacr = _("Dur");
//$Sum_Form->model[] = new FloatField(_("Credit"), "pos_charge");
$sform->model[] = new MoneyField(_("Bill"), "sessionbill");
示例2: DateTimeField
$tmp->Form->model[] = new DateTimeField(_("Time"), 'starttime');
$tmp->Form->model[] = new TextField(_("Number"), 'calledstation');
$tmp->Form->model[] = new TextField(_("Destination"), 'destination');
$tmp->Form->model[] = new SecondsField(_("Duration"), 'sessiontime');
end($tmp->Form->model)->fieldacr = _("Dur");
//$tmp->Form->model[] = new PKeyFieldTxt(_("ID"),'id');
$tmp->Form->model[] = new MoneyField(_("Bill"), 'sessionbill');
//one non-summed group
$tmp->Form->views['list']->sums[] = array('fns' => array('starttime' => true, 'calledstation' => true, 'destination' => true, 'sessiontime' => true, 'sessionbill' => true), 'order' => 'starttime');
//Per day/destination
$tmp->Form->views['list']->sums[] = array('title' => _("Sum per destination"), 'fns' => array('starttime' => false, 'destination' => true, 'sessiontime' => 'SUM', 'sessionbill' => 'SUM'), 'order' => 'sessiontime', 'sens' => 'DESC');
$tmp->Form->views['list']->sums[] = array('title' => _("Total"), 'fns' => array('calledstation' => 'COUNT', 'sessiontime' => 'SUM', 'sessionbill' => 'SUM'));
$hform = new FormHandler('cc_card');
$hform->checkRights(ACX_INVOICING);
$hform->init(null, false);
$hform->setAction('details');
$hform->views['details'] = new DetailsView();
$hform->model[] = new FreeClauseField(str_dbparams(A2Billing::DBHandle(), 'id = (SELECT cardid FROM cc_invoices WHERE id = %#1)', array($dform->getpost_dirty('id'))));
//$hform->model[] = new PKeyField(_("ID"),'id');
$hform->model[] = new TextField(_("Local number"), 'useralias');
$hform->model[] = new TextFieldN(_("First name"), 'firstname');
$hform->model[] = new TextFieldN(_("Last name"), 'lastname');
$hform->model[] = new TextAreaField(_("Address"), 'address');
$hform->model[] = new TextFieldN(_("City"), 'city');
$hform->model[] = new TextFieldN(_("State"), 'state');
$hform->model[] = new TextFieldN(_("Country"), 'country');
$hform->model[] = new TextFieldN(_("Zipcode"), 'zipcode');
//$hform->model[] = new TextFieldN(_("Phone"),'phone');
$hform->model[] = new TextFieldN(_("Fax"), 'fax');
$PAGE_ELEMS[] =& $hform;
$PAGE_ELEMS[] =& $dform;
示例3: array
$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 SqlRefField(_("System"),'sysid','nm.system','id','name');
$SEL_Form->model[] = new SqlRefField(_("Node"), "par_id", "nm.attr_node", "id", "name");
end($SEL_Form->model)->combofield = "nm.full_name_attr(id)";
if ($sform->getAction() != 'printing') {
$PAGE_ELEMS[] =& $SEL_Form;
}
// HelpElem::DoHelp(gettext("*-*"),'vcard.png');
$sform->views['idle'] = new IdleView();
$sform->views['printing'] = new IdleView();
if ($sform->getAction() == 'list') {
$sform->setAction('idle');
}
$sform->views['sums'] = new SumMultiView();
if ($FG_DEBUG) {
$sform->views['dump-form'] = new DbgDumpView();
}
$SEL_Form->appendClauses($sform);
$sform->model[] = new DateTimeField(_("Date"), 'tstamp');
end($sform->model)->fieldexpr = 'date_trunc(%trunc, tstamp)';
$sform->model[] = new FloatField(_("Value"), 'value');
// repeat the columns, so that we use other aggregates
$sform->model[] = new FloatField(_("Value"), 'value_min');
end($sform->model)->fieldexpr = 'value';
$sform->model[] = new FloatField(_("Value"), 'value_max');
end($sform->model)->fieldexpr = 'value';
/*$sform->model[] = new SecondsField(_("Average Length of Calls"), "aloc");