• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP url_param函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中url_param函数的典型用法代码示例。如果您正苦于以下问题:PHP url_param函数的具体用法?PHP url_param怎么用?PHP url_param使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了url_param函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_dynamic_chart

function get_dynamic_chart($dom_graph_id, $img_src, $width = 0)
{
    if (is_int($width) && $width > 0) {
        $img_src .= url_param($width, false, 'width');
    }
    $result = new CScript('
		<script language="JavaScript" type="text/javascript">
		<!--
		var width = "' . (!(is_int($width) && $width > 0) ? $width : '') . '";
		var img_src = "' . $img_src . '";
		
		A_SBOX["' . $dom_graph_id . '"] = new Object;
		A_SBOX["' . $dom_graph_id . '"].shiftT = 17;
		A_SBOX["' . $dom_graph_id . '"].shiftL = 10;

		var ZBX_G_WIDTH;
	
		if(width!=""){
			if(window.innerWidth) ZBX_G_WIDTH=window.innerWidth; 
			else ZBX_G_WIDTH=document.body.clientWidth;
			
			ZBX_G_WIDTH-= 80;
	
			ZBX_G_WIDTH+= parseInt(width);
			width = "&width=" + ZBX_G_WIDTH;
		}
		else{
			ZBX_G_WIDTH = ' . $width . ';
		}
		
		document.write(\'<img src="\'+img_src + width +\'" alt="chart" id="' . $dom_graph_id . '" />\');
		-->
		</script>');
    return $result;
}
开发者ID:rennhak,项目名称:zabbix,代码行数:35,代码来源:js.inc.php


示例2: rte_image_editor_search

 static function rte_image_editor_search()
 {
     $active = url_param('view');
     $cls = '';
     if ($active == 'shop') {
         $cls = ' class="active" ';
     }
     print '<module type="files/admin" />';
 }
开发者ID:MenZil-Team,项目名称:microweber,代码行数:9,代码来源:Api.php


示例3: mw_print_stats_on_dashboard

function mw_print_stats_on_dashboard()
{
    $active = url_param('view');
    $cls = '';
    if ($active == 'shop') {
        //   $cls = ' class="active" ';
    }
    print '  <module type="site_stats/admin" subtype="graph" />
  <module type="site_stats/admin" />';
    //print '<microweber module="site_stats" view="admin" />';
}
开发者ID:apsolut,项目名称:microweber,代码行数:11,代码来源:functions.php


示例4: mw_print_admin_updates_settings_link

function mw_print_admin_updates_settings_link()
{
    $active = url_param('view');
    $cls = '';
    if ($active == 'comments') {
        $cls = ' class="active" ';
    }
    $notif_html = '';
    $mname = module_name_encode('updates');
    print "<li><a class=\"item-" . $mname . "\" href=\"#option_group=" . $mname . "\">" . _e("Updates", true) . "</a></li>";
    //$notif_count = mw()->notifications_manager->get('module=comments&is_read=0&count=1');
    /*if ($notif_count > 0) {
    		$notif_html = '<sup class="mw-notif-bubble">' . $notif_count . '</sup>';
    	}*/
    //print '<li' . $cls . '><a href="' . admin_url() . 'view:comments"><span class="ico icomment">' . $notif_html . '</span><span>Comments</span></a></li>';
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:16,代码来源:functions.php


示例5: index

 function index()
 {
     $is_admin = is_admin();
     if ($is_admin == false) {
         $go = site_url('login');
         safe_redirect($go);
     }
     $action = url_param('action');
     $this->template['functionName'] = strtolower(__FUNCTION__);
     $this->load->vars($this->template);
     $layout = CI::view('admin/layout', true, true);
     if ($action == false) {
         $primarycontent = CI::view('admin/index', true, true);
     } else {
         $primarycontent = CI::view('admin/' . $action, true, true);
     }
     $layout = str_ireplace('{content}', $primarycontent, $layout);
     $layout = CI::model('template')->parseMicrwoberTags($layout);
     CI::library('output')->set_output($layout);
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:20,代码来源:index.php


示例6: loginas

 function loginas()
 {
     $id = url_param('id');
     if ($id == false) {
         exit('Specify id');
     }
     $cur_user = user_id();
     if ($cur_user == false) {
         exit('You need to be logged in as some of the parent users.');
     }
     $other_user = get_user($id);
     if ($cur_user == $other_user) {
         redirect('dashboard');
     }
     //var_dump($other_user);
     if (intval($other_user['parent_id']) == $cur_user) {
     } else {
         exit('You need to be logged in as some of the parent users.');
     }
     $user_session['is_logged'] = 'yes';
     $user_session['user_id'] = $other_user['id'];
     CI::library('session')->set_userdata('user_session', $user_session);
     CI::library('session')->set_userdata('user', $other_user);
     $back_to = CI::model('core')->getParamFromURL('back_to');
     if ($back_to != '') {
         $back_to = base64_decode($back_to);
         if (trim($back_to) != '') {
             header('Location: ' . $back_to);
             exit;
         } else {
             redirect('dashboard');
         }
     } else {
         redirect('dashboard');
     }
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:36,代码来源:user.php


示例7: CTableInfo

$hostinvent_wdgt->addItem(BR());
$table = new CTableInfo(_('No hosts defined.'));
$table->setHeader(array(make_sorting_header($groupFieldTitle === '' ? _('Field') : $groupFieldTitle, 'inventory_field'), make_sorting_header(_('Host count'), 'host_count')));
// to show a report, we will need a host group and a field to aggregate
if ($pageFilter->groupsSelected && $groupFieldTitle !== '') {
    $options = array('output' => array('hostid', 'name'), 'selectInventory' => array($_REQUEST['groupby']), 'withInventory' => true);
    if ($pageFilter->groupid > 0) {
        $options['groupids'] = $pageFilter->groupid;
    }
    $hosts = API::Host()->get($options);
    // aggregating data by chosen field value
    $report = array();
    foreach ($hosts as $host) {
        if ($host['inventory'][$_REQUEST['groupby']] !== '') {
            $lowerValue = zbx_strtolower($host['inventory'][$_REQUEST['groupby']]);
            if (!isset($report[$lowerValue])) {
                $report[$lowerValue] = array('inventory_field' => $host['inventory'][$_REQUEST['groupby']], 'host_count' => 1);
            } else {
                $report[$lowerValue]['host_count'] += 1;
            }
        }
    }
    order_result($report, getPageSortField('host_count'), getPageSortOrder());
    foreach ($report as $rep) {
        $row = array(new CSpan($rep['inventory_field'], 'pre'), new CLink($rep['host_count'], 'hostinventories.php?filter_field=' . $_REQUEST['groupby'] . '&filter_field_value=' . urlencode($rep['inventory_field']) . '&filter_set=1&filter_exact=1' . url_param('groupid')));
        $table->addRow($row);
    }
}
$hostinvent_wdgt->addItem($table);
$hostinvent_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:hostinventoriesoverview.php


示例8: CTable

if (isset($service) && isset($_REQUEST['showgraph'])) {
    $table = new CTable(null, 'chart');
    $table->AddRow(new CImg('chart5.php?serviceid=' . $service['serviceid'] . url_param('path')));
    $table->Show();
} else {
    $query = 'SELECT DISTINCT s.serviceid, sl.servicedownid, sl_p.serviceupid as serviceupid, s.triggerid, ' . ' s.name as caption, s.algorithm, t.description, t.expression, s.sortorder, sl.linkid, s.showsla, s.goodsla, s.status ' . ' FROM services s ' . ' LEFT JOIN triggers t ON s.triggerid = t.triggerid ' . ' LEFT JOIN services_links sl ON  s.serviceid = sl.serviceupid and NOT(sl.soft=0) ' . ' LEFT JOIN services_links sl_p ON  s.serviceid = sl_p.servicedownid and sl_p.soft=0 ' . ' WHERE ' . DBin_node('s.serviceid') . ' AND (t.triggerid IS NULL OR ' . DBcondition('t.triggerid', $available_triggers) . ') ' . ' ORDER BY s.sortorder, sl_p.serviceupid, s.serviceid';
    $result = DBSelect($query);
    $services = array();
    $row = array('id' => 0, 'serviceid' => 0, 'serviceupid' => 0, 'caption' => S_ROOT_SMALL, 'status' => SPACE, 'reason' => SPACE, 'sla' => SPACE, 'sla2' => SPACE, 'graph' => SPACE, 'linkid' => '');
    $services[0] = $row;
    $now = time();
    while ($row = DBFetch($result)) {
        $row['id'] = $row['serviceid'];
        empty($row['serviceupid']) ? $row['serviceupid'] = '0' : '';
        empty($row['description']) ? $row['description'] = 'None' : '';
        $row['graph'] = new CLink(S_SHOW, "srv_status.php?serviceid=" . $row["serviceid"] . "&showgraph=1" . url_param('path'), "action");
        if (isset($row["triggerid"]) && !empty($row["triggerid"])) {
            $url = new CLink(expand_trigger_description($row['triggerid']), 'events.php?triggerid=' . $row['triggerid']);
            $row['caption'] = array($row['caption'] . ' [', $url, ']');
        }
        if ($row["status"] == 0 || isset($service) && bccomp($service["serviceid"], $row["serviceid"]) == 0) {
            $row['reason'] = '-';
        } else {
            $row['reason'] = '-';
            $result2 = DBselect('SELECT s.triggerid,s.serviceid ' . ' FROM services s, triggers t ' . ' WHERE s.status>0 ' . ' AND s.triggerid is not NULL ' . ' AND t.triggerid=s.triggerid ' . ' AND ' . DBcondition('t.triggerid', $available_triggers) . ' AND ' . DBin_node('s.serviceid') . ' ORDER BY s.status DESC, t.description');
            while ($row2 = DBfetch($result2)) {
                if (is_string($row['reason']) && $row['reason'] == '-') {
                    $row['reason'] = new CList(null, "itservices");
                }
                if (does_service_depend_on_the_service($row["serviceid"], $row2["serviceid"])) {
                    $row['reason']->AddItem(new CLink(expand_trigger_description($row2["triggerid"]), "events.php?triggerid=" . $row2["triggerid"]));
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:srv_status.php


示例9: CFormList

$itemFormList = new CFormList('itemFormList');
// append type to form list
$copyTypeComboBox = new CComboBox('copy_type', $this->data['copy_type'], 'submit()');
$copyTypeComboBox->addItem(0, _('Hosts'));
$copyTypeComboBox->addItem(1, _('Host groups'));
$itemFormList->addRow(_('Target type'), $copyTypeComboBox);
// append targets to form list
$targetList = array();
if ($this->data['copy_type'] == 0) {
    $groupComboBox = new CComboBox('copy_groupid', $this->data['copy_groupid'], 'submit()');
    foreach ($this->data['groups'] as $group) {
        $groupComboBox->addItem($group['groupid'], $group['name']);
    }
    $itemFormList->addRow(_('Group'), $groupComboBox);
    foreach ($this->data['hosts'] as $host) {
        array_push($targetList, array(new CCheckBox('copy_targetid[' . $host['hostid'] . ']', uint_in_array($host['hostid'], $this->data['copy_targetid']), null, $host['hostid']), SPACE, $host['name'], BR()));
    }
} else {
    foreach ($this->data['groups'] as $group) {
        array_push($targetList, array(new CCheckBox('copy_targetid[' . $group['groupid'] . ']', uint_in_array($group['groupid'], $this->data['copy_targetid']), null, $group['groupid']), SPACE, $group['name'], BR()));
    }
}
$itemFormList->addRow(_('Target'), !empty($targetList) ? $targetList : SPACE);
// append tabs to form
$itemTab = new CTabView();
$itemTab->addTab('itemTab', count($this->data['group_itemid']) . ' ' . _('elements copy to ...'), $itemFormList);
$itemForm->addItem($itemTab);
// append buttons to form
$itemForm->addItem(makeFormFooter(new CSubmit('copy', _('Copy')), new CButtonCancel(url_param('groupid') . url_param('hostid') . url_param('config'))));
$itemWidget->addItem($itemForm);
return $itemWidget;
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:configuration.item.copy.php


示例10: CForm

$imageForm = new CForm('post', null, 'multipart/form-data');
$imageForm->setName('imageForm');
$imageForm->addVar('form', $this->data['form']);
if (isset($this->data['imageid'])) {
    $imageForm->addVar('imageid', $this->data['imageid']);
}
$imageForm->addVar('imagetype', $this->data['imagetype']);
// append form list
$imageFormList = new CFormList('imageFormList');
$nameTextBox = new CTextBox('name', $this->data['imagename'], 64, false, 64);
$nameTextBox->attr('autofocus', 'autofocus');
$imageFormList->addRow(_('Name'), $nameTextBox);
$imageFormList->addRow(_('Upload'), new CFile('image'));
if (isset($this->data['imageid'])) {
    if ($this->data['imagetype'] == IMAGE_TYPE_BACKGROUND) {
        $imageFormList->addRow(_('Image'), new CLink(new CImg('imgstore.php?width=200&height=200&iconid=' . $this->data['imageid'], 'no image'), 'image.php?imageid=' . $this->data['imageid']));
    } else {
        $imageFormList->addRow(_('Image'), new CImg('imgstore.php?iconid=' . $this->data['imageid'], 'no image', null));
    }
}
// append tab
$imageTab = new CTabView();
$imageTab->addTab('imageTab', $this->data['imagetype'] == IMAGE_TYPE_ICON ? _('Icon') : _('Background'), $imageFormList);
$imageForm->addItem($imageTab);
// append buttons
if (isset($this->data['imageid'])) {
    $imageForm->addItem(makeFormFooter(new CSubmit('update', _('Update')), array(new CButtonDelete(_('Delete selected image?'), url_param('form') . url_param('imageid')), new CButtonCancel())));
} else {
    $imageForm->addItem(makeFormFooter(new CSubmit('add', _('Add')), new CButtonCancel()));
}
return $imageForm;
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:31,代码来源:administration.general.image.edit.php


示例11: dirname

if (!isset($params['id'])) {
    return;
}
require_once dirname(__FILE__) . DS . 'functions.php';
if (get_option('enable_comments', 'comments') == 'y') {
    $engine = get_option('engine', 'comments');
    if ($engine == 'disqus') {
        return include dirname(__FILE__) . DS . 'engines/disqus.php';
    } elseif ($engine == 'facebook') {
        return include dirname(__FILE__) . DS . 'engines/facebook.php';
    }
    $login_required = get_option('user_must_be_logged', 'comments') == 'y';
    $from_related_posts = false;
    $paging_param = $params['id'] . '_page';
    $current_page_from_url = url_param($paging_param);
    $data = $params;
    if (isset($params['content-id'])) {
        $data['rel_type'] = 'content';
        $data['rel_id'] = $params['content-id'];
    } elseif (isset($params['content_id'])) {
        $data['rel_type'] = 'content';
        $data['rel_id'] = $params['content_id'];
    }
    if (!isset($params['rel_type'])) {
        $data['rel_type'] = 'content';
    }
    if (!isset($data['rel_id']) and isset($params['content-id'])) {
        $data['rel_id'] = intval($params['content-id']);
        $data['rel_type'] = 'content';
    }
开发者ID:hyrmedia,项目名称:microweber,代码行数:30,代码来源:index.php


示例12: make_latest_data

function make_latest_data()
{
    global $USER_DETAILS;
    $available_hosts = get_accessible_hosts_by_user($USER_DETAILS, PERM_READ_ONLY, PERM_RES_IDS_ARRAY);
    while ($db_app = DBfetch($db_applications)) {
        $db_items = DBselect('SELECT DISTINCT i.* ' . ' FROM items i,items_applications ia' . ' WHERE ia.applicationid=' . $db_app['applicationid'] . ' AND i.itemid=ia.itemid' . ' AND i.status=' . ITEM_STATUS_ACTIVE . order_by('i.description,i.itemid,i.lastclock'));
        $app_rows = array();
        $item_cnt = 0;
        while ($db_item = DBfetch($db_items)) {
            $description = item_description($db_item);
            if (!zbx_empty($_REQUEST['select']) && !zbx_stristr($description, $_REQUEST['select'])) {
                continue;
            }
            ++$item_cnt;
            if (!uint_in_array($db_app['applicationid'], $_REQUEST['applications']) && !isset($show_all_apps)) {
                continue;
            }
            if (isset($db_item['lastclock'])) {
                $lastclock = date(S_DATE_FORMAT_YMDHMS, $db_item['lastclock']);
            } else {
                $lastclock = new CCol('-', 'center');
            }
            $lastvalue = format_lastvalue($db_item);
            if (isset($db_item['lastvalue']) && isset($db_item['prevvalue']) && $db_item['value_type'] == 0 && $db_item['lastvalue'] - $db_item['prevvalue'] != 0) {
                if ($db_item['lastvalue'] - $db_item['prevvalue'] < 0) {
                    $change = convert_units($db_item['lastvalue'] - $db_item['prevvalue'], $db_item['units']);
                } else {
                    $change = '+' . convert_units($db_item['lastvalue'] - $db_item['prevvalue'], $db_item['units']);
                }
                $change = nbsp($change);
            } else {
                $change = new CCol('-', 'center');
            }
            if ($db_item['value_type'] == ITEM_VALUE_TYPE_FLOAT || $db_item['value_type'] == ITEM_VALUE_TYPE_UINT64) {
                $actions = new CLink(S_GRAPH, 'history.php?action=showgraph&itemid=' . $db_item['itemid'], 'action');
            } else {
                $actions = new CLink(S_HISTORY, 'history.php?action=showvalues&period=3600&itemid=' . $db_item['itemid'], 'action');
            }
            array_push($app_rows, new CRow(array(is_show_all_nodes() ? SPACE : null, $_REQUEST['hostid'] > 0 ? NULL : SPACE, str_repeat(SPACE, 6) . $description, $lastclock, new CCol($lastvalue, $lastvalue == '-' ? 'center' : null), $change, $actions)));
        }
        if ($item_cnt > 0) {
            if (uint_in_array($db_app['applicationid'], $_REQUEST['applications']) || isset($show_all_apps)) {
                $link = new CLink(new CImg('images/general/opened.gif'), '?close=1&applicationid=' . $db_app['applicationid'] . url_param('groupid') . url_param('hostid') . url_param('applications') . url_param('select'));
            } else {
                $link = new CLink(new CImg('images/general/closed.gif'), '?open=1&applicationid=' . $db_app['applicationid'] . url_param('groupid') . url_param('hostid') . url_param('applications') . url_param('select'));
            }
            $col = new CCol(array($link, SPACE, bold($db_app['name']), SPACE . '(' . $item_cnt . SPACE . S_ITEMS . ')'));
            $col->setColSpan(5);
            $table->ShowRow(array(get_node_name_by_elid($db_app['hostid']), $_REQUEST['hostid'] > 0 ? NULL : $db_app['host'], $col));
            $any_app_exist = true;
            foreach ($app_rows as $row) {
                $table->ShowRow($row);
            }
        }
    }
}
开发者ID:phedders,项目名称:zabbix,代码行数:56,代码来源:blocks.inc.php


示例13: zbx_strtolower

                $hosts[$num]['pr_serialno_a'] = $host['inventory']['serialno_a'];
                $hosts[$num]['pr_tag'] = $host['inventory']['tag'];
                $hosts[$num]['pr_macaddress_a'] = $host['inventory']['macaddress_a'];
                // if we are filtering by inventory field
                if (!empty($_REQUEST['filter_field']) && !empty($_REQUEST['filter_field_value'])) {
                    // must we filter exactly or using a substring (both are case insensitive)
                    $match = $_REQUEST['filter_exact'] ? zbx_strtolower($hosts[$num]['inventory'][$_REQUEST['filter_field']]) === zbx_strtolower($_REQUEST['filter_field_value']) : zbx_strpos(zbx_strtolower($hosts[$num]['inventory'][$_REQUEST['filter_field']]), zbx_strtolower($_REQUEST['filter_field_value'])) !== false;
                    if (!$match) {
                        unset($hosts[$num]);
                    }
                }
            }
            order_result($hosts, getPageSortField('name'), getPageSortOrder());
            $paging = getPagingLine($hosts);
            foreach ($hosts as $host) {
                $host_groups = array();
                foreach ($host['groups'] as $group) {
                    $host_groups[] = $group['name'];
                }
                natsort($host_groups);
                $host_groups = implode(', ', $host_groups);
                $row = array(get_node_name_by_elid($host['hostid']), new CLink($host['name'], '?hostid=' . $host['hostid'] . url_param('groupid')), $host_groups, zbx_str2links($host['inventory']['name']), zbx_str2links($host['inventory']['type']), zbx_str2links($host['inventory']['os']), zbx_str2links($host['inventory']['serialno_a']), zbx_str2links($host['inventory']['tag']), zbx_str2links($host['inventory']['macaddress_a']));
                $table->addRow($row);
            }
        }
    }
    $table = array($paging, $table, $paging);
    $hostinvent_wdgt->addItem($table);
}
$hostinvent_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:hostinventories.php


示例14: CList

$controls = (new CList())->addItem([_('Group') . SPACE, $pageFilter->getGroupsCB()])->addItem([_('Grouping by') . SPACE, $inventoryFieldsComboBox]);
$hostinvent_wdgt->setControls((new CForm('get'))->addItem($controls));
$table = (new CTableInfo())->setHeader([make_sorting_header($groupFieldTitle === '' ? _('Field') : $groupFieldTitle, 'inventory_field', $sortField, $sortOrder), make_sorting_header(_('Host count'), 'host_count', $sortField, $sortOrder)]);
// to show a report, we will need a host group and a field to aggregate
if ($pageFilter->groupsSelected && $groupFieldTitle !== '') {
    $options = ['output' => ['hostid', 'name'], 'selectInventory' => [$_REQUEST['groupby']], 'withInventory' => true];
    if ($pageFilter->groupid > 0) {
        $options['groupids'] = $pageFilter->groupid;
    }
    $hosts = API::Host()->get($options);
    // aggregating data by chosen field value
    $report = [];
    foreach ($hosts as $host) {
        if ($host['inventory'][$_REQUEST['groupby']] !== '') {
            // same names with different letter casing are considered the same
            $lowerValue = mb_strtolower($host['inventory'][$_REQUEST['groupby']]);
            if (!isset($report[$lowerValue])) {
                $report[$lowerValue] = ['inventory_field' => $host['inventory'][$_REQUEST['groupby']], 'host_count' => 1];
            } else {
                $report[$lowerValue]['host_count'] += 1;
            }
        }
    }
    order_result($report, $sortField, $sortOrder);
    foreach ($report as $rep) {
        $table->addRow([zbx_str2links($rep['inventory_field']), new CLink($rep['host_count'], 'hostinventories.php?filter_field=' . $_REQUEST['groupby'] . '&filter_field_value=' . urlencode($rep['inventory_field']) . '&filter_set=1&filter_exact=1' . url_param('groupid'))]);
    }
}
$hostinvent_wdgt->addItem($table);
$hostinvent_wdgt->show();
require_once dirname(__FILE__) . '/include/page_footer.php';
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:31,代码来源:hostinventoriesoverview.php


示例15: function

?>
", function () {
            data = {};
            data.id = id
            $.post("<?php 
print api_link();
?>
delete_user", data, function () {
                _mw_admin_users_manage();
            });
        });
    }

</script>
    <?php 
$mw_notif = url_param('mw_notif');
if ($mw_notif != false) {
    $mw_notif = mw()->notifications_manager->read($mw_notif);
}
mw()->notifications_manager->mark_as_read('users');
?>
    <?php 
if (is_array($mw_notif) and isset($mw_notif['rel_id'])) {
    ?>
    <script type="text/javascript">
        $(document).ready(function () {
            mw.url.windowHashParam('edit-user', '<?php 
    print $mw_notif['rel_id'];
    ?>
');
            _mw_admin_user_edit();
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:admin.php


示例16: array

    }
    $frmHostG->addRow(S_HOSTS, $cmbHosts->Get(S_HOSTS . SPACE . S_IN, array(S_OTHER . SPACE . S_HOSTS . SPACE . '|' . SPACE . S_GROUP . SPACE, $cmbGroups)));
    $frmHostG->addItemToBottomRow(new CButton('save', S_SAVE));
    if ($groupid > 0) {
        $frmHostG->addItemToBottomRow(SPACE);
        $frmHostG->addItemToBottomRow(new CButton('clone', S_CLONE));
        $frmHostG->addItemToBottomRow(SPACE);
        $dltButton = new CButtonDelete('Delete selected group?', url_param('form') . url_param('config') . url_param('groupid'));
        $dlt_groups = getDeletableHostGroups($_REQUEST['groupid']);
        if (empty($dlt_groups)) {
            $dltButton->setAttribute('disabled', 'disabled');
        }
        $frmHostG->addItemToBottomRow($dltButton);
    }
    $frmHostG->addItemToBottomRow(SPACE);
    $frmHostG->addItemToBottomRow(new CButtonCancel(url_param('config')));
    $frmHostG->show();
} else {
    $config = select_config();
    $numrows = new CSpan(null, 'info');
    $numrows->setAttribute('name', 'numrows');
    $header = get_table_header(array(S_HOST_GROUPS_BIG, new CSpan(SPACE . SPACE . '|' . SPACE . SPACE, 'divider'), S_FOUND . ': ', $numrows));
    show_table_header($header);
    $form = new CForm('hostgroups.php');
    $form->setName('form_groups');
    $table = new CTableInfo(S_NO_HOST_GROUPS_DEFINED);
    $table->setHeader(array(new CCheckBox('all_groups', NULL, "checkAll('" . $form->GetName() . "','all_groups','groups');"), make_sorting_link(S_NAME, 'g.name'), ' # ', S_MEMBERS));
    $groups = CHostGroup::get(array('order' => 'name', 'editable' => 1, 'extendoutput' => 1, 'select_hosts' => 1));
    foreach ($groups as $groupid => $group) {
        $tpl_count = 0;
        $host_count = 0;
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:hostgroups.php


示例17: array

        $passwordField = array($passwordButton, $passwordBox);
    } else {
        $passwordField = new CPassBox('password', '', ZBX_TEXTBOX_SMALL_SIZE);
    }
    // append password field to form list
    if ($this->data['type'] == MEDIA_TYPE_JABBER) {
        $mediaTypeFormList->addRow(_('Jabber identifier'), new CTextBox('username', $this->data['username'], ZBX_TEXTBOX_STANDARD_SIZE));
        $mediaTypeFormList->addRow(_('Password'), $passwordField);
    } else {
        $mediaTypeFormList->addRow(_('Username'), new CTextBox('username', $this->data['username'], ZBX_TEXTBOX_STANDARD_SIZE));
        $mediaTypeFormList->addRow(_('Password'), $passwordField);
        $limitCb = new CComboBox('exec_path', $this->data['exec_path']);
        $limitCb->addItems(array(EZ_TEXTING_LIMIT_USA => _('USA (160 characters)'), EZ_TEXTING_LIMIT_CANADA => _('Canada (136 characters)')));
        $mediaTypeFormList->addRow(_('Message text limit'), $limitCb);
    }
}
$mediaTypeFormList->addRow(_('Enabled'), new CCheckBox('status', MEDIA_TYPE_STATUS_ACTIVE == $this->data['status'], null, MEDIA_TYPE_STATUS_ACTIVE));
// append form list to tab
$mediaTypeTab = new CTabView();
$mediaTypeTab->addTab('mediaTypeTab', _('Media type'), $mediaTypeFormList);
// append tab to form
$mediaTypeForm->addItem($mediaTypeTab);
// append buttons to form
if (!empty($this->data['mediatypeid'])) {
    $mediaTypeForm->addItem(makeFormFooter(new CSubmit('update', _('Update')), array(new CButtonDelete(_('Delete selected media type?'), url_param('form') . url_param('mediatypeid') . url_param('config')), new CButtonCancel(url_param('config')))));
} else {
    $mediaTypeForm->addItem(makeFormFooter(new CSubmit('add', _('Add')), new CButtonCancel(url_param('config'))));
}
// append form to widget
$mediaTypeWidget->addItem($mediaTypeForm);
return $mediaTypeWidget;
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:31,代码来源:administration.mediatypes.edit.php


示例18: array_push

    }
    array_push($app_rows, new CRow(array(is_show_subnodes() ? $db_host['item_cnt'] ? SPACE : get_node_name_by_elid($db_item['itemid']) : null, $_REQUEST['hostid'] ? NULL : ($db_host['item_cnt'] ? SPACE : $db_item['host']), str_repeat(SPACE, 6) . $description, $lastclock, new CCol($lastvalue), $change, $actions)));
}
unset($app_rows);
unset($db_host);
foreach ($db_hosts as $hostid => $db_host) {
    if (!isset($tab_rows[$hostid])) {
        continue;
    }
    $app_rows = $tab_rows[$hostid];
    if (uint_in_array(0, $_REQUEST['applications']) || isset($show_all_apps)) {
        $url = '?close=1&applicationid=0' . url_param('groupid') . url_param('hostid') . url_param('applications') . url_param('select');
        $link = new CLink(new CImg('images/general/opened.gif'), $url);
        //			$link = new CLink(new CImg('images/general/opened.gif'),$url,null,"javascript: return updater.onetime_update('".ZBX_PAGE_MAIN_HAT."','".$url."');");
    } else {
        $url = '?open=1&applicationid=0' . url_param('groupid') . url_param('hostid') . url_param('applications') . url_param('select');
        $link = new CLink(new CImg('images/general/closed.gif'), $url);
        //			$link = new CLink(new CImg('images/general/closed.gif'),$url,null,"javascript: return updater.onetime_update('".ZBX_PAGE_MAIN_HAT."','".$url."');");
    }
    $col = new CCol(array($link, SPACE, bold(S_MINUS_OTHER_MINUS), SPACE . '(' . $db_host['item_cnt'] . SPACE . S_ITEMS . ')'));
    $col->SetColSpan(5);
    $table->AddRow(array(get_node_name_by_elid($db_host['hostid']), $_REQUEST['hostid'] > 0 ? NULL : $db_host['host'], $col));
    foreach ($app_rows as $row) {
        $table->AddRow($row);
    }
}
$p_elements[] = $table;
/*
// Refresh tab
	$refresh_tab = array(
		array('id'	=> ZBX_PAGE_MAIN_HAT,
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:latest.php


示例19: _

    $interfaceTable->addRow(array(_('IP address'), _('DNS name'), _('Connect to'), _('Port')));
    $connectByComboBox = new CRadioButtonList('interface[useip]', $this->data['interface']['useip']);
    $connectByComboBox->addValue(_('IP'), 1);
    $connectByComboBox->addValue(_('DNS'), 0);
    $connectByComboBox->useJQueryStyle();
    $interfaceTable->addRow(array(new CTextBox('interface[ip]', $this->data['interface']['ip'], ZBX_TEXTBOX_SMALL_SIZE, 'no', 64), new CTextBox('interface[dns]', $this->data['interface']['dns'], ZBX_TEXTBOX_SMALL_SIZE, 'no', 64), $connectByComboBox, new CTextBox('interface[port]', $this->data['interface']['port'], 18, 'no', 64)));
    $proxyFormList->addRow(_('Interface'), new CDiv($interfaceTable, 'objectgroup inlineblock border_dotted ui-corner-all'));
}
// append hosts to form list
$hostsTweenBox = new CTweenBox($proxyForm, 'hosts', $this->data['hosts']);
foreach ($this->data['dbHosts'] as $host) {
    // show only normal hosts, and discovered hosts monitored by the current proxy
    // for new proxies display only normal hosts
    if ($this->data['proxyid'] && idcmp($this->data['proxyid'], $host['proxy_hostid']) || $host['flags'] == ZBX_FLAG_DISCOVERY_NORMAL) {
        $hostsTweenBox->addItem($host['hostid'], $host['name'], null, empty($host['proxy_hostid']) || !empty($this->data['proxyid']) && bccomp($host['proxy_hostid'], $this->data['proxyid']) == 0 && $host['flags'] == ZBX_FLAG_DISCOVERY_NORMAL);
    }
}
$proxyFormList->addRow(_('Hosts'), $hostsTweenBox->get(_('Proxy hosts'), _('Other hosts')));
// append tabs to form
$proxyTab = new CTabView();
$proxyTab->addTab('proxyTab', _('Proxy'), $proxyFormList);
$proxyForm->addItem($proxyTab);
// append buttons to form
if (!empty($this->data['proxyid'])) {
    $proxyForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), array(new CSubmit('clone', _('Clone')), new CButtonDelete(_('Delete proxy?'), url_param('form') . url_param('proxyid')), new CButtonCancel())));
} else {
    $proxyForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButtonCancel()));
}
// append form to widget
$proxyWidget->addItem($proxyForm);
return $proxyWidget;
开发者ID:itnihao,项目名称:Zabbix_,代码行数:31,代码来源:administration.proxy.edit.php


示例20: array

                $users_id = array();
                $db_users = DBselect('SELECT DISTINCT u.alias,u.userid ' . ' FROM users u,users_groups ug ' . ' WHERE u.userid=ug.userid ' . ' AND ug.usrgrpid=' . $row['usrgrpid'] . ' ORDER BY u.alias');
                while ($db_user = DBfetch($db_users)) {
                    if (!empty($users)) {
                        $users[$db_user['userid']][] = ', ';
                    } else {
                        $users[$db_user['userid']] = array();
                    }
                    $users[$db_user['userid']][] = new Clink($db_user['alias'], 'users.php?form=update&config=0&userid=' . $db_user['userid'] . '#form');
                }
                $gui_access = user_auth_type2str($row['gui_access']);
                $users_status = $row['users_status'] == GROUP_STATUS_ENABLED ? S_ENABLED : S_DISABLED;
                if (granted2update_group($row['usrgrpid'])) {
                    $next_gui_auth = $row['gui_access'] + 1 > GROUP_GUI_ACCESS_DISABLED ? GROUP_GUI_ACCESS_SYSTEM : $row['gui_access'] + 1;
                    $gui_access = new CLink($gui_access, 'users.php?form=update' . '&set_gui_access=' . $next_gui_auth . '&usrgrpid=' . $row['usrgrpid'] . url_param('config'), $row['gui_access'] == GROUP_GUI_ACCESS_DISABLED ? 'orange' : 'enabled');
                    $users_status = new CLink($users_status, 'users.php?form=update' . '&set_users_status=' . ($row['users_status'] == GROUP_STATUS_ENABLED ? GROUP_STATUS_DISABLED : GROUP_STATUS_ENABLED) . '&usrgrpid=' . $row['usrgrpid'] . url_param('config'), $row['users_status'] == GROUP_STATUS_ENABLED ? 'enabled' : 'disabled');
                } else {
                    $gui_access = new CSpan($gui_access, $row['gui_access'] == GROUP_GUI_ACCESS_DISABLED ? 'orange' : 'green');
                    $users_status = new CSpan($users_status, $row['users_status'] == GROUP_STATUS_ENABLED ? 'green' : 'red');
                }
                $table->addRow(array($users_status, $gui_access, array(new CCheckBox('group_groupid[' . $row['usrgrpid'] . ']', NULL, NULL, $row['usrgrpid']), $alias = new CLink($row['name'], 'users.php?form=update' . url_param('config') . '&usrgrpid=' . $row['usrgrpid'] . '#form', 'action')), new CCol($users, 'wraptext')));
                $row_count++;
            }
            $table->SetFooter(new CCol(new CButtonQMessage('delete_selected', S_DELETE_SELECTED, S_DELETE_SELECTED_GROUPS_Q)));
            $form->AddItem($table);
            $form->Show();
        }
    }
}
zbx_add_post_js('insert_in_element("numrows","' . $row_count . '");');
include_once 'include/page_footer.php';
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:users.php



注:本文中的url_param函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP url_params函数代码示例发布时间:2022-05-23
下一篇:
PHP url_par函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap