本文整理汇总了PHP中CForm::SetMethod方法的典型用法代码示例。如果您正苦于以下问题:PHP CForm::SetMethod方法的具体用法?PHP CForm::SetMethod怎么用?PHP CForm::SetMethod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CForm
的用法示例。
在下文中一共展示了CForm::SetMethod方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
}
unset($_REQUEST['form']);
}
}
}
}
}
}
}
}
}
}
$_REQUEST['filter_usrgrpid'] = get_request('filter_usrgrpid', get_profile('web.users.filter.usrgrpid', 0));
update_profile('web.users.filter.usrgrpid', $_REQUEST['filter_usrgrpid'], PROFILE_TYPE_ID);
$frmForm = new CForm();
$frmForm->SetMethod('get');
$cmbConf = new CComboBox('config', $_REQUEST['config'], 'submit()');
$cmbConf->AddItem(0, S_USERS);
$cmbConf->AddItem(1, S_USER_GROUPS);
$frmForm->AddItem($cmbConf);
if (0 == $_REQUEST['config']) {
$cmbUGrp = new CComboBox('filter_usrgrpid', $_REQUEST['filter_usrgrpid'], 'submit()');
$cmbUGrp->AddItem(0, S_ALL_S);
$result = DBselect('SELECT usrgrpid, name FROM usrgrp WHERE ' . DBin_node('usrgrpid') . ' ORDER BY name');
while ($usrgrp = DBfetch($result)) {
$cmbUGrp->AddItem($usrgrp['usrgrpid'], $usrgrp['name']);
}
$frmForm->AddItem(array(SPACE . SPACE, S_USER_GROUP, $cmbUGrp));
}
$frmForm->AddItem(SPACE . '|' . SPACE);
$frmForm->AddItem($btnNew = new CButton('form', $_REQUEST['config'] == 0 ? S_CREATE_USER : S_CREATE_GROUP));
示例2: unset
unset($_REQUEST["form"]);
}
} elseif (isset($_REQUEST["delete"]) && isset($_REQUEST["mediatypeid"])) {
/* DELETE */
/* $mediatype=get_mediatype_by_mediatypeid($_REQUEST["mediatypeid"]);*/
$result = delete_mediatype($_REQUEST["mediatypeid"]);
show_messages($result, S_MEDIA_TYPE_DELETED, S_MEDIA_TYPE_WAS_NOT_DELETED);
if ($result) {
/* add_audit(AUDIT_ACTION_DELETE,AUDIT_RESOURCE_MEDIA_TYPE,
"Media type [".$mediatype["description"]."]");
*/
unset($_REQUEST["form"]);
}
}
$form = new CForm();
$form->SetMethod('get');
$form->AddItem(new CButton("form", S_CREATE_MEDIA_TYPE));
$row_count = 0;
$numrows = new CSpan(null, 'info');
$numrows->addOption('name', 'numrows');
$header = get_table_header(array(S_CONFIGURATION_OF_MEDIA_TYPES_BIG, new CSpan(SPACE . SPACE . '|' . SPACE . SPACE, 'divider'), S_FOUND . ': ', $numrows));
show_table_header($header, $form);
if (isset($_REQUEST["form"])) {
echo SBR;
insert_media_type_form();
} else {
$table = new CTableInfo(S_NO_MEDIA_TYPES_DEFINED);
$table->setHeader(array(make_sorting_link(S_TYPE, 'mt.type'), make_sorting_link(S_DESCRIPTION, 'mt.description'), S_DETAILS));
$result = DBselect('SELECT mt.* ' . ' FROM media_type mt' . ' WHERE ' . DBin_node('mt.mediatypeid') . order_by('mt.type,mt.description'));
while ($row = DBfetch($result)) {
switch ($row['type']) {
示例3: isset
if ($_REQUEST["action"] == "showvalues") {
$bstime = isset($_REQUEST['stime']) ? $_REQUEST['stime'] : date('YmdHi', time() - $_REQUEST['period']);
$time = mktime(substr($bstime, 8, 2), substr($bstime, 10, 2), 0, substr($bstime, 4, 2), substr($bstime, 6, 2), substr($bstime, 0, 4));
$till = $time + $effectiveperiod;
$l_header = array(S_SHOWING_HISTORY_OF . SPACE . zbx_date2age(0, $effectiveperiod), '[' . S_FROM_SMALL . ': ' . date('Y.M.d H:i:s', $time) . ']');
} else {
$l_header = null;
}
if (!isset($_REQUEST["plaintext"])) {
if ($item_type == ITEM_VALUE_TYPE_LOG) {
$to_save_request = array("filter_task", "filter", "mark_color");
$filter_task = get_request("filter_task", 0);
$filter = get_request("filter", "");
$mark_color = get_request("mark_color", 0);
$r_header = new CForm();
$r_header->SetMethod('get');
$r_header->AddVar("action", $_REQUEST["action"]);
$r_header->AddVar("from", $_REQUEST["from"]);
$r_header->AddVar("period", $_REQUEST["period"]);
$r_header->AddVar("itemid", $_REQUEST["itemid"]);
$cmbFTask = new CComboBox("filter_task", $filter_task, "submit()");
$cmbFTask->AddItem(FILTER_TAST_SHOW, S_SHOW_SELECTED);
$cmbFTask->AddItem(FILTER_TAST_HIDE, S_HIDE_SELECTED);
$cmbFTask->AddItem(FILTER_TAST_MARK, S_MARK_SELECTED);
$cmbFTask->AddItem(FILTER_TAST_INVERT_MARK, S_MARK_OTHERS);
$r_header->AddItem(array(S_SELECT_ROWS_WITH_VALUE_LIKE, SPACE, new CTextBox("filter", $filter, 25), $cmbFTask, SPACE));
if (str_in_array($filter_task, array(FILTER_TAST_MARK, FILTER_TAST_INVERT_MARK))) {
$cmbColor = new CComboBox("mark_color", $mark_color);
$cmbColor->AddItem(MARK_COLOR_RED, S_AS_RED);
$cmbColor->AddItem(MARK_COLOR_GREEN, S_AS_GREEN);
$cmbColor->AddItem(MARK_COLOR_BLUE, S_AS_BLUE);