当前位置: 首页>>代码示例>>PHP>>正文


PHP show_table_header函数代码示例

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


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

示例1: show_report2_header

function show_report2_header($config, &$PAGE_GROUPS, &$PAGE_HOSTS)
{
    global $USER_DETAILS;
    $available_groups = $PAGE_GROUPS['groupids'];
    $available_hosts = $PAGE_HOSTS['hostids'];
    //	$available_groups = $PAGE_GROUPS['groupids'];
    //	$available_hosts = $PAGE_HOSTS['hostids'];
    $r_form = new CForm();
    $r_form->setMethod('get');
    $cmbConf = new CComboBox('config', $config, 'submit()');
    $cmbConf->addItem(0, S_BY_HOST);
    $cmbConf->addItem(1, S_BY_TRIGGER_TEMPLATE);
    $r_form->addItem(array(S_MODE . SPACE, $cmbConf, SPACE));
    $cmbGroups = new CComboBox('groupid', $PAGE_GROUPS['selected'], 'javascript: submit();');
    $cmbHosts = new CComboBox('hostid', $PAGE_HOSTS['selected'], 'javascript: submit();');
    foreach ($PAGE_GROUPS['groups'] as $groupid => $name) {
        $cmbGroups->addItem($groupid, get_node_name_by_elid($groupid) . $name);
    }
    foreach ($PAGE_HOSTS['hosts'] as $hostid => $name) {
        $cmbHosts->addItem($hostid, get_node_name_by_elid($hostid) . $name);
    }
    $r_form->addItem(array(S_GROUP . SPACE, $cmbGroups));
    $r_form->addItem(array(SPACE . S_HOST . SPACE, $cmbHosts));
    if (1 == $config) {
        $cmbTrigs = new CComboBox('tpl_triggerid', get_request('tpl_triggerid', 0), 'submit()');
        $cmbHGrps = new CComboBox('hostgroupid', get_request('hostgroupid', 0), 'submit()');
        $cmbTrigs->addItem(0, S_ALL_SMALL);
        $cmbHGrps->addItem(0, S_ALL_SMALL);
    }
    if (0 == $config) {
        show_table_header(S_AVAILABILITY_REPORT_BIG, $r_form);
    } else {
        $sql_cond = ' AND h.hostid=ht.hostid ';
        if ($_REQUEST['hostid'] > 0) {
            $sql_cond .= ' AND ht.templateid=' . $_REQUEST['hostid'];
        }
        if (isset($_REQUEST['tpl_triggerid']) && $_REQUEST['tpl_triggerid'] > 0) {
            $sql_cond .= ' AND t.templateid=' . $_REQUEST['tpl_triggerid'];
        }
        $result = DBselect('SELECT DISTINCT g.groupid,g.name ' . ' FROM triggers t,hosts h,items i,functions f, hosts_templates ht, groups g, hosts_groups hg ' . ' WHERE f.itemid=i.itemid ' . ' AND h.hostid=i.hostid ' . ' AND hg.hostid=h.hostid' . ' AND g.groupid=hg.groupid ' . ' AND ' . DBcondition('h.hostid', $available_hosts) . ' AND t.status=' . TRIGGER_STATUS_ENABLED . ' AND t.triggerid=f.triggerid ' . ' AND ' . DBin_node('t.triggerid') . ' AND i.status=' . ITEM_STATUS_ACTIVE . ' AND h.status=' . HOST_STATUS_MONITORED . $sql_cond . ' ORDER BY g.name');
        while ($row = DBfetch($result)) {
            $cmbHGrps->addItem($row['groupid'], get_node_name_by_elid($row['groupid']) . $row['name']);
        }
        $sql_cond = $_REQUEST['hostid'] > 0 ? ' AND h.hostid=' . $_REQUEST['hostid'] : ' AND ' . DBcondition('h.hostid', $available_hosts);
        $sql = 'SELECT DISTINCT t.triggerid,t.description ' . ' FROM triggers t,hosts h,items i,functions f ' . ' WHERE f.itemid=i.itemid ' . ' AND h.hostid=i.hostid ' . ' AND t.status=' . TRIGGER_STATUS_ENABLED . ' AND t.triggerid=f.triggerid ' . ' AND h.status=' . HOST_STATUS_TEMPLATE . ' AND ' . DBin_node('t.triggerid') . ' AND i.status=' . ITEM_STATUS_ACTIVE . $sql_cond . ' ORDER BY t.description';
        $result = DBselect($sql);
        while ($row = DBfetch($result)) {
            $cmbTrigs->addItem($row['triggerid'], get_node_name_by_elid($row['triggerid']) . expand_trigger_description($row['triggerid']));
        }
        $rr_form = new CForm();
        $rr_form->setMethod('get');
        $rr_form->addVar('config', $config);
        $rr_form->addVar('groupid', $_REQUEST['groupid']);
        $rr_form->addVar('hostid', $_REQUEST['hostid']);
        $rr_form->addItem(array(S_TRIGGER . SPACE, $cmbTrigs, BR(), S_FILTER, SPACE, S_HOST_GROUP . SPACE, $cmbHGrps));
        show_table_header(S_AVAILABILITY_REPORT_BIG, array($r_form, $rr_form));
    }
}
开发者ID:rennhak,项目名称:zabbix,代码行数:58,代码来源:reports.inc.php

示例2: CCol

        $status['style'] = 'unknown';
    } else {
        if ($httptest_data['lastfailedstep'] > 0) {
            $status['msg'] = S_FAIL . ' - ' . S_ERROR . ': ' . $httptest_data['error'];
            $status['style'] = 'disabled';
        }
    }
}
$table->AddRow(array(new CCol(S_TOTAL_BIG, 'bold'), new CCol(SPACE, 'bold'), new CCol(format_lastvalue($total_data[HTTPSTEP_ITEM_TYPE_TIME]), 'bold'), new CCol(SPACE, 'bold'), new CCol(new CSpan($status['msg'], $status['style']), 'bold')));
$table->Show();
echo SBR;
if (isset($_REQUEST['period']) && $_REQUEST['period'] != ZBX_MIN_PERIOD) {
    update_profile('web.httptest.period', $_REQUEST['period'], PROFILE_TYPE_INT, $_REQUEST['httptestid']);
}
$_REQUEST['period'] = get_profile('web.httptest.period', ZBX_PERIOD_DEFAULT, PROFILE_TYPE_INT, $_REQUEST['httptestid']);
show_table_header(array(S_HISTORY . ' "', bold($httptest_data['name']), '"'));
$form = new CTableInfo();
$form->AddOption('id', 'graph');
$form->AddRow(array(bold(S_SPEED), new CCol(get_dynamic_chart('graph_1', 'chart3.php?' . url_param('period') . url_param('from') . url_param($httptest_data['name'], false, 'name') . url_param(150, false, 'height') . url_param(get_request('stime', 0), false, 'stime') . url_param($items[HTTPSTEP_ITEM_TYPE_IN], false, 'items') . url_param(GRAPH_TYPE_STACKED, false, 'graphtype'), '-128'), 'center')));
$form->AddRow(array(bold(S_RESPONSE_TIME), new CCol(get_dynamic_chart('graph_2', 'chart3.php?' . url_param('period') . url_param('from') . url_param($httptest_data['name'], false, 'name') . url_param(150, false, 'height') . url_param(get_request('stime', 0), false, 'stime') . url_param($items[HTTPSTEP_ITEM_TYPE_TIME], false, 'items') . url_param(GRAPH_TYPE_STACKED, false, 'graphtype'), '-128'), 'center')));
$form->Show();
$period = get_request('period', 3600);
//SDI(get_min_itemclock_by_itemid($items[HTTPSTEP_ITEM_TYPE_IN][0]['itemid']));
$mstime = min(get_min_itemclock_by_itemid($items[HTTPSTEP_ITEM_TYPE_IN][0]['itemid']), get_min_itemclock_by_itemid($items[HTTPSTEP_ITEM_TYPE_TIME][0]['itemid']));
$stime = $mstime ? $mstime : 0;
$bstime = time() - $period;
if (isset($_REQUEST['stime'])) {
    $bstime = $_REQUEST['stime'];
    $bstime = mktime(substr($bstime, 8, 2), substr($bstime, 10, 2), 0, substr($bstime, 4, 2), substr($bstime, 6, 2), substr($bstime, 0, 4));
}
$script = 'scrollinit(0,' . $period . ',' . $stime . ',0,' . $bstime . ');
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:httpdetails.php

示例3: printf

}
if ($action == "modifytemplates") {
    if ($msg != "") {
        printf("<p><b>%s</b></p>\n", $msg);
    }
    show_table_header($lang['edit_templates'], 2);
    show_theme_select_row($lang['choose_theme']);
    if ($themes_found) {
        show_template_select_row($lang['choose_template'], $template_folder);
    }
    show_table_footer();
    if (!isset($content)) {
        $content = "";
    }
    show_form_header("templates.php", "savetemplate");
    show_table_header($lang['edit_template'] . ": " . $template_file_name, 1);
    echo "<tr class=\"tablerow\"><td>";
    ?>
  <style>
  .template_textarea {
    width: 100%;
  }
  </style>
  <?php 
    echo "<textarea name=\"content\" cols=\"60\" rows=\"30\" wrap=\"off\" class=\"template_textarea\">";
    echo htmlspecialchars($content);
    echo "</textarea>";
    show_hidden_input("template_file_name", $template_file_name);
    show_hidden_input("template_folder", $template_folder);
    show_form_footer($lang['save_changes'], "", 1);
}
开发者ID:abhinay100,项目名称:fourimages_app,代码行数:31,代码来源:templates.php

示例4: DBselect

                                $sec_600[$row['proxy_hostid']]++;
                            } else {
                                $sec_rest[$row['proxy_hostid']]++;
                            }
                        }
                    }
                }
            }
        }
        $table->setHeader(array(S_PROXY, S_5_SECONDS, S_10_SECONDS, S_30_SECONDS, S_1_MINUTE, S_5_MINUTES, S_MORE_THAN_10_MINUTES));
        $db_proxies = DBselect('select hostid,host from hosts where status=' . HOST_STATUS_PROXY . ' order by host');
        while (null != ($db_proxy = DBfetch($db_proxies))) {
            $elements = array($db_proxy['host'], new CCol($sec_10[$db_proxy['hostid']], $sec_10[$db_proxy['hostid']] ? "unknown_trigger" : "normal"), new CCol($sec_30[$db_proxy['hostid']], $sec_30[$db_proxy['hostid']] ? "information" : "normal"), new CCol($sec_60[$db_proxy['hostid']], $sec_60[$db_proxy['hostid']] ? "warning" : "normal"), new CCol($sec_300[$db_proxy['hostid']], $sec_300[$db_proxy['hostid']] ? "average" : "normal"), new CCol($sec_600[$db_proxy['hostid']], $sec_600[$db_proxy['hostid']] ? "high" : "normal"), new CCol($sec_rest[$db_proxy['hostid']], $sec_rest[$db_proxy['hostid']] ? "disaster" : "normal"));
            $table->addRow($elements);
        }
        $elements = array(new CCol(S_SERVER, 'bold'), new CCol($sec_10[0], $sec_10[0] ? 'unknown_trigger' : 'normal'), new CCol($sec_30[0], $sec_30[0] ? 'information' : 'normal'), new CCol($sec_60[0], $sec_60[0] ? 'warning' : 'normal'), new CCol($sec_300[0], $sec_300[0] ? 'average' : 'normal'), new CCol($sec_600[0], $sec_600[0] ? 'high' : 'normal'), new CCol($sec_rest[0], $sec_rest[0] ? 'disaster' : 'normal'));
        $table->addRow($elements);
    } else {
        if ($_REQUEST["show"] == 2) {
            $table->SetHeader(array(S_NEXT_CHECK, is_show_subnodes() ? S_NODE : null, S_HOST, S_DESCRIPTION));
            while ($row = DBfetch($result)) {
                $table->AddRow(array(date("m.d.Y H:i:s", $row["nextcheck"]), get_node_name_by_elid($row['hostid']), $row['host'], item_description($row)));
            }
        }
    }
}
$table->Show();
if ($_REQUEST["show"] != 0) {
    show_table_header(S_TOTAL . ": " . $table->GetNumRows());
}
include_once "include/page_footer.php";
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:queue.php

示例5: CForm

    }
}
$form = new CForm();
$form->SetMethod('get');
$form->AddItem(new CButton("form", S_CREATE_MAP));
show_table_header(S_CONFIGURATION_OF_NETWORK_MAPS, $form);
echo SBR;
if (isset($_REQUEST["form"])) {
    insert_map_form();
} else {
    $form = new CForm();
    $form->setName('frm_maps');
    $numrows = new CSpan(null, 'info');
    $numrows->setAttribute('name', 'numrows');
    $header = get_table_header(array(S_MAPS_BIG, new CSpan(SPACE . SPACE . '|' . SPACE . SPACE, 'divider'), S_FOUND . ': ', $numrows));
    show_table_header($header);
    $table = new CTableInfo(S_NO_MAPS_DEFINED);
    $table->SetHeader(array(new CCheckBox('all_maps', NULL, "checkAll('" . $form->getName() . "','all_maps','maps');"), make_sorting_link(S_NAME, 'sm.name'), make_sorting_link(S_WIDTH, 'sm.width'), make_sorting_link(S_HEIGHT, 'sm.height'), S_MAP));
    $result = DBselect('SELECT sm.sysmapid,sm.name,sm.width,sm.height ' . ' FROM sysmaps sm' . ' WHERE ' . DBin_node('sm.sysmapid') . order_by('sm.name,sm.width,sm.height', 'sm.sysmapid'));
    while ($row = DBfetch($result)) {
        if (!sysmap_accessible($row["sysmapid"], PERM_READ_WRITE)) {
            continue;
        }
        $table->AddRow(array(new CCheckBox('maps[' . $row['sysmapid'] . ']', NULL, NULL, $row['sysmapid']), new CLink($row["name"], "sysmaps.php?form=update" . "&sysmapid=" . $row["sysmapid"] . "#form", 'action'), $row["width"], $row["height"], new CLink(S_EDIT, "sysmap.php?sysmapid=" . $row["sysmapid"])));
    }
    //----- GO ------
    $goBox = new CComboBox('go');
    $goBox->addItem('delete', S_DELETE_SELECTED);
    // goButton name is necessary!!!
    $goButton = new CButton('goButton', S_GO . ' (0)');
    $goButton->setAttribute('id', 'goButton');
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:sysmaps.php

示例6: array

$page["title"] = "S_TRIGGER_COMMENTS";
$page["file"] = "tr_comments.php";
include_once "include/page_header.php";
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array("triggerid" => array(T_ZBX_INT, O_MAND, P_SYS, DB_ID, null), "comments" => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), "save" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), "cancel" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null));
check_fields($fields);
$sql = 'SELECT * ' . ' FROM items i, functions f ' . ' WHERE i.itemid=f.itemid ' . ' AND f.triggerid=' . $_REQUEST['triggerid'] . ' AND ' . DBin_node('f.triggerid');
if (!($db_data = DBfetch(DBselect($sql)))) {
    fatal_error(S_NO_TRIGGER_DEFINED);
}
$available_triggers = get_accessible_triggers(PERM_READ_ONLY, array($db_data['hostid']));
if (!isset($available_triggers[$_REQUEST['triggerid']])) {
    access_deny();
}
$trigger_hostid = $db_data['hostid'];
if (isset($_REQUEST["save"])) {
    $result = update_trigger_comments($_REQUEST["triggerid"], $_REQUEST["comments"]);
    show_messages($result, S_COMMENT_UPDATED, S_CANNOT_UPDATE_COMMENT);
    if ($result) {
        add_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_TRIGGER, S_TRIGGER . " [" . $_REQUEST["triggerid"] . "] [" . expand_trigger_description($_REQUEST["triggerid"]) . "] " . S_COMMENTS . " [" . $_REQUEST["comments"] . "]");
    }
} else {
    if (isset($_REQUEST["cancel"])) {
        redirect('tr_status.php?hostid=' . $trigger_hostid);
        exit;
    }
}
show_table_header(S_TRIGGER_COMMENTS_BIG);
echo SBR;
insert_trigger_comment_form($_REQUEST["triggerid"]);
include_once "include/page_footer.php";
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:tr_comments.php

示例7: format_file_size

     if (!empty($global_info['database_size']['4images'])) {
         $db_status = $lang['homestats_total'] . " <b>" . format_file_size($global_info['database_size']['total']) . "</b> / ";
         $db_status .= "4images:&nbsp;<b>" . format_file_size($global_info['database_size']['4images']) . "</b>";
     } else {
         $db_status = format_file_size(!empty($global_info['database_size']['total']));
     }
 } else {
     $db_status = "n/a";
 }
 echo $db_status . "</td>\n";
 echo "</tr>";
 show_table_footer();
 $sql = "SELECT SUM(cat_hits) AS sum\n          FROM " . CATEGORIES_TABLE;
 $row = $site_db->query_firstrow($sql);
 $sum = isset($row['sum']) ? $row['sum'] : 0;
 show_table_header($lang['top_cat_hits'] . " (" . $lang['homestats_total'] . " " . $sum . ")", 4);
 $sql = "SELECT cat_id, cat_name, cat_hits\n          FROM " . CATEGORIES_TABLE . "\n          ORDER BY cat_hits DESC\n          LIMIT {$stats_limit}";
 $result = $site_db->query($sql);
 $num = 1;
 while ($row = $site_db->fetch_array($result)) {
     if ($num == 1) {
         $max = $row['cat_hits'];
         if ($max == 0) {
             $max = 1;
         }
     }
     echo "<tr class=\"" . get_row_bg() . "\">\n";
     echo "<td>&nbsp;" . $num . ".</td>\n<td nowrap=\"nowrap\"><b><a href=\"" . $site_sess->url(ROOT_PATH . "categories.php?" . URL_CAT_ID . "=" . $row['cat_id']) . "\" target=\"_blank\">" . format_text($row['cat_name'], 2) . "</a></b></td>\n\n";
     $per = intval($row['cat_hits'] / $max * 100);
     echo "<td width=\"100%\">\n";
     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\" width=\"100%\"><tr><td bgcolor=\"#FFFFFF\">\n";
开发者ID:abhinay100,项目名称:fourimages_app,代码行数:31,代码来源:home.php

示例8: show_messages

show_messages();
$config = select_config();
switch ($config['authentication_type']) {
    case ZBX_AUTH_INTERNAL:
        $auth = S_ZABBIX_INTERNAL_AUTH;
        break;
    case ZBX_AUTH_LDAP:
        $auth = S_LDAP_AUTH;
        break;
    case ZBX_AUTH_HTTP:
        $auth = S_HTTP_AUTH;
        break;
    default:
        $auth = '';
}
show_table_header(S_AUTHENTICATION_TO_ZABBIX, $auth);
if (ZBX_AUTH_INTERNAL == $_REQUEST['config']) {
    $form_refresh_internal = get_request('form_refresh_internal', 0);
    $form_refresh_internal++;
    $frmAuth = new CFormTable(S_ZABBIX_INTERNAL_AUTH, 'authentication.php');
    $frmAuth->setHelp('web.authentication.php');
    $frmAuth->addVar('form_refresh_internal', $form_refresh_internal);
    $cmbConfig = new CCombobox('config', ZBX_AUTH_INTERNAL, 'submit()');
    $cmbConfig->addItem(ZBX_AUTH_INTERNAL, S_INTERNAL_S);
    $cmbConfig->addItem(ZBX_AUTH_LDAP, S_LDAP);
    $cmbConfig->addItem(ZBX_AUTH_HTTP, S_HTTP);
    $frmAuth->addRow(S_DEFAULT_AUTHENTICATION, $cmbConfig);
    $action = "javascript: if(confirm('" . S_SWITCHING_HTTP . "')) return true; else return false;";
    $frmAuth->addRow(S_ZABBIX_INTERNAL_AUTH . SPACE . S_ENABLED, new CCheckBox('authentication_type', ZBX_AUTH_INTERNAL == $config['authentication_type'], $action, ZBX_AUTH_INTERNAL));
    $frmAuth->addItemToBottomRow(new CButton('save', S_SAVE));
    $frmAuth->Show();
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:authentication.php

示例9: redirect

        if (in_array($_REQUEST['backurl'], array('tr_events.php', 'events.php'))) {
            redirect($_REQUEST['backurl'] . '?eventid=' . $_REQUEST['eventid'] . '&triggerid=' . $_REQUEST['triggerid']);
        } elseif ($_REQUEST['backurl'] == 'screenedit.php') {
            redirect($_REQUEST['backurl'] . '?screenid=' . $_REQUEST['screenid']);
        } elseif ($_REQUEST['backurl'] == 'screens.php') {
            redirect($_REQUEST['backurl'] . '?elementid=' . $_REQUEST['screenid']);
        } else {
            redirect($_REQUEST['backurl']);
        }
    }
}
ob_end_flush();
/*
 * Display
 */
show_table_header(array(_('ALARM ACKNOWLEDGES') . NAME_DELIMITER, $bulk ? ' BULK ACKNOWLEDGE ' : $eventTriggerName));
echo SBR;
if ($bulk) {
    $title = _('Acknowledge alarm by');
    $saveAndReturnLabel = _('Acknowledge and return');
} else {
    $acknowledges = DBselect('SELECT a.*,u.alias,u.name,u.surname' . ' FROM acknowledges a' . ' LEFT JOIN users u ON u.userid=a.userid' . ' WHERE a.eventid=' . zbx_dbstr($_REQUEST['eventid']));
    if ($acknowledges) {
        $acknowledgesTable = new CTable(null, 'ack_msgs');
        $acknowledgesTable->setAlign('center');
        while ($acknowledge = DBfetch($acknowledges)) {
            $acknowledgesTable->addRow(array(new CCol(getUserFullname($acknowledge), 'user'), new CCol(zbx_date2str(_('d M Y H:i:s'), $acknowledge['clock']), 'time')), 'title');
            $acknowledgesTable->addRow(new CCol(zbx_nl2br($acknowledge['message']), null, 2), 'msg');
        }
        $acknowledgesTable->show();
    }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:31,代码来源:acknow.php

示例10: CForm

}
$form = new CForm();
$form->SetMethod('get');
$form->AddVar("serviceid", $_REQUEST["serviceid"]);
$cmbPeriod = new CComboBox("period", $period, "submit();");
$cmbPeriod->AddItem("dayly", S_DAILY);
$cmbPeriod->AddItem("weekly", S_WEEKLY);
$cmbPeriod->AddItem("monthly", S_MONTHLY);
$cmbPeriod->AddItem("yearly", S_YEARLY);
$form->AddItem(array(SPACE . S_PERIOD . SPACE, $cmbPeriod));
$cmbYear = new CComboBox("year", $year, "submit();");
for ($y = date("Y") - YEAR_LEFT_SHIFT; $y <= date("Y"); $y++) {
    $cmbYear->AddItem($y, $y);
}
$form->AddItem(array(SPACE . S_YEAR . SPACE, $cmbYear));
show_table_header(array(S_IT_SERVICES_AVAILABILITY_REPORT_BIG, SPACE . "\"", new CLink($service["name"], "srv_status.php?serviceid=" . $service["serviceid"]), "\""), $form);
$table = new CTableInfo();
$header = array(S_OK, S_PROBLEMS, S_DOWNTIME, S_PERCENTAGE, S_SLA);
switch ($period) {
    case "yearly":
        $from = date("Y") - YEAR_LEFT_SHIFT;
        $to = date("Y");
        array_unshift($header, new CCol(S_YEAR, "center"));
        function get_time($y)
        {
            return mktime(0, 0, 0, 1, 1, $y);
        }
        function format_time($t)
        {
            return date("Y", $t);
        }
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:report3.php

示例11: array

/*
** ZABBIX
** Copyright (C) 2000-2008 SIA Zabbix
**
** 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., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
require_once "include/config.inc.php";
require_once "include/blocks.inc.php";
$page["title"] = "S_STATUS_OF_ZABBIX";
$page["file"] = "report1.php";
$page['hist_arg'] = array();
include_once "include/page_header.php";
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array();
check_fields($fields);
show_table_header(S_STATUS_OF_ZABBIX_BIG);
$status = make_status_of_zbx();
$status->show();
include_once "include/page_footer.php";
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:report1.php

示例12: access_deny

    access_deny();
}
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array('password1' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})&&isset({form})&&({form}!="update")&&isset({change_password})'), 'password2' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})&&isset({form})&&({form}!="update")&&isset({change_password})'), 'lang' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'), 'theme' => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'), 'autologin' => array(T_ZBX_INT, O_OPT, null, IN('0,1'), null), 'autologout' => array(T_ZBX_INT, O_OPT, null, BETWEEN(90, 10000), null), 'url' => array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'), 'refresh' => array(T_ZBX_INT, O_OPT, null, BETWEEN(0, 3600), 'isset({save})'), 'change_password' => array(T_ZBX_STR, O_OPT, null, null, null), 'save' => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), 'cancel' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'form_refresh' => array(T_ZBX_STR, O_OPT, null, null, null));
check_fields($fields);
if (isset($_REQUEST['cancel'])) {
    $url = get_profile('web.menu.view.last', 'index.php');
    redirect($url);
} else {
    if (isset($_REQUEST['save'])) {
        $_REQUEST['password1'] = get_request('password1', null);
        $_REQUEST['password2'] = get_request('password2', null);
        if (isset($_REQUEST['password1']) && $_REQUEST['password1'] == '') {
            show_error_message(S_ONLY_FOR_GUEST_ALLOWED_EMPTY_PASSWORD);
        } else {
            if ($_REQUEST['password1'] == $_REQUEST['password2']) {
                $result = update_user_profile($USER_DETAILS['userid'], $_REQUEST['password1'], $_REQUEST['url'], get_request('autologin', 0), get_request('autologout', 0), $_REQUEST['lang'], $_REQUEST['theme'], $_REQUEST['refresh']);
                show_messages($result, S_USER_UPDATED, S_CANNOT_UPDATE_USER);
                if ($result) {
                    add_audit(AUDIT_ACTION_UPDATE, AUDIT_RESOURCE_USER, 'User alias [' . $USER_DETAILS['alias'] . '] name [' . $USER_DETAILS['name'] . '] surname [' . $USER_DETAILS['surname'] . '] profile id [' . $USER_DETAILS['userid'] . ']');
                }
            } else {
                show_error_message(S_CANNOT_UPDATE_USER_BOTH_PASSWORDS);
            }
        }
    }
}
show_table_header(S_USER_PROFILE_BIG . ' : ' . $USER_DETAILS['name'] . ' ' . $USER_DETAILS['surname']);
echo '<br>';
insert_user_form($USER_DETAILS['userid'], 1);
include_once 'include/page_footer.php';
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:profile.php

示例13: flush

                flush();
                @set_time_limit(90);
                if (resize_image($path . "/" . $image_cache[$key]['cat_id'] . "/" . $image_cache[$key][$sql_image_type], $quality, $dimension, $resize_type)) {
                    echo "<br />&nbsp;&nbsp;&nbsp;<b>" . $lang['resizing_image_success'] . "</b><p>";
                } else {
                    echo "<br />&nbsp;&nbsp;&nbsp;<b class=\"marktext\">" . $lang['resizing_image_error'] . "</b><p>";
                }
            }
        }
    } else {
        echo "<b>Just relaxing because you give me nothing to do!</b>";
    }
}
if ($action == "selectoptions") {
    show_form_header("resizer.php", "selectoptions");
    show_table_header($lang['resize_images'], 2);
    $image_type = isset($HTTP_POST_VARS['image_type']) ? trim($HTTP_POST_VARS['image_type']) : "media";
    $select_image_type = "<select name=\"image_type\">";
    $select_image_type .= "<option value=\"media\"";
    if ($image_type == "media") {
        $select_image_type .= " selected";
    }
    $select_image_type .= ">" . $lang['resize_image_files'] . "</option>";
    $select_image_type .= "<option value=\"thumb\"";
    if ($image_type == "thumb") {
        $select_image_type .= " selected";
    }
    $select_image_type .= ">" . $lang['resize_thumb_files'] . "</option>";
    $select_image_type .= "</select>";
    show_custom_row($lang['resize_image_type_desc'], $select_image_type);
    $dimension = isset($HTTP_POST_VARS['dimension']) ? intval($HTTP_POST_VARS['dimension']) : $config['max_image_width'];
开发者ID:abhinay100,项目名称:fourimages_app,代码行数:31,代码来源:resizer.php

示例14: CSpan

$gridShow->setAttribute('id', 'gridshow');
$gridAutoAlign = new CSpan($sysmap['grid_align'] == SYSMAP_GRID_ALIGN_ON ? _('On') : _('Off'), 'whitelink');
$gridAutoAlign->setAttribute('id', 'gridautoalign');
$possibleGridSizes = array(20 => '20x20', 40 => '40x40', 50 => '50x50', 75 => '75x75', 100 => '100x100');
$gridSize = new CComboBox('gridsize', $sysmap['grid_size']);
$gridSize->addItems($possibleGridSizes);
$gridAlignAll = new CSubmit('gridalignall', _('Align icons'));
$gridAlignAll->setAttribute('id', 'gridalignall');
$gridForm = new CDiv(array($gridSize, $gridAlignAll));
$gridForm->setAttribute('id', 'gridalignblock');
$saveButton = new CSubmit('save', _('Save'));
$saveButton->setAttribute('id', 'sysmap_save');
$menuRow = array(_s('Map "%s"', $sysmap['name']), SPACE . SPACE, _('Icon'), SPACE, $el_add, SPACE, $el_rmv, SPACE . SPACE, _('Link'), SPACE, $cn_add, SPACE, $cn_rmv, SPACE . SPACE, _('Expand macros') . ' [ ', $expandMacros, ' ]', SPACE . SPACE, _('Grid') . SPACE . '[', $gridShow, '|', $gridAutoAlign, ']', SPACE, $gridForm, SPACE . '|' . SPACE, $saveButton);
$elcn_tab = new CTable(null, 'textwhite');
$elcn_tab->addRow($menuRow);
show_table_header($elcn_tab);
$sysmap_img = new CImg('images/general/tree/zero.gif', 'Sysmap');
$sysmap_img->setAttribute('id', 'sysmap_img', $sysmap['width'], $sysmap['height']);
$table = new CTable();
$table->addRow($sysmap_img);
$table->Show();
$container = new CDiv();
$container->setAttribute('id', 'sysmap_cnt');
$container->Show();
insert_show_color_picker_javascript();
add_elementNames($sysmap['selements']);
foreach ($sysmap['links'] as &$link) {
    foreach ($link['linktriggers'] as $lnum => $linktrigger) {
        $dbTrigger = API::Trigger()->get(array('triggerids' => $linktrigger['triggerid'], 'output' => array('description', 'expression'), 'selectHosts' => API_OUTPUT_EXTEND, 'preservekeys' => true, 'expandDescription' => true));
        $dbTrigger = reset($dbTrigger);
        $host = reset($dbTrigger['hosts']);
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:31,代码来源:sysmap.php

示例15: CForm

CProfile::update('web.popup_right.nodeid.last', $nodeid, PROFILE_TYPE_ID);
$frmTitle = new CForm();
$frmTitle->addVar('dstfrm', $dstfrm);
$frmTitle->addVar('permission', $permission);
if (ZBX_DISTRIBUTED) {
    $available_nodes = get_accessible_nodes_by_user($USER_DETAILS, PERM_READ_ONLY, PERM_RES_IDS_ARRAY);
    $cmbResourceNode = new CComboBox('nodeid', $nodeid, 'submit();');
    $cmbResourceNode->addItem(0, S_ALL_S);
    $sql = 'SELECT name,nodeid ' . ' FROM nodes ' . ' WHERE ' . DBcondition('nodeid', $available_nodes);
    $db_nodes = DBselect($sql);
    while ($node = DBfetch($db_nodes)) {
        $cmbResourceNode->addItem($node['nodeid'], $node['name']);
    }
    $frmTitle->addItem(array(S_NODE, SPACE, $cmbResourceNode));
}
show_table_header(permission2str($permission), $frmTitle);
$form = new CForm();
$form->setAttribute('id', 'groups');
$table = new CTableInfo(S_NO_RESOURCES_DEFINED);
$table->setHeader(new CCol(array(new CCheckBox('all_groups', NULL, 'check_all(this.checked)'), S_NAME)));
// NODES
if ($nodeid == 0) {
    $nodeids = get_current_nodeid(true);
} else {
    $nodeids = $nodeid;
}
$count = 0;
$grouplist = array();
$options = array('nodeids' => $nodeids, 'output' => API_OUTPUT_EXTEND);
$groups = CHostGroup::get($options);
foreach ($groups as $gnum => $row) {
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:31,代码来源:popup_right.php


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