<?php

/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** 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.
**/
require_once dirname(__FILE__) . '/js/administration.general.housekeeper.edit.js.php';
$widget = (new CWidget())->setTitle(_('Housekeeping'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.housekeeper.php'))));
$houseKeeperTab = (new CFormList())->addRow(new CTag('h4', true, _('Events and alerts')))->addRow(new CLabel(_('Enable internal housekeeping'), 'hk_events_mode'), (new CCheckBox('hk_events_mode'))->setChecked($data['hk_events_mode'] == 1))->addRow(new CLabel(_('Trigger data storage period (in days)'), 'hk_events_trigger'), (new CNumericBox('hk_events_trigger', $data['hk_events_trigger'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_events_mode'] == 1))->addRow(new CLabel(_('Internal data storage period (in days)'), 'hk_events_internal'), (new CNumericBox('hk_events_internal', $data['hk_events_internal'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_events_mode'] == 1))->addRow(new CLabel(_('Network discovery data storage period (in days)'), 'hk_events_discovery'), (new CNumericBox('hk_events_discovery', $data['hk_events_discovery'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_events_mode'] == 1))->addRow(new CLabel(_('Auto-registration data storage period (in days)'), 'hk_events_autoreg'), (new CNumericBox('hk_events_autoreg', $data['hk_events_autoreg'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_events_mode'] == 1))->addRow(null)->addRow(new CTag('h4', true, _('IT services')))->addRow(new CLabel(_('Enable internal housekeeping'), 'hk_services_mode'), (new CCheckBox('hk_services_mode'))->setChecked($data['hk_services_mode'] == 1))->addRow(new CLabel(_('Data storage period (in days)'), 'hk_services'), (new CNumericBox('hk_services', $data['hk_services'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_services_mode'] == 1))->addRow(null)->addRow(new CTag('h4', true, _('Audit')))->addRow(new CLabel(_('Enable internal housekeeping'), 'hk_audit_mode'), (new CCheckBox('hk_audit_mode'))->setChecked($data['hk_audit_mode'] == 1))->addRow(new CLabel(_('Data storage period (in days)'), 'hk_audit'), (new CNumericBox('hk_audit', $data['hk_audit'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_audit_mode'] == 1))->addRow(null)->addRow(new CTag('h4', true, _('User sessions')))->addRow(new CLabel(_('Enable internal housekeeping'), 'hk_sessions_mode'), (new CCheckBox('hk_sessions_mode'))->setChecked($data['hk_sessions_mode'] == 1))->addRow(new CLabel(_('Data storage period (in days)'), 'hk_sessions'), (new CNumericBox('hk_sessions', $data['hk_sessions'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_sessions_mode'] == 1))->addRow(null)->addRow(new CTag('h4', true, _('History')))->addRow(new CLabel(_('Enable internal housekeeping'), 'hk_history_mode'), (new CCheckBox('hk_history_mode'))->setChecked($data['hk_history_mode'] == 1))->addRow(new CLabel(_('Override item history period'), 'hk_history_global'), (new CCheckBox('hk_history_global'))->setChecked($data['hk_history_global'] == 1))->addRow(new CLabel(_('Data storage period (in days)'), 'hk_history'), (new CNumericBox('hk_history', $data['hk_history'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_history_global'] == 1))->addRow(null)->addRow(new CTag('h4', true, _('Trends')))->addRow(new CLabel(_('Enable internal housekeeping'), 'hk_trends_mode'), (new CCheckBox('hk_trends_mode'))->setChecked($data['hk_trends_mode'] == 1))->addRow(new CLabel(_('Override item trend period'), 'hk_trends_global'), (new CCheckBox('hk_trends_global'))->setChecked($data['hk_trends_global'] == 1))->addRow(new CLabel(_('Data storage period (in days)'), 'hk_trends'), (new CNumericBox('hk_trends', $data['hk_trends'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH)->setEnabled($data['hk_trends_global'] == 1));
$houseKeeperView = (new CTabView())->addTab('houseKeeper', _('Housekeeping'), $houseKeeperTab)->setFooter(makeFormFooter(new CSubmit('update', _('Update')), [new CButton('resetDefaults', _('Reset defaults'))]));
$widget->addItem((new CForm())->addItem($houseKeeperView));
return $widget;
** This program is free software; you can redistribute it and/or modify
** 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.
**/
include 'include/views/js/administration.general.iconmap.js.php';
$widget = (new CWidget())->setTitle(_('Icon mapping'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.iconmapping.php'))));
$iconMapTab = new CFormList();
$name = (new CTextBox('iconmap[name]', $this->data['iconmap']['name']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('maxlength', 64)->setAttribute('autofocus', 'autofocus');
$iconMapTab->addRow(_('Name'), $name);
$iconMapForm = (new CForm())->addVar('form', 1);
if (isset($this->data['iconmapid'])) {
    $iconMapForm->addVar('iconmapid', $this->data['iconmap']['iconmapid']);
}
$iconMapTable = (new CTable())->setAttribute('style', 'width: 100%;')->setId('iconMapTable')->setHeader(['', '', _('Inventory field'), _('Expression'), _('Icon'), '', _('Action')]);
order_result($this->data['iconmap']['mappings'], 'sortorder');
$i = 0;
foreach ($this->data['iconmap']['mappings'] as $mapping) {
    $numSpan = (new CSpan($i + 1 . ':'))->addClass('rowNum');
    $profileLinksComboBox = new CComboBox('iconmap[mappings][' . $i . '][inventory_link]', $mapping['inventory_link'], null, $this->data['inventoryList']);
    $expressionTextBox = [(new CTextBox('iconmap[mappings][' . $i . '][expression]', $mapping['expression']))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH)->setAttribute('maxlength', 64)];
    if (isset($mapping['iconmappingid'])) {
**
** This program is free software; you can redistribute it and/or modify
** 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(_('Images'))->setControls((new CForm())->cleanItems()->addVar('imagetype', $data['imagetype'])->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.images.php'))->addItem([_('Type'), SPACE, new CComboBox('imagetype', $data['imagetype'], 'submit();', [IMAGE_TYPE_ICON => _('Icon'), IMAGE_TYPE_BACKGROUND => _('Background')])])->addItem(new CSubmit('form', $data['imagetype'] == IMAGE_TYPE_ICON ? _('Create icon') : _('Create background')))));
if (!$data['images']) {
    $widget->addItem(new CTableInfo());
} else {
    // header
    $imageTable = (new CDiv())->addClass(ZBX_STYLE_TABLE)->addClass(ZBX_STYLE_ADM_IMG);
    $count = 0;
    $imageRow = (new CDiv())->addClass(ZBX_STYLE_ROW);
    foreach ($data['images'] as $image) {
        $img = $image['imagetype'] == IMAGE_TYPE_BACKGROUND ? new CLink(new CImg('imgstore.php?width=200&height=200&iconid=' . $image['imageid'], 'no image'), 'image.php?imageid=' . $image['imageid']) : new CImg('imgstore.php?iconid=' . $image['imageid'], 'no image');
        $imageRow->addItem((new CDiv())->addClass(ZBX_STYLE_CELL)->addItem([$img, BR(), new CLink($image['name'], 'adm.images.php?form=update&imageid=' . $image['imageid'])]));
        if (++$count % 5 == 0) {
            $imageTable->addItem($imageRow);
            $imageRow = (new CDiv())->addClass(ZBX_STYLE_ROW);
        }
    }
<?php

/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** 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.
**/
include 'include/views/js/administration.general.triggerSeverity.js.php';
$widget = (new CWidget())->setTitle(_('Trigger severities'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.triggerseverities.php'))));
$severityTab = (new CFormList())->addRow(_('Not classified'), [(new CTextBox('severity_name_0', $data['severity_name_0']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('maxlength', 32), (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), new CColor('severity_color_0', $data['severity_color_0'])])->addRow(_('Information'), [(new CTextBox('severity_name_1', $data['severity_name_1']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('maxlength', 32), (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), new CColor('severity_color_1', $data['severity_color_1'])])->addRow(_('Warning'), [(new CTextBox('severity_name_2', $data['severity_name_2']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('maxlength', 32), (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), new CColor('severity_color_2', $data['severity_color_2'])])->addRow(_('Average'), [(new CTextBox('severity_name_3', $data['severity_name_3']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('maxlength', 32), (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), new CColor('severity_color_3', $data['severity_color_3'])])->addRow(_('High'), [(new CTextBox('severity_name_4', $data['severity_name_4']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('maxlength', 32), (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), new CColor('severity_color_4', $data['severity_color_4'])])->addRow(_('Disaster'), [(new CTextBox('severity_name_5', $data['severity_name_5']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('maxlength', 32), (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), new CColor('severity_color_5', $data['severity_color_5'])])->addRow(null)->addInfo(_('Custom severity names affect all locales and require manual translation!'));
$severityForm = (new CForm())->addItem((new CTabView())->addTab('severities', _('Trigger severities'), $severityTab)->setFooter(makeFormFooter(new CSubmit('update', _('Update')), [new CButton('resetDefaults', _('Reset defaults'))])));
$widget->addItem($severityForm);
return $widget;
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** 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(_('Value mapping'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.valuemapping.php'))->addItem(new CSubmit('form', _('Create value map')))->addItem((new CButton('form', _('Import')))->onClick('redirect("conf.import.php?rules_preset=valuemap")'))));
$form = (new CForm())->setName('valuemap_form');
$table = (new CTableInfo())->setHeader([(new CColHeader((new CCheckBox('all_valuemaps'))->onClick("checkAll('" . $form->getName() . "', 'all_valuemaps', 'valuemapids');")))->addClass(ZBX_STYLE_CELL_WIDTH), make_sorting_header(_('Name'), 'name', $data['sort'], $data['sortorder']), _('Value map'), _('Used in items')]);
foreach ($data['valuemaps'] as $valuemap) {
    $mappings = [];
    foreach ($valuemap['mappings'] as $mapping) {
        $mappings[] = $mapping['value'] . ' &rArr; ' . $mapping['newvalue'];
        $mappings[] = BR();
    }
    array_pop($mappings);
    $table->addRow([new CCheckBox('valuemapids[' . $valuemap['valuemapid'] . ']', $valuemap['valuemapid']), new CLink($valuemap['name'], 'adm.valuemapping.php?form=update&valuemapid=' . $valuemap['valuemapid']), $mappings, $valuemap['used_in_items'] ? (new CCol(_('Yes')))->addClass(ZBX_STYLE_GREEN) : '']);
}
$form->addItem([$table, $data['paging'], new CActionButtonList('action', 'valuemapids', ['valuemap.export' => ['name' => _('Export')], 'valuemap.delete' => ['name' => _('Delete'), 'confirm' => _('Delete selected value maps?')]])]);
$widget->addItem($form);
return $widget;
<?php

/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** 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(_('Working time'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.workingtime.php'))));
$workingTimeView = (new CTabView())->addTab('workingTime', _('Working time'), (new CFormList())->addRow(_('Working time'), (new CTextBox('work_period', $data['work_period']))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)->setAttribute('autofocus', 'autofocus')))->setFooter(makeFormFooter(new CSubmit('update', _('Update'))));
$workingTimeForm = (new CForm())->addItem($workingTimeView);
$widget->addItem($workingTimeForm);
return $widget;
**
** This program is free software; you can redistribute it and/or modify
** 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(_('Regular expressions'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.regexps.php'))->addItem(new CSubmit('form', _('New regular expression')))));
$form = (new CForm())->setName('regularExpressionsForm');
$regExpTable = (new CTableInfo())->setHeader([(new CColHeader((new CCheckBox('all_regexps'))->onClick("checkAll('" . $form->getName() . "', 'all_regexps', 'regexpids');")))->addClass(ZBX_STYLE_CELL_WIDTH), _('Name'), _('Expressions')]);
$expressions = [];
$values = [];
foreach ($data['db_exps'] as $exp) {
    if (!isset($expressions[$exp['regexpid']])) {
        $values[$exp['regexpid']] = 1;
    } else {
        $values[$exp['regexpid']]++;
    }
    if (!isset($expressions[$exp['regexpid']])) {
        $expressions[$exp['regexpid']] = new CTable();
    }
    $expressions[$exp['regexpid']]->addRow([new CCol($values[$exp['regexpid']]), new CCol(' &raquo; '), new CCol($exp['expression']), new CCol(' [' . expression_type2str($exp['expression_type']) . ']')]);
}
** This program is free software; you can redistribute it and/or modify
** 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.
**/
require_once dirname(__FILE__) . '/js/administration.general.macros.edit.js.php';
$widget = (new CWidget())->setTitle(_('Macros'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.macros.php'))));
$table = (new CTable())->setId('tbl_macros')->setHeader([_('Macro'), '', _('Value'), '']);
// fields
foreach ($data['macros'] as $i => $macro) {
    $macro_input = (new CTextBox('macros[' . $i . '][macro]', $macro['macro'], false, 255))->addClass('macro')->setWidth(ZBX_TEXTAREA_MACRO_WIDTH)->setAttribute('placeholder', '{$MACRO}');
    $value_input = (new CTextBox('macros[' . $i . '][value]', $macro['value'], false, 255))->setWidth(ZBX_TEXTAREA_MACRO_VALUE_WIDTH)->setAttribute('placeholder', _('value'));
    $button_cell = [(new CButton('macros[' . $i . '][remove]', _('Remove')))->addClass(ZBX_STYLE_BTN_LINK)->addClass('element-table-remove')];
    if (array_key_exists('globalmacroid', $macro)) {
        $button_cell[] = new CVar('macros[' . $i . '][globalmacroid]', $macro['globalmacroid']);
    }
    $table->addRow([$macro_input, '&rArr;', $value_input, (new CCol($button_cell))->addClass(ZBX_STYLE_NOWRAP)], 'form_row');
}
// buttons
$table->setFooter(new CCol((new CButton('macro_add', _('Add')))->addClass(ZBX_STYLE_BTN_LINK)->addClass('element-table-add')));
// form list
$macros_form_list = (new CFormList('macrosFormList'))->addRow($table);
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** 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(_('Other configuration parameters'))->setControls((new CForm())->cleanItems()->addItem((new CList())->addItem(makeAdministrationGeneralMenu('adm.other.php'))));
$otherTab = new CFormList();
$discoveryGroup = new CComboBox('discovery_groupid', $data['discovery_groupid']);
foreach ($data['discovery_groups'] as $group) {
    $discoveryGroup->addItem($group['groupid'], $group['name']);
}
$alertUserGroup = new CComboBox('alert_usrgrpid', $data['alert_usrgrpid']);
$alertUserGroup->addItem(0, _('None'));
foreach ($data['alert_usrgrps'] as $usrgrp) {
    $alertUserGroup->addItem($usrgrp['usrgrpid'], $usrgrp['name']);
}
$otherTab->addRow(_('Refresh unsupported items (in sec)'), (new CNumericBox('refresh_unsupported', $data['refresh_unsupported'], 5))->setWidth(ZBX_TEXTAREA_NUMERIC_STANDARD_WIDTH))->addRow(_('Group for discovered hosts'), $discoveryGroup)->addRow(_('Default host inventory mode'), (new CRadioButtonList('default_inventory_mode', (int) $data['default_inventory_mode']))->addValue(_('Disabled'), HOST_INVENTORY_DISABLED)->addValue(_('Manual'), HOST_INVENTORY_MANUAL)->addValue(_('Automatic'), HOST_INVENTORY_AUTOMATIC)->setModern(true))->addRow(_('User group for database down message'), $alertUserGroup)->addRow(_('Log unmatched SNMP traps'), (new CCheckBox('snmptrap_logging'))->setChecked($data['snmptrap_logging'] == 1));
$otherForm = (new CForm())->setName('otherForm')->addItem((new CTabView())->addTab('other', _('Other parameters'), $otherTab)->setFooter(makeFormFooter(new CSubmit('update', _('Update')))));
$widget->addItem($otherForm);
return $widget;