本文整理汇总了PHP中url_params函数的典型用法代码示例。如果您正苦于以下问题:PHP url_params函数的具体用法?PHP url_params怎么用?PHP url_params使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了url_params函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: CFormTable
}
}
$messageTable = new CFormTable($title . ' "' . getUserFullname(CWebUser::$data) . '"');
$messageTable->addVar('backurl', $_REQUEST['backurl']);
if (in_array($_REQUEST['backurl'], array('tr_events.php', 'events.php'))) {
$messageTable->addVar('eventid', $_REQUEST['eventid']);
$messageTable->addVar('triggerid', $_REQUEST['triggerid']);
} elseif (in_array($_REQUEST['backurl'], array('screenedit.php', 'screens.php'))) {
$messageTable->addVar('screenid', $_REQUEST['screenid']);
}
if (isset($_REQUEST['eventid'])) {
$messageTable->addVar('eventid', $_REQUEST['eventid']);
} elseif (isset($_REQUEST['triggers'])) {
foreach ($_REQUEST['triggers'] as $triggerId) {
$messageTable->addVar('triggers[' . $triggerId . ']', $triggerId);
}
} elseif (isset($_REQUEST['events'])) {
foreach ($_REQUEST['events'] as $eventId) {
$messageTable->addVar('events[' . $eventId . ']', $eventId);
}
}
$message = new CTextArea('message', '', array('rows' => ZBX_TEXTAREA_STANDARD_ROWS, 'width' => ZBX_TEXTAREA_BIG_WIDTH, 'maxlength' => 255));
$message->attr('autofocus', 'autofocus');
$messageTable->addRow(_('Message'), $message);
$messageTable->addItemToBottomRow(new CSubmit('saveandreturn', $saveAndReturnLabel));
if (!$bulk) {
$messageTable->addItemToBottomRow(new CSubmit('save', $saveLabel));
}
$messageTable->addItemToBottomRow(new CButtonCancel(url_params(array('backurl', 'eventid', 'triggerid', 'screenid'))));
$messageTable->show(false);
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:acknow.php
示例2: CWidget
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
$widget = (new CWidget())->setTitle(_('Applications'))->addItem(get_header_host_table('applications', $this->data['hostid']));
// create form
$applicationForm = (new CForm())->addVar('form', $this->data['form'])->addVar('hostid', $this->data['hostid']);
if (!empty($this->data['applicationid'])) {
$applicationForm->addVar('applicationid', $this->data['applicationid']);
}
// append tabs to form
$applicationTab = (new CTabView())->addTab('applicationTab', _('Application'), (new CFormList())->addRow(_('Name'), (new CTextBox('appname', $this->data['appname']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('autofocus', 'autofocus')));
// append buttons to form
if (!empty($this->data['applicationid'])) {
$applicationTab->setFooter(makeFormFooter(new CSubmit('update', _('Update')), [new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete application?'), url_params(['hostid', 'form', 'applicationid'])), new CButtonCancel(url_param('hostid'))]));
} else {
$applicationTab->setFooter(makeFormFooter(new CSubmit('add', _('Add')), [new CButtonCancel(url_param('hostid'))]));
}
$applicationForm->addItem($applicationTab);
// append form to widget
$widget->addItem($applicationForm);
return $widget;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.application.edit.php
示例3: CTabView
// append tabs to form
$itemTab = new CTabView();
$itemTab->addTab('itemTab', $this->data['caption'], $itemFormList);
$itemForm->addItem($itemTab);
// append buttons to form
$buttons = array();
if (!empty($this->data['itemid'])) {
array_push($buttons, new CSubmit('clone', _('Clone')));
if (!$this->data['is_template'] && !empty($this->data['itemid']) && empty($this->data['parent_discoveryid']) && !$this->data['is_discovery_rule']) {
array_push($buttons, new CButtonQMessage('del_history', _('Clear history and trends'), _('History clearing can take a long time. Continue?')));
}
if (!$this->data['limited']) {
if ($this->data['is_discovery_rule']) {
array_push($buttons, new CButtonDelete(_('Delete discovery rule?'), url_params(array('form', 'groupid', 'itemid', 'parent_discoveryid'))));
} else {
array_push($buttons, new CButtonDelete(_('Delete item?'), url_params(array('form', 'groupid', 'itemid', 'parent_discoveryid'))));
}
}
}
array_push($buttons, new CButtonCancel(url_param('groupid') . url_param('parent_discoveryid') . url_param('hostid')));
$itemForm->addItem(makeFormFooter(array(new CSubmit('save', _('Save'))), $buttons));
$itemWidget->addItem($itemForm);
/*
* Visibility
*/
$this->data['typeVisibility'] = array();
$i = 0;
foreach ($this->data['delay_flex'] as $delayFlex) {
if (!isset($delayFlex['delay']) && !isset($delayFlex['period'])) {
continue;
}
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.item.edit.php
示例4: empty
if (!$this->data['form_refresh']) {
$graphTab->setSelected(0);
}
$graphTab->addTab('graphTab', empty($this->data['parent_discoveryid']) ? _('Graph') : _('Graph prototype'), $graphFormList);
/*
* Preview tab
*/
$chartImage = new CImg('chart3.php?period=3600');
$chartImage->preload();
$graphPreviewTable = new CTable(null, 'center maxwidth');
$graphPreviewTable->addRow(new CDiv($chartImage, null, 'previewChar'));
$graphTab->addTab('previewTab', _('Preview'), $graphPreviewTable);
$graphForm->addItem($graphTab);
// append buttons to form
if (!empty($this->data['graphid'])) {
$updateButton = new CSubmit('update', _('Update'));
$deleteButton = new CButtonDelete($this->data['parent_discoveryid'] ? _('Delete graph prototype?') : _('Delete graph?'), url_params(array('graphid', 'parent_discoveryid', 'hostid')));
if (!empty($this->data['templateid'])) {
$updateButton->setEnabled(false);
$deleteButton->setEnabled(false);
}
$graphForm->addItem(makeFormFooter($updateButton, array(new CSubmit('clone', _('Clone')), $deleteButton, new CButtonCancel(url_param('parent_discoveryid')))));
} else {
$graphForm->addItem(makeFormFooter(new CSubmit('add', _('Add')), new CButtonCancel(url_param('parent_discoveryid'))));
}
// insert js (depended from some variables inside the file)
insert_show_color_picker_javascript();
require_once dirname(__FILE__) . '/js/configuration.graph.edit.js.php';
// append form to widget
$graphWidget->addItem($graphForm);
return $graphWidget;
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:configuration.graph.edit.php
示例5: build_nav
function build_nav($tree, $url_params = false)
{
// Remove Index
unset($tree['index']);
if (!is_array($url_params)) {
$url_params = url_params();
}
$url_path = url_path();
$html = '<ul class="nav nav-list">';
foreach ($tree as $key => $val) {
// Active Tree Node
if (isset($url_params[0]) && $url_params[0] == $val['clean']) {
array_shift($url_params);
// Final Node
if ($url_path == $val['url']) {
$html .= '<li class="active">';
} else {
$html .= '<li class="open">';
}
} else {
$html .= '<li>';
}
if ($val['type'] == 'folder') {
$html .= '<a href="#" class="aj-nav folder">' . $val['name'] . '</a>';
$html .= build_nav($val['tree'], $url_params);
} else {
$html .= '<a href="' . $val['url'] . '">' . $val['name'] . '</a>';
}
$html .= '</li>';
}
$html .= '</ul>';
return $html;
}
开发者ID:19830829,项目名称:I-A-3-Documentation,代码行数:33,代码来源:functions.php
示例6: CTabView
// append tabs to form
$itemTab = new CTabView();
$itemTab->addTab('itemTab', $this->data['caption'], $itemFormList);
$itemForm->addItem($itemTab);
// append buttons to form
$buttons = array();
if (!empty($this->data['itemid'])) {
array_push($buttons, new CSubmit('clone', _('Clone')));
if (!$this->data['is_template'] && !empty($this->data['itemid']) && empty($this->data['parent_discoveryid']) && !$this->data['is_discovery_rule']) {
array_push($buttons, new CButtonQMessage('del_history', _('Clear history and trends'), _('History clearing can take a long time. Continue?')));
}
if (!$this->data['limited']) {
if ($this->data['is_discovery_rule']) {
array_push($buttons, new CButtonDelete(_('Delete discovery rule?'), url_params(array('form', 'groupid', 'itemid', 'parent_discoveryid', 'hostid'))));
} else {
$buttons[] = new CButtonDelete($this->data['parent_discoveryid'] ? _('Delete item prototype?') : _('Delete item?'), url_params(array('form', 'groupid', 'itemid', 'parent_discoveryid', 'hostid')));
}
}
}
array_push($buttons, new CButtonCancel(url_param('groupid') . url_param('parent_discoveryid') . url_param('hostid')));
$itemForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), $buttons));
$itemWidget->addItem($itemForm);
/*
* Visibility
*/
$this->data['typeVisibility'] = array();
$i = 0;
foreach ($this->data['delay_flex'] as $delayFlex) {
if (!isset($delayFlex['delay']) && !isset($delayFlex['period'])) {
continue;
}
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.item.edit.php
示例7: CButton
}
$addButton = new CButton('macro_add', _('Add'), null, 'link_menu element-table-add');
$buttonColumn = new CCol($addButton);
$buttonColumn->setAttribute('colspan', 5);
$buttonRow = new CRow();
$buttonRow->setAttribute('id', 'row_new_macro');
$buttonRow->addItem($buttonColumn);
$conditionTable->addRow($buttonRow);
$conditionFormList->addRow(_('Filters'), new CDiv($conditionTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
// append tabs to form
$itemTab = new CTabView();
if (!hasRequest('form_refresh')) {
$itemTab->setSelected(0);
}
$itemTab->addTab('itemTab', $this->data['caption'], $itemFormList);
$itemTab->addTab('macroTab', _('Filters'), $conditionFormList);
$itemForm->addItem($itemTab);
// append buttons to form
if (!empty($this->data['itemid'])) {
if (!$this->data['limited']) {
$btnDelete = new CButtonDelete(_('Delete discovery rule?'), url_params(array('form', 'groupid', 'itemid', 'parent_discoveryid', 'hostid')));
} else {
$btnDelete = null;
}
$itemForm->addItem(makeFormFooter(new CSubmit('update', _('Update')), array(new CSubmit('clone', _('Clone')), $btnDelete, new CButtonCancel(url_param('groupid') . url_param('parent_discoveryid') . url_param('hostid')))));
} else {
$itemForm->addItem(makeFormFooter(new CSubmit('add', _('Add')), new CButtonCancel(url_param('groupid') . url_param('parent_discoveryid') . url_param('hostid'))));
}
$itemWidget->addItem($itemForm);
require_once dirname(__FILE__) . '/js/configuration.host.discovery.edit.js.php';
return $itemWidget;
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:configuration.host.discovery.edit.php
示例8: foreach
foreach ($this->data['slides'] as $step => $slides) {
$name = '';
if (!empty($slides['screenid'])) {
$screen = get_screen_by_screenid($slides['screenid']);
if (!empty($screen['name'])) {
$name = $screen['name'];
}
}
$delay = new CNumericBox('slides[' . $step . '][delay]', !empty($slides['delay']) ? $slides['delay'] : '', 5, 'no', true, false);
$delay->setAttribute('placeholder', _('default'));
$removeButton = new CButton('remove_' . $step, _('Remove'), 'javascript: removeSlide(this);', 'link_menu');
$removeButton->setAttribute('remove_slide', $step);
$row = new CRow(array(new CSpan(null, 'ui-icon ui-icon-arrowthick-2-n-s move'), new CSpan($i++ . ':', 'rowNum', 'current_slide_' . $step), $name, $delay, $removeButton), 'sortable', 'slides_' . $step);
$slideTable->addRow($row);
}
$addButtonColumn = new CCol(empty($this->data['work_slide']) ? new CButton('add', _('Add'), 'return PopUp("popup.php?srctbl=screens&srcfld1=screenid&dstfrm=' . $slideForm->getName() . '&multiselect=1", 450, 450)', 'link_menu') : null, null, 5);
$addButtonColumn->setAttribute('style', 'vertical-align: middle;');
$slideTable->addRow(new CRow($addButtonColumn, null, 'screenListFooter'));
$slideFormList->addRow(_('Slides'), new CDiv($slideTable, 'objectgroup inlineblock border_dotted'));
// append tabs to form
$slideTab = new CTabView();
$slideTab->addTab('slideTab', _('Slide'), $slideFormList);
$slideForm->addItem($slideTab);
// append buttons to form
if (empty($this->data['slideshowid'])) {
$slideForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButtonCancel()));
} else {
$slideForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete slide show?'), url_params(array('form', 'slideshowid'))), new CButtonCancel())));
}
$slideWidget->addItem($slideForm);
return $slideWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:configuration.slideconf.edit.php
示例9: CTextArea
} else {
$enabled = true;
}
$hostInventoryFieldComboBox->addItem($fieldNo, $fieldInfo['title'], $this->data['inventory_link'] == $fieldNo && $enabled ? 'yes' : null, $enabled);
}
$itemFormList->addRow(_('Populates host inventory field'), $hostInventoryFieldComboBox, 'row_inventory_link');
// append description to form list
$itemFormList->addRow(_('Description'), (new CTextArea('description', $this->data['description']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH));
// status
$enabledCheckBox = (new CCheckBox('status', ITEM_STATUS_ACTIVE))->setChecked($this->data['status'] == ITEM_STATUS_ACTIVE);
$itemFormList->addRow(_('Enabled'), $enabledCheckBox);
// append tabs to form
$itemTab = (new CTabView())->addTab('itemTab', $this->data['caption'], $itemFormList);
// append buttons to form
if ($this->data['itemid'] != 0) {
$buttons = [new CSubmit('clone', _('Clone'))];
if ($host['status'] == HOST_STATUS_MONITORED || $host['status'] == HOST_STATUS_NOT_MONITORED) {
$buttons[] = new CButtonQMessage('del_history', _('Clear history and trends'), _('History clearing can take a long time. Continue?'));
}
if (!$this->data['limited']) {
$buttons[] = new CButtonDelete(_('Delete item?'), url_params(['form', 'groupid', 'itemid', 'hostid']));
}
$buttons[] = new CButtonCancel(url_param('groupid') . url_param('hostid'));
$itemTab->setFooter(makeFormFooter(new CSubmit('update', _('Update')), $buttons));
} else {
$itemTab->setFooter(makeFormFooter(new CSubmit('add', _('Add')), [new CButtonCancel(url_param('groupid') . url_param('hostid'))]));
}
$itemForm->addItem($itemTab);
$widget->addItem($itemForm);
require_once dirname(__FILE__) . '/js/configuration.item.edit.js.php';
return $widget;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.item.edit.php
示例10: CNumericBox
$screenFormList->addRow(_('Width'), (new CNumericBox('width', $width, 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH));
$screenFormList->addRow(_('Height'), (new CNumericBox('height', $height, 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH));
} else {
$form->addVar('width', 500)->addVar('height', 100);
}
$resourcesWithHAlign = [SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_MAP, SCREEN_RESOURCE_CLOCK, SCREEN_RESOURCE_URL, SCREEN_RESOURCE_LLD_GRAPH, SCREEN_RESOURCE_LLD_SIMPLE_GRAPH];
if (in_array($resourceType, $resourcesWithHAlign)) {
$screenFormList->addRow(_('Horizontal align'), (new CRadioButtonList('halign', (int) $halign))->addValue(_('Left'), HALIGN_LEFT)->addValue(_('Center'), HALIGN_CENTER)->addValue(_('Right'), HALIGN_RIGHT)->setModern(true));
} else {
$form->addVar('halign', 0);
}
$screenFormList->addRow(_('Vertical align'), (new CRadioButtonList('valign', (int) $valign))->addValue(_('Top'), VALIGN_TOP)->addValue(_('Middle'), VALIGN_MIDDLE)->addValue(_('Bottom'), VALIGN_BOTTOM)->setModern(true));
$screenFormList->addRow(_('Column span'), (new CNumericBox('colspan', $colspan, 3))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH));
$screenFormList->addRow(_('Row span'), (new CNumericBox('rowspan', $rowspan, 3))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH));
// dynamic addon
$resourcesWithDynamic = [SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_PLAIN_TEXT, SCREEN_RESOURCE_URL, SCREEN_RESOURCE_LLD_GRAPH, SCREEN_RESOURCE_LLD_SIMPLE_GRAPH];
if ($this->data['screen']['templateid'] == 0 && in_array($resourceType, $resourcesWithDynamic)) {
$screenFormList->addRow(_('Dynamic item'), (new CCheckBox('dynamic'))->setChecked($dynamic == 1));
}
// append tabs to form
$screenTab = new CTabView();
$screenTab->setAttribute('style', 'text-align: left;');
$screenTab->addTab('screenTab', _('Screen cell configuration'), $screenFormList);
// append buttons to form
if (isset($_REQUEST['screenitemid'])) {
$screenTab->setFooter(makeFormFooter(new CSubmit('update', _('Update')), [new CButtonDelete(null, url_params(['form', 'screenid', 'templateid', 'screenitemid'])), new CButtonCancel(url_params(['screenid', 'templateid']))]));
} else {
$screenTab->setFooter(makeFormFooter(new CSubmit('add', _('Add')), [new CButtonCancel(url_params(['screenid', 'templateid']))]));
}
$form->addItem($screenTab);
return $form;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:monitoring.screen.constructor.edit.php
示例11: CRow
$user_group_shares_table->addRow((new CRow((new CCol($add_user_group_btn))->setColSpan(3)))->setId('user_group_list_footer'));
$user_groups = [];
foreach ($data['screen']['userGroups'] as $user_group) {
$user_groupid = $user_group['usrgrpid'];
$user_groups[$user_groupid] = ['usrgrpid' => $user_groupid, 'name' => $data['user_groups'][$user_groupid]['name'], 'permission' => $user_group['permission']];
}
$js_insert = 'addPopupValues(' . zbx_jsvalue(['object' => 'usrgrpid', 'values' => $user_groups]) . ');';
// User sharing table.
$user_shares_table = (new CTable())->setHeader([_('Users'), _('Permissions'), _('Action')])->setAttribute('style', 'width: 100%;');
$add_user_btn = [(new CButton(null, _('Add')))->onClick('return PopUp("popup.php?dstfrm=' . $form->getName() . '&srctbl=users&srcfld1=userid&srcfld2=fullname&multiselect=1")')->addClass(ZBX_STYLE_BTN_LINK)];
$user_shares_table->addRow((new CRow((new CCol($add_user_btn))->setColSpan(3)))->setId('user_list_footer'));
$users = [];
foreach ($data['screen']['users'] as $user) {
$userid = $user['userid'];
$users[$userid] = ['id' => $userid, 'name' => getUserFullname($data['users'][$userid]), 'permission' => $user['permission']];
}
$js_insert .= 'addPopupValues(' . zbx_jsvalue(['object' => 'userid', 'values' => $users]) . ');';
zbx_add_post_js($js_insert);
$sharing_tab = (new CFormList('sharing_form'))->addRow(_('Type'), (new CRadioButtonList('private', (int) $data['screen']['private']))->addValue(_('Private'), PRIVATE_SHARING)->addValue(_('Public'), PUBLIC_SHARING)->setModern(true))->addRow(_('List of user group shares'), (new CDiv($user_group_shares_table))->addClass(ZBX_STYLE_TABLE_FORMS_SEPARATOR)->setAttribute('style', 'min-width: ' . ZBX_TEXTAREA_STANDARD_WIDTH . 'px;'))->addRow(_('List of user shares'), (new CDiv($user_shares_table))->addClass(ZBX_STYLE_TABLE_FORMS_SEPARATOR)->setAttribute('style', 'min-width: ' . ZBX_TEXTAREA_STANDARD_WIDTH . 'px;'));
// Append data to form.
$tabs->addTab('sharing_tab', _('Sharing'), $sharing_tab);
}
// append buttons to form
if ($data['screen']['screenid']) {
$tabs->setFooter(makeFormFooter(new CSubmit('update', _('Update')), [new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete screen?'), url_params(['form', 'screenid', 'templateid'])), new CButtonCancel(url_param('templateid'))]));
} else {
$tabs->setFooter(makeFormFooter(new CSubmit('add', _('Add')), [new CButtonCancel(url_param('templateid'))]));
}
$form->addItem($tabs);
$widget->addItem($form);
return $widget;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:monitoring.screen.edit.php
示例12: zbx_jsvalue
$user_groupid = $user_group['usrgrpid'];
if (array_key_exists($user_groupid, $data['user_groups'])) {
$user_groups[$user_groupid] = ['usrgrpid' => $user_groupid, 'name' => $data['user_groups'][$user_groupid]['name'], 'permission' => $user_group['permission']];
}
}
$js_insert = 'addPopupValues(' . zbx_jsvalue(['object' => 'usrgrpid', 'values' => $user_groups]) . ');';
// User sharing table.
$user_shares_table = (new CTable())->setHeader([_('Users'), _('Permissions'), _('Action')])->setAttribute('style', 'width: 100%;');
$add_user_btn = [(new CButton(null, _('Add')))->onClick('return PopUp("popup.php?dstfrm=' . $form->getName() . '&srctbl=users&srcfld1=userid&srcfld2=fullname&multiselect=1")')->addClass(ZBX_STYLE_BTN_LINK)];
$user_shares_table->addRow((new CRow((new CCol($add_user_btn))->setColSpan(3)))->setId('user_list_footer'));
$users = [];
foreach ($data['slideshow']['users'] as $user) {
$userid = $user['userid'];
if (array_key_exists($userid, $data['users'])) {
$users[$userid] = ['id' => $userid, 'name' => getUserFullname($data['users'][$userid]), 'permission' => $user['permission']];
}
}
$js_insert .= 'addPopupValues(' . zbx_jsvalue(['object' => 'userid', 'values' => $users]) . ');';
zbx_add_post_js($js_insert);
$sharing_tab = (new CFormList('sharing_form'))->addRow(_('Type'), (new CRadioButtonList('private', (int) $data['slideshow']['private']))->addValue(_('Private'), PRIVATE_SHARING)->addValue(_('Public'), PUBLIC_SHARING)->setModern(true))->addRow(_('List of user group shares'), (new CDiv($user_group_shares_table))->addClass(ZBX_STYLE_TABLE_FORMS_SEPARATOR)->setAttribute('style', 'min-width: ' . ZBX_TEXTAREA_STANDARD_WIDTH . 'px;'))->addRow(_('List of user shares'), (new CDiv($user_shares_table))->addClass(ZBX_STYLE_TABLE_FORMS_SEPARATOR)->setAttribute('style', 'min-width: ' . ZBX_TEXTAREA_STANDARD_WIDTH . 'px;'));
// Append data to form.
$tabs->addTab('sharing_tab', _('Sharing'), $sharing_tab);
// append buttons to form
if (isset($data['slideshow']['slideshowid'])) {
$tabs->setFooter(makeFormFooter(new CSubmit('update', _('Update')), [new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete slide show?'), url_params(['form', 'slideshowid'])), new CRedirectButton(_('Cancel'), 'slides.php')]));
} else {
$tabs->setFooter(makeFormFooter(new CSubmit('add', _('Add')), [new CButtonCancel()]));
}
$form->addItem($tabs);
$widget->addItem($form);
return $widget;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:monitoring.slideconf.edit.php
示例13: CFormList
if (empty($this->data['parent_discoveryid'])) {
$dependenciesFormList = new CFormList('dependenciesFormList');
$dependenciesTable = new CTable(_('No dependencies defined.'), 'formElementTable');
$dependenciesTable->setAttribute('style', 'min-width: 500px;');
$dependenciesTable->setAttribute('id', 'dependenciesTable');
$dependenciesTable->setHeader(array(_('Name'), _('Action')));
foreach ($this->data['db_dependencies'] as $dependency) {
$triggersForm->addVar('dependencies[]', $dependency['triggerid'], 'dependencies_' . $dependency['triggerid']);
$row = new CRow(array($dependency['host'] . NAME_DELIMITER . $dependency['description'], new CButton('remove', _('Remove'), 'javascript: removeDependency("' . $dependency['triggerid'] . '");', 'link_menu')));
$row->setAttribute('id', 'dependency_' . $dependency['triggerid']);
$dependenciesTable->addRow($row);
}
$dependenciesFormList->addRow(_('Dependencies'), new CDiv(array($dependenciesTable, new CButton('bnt1', _('Add'), 'return PopUp("popup.php?' . 'srctbl=triggers' . '&srcfld1=triggerid' . '&reference=deptrigger' . '&multiselect=1' . '&with_triggers=1", 1000, 700);', 'link_menu')), 'objectgroup inlineblock border_dotted ui-corner-all'));
$triggersTab->addTab('dependenciesTab', _('Dependencies'), $dependenciesFormList);
}
// append tabs to form
$triggersForm->addItem($triggersTab);
// append buttons to form
$buttons = array();
if (!empty($this->data['triggerid'])) {
$buttons[] = new CSubmit('clone', _('Clone'));
$deleteButton = new CButtonDelete($this->data['parent_discoveryid'] ? _('Delete trigger prototype?') : _('Delete trigger?'), url_params(array('form', 'groupid', 'hostid', 'triggerid', 'parent_discoveryid')));
if ($this->data['limited']) {
$deleteButton->setAttribute('disabled', 'disabled');
}
$buttons[] = $deleteButton;
}
$buttons[] = new CButtonCancel(url_params(array('groupid', 'hostid', 'parent_discoveryid')));
$triggersForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array($buttons)));
$triggersWidget->addItem($triggersForm);
return $triggersWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.triggers.edit.php
示例14: CFormList
/*
* Dependencies tab
*/
$dependenciesFormList = new CFormList('dependenciesFormList');
$dependenciesTable = (new CTable())->setAttribute('style', 'width: 100%;')->setHeader([_('Name'), _('Action')]);
foreach ($this->data['db_dependencies'] as $dependency) {
$triggersForm->addVar('dependencies[]', $dependency['triggerid'], 'dependencies_' . $dependency['triggerid']);
$depTriggerDescription = CHtml::encode(implode(', ', zbx_objectValues($dependency['hosts'], 'name')) . NAME_DELIMITER . $dependency['description']);
if ($dependency['flags'] == ZBX_FLAG_DISCOVERY_NORMAL) {
$description = (new CLink($depTriggerDescription, 'triggers.php?form=update&triggerid=' . $dependency['triggerid']))->setAttribute('target', '_blank');
} else {
$description = $depTriggerDescription;
}
$dependenciesTable->addRow((new CRow([$description, (new CCol((new CButton('remove', _('Remove')))->onClick('javascript: removeDependency("' . $dependency['triggerid'] . '");')->addClass(ZBX_STYLE_BTN_LINK)))->addClass(ZBX_STYLE_NOWRAP)]))->setId('dependency_' . $dependency['triggerid']));
}
$dependenciesFormList->addRow(_('Dependencies'), (new CDiv([$dependenciesTable, (new CButton('bnt1', _('Add')))->onClick('return PopUp("popup.php?srctbl=triggers&srcfld1=triggerid&reference=deptrigger&multiselect=1' . '&with_triggers=1&noempty=1");')->addClass(ZBX_STYLE_BTN_LINK)]))->addClass(ZBX_STYLE_TABLE_FORMS_SEPARATOR)->setAttribute('style', 'min-width: ' . ZBX_TEXTAREA_BIG_WIDTH . 'px;'));
$triggersTab->addTab('dependenciesTab', _('Dependencies'), $dependenciesFormList);
// append buttons to form
if (!empty($this->data['triggerid'])) {
$deleteButton = new CButtonDelete(_('Delete trigger?'), url_params(['form', 'hostid', 'triggerid']));
if ($this->data['limited']) {
$deleteButton->setAttribute('disabled', 'disabled');
}
$triggersTab->setFooter(makeFormFooter(new CSubmit('update', _('Update')), [new CSubmit('clone', _('Clone')), $deleteButton, new CButtonCancel(url_param('hostid'))]));
} else {
$triggersTab->setFooter(makeFormFooter(new CSubmit('add', _('Add')), [new CButtonCancel(url_param('hostid'))]));
}
// append tabs to form
$triggersForm->addItem($triggersTab);
$widget->addItem($triggersForm);
return $widget;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.triggers.edit.php
示例15: tort
liability, whether in contract, strict liability, or tort (including
negligence or otherwise) arising in any way out of the use of this
software, even if advised of the possibility of such damage.
*/
require_once 'libs/functions.php';
$options = get_options();
$tree = get_tree($options['docs_path'], $base_url);
// If a language is set in the config, rewrite urls based on the language
if (!isset($language) || $language === null) {
$homepage_url = homepage_url($tree);
$docs_url = docs_url($tree);
} else {
$homepage_url = "/";
}
$docs_url = docs_url($tree);
$url_params = url_params();
if (count($options['languages']) > 0 && count($url_params) > 0 && strlen($url_params[0]) > 0) {
$language = array_shift($url_params);
$base_path = "docs/" . $language;
} else {
$language = null;
$base_path = "docs";
}
$tree = get_tree($base_path, $base_url, '', true, $language);
$page = load_page($tree, $url_params);
// If a timezone has been set in the config file, override the default PHP timezone for this application.
if (isset($options['timezone'])) {
date_default_timezone_set($options['timezone']);
}
// Redirect to docs, if there is no homepage
if ($homepage && $homepage_url !== '/') {
开发者ID:dongcheng,项目名称:daux,代码行数:31,代码来源:index.php
示例16: CWidget
$applicationWidget = new CWidget();
$applicationWidget->addPageHeader(_('CONFIGURATION OF APPLICATIONS'));
// append host summary to widget header
$applicationWidget->addItem(get_header_host_table('applications', $this->data['hostid']));
// create form
$applicationForm = new CForm();
$applicationForm->setName('applicationForm');
$applicationForm->addVar('form', $this->data['form']);
$applicationForm->addVar('groupid', $this->data['groupid']);
$applicationForm->addVar('hostid', $this->data['hostid']);
if (!empty($this->data['applicationid'])) {
$applicationForm->addVar('applicationid', $this->data['applicationid']);
}
// create form list
$applicationFormList = new CFormList('applicationFormList');
$nameTextBox = new CTextBox('appname', $this->data['appname'], ZBX_TEXTBOX_STANDARD_SIZE);
$nameTextBox->attr('autofocus', 'autofocus');
$applicationFormList->addRow(_('Name'), $nameTextBox);
// append tabs to form
$applicationTab = new CTabView();
$applicationTab->addTab('applicationTab', _('Application'), $applicationFormList);
$applicationForm->addItem($applicationTab);
// append buttons to form
if (!empty($this->data['applicationid'])) {
$applicationForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete application?'), url_params(array('config', 'hostid', 'groupid', 'form', 'applicationid'))), new CButtonCancel(url_param('config') . url_param('hostid') . url_param('groupid')))));
} else {
$applicationForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButtonCancel(url_param('config') . url_param('hostid') . url_param('groupid'))));
}
// append form to widget
$applicationWidget->addItem($applicationForm);
return $applicationWidget;
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:configuration.application.edit.php
示例17: CComboBox
if ($paramId == 0 || $paramId == 1 && (substr($this->data['expr_type'], 0, 6) == 'regexp' || substr($this->data['expr_type'], 0, 7) == 'iregexp' || substr($this->data['expr_type'], 0, 3) == 'str' && substr($this->data['expr_type'], 0, 6) != 'strlen')) {
if (isset($paramFunction['M'])) {
$paramTypeElement = new CComboBox('paramtype', $this->data['paramtype'], null, $paramFunction['M']);
} else {
$expressionForm->addVar('paramtype', PARAM_TYPE_TIME);
$paramTypeElement = _('Time');
}
}
if ($paramId == 1 && (substr($this->data['expr_type'], 0, 3) != 'str' || substr($this->data['expr_type'], 0, 6) == 'strlen') && substr($this->data['expr_type'], 0, 6) != 'regexp' && substr($this->data['expr_type'], 0, 7) != 'iregexp') {
$paramTypeElement = _('Time');
$paramField = (new CTextBox('params[' . $paramId . ']', $paramValue))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH);
} else {
$paramField = $this->data['paramtype'] == PARAM_TYPE_COUNTS ? (new CNumericBox('params[' . $paramId . ']', (int) $paramValue, 10))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH) : (new CTextBox('params[' . $paramId . ']', $paramValue))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH);
}
$expressionFormList->addRow($paramFunction['C'], [$paramField, (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), $paramTypeElement]);
} else {
$expressionFormList->addRow($paramFunction['C'], (new CTextBox('params[' . $paramId . ']', $paramValue))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH));
$expressionForm->addVar('paramtype', PARAM_TYPE_TIME);
}
}
} else {
$expressionForm->addVar('paramtype', PARAM_TYPE_TIME);
}
$expressionFormList->addRow('N', (new CTextBox('value', $this->data['value']))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH));
// append tabs to form
$expressionTab = (new CTabView())->addTab('expressionTab', _('Trigger expression condition'), $expressionFormList);
// append buttons to form
$expressionTab->setFooter(makeFormFooter(new CSubmit('insert', _('Insert')), [new CButtonCancel(url_params(['parent_discoveryid', 'dstfrm', 'dstfld1']))]));
$expressionForm->addItem($expressionTab);
$expressionWidget->addItem($expressionForm);
return $expressionWidget;
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:configuration.triggers.expression.php
示例18: _
}
} else {
$expressionForm->addVar('paramtype', PARAM_TYPE_TIME);
$paramTypeElement = SPACE . _('Time');
}
}
if ($paramId == 1 && (substr($this->data['expr_type'], 0, 3) != 'str' || substr($this->data['expr_type'], 0, 6) == 'strlen') && substr($this->data['expr_type'], 0, 6) != 'regexp' && substr($this->data['expr_type'], 0, 7) != 'iregexp') {
$paramTypeElement = SPACE . _('Time');
$paramField = new CTextBox('param[' . $paramId . ']', $paramValue, 10);
} else {
$paramField = $this->data['paramtype'] == PARAM_TYPE_COUNTS ? new CNumericBox('param[' . $paramId . ']', (int) $paramValue, 10) : new CTextBox('param[' . $paramId . ']', $paramValue, 10);
}
$expressionFormList->addRow($paramFunction['C'] . ' ', array($paramField, $paramTypeElement));
} else {
$expressionFormList->addRow($paramFunction['C'], new CTextBox('param[' . $paramId . ']', $paramValue, 30));
$expressionForm->addVar('paramtype', PARAM_TYPE_TIME);
}
}
} else {
$expressionForm->addVar('paramtype', PARAM_TYPE_TIME);
$expressionForm->addVar('param', 0);
}
$expressionFormList->addRow('N', new CTextBox('value', $this->data['value'], 10));
// append tabs to form
$expressionTab = new CTabView();
$expressionTab->addTab('expressionTab', _('Trigger expression condition'), $expressionFormList);
$expressionForm->addItem($expressionTab);
// append buttons to form
$expressionForm->addItem(makeFormFooter(new CSubmit('insert', _('Insert')), new CButtonCancel(url_params(array('parent_discoveryid', 'dstfrm', 'dstfld1')))));
$expressionWidget->addItem($expressionForm);
return $expressionWidget;
开发者ID:itnihao,项目名称:zatree-2.2,代码行数:31,代码来源:configuration.triggers.expression.php
示例19: show
/**
* Process screen with particular screen objects.
*
* @return CTable
*/
public function show()
{
if (empty($this->screen)) {
return new CTableInfo();
}
$skipedFields = [];
$screenitems = [];
$emptyScreenColumns = [];
// calculate table columns and rows
foreach ($this->screen['screenitems'] as $screenitem) {
$screenitems[] = $screenitem;
for ($i = 0; $i < $screenitem['rowspan'] || $i == 0; $i++) {
for ($j = 0; $j < $screenitem['colspan'] || $j == 0; $j++) {
if ($i != 0 || $j != 0) {
if (!isset($skipedFields[$screenitem['y'] + $i])) {
$skipedFields[$screenitem['y'] + $i] = [];
}
$skipedFields[$screenitem['y'] + $i][$screenitem['x'] + $j] = 1;
}
}
}
}
// create screen table
$screenTable = (new CTable())->setId(self::makeScreenTableId($this->screen['screenid']))->addClass(ZBX_STYLE_SCREEN_TABLE);
if ($this->mode == SCREEN_MODE_EDIT) {
$screenTable->addClass(ZBX_STYLE_DASHED_BORDER);
}
// action top row
if ($this->mode == SCREEN_MODE_EDIT) {
$newColumns = [(new CCol())->addClass(ZBX_STYLE_CELL_WIDTH)];
for ($i = 0, $size = $this->screen['hsize']; $i < $size; $i++) {
if ($this->screen['hsize'] >= SCREEN_MAX_SIZE) {
$link = (new CDiv('+'))->addClass(ZBX_STYLE_TREEVIEW_PLUS)->addClass(ZBX_STYLE_DISABLED);
} else {
$link = (new CLink('+', 'screenedit.php?screenid=' . $this->screen['screenid'] . url_param('templateid') . '&add_col=' . $i))->addClass(ZBX_STYLE_TREEVIEW_PLUS)->addSID();
}
$newColumns[] = (new CCol($link))->addClass(ZBX_STYLE_CENTER)->addClass(ZBX_STYLE_MIDDLE);
}
if ($this->screen['hsize'] >= SCREEN_MAX_SIZE) {
$link = (new CDiv('+'))->addClass(ZBX_STYLE_TREEVIEW_PLUS)->addClass(ZBX_STYLE_DISABLED);
} else {
$link = (new CLink('+', 'screenedit.php?screenid=' . $this->screen['screenid'] . url_param('templateid') . '&add_col=' . $this->screen['hsize']))->addClass(ZBX_STYLE_TREEVIEW_PLUS)->addSID();
}
$newColumns[] = (new CCol($link))->addClass(ZBX_STYLE_CENTER)->addClass(ZBX_STYLE_MIDDLE)->addClass(ZBX_STYLE_CELL_WIDTH);
$screenTable->addRow($newColumns);
}
for ($r = 0; $r < $this->screen['vsize']; $r++) {
$newColumns = [];
$emptyScreenRow = true;
// action left cell
if ($this->mode == SCREEN_MODE_EDIT) {
if ($this->screen['vsize'] >= SCREEN_MAX_SIZE) {
$link = (new CDiv('+'))->addClass(ZBX_STYLE_TREEVIEW_PLUS)->addClass(ZBX_STYLE_DISABLED);
} else {
$link = (new CLink('+', 'screenedit.php?screenid=' . $this->screen['screenid'] . url_param('templateid') . '&add_row=' . $r))->addClass(ZBX_STYLE_TREEVIEW_PLUS)->addSID();
}
$newColumns[] = (new CCol($link))->
|
请发表评论