本文整理匯總了PHP中CWidget::addPageheader方法的典型用法代碼示例。如果您正苦於以下問題:PHP CWidget::addPageheader方法的具體用法?PHP CWidget::addPageheader怎麽用?PHP CWidget::addPageheader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CWidget
的用法示例。
在下文中一共展示了CWidget::addPageheader方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CUrl
if ($_REQUEST['go'] != 'none' && isset($go_result) && $go_result) {
$url = new CUrl();
$path = $url->getPath();
insert_js('cookie.eraseArray("' . $path . '")');
}
$options = array('groups' => array('editable' => 1), 'hosts' => array('editable' => 1, 'templated_hosts' => 1), 'hostid' => get_request('hostid', null), 'groupid' => get_request('groupid', null));
$pageFilter = new CPageFilter($options);
$_REQUEST['groupid'] = $pageFilter->groupid;
$_REQUEST['hostid'] = $pageFilter->hostid;
$app_wdgt = new CWidget();
$frmForm = new CForm(null, 'get');
$frmForm->addVar('hostid', get_request('hostid', 0));
if (!isset($_REQUEST['form'])) {
$frmForm->addItem(new CButton('form', S_CREATE_APPLICATION));
}
$app_wdgt->addPageheader(S_CONFIGURATION_OF_APPLICATIONS, $frmForm);
if (isset($_REQUEST['form'])) {
$frm_title = S_NEW_APPLICATION;
if (isset($_REQUEST['applicationid'])) {
$result = DBselect('SELECT * FROM applications WHERE applicationid=' . $_REQUEST['applicationid']);
$row = DBfetch($result);
$frm_title = S_APPLICATION . ': "' . $row['name'] . '"';
}
if (isset($_REQUEST["applicationid"]) && !isset($_REQUEST["form_refresh"])) {
$appname = $row["name"];
$apphostid = $row['hostid'];
} else {
$appname = get_request("appname", "");
$apphostid = get_request("apphostid", get_request("hostid", 0));
}
$db_host = get_host_by_hostid($apphostid, 1);