本文整理汇总了PHP中CFormTable::AddAction方法的典型用法代码示例。如果您正苦于以下问题:PHP CFormTable::AddAction方法的具体用法?PHP CFormTable::AddAction怎么用?PHP CFormTable::AddAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFormTable
的用法示例。
在下文中一共展示了CFormTable::AddAction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$clndr_icon->AddOption('style', 'vertical-align: bottom;');
$nav_clndr = array(new CNumericBox('nav_day', $_REQUEST['nav_time'] > 0 ? date('d', $_REQUEST['nav_time']) : '', 2), new CNumericBox('nav_month', $_REQUEST['nav_time'] > 0 ? date('m', $_REQUEST['nav_time']) : '', 2), new CNumericBox('nav_year', $_REQUEST['nav_time'] > 0 ? date('Y', $_REQUEST['nav_time']) : '', 4), $clndr_icon);
zbx_add_post_js('create_calendar(null,["nav_day","nav_month","nav_year"],"nav_time");');
zbx_add_post_js('addListener($("hat_events_icon"),' . '"click",' . 'CLNDR["nav_time"].clndr.clndrhide.bindAsEventListener(CLNDR["nav_time"].clndr));');
$navForm->AddItem(array($back, SPACE, $next, new CSpan(' | ', 'divider'), $nav_clndr, SPACE, new CButton('load', S_SHOW . ' »')));
$navigation = $navForm;
//------------
$filterForm = new CFormTable(S_FILTER);
//,'events.php?filter_set=1','POST',null,'sform');
$filterForm->AddOption('name', 'zbx_filter');
$filterForm->AddOption('id', 'zbx_filter');
$filterForm->SetMethod('get');
$filterForm->AddVar('nav_time', $_REQUEST['nav_time']);
if (EVENT_SOURCE_TRIGGERS == $source) {
$script = new CScript("javascript: if(CLNDR['events_since'].clndr.setSDateFromOuterObj()){" . "\$('filter_timesince').value = parseInt(CLNDR['events_since'].clndr.sdt.getTime()/1000);}" . "if(CLNDR['events_till'].clndr.setSDateFromOuterObj()){" . "\$('filter_timetill').value = parseInt(CLNDR['events_till'].clndr.sdt.getTime()/1000);}");
$filterForm->AddAction('onsubmit', $script);
$filterForm->AddVar('triggerid', $_REQUEST['triggerid']);
if (isset($_REQUEST['triggerid']) && $_REQUEST['triggerid'] > 0) {
$trigger = expand_trigger_description($_REQUEST['triggerid']);
} else {
$trigger = "";
}
$row = new CRow(array(new CCol(S_TRIGGER, 'form_row_l'), new CCol(array(new CTextBox("trigger", $trigger, 96, 'yes'), new CButton("btn1", S_SELECT, "return PopUp('popup.php?" . "dstfrm=" . $filterForm->GetName() . "&dstfld1=triggerid&dstfld2=trigger" . "&srctbl=triggers&srcfld1=triggerid&srcfld2=description&real_hosts=1');", 'T')), 'form_row_r')));
$filterForm->AddRow($row);
$filterForm->AddVar('show_unknown', $show_unknown);
$unkcbx = new CCheckBox('show_unk', $show_unknown, null, '1');
$unkcbx->SetAction('javascript: create_var("' . $filterForm->GetName() . '", "show_unknown", (this.checked?1:0), 0); ');
$filterForm->AddRow(S_SHOW_UNKNOWN, $unkcbx);
$reset = new CButton("filter_rst", S_RESET);
$reset->SetType('button');
$reset->SetAction('javascript: var uri = new Curl(location.href); uri.setArgument("filter_rst",1); location.href = uri.getUrl();');
示例2: CButton
} else {
array_push($stime_el, new CButton('del_service_times', S_DELETE_SELECTED));
}
$frmService->AddRow(S_SERVICE_TIMES, $stime_el);
$cmbTimeType = new CComboBox("new_service_time[type]", $new_service_time['type'], 'javascript: document.forms[0].action += \'?sform=1\'; submit();');
$cmbTimeType->AddItem(SERVICE_TIME_TYPE_UPTIME, S_UPTIME);
$cmbTimeType->AddItem(SERVICE_TIME_TYPE_DOWNTIME, S_DOWNTIME);
$cmbTimeType->AddItem(SERVICE_TIME_TYPE_ONETIME_DOWNTIME, S_ONE_TIME_DOWNTIME);
$time_param = new CTable();
$div = new Ctag('div', 'yes');
if ($new_service_time['type'] == SERVICE_TIME_TYPE_ONETIME_DOWNTIME) {
// $time_param->AddRow(array(S_NOTE, new CTextBox('new_service_time[note]','<short description>',40)));
// $time_param->AddRow(array(S_FROM, new CTextBox('new_service_time[from]','d M Y H:i',20)));
// $time_param->AddRow(array(S_TILL, new CTextBox('new_service_time[to]','d M Y H:i',20)));
$script = new CScript("javascript: if(CLNDR['downtime_since'].clndr.setSDateFromOuterObj()){" . "\$('new_service_time[from]').value = parseInt(CLNDR['downtime_since'].clndr.sdt.getTime()/1000);}" . "if(CLNDR['downtime_till'].clndr.setSDateFromOuterObj()){" . "\$('new_service_time[to]').value = parseInt(CLNDR['downtime_till'].clndr.sdt.getTime()/1000);}");
$frmService->AddAction('onsubmit', $script);
$frmService->AddVar('new_service_time[from]', '');
$frmService->AddVar('new_service_time[to]', '');
$clndr_icon = new CImg('images/general/bar/cal.gif', 'calendar', 16, 12, 'pointer');
$clndr_icon->AddAction('onclick', 'javascript: var pos = getPosition(this);' . ' pos.top-=203; pos.left+=16; ' . " CLNDR['downtime_since'].clndr.clndrshow(pos.top,pos.left);");
$filtertimetab = new CTable(null, 'calendar');
$filtertimetab->setAttribute('width', '10%');
$filtertimetab->SetCellPadding(0);
$filtertimetab->SetCellSpacing(0);
$td_tmp = new CCol(new CTextBox('new_service_time[note]', '<short description>', 40));
$td_tmp->SetColSpan(10);
$filtertimetab->AddRow(array(S_NOTE, $td_tmp));
$filtertimetab->AddRow(array(S_FROM, new CNumericBox('downtime_since_day', '', 2), '/', new CNumericBox('downtime_since_month', '', 2), '/', new CNumericBox('downtime_since_year', '', 4), SPACE, new CNumericBox('downtime_since_hour', '', 2), ':', new CNumericBox('downtime_since_minute', '', 2), $clndr_icon));
zbx_add_post_js('create_calendar(' . 'null,' . '["downtime_since_day","downtime_since_month","downtime_since_year","downtime_since_hour","downtime_since_minute"],' . '"downtime_since");');
$clndr_icon->AddAction('onclick', 'javascript: var pos = getPosition(this);' . ' pos.top-=203; pos.left+=16; ' . " CLNDR['downtime_till'].clndr.clndrshow(pos.top,pos.left);");
$filtertimetab->AddRow(array(S_TILL, new CNumericBox('downtime_till_day', '', 2), '/', new CNumericBox('downtime_till_month', '', 2), '/', new CNumericBox('downtime_till_year', '', 4), SPACE, new CNumericBox('downtime_till_hour', '', 2), ':', new CNumericBox('downtime_till_minute', '', 2), $clndr_icon));