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

PHP update_profile函数代码示例

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

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



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

示例1: send_password

function send_password($email, $email_from_address, $website_address, $new_user = false)
{
    $query_passwordcheck = "SELECT * FROM users WHERE user_email = '" . $email . "'";
    $passwordcheck = mysql_query($query_passwordcheck) or die(mysql_error());
    $row_passwordcheck = mysql_fetch_assoc($passwordcheck);
    $totalRows_passwordcheck = mysql_num_rows($passwordcheck);
    $new_password = gen_password(8);
    update_profile($email, $new_password);
    if ($totalRows_passwordcheck == 1) {
        error_log("Sending password email to: " . $email);
        //SEND EMAIL WITH PASSWORD
        $password = $row_passwordcheck['user_password'];
        $name = "Donor Track";
        $subject = $new_user ? "Welcome to Donor Track" : "Your New Password";
        $message = "Your password is {$new_password}.";
        $emailto = $row_passwordcheck['user_email'];
        if ($new_user) {
            $message .= " Your username is {$email}.";
        } else {
            $message = "A password reset request was submitted for your account. " . $message;
        }
        $message .= " \nYou can login at: {$website_address}/login.php";
        error_log($message);
        return mail($emailto, $subject, $message, "From: {$name} <" . $email_from_address . ">\n" . "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1");
        //END SEND EMAIL
    } else {
        if ($totalRows_passwordcheck < 1) {
            return false;
        }
    }
}
开发者ID:jmreardon,项目名称:donor-track,代码行数:31,代码来源:user.inc.php


示例2: init_nodes

function init_nodes()
{
    /* Init CURRENT NODE ID */
    if (defined('ZBX_NODES_INITIALIZED')) {
        return;
    }
    global $USER_DETAILS;
    global $ZBX_LOCALNODEID, $ZBX_LOCMASTERID, $ZBX_CURRENT_NODEID, $ZBX_CURMASTERID, $ZBX_NODES, $ZBX_NODES_IDS, $ZBX_AVAILABLE_NODES, $ZBX_VIEWED_NODES, $ZBX_WITH_ALL_NODES;
    $ZBX_AVAILABLE_NODES = array();
    $ZBX_NODES_IDS = array();
    $ZBX_NODES = array();
    $ZBX_CURRENT_NODEID = $ZBX_LOCALNODEID;
    $ZBX_WITH_ALL_NODES = !defined('ZBX_NOT_ALLOW_ALL_NODES');
    if (!defined('ZBX_PAGE_NO_AUTHERIZATION') && ZBX_DISTRIBUTED) {
        if ($USER_DETAILS['type'] == USER_TYPE_SUPER_ADMIN) {
            $sql = 'SELECT DISTINCT n.nodeid,n.name,n.masterid FROM nodes n ';
        } else {
            $sql = 'SELECT DISTINCT n.nodeid,n.name,n.masterid ' . ' FROM nodes n, groups hg,rights r, users_groups g ' . ' WHERE r.id=hg.groupid ' . ' AND r.groupid=g.usrgrpid ' . ' AND g.userid=' . $USER_DETAILS['userid'] . ' AND n.nodeid=' . DBid2nodeid('hg.groupid');
        }
        $db_nodes = DBselect($sql);
        while ($node = DBfetch($db_nodes)) {
            $ZBX_NODES[$node['nodeid']] = $node;
            $ZBX_NODES_IDS[$node['nodeid']] = $node['nodeid'];
        }
        $ZBX_AVAILABLE_NODES = get_accessible_nodes_by_user($USER_DETAILS, PERM_READ_LIST, PERM_RES_IDS_ARRAY, $ZBX_NODES_IDS);
        $ZBX_VIEWED_NODES = get_viewed_nodes();
        $ZBX_CURRENT_NODEID = $ZBX_VIEWED_NODES['selected'];
        if ($node_data = DBfetch(DBselect('SELECT masterid FROM nodes WHERE nodeid=' . $ZBX_CURRENT_NODEID))) {
            $ZBX_CURMASTERID = $node_data['masterid'];
        }
        if (!isset($ZBX_NODES[$ZBX_CURRENT_NODEID])) {
            $ZBX_CURRENT_NODEID = $ZBX_LOCALNODEID;
            $ZBX_CURMASTERID = $ZBX_LOCMASTERID;
        }
        if (isset($_REQUEST['select_nodes'])) {
            update_profile('web.nodes.selected', $ZBX_VIEWED_NODES['nodeids'], PROFILE_TYPE_ARRAY_ID);
        }
        if (isset($_REQUEST['switch_node'])) {
            update_profile('web.nodes.switch_node', $ZBX_VIEWED_NODES['selected'], PROFILE_TYPE_ID);
        }
    } else {
        $ZBX_CURRENT_NODEID = $ZBX_LOCALNODEID;
        $ZBX_CURMASTERID = $ZBX_LOCMASTERID;
    }
    // zbx_set_post_cookie('zbx_current_nodeid', $ZBX_CURRENT_NODEID);
    define('ZBX_NODES_INITIALIZED', 1);
}
开发者ID:phedders,项目名称:zabbix,代码行数:47,代码来源:nodes.inc.php


示例3: get_accessible_hosts_by_user

$available_hosts = get_accessible_hosts_by_user($USER_DETAILS, PERM_READ_ONLY, PERM_RES_IDS_ARRAY, get_current_nodeid(true));
$items = get_request('items', array());
asort_by_key($items, 'sortorder');
foreach ($items as $gitem) {
    if (!($host = DBfetch(DBselect('SELECT h.* FROM hosts h,items i WHERE h.hostid=i.hostid AND i.itemid=' . $gitem['itemid'])))) {
        fatal_error(S_NO_ITEM_DEFINED);
    }
    if (!isset($available_hosts[$host['hostid']])) {
        access_deny();
    }
}
$effectiveperiod = navigation_bar_calc();
if (count($items) == 1) {
    $_REQUEST['period'] = get_request('period', get_profile('web.item.graph.period', ZBX_PERIOD_DEFAULT, null, $items['itemid']));
    if ($_REQUEST['period'] >= ZBX_MIN_PERIOD) {
        update_profile('web.item.graph.period', $_REQUEST['period'], PROFILE_TYPE_INT, $items['itemid']);
    }
}
$graph = new CPie(get_request('graphtype', GRAPH_TYPE_NORMAL));
$graph->setHeader($host['host'] . ':' . get_request('name', ''));
$graph3d = get_request('graph3d', 0);
$legend = get_request('legend', 0);
if ($graph3d == 1) {
    $graph->switchPie3D();
}
$graph->switchLegend($legend);
unset($host);
if (isset($_REQUEST['period'])) {
    $graph->SetPeriod($_REQUEST['period']);
}
if (isset($_REQUEST['from'])) {
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:chart7.php


示例4: array

require_once 'include/services.inc.php';
require_once 'include/triggers.inc.php';
require_once 'include/html.inc.php';
$page["title"] = "S_CONFIGURATION_OF_IT_SERVICES";
$page["file"] = "services.php";
$page['scripts'] = array('services.js');
$page['hist_arg'] = array();
include_once "include/page_header.php";
//---------------------------------- CHECKS ------------------------------------
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array("msg" => array(T_ZBX_STR, O_OPT, null, null, NULL), 'favobj' => array(T_ZBX_STR, O_OPT, P_ACT, IN("'hat'"), NULL), 'favid' => array(T_ZBX_STR, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj})'), 'state' => array(T_ZBX_INT, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj})'));
check_fields($fields);
/* AJAX */
if (isset($_REQUEST['favobj'])) {
    if ('hat' == $_REQUEST['favobj']) {
        update_profile('web.services.hats.' . $_REQUEST['favid'] . '.state', $_REQUEST['state'], PROFILE_TYPE_INT);
    }
}
if (PAGE_TYPE_JS == $page['type'] || PAGE_TYPE_HTML_BLOCK == $page['type']) {
    exit;
}
//--------
//--------------------------------------------------------------------------
$available_triggers = get_accessible_triggers(PERM_READ_ONLY, array(), PERM_RES_IDS_ARRAY);
$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, 'algorithm' => SPACE, 'description' => SPACE, 'soft' => 0, 'linkid' => '');
$services[0] = $row;
while ($row = DBFetch($result)) {
    $row['id'] = $row['serviceid'];
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:services.php


示例5: array

require_once 'include/hosts.inc.php';
require_once 'include/html.inc.php';
$page["title"] = "S_SEARCH";
$page['file'] = 'search.php';
$page['hist_arg'] = array();
$page['scripts'] = array('pmaster.js', 'menu_scripts.js', 'showhint.js', 'scriptaculous.js?load=effects');
$page['type'] = detect_page_type(PAGE_TYPE_HTML);
include_once 'include/page_header.php';
//		VAR				TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array('type' => array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), 'search' => array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), 'favobj' => array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), 'favid' => array(T_ZBX_STR, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj})'), 'favcnt' => array(T_ZBX_INT, O_OPT, null, null, NULL), 'action' => array(T_ZBX_STR, O_OPT, P_ACT, IN("'add','remove'"), NULL), 'state' => array(T_ZBX_INT, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj}) && ("hat"=={favobj})'));
check_fields($fields);
// ACTION /////////////////////////////////////////////////////////////////////////////
if (isset($_REQUEST['favobj'])) {
    $_REQUEST['pmasterid'] = get_request('pmasterid', 'mainpage');
    if ('hat' == $_REQUEST['favobj']) {
        update_profile('web.dashboard.hats.' . $_REQUEST['favid'] . '.state', $_REQUEST['state'], PROFILE_TYPE_INT);
    }
    if ('refresh' == $_REQUEST['favobj']) {
        switch ($_REQUEST['favid']) {
            case 'hat_syssum':
                $syssum = make_system_summary();
                $syssum->show();
                break;
            case 'hat_stszbx':
                $stszbx = make_status_of_zbx();
                $stszbx->show();
                break;
        }
    }
}
if (PAGE_TYPE_JS == $page['type'] || PAGE_TYPE_HTML_BLOCK == $page['type']) {
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:search.php


示例6: add_audit

                                            add_audit($audit_action, AUDIT_RESOURCE_USER_GROUP, 'Group name [' . $group['name'] . ']');
                                            unset($_REQUEST['usrgrpid']);
                                        }
                                        unset($_REQUEST['form']);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
$_REQUEST['filter_usrgrpid'] = get_request('filter_usrgrpid', get_profile('web.users.filter.usrgrpid', 0));
update_profile('web.users.filter.usrgrpid', $_REQUEST['filter_usrgrpid'], PROFILE_TYPE_ID);
$frmForm = new CForm();
$frmForm->SetMethod('get');
$cmbConf = new CComboBox('config', $_REQUEST['config'], 'submit()');
$cmbConf->AddItem(0, S_USERS);
$cmbConf->AddItem(1, S_USER_GROUPS);
$frmForm->AddItem($cmbConf);
if (0 == $_REQUEST['config']) {
    $cmbUGrp = new CComboBox('filter_usrgrpid', $_REQUEST['filter_usrgrpid'], 'submit()');
    $cmbUGrp->AddItem(0, S_ALL_S);
    $result = DBselect('SELECT usrgrpid, name FROM usrgrp WHERE ' . DBin_node('usrgrpid') . ' ORDER BY name');
    while ($usrgrp = DBfetch($result)) {
        $cmbUGrp->AddItem($usrgrp['usrgrpid'], $usrgrp['name']);
    }
    $frmForm->AddItem(array(SPACE . SPACE, S_USER_GROUP, $cmbUGrp));
}
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:users.php


示例7: array_push

    array_push($options, 'only_current_node');
}
$params = array();
foreach ($options as $option) {
    $params[$option] = 1;
}
$PAGE_GROUPS = get_viewed_groups(PERM_READ_ONLY, $params);
$PAGE_HOSTS = get_viewed_hosts(PERM_READ_ONLY, $PAGE_GROUPS['selected'], $params);
validate_group_with_host($PAGE_GROUPS, $PAGE_HOSTS);
//SDI($_REQUEST['groupid'].' : '.$_REQUEST['hostid']);
$available_groups = $PAGE_GROUPS['groupids'];
$available_hosts = $PAGE_HOSTS['hostids'];
$available_graphs = get_accessible_graphs(PERM_READ_LIST, $available_hosts, PERM_RES_IDS_ARRAY, get_current_nodeid(true));
if ($_REQUEST['graphid'] > 0 && ($row = DBfetch(DBselect('SELECT DISTINCT graphid, name FROM graphs WHERE graphid=' . $_REQUEST['graphid'])))) {
    if (!graph_accessible($_REQUEST['graphid'])) {
        update_profile('web.charts.graphid', 0);
        access_deny();
    }
    array_push($h1, $row['name']);
} else {
    $_REQUEST['graphid'] = 0;
    array_push($h1, S_SELECT_GRAPH_TO_DISPLAY);
}
$p_elements = array();
$r_form = new CForm();
$r_form->setMethod('get');
$r_form->addVar('fullscreen', $_REQUEST['fullscreen']);
$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);
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:charts.php


示例8: DBend

     }
     $_REQUEST['hostid'] = $clone_hostid;
 }
 $result = DBend($result);
 if ($result) {
     update_profile('HOST_PORT', $_REQUEST['port'], PROFILE_TYPE_INT);
     DBstart();
     delete_host_profile($hostid);
     if (get_request('useprofile', 'no') == 'yes') {
         add_host_profile($hostid, $_REQUEST['devicetype'], $_REQUEST['name'], $_REQUEST['os'], $_REQUEST['serialno'], $_REQUEST['tag'], $_REQUEST['macaddress'], $_REQUEST['hardware'], $_REQUEST['software'], $_REQUEST['contact'], $_REQUEST['location'], $_REQUEST['notes']);
     }
     $result = DBend($result);
 }
 //HOSTS PROFILE EXTANDED Section
 if ($result) {
     update_profile('HOST_PORT', $_REQUEST['port'], PROFILE_TYPE_INT);
     DBstart();
     delete_host_profile_ext($hostid);
     $useprofile_ext = get_request('useprofile_ext', 'no');
     $ext_host_profiles = get_request('ext_host_profiles', array());
     if ($useprofile_ext == 'yes' && !empty($ext_host_profiles)) {
         $result = add_host_profile_ext($hostid, $ext_host_profiles);
     }
     $result = DBend($result);
 }
 //HOSTS PROFILE EXTANDED Section
 show_messages($result, $msg_ok, $msg_fail);
 if ($result) {
     /*			add_audit($audit_action,AUDIT_RESOURCE_HOST,
     				'Host ['.$_REQUEST['host'].'] IP ['.$_REQUEST['ip'].'] '.
     				'Status ['.$_REQUEST['status'].']');*/
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:hosts.php


示例9: validate_sort_and_sortorder

function validate_sort_and_sortorder($sort = NULL, $sortorder = ZBX_SORT_UP)
{
    global $page;
    $_REQUEST['sort'] = get_request('sort', get_profile('web.' . $page["file"] . '.sort', $sort));
    $_REQUEST['sortorder'] = get_request('sortorder', get_profile('web.' . $page["file"] . '.sortorder', $sortorder));
    if (!is_null($_REQUEST['sort'])) {
        $_REQUEST['sort'] = eregi_replace('[^a-z\\.\\_]', '', $_REQUEST['sort']);
        update_profile('web.' . $page["file"] . '.sort', $_REQUEST['sort']);
    }
    if (!str_in_array($_REQUEST['sortorder'], array(ZBX_SORT_DOWN, ZBX_SORT_UP))) {
        $_REQUEST['sortorder'] = ZBX_SORT_UP;
    }
    update_profile('web.' . $page["file"] . '.sortorder', $_REQUEST['sortorder']);
}
开发者ID:rennhak,项目名称:zabbix,代码行数:14,代码来源:config.inc.php


示例10: self_name

$username = self_name();
$char_id = self_char_id();
// Password and email changing systems exist in account.php (& account.tpl).
$char = new Player($char_id);
$profile_max_length = 500;
// Should match the limit in limitStatChars.js - ajv: No, limitStatChars.js should be dynamically generated with this number from a common location -
$successMessage = null;
$description = post('description', $char->description());
$goals = post('goals', $char->goals());
$instincts = post('instincts', $char->instincts());
$beliefs = post('beliefs', $char->beliefs());
$traits = post('traits', $char->traits());
if ($changedetails) {
    // Limit the profile length.
    if ($newprofile != '') {
        $profile_changed = update_profile($char_id, $newprofile);
    } else {
        $error = 'Cannot enter a blank profile.';
    }
    assert((bool) $description);
    assert((bool) $goals);
    // Check that the text features don't differ
    $char->set_description($description);
    $char->set_goals($goals);
    $char->set_instincts($instincts);
    $char->set_beliefs($beliefs);
    $char->set_traits($traits);
    /*
    	foreach(['description', 'goals', 'instincts', 'beliefs', 'traits'] as $type){
    		if($$type && isset($char->vo)){
    			$method = 'set_'.$type;
开发者ID:reillo,项目名称:ninjawars,代码行数:31,代码来源:stats.php


示例11: log_error

if (empty($_POST['mode'])) {
    echo 'アクセスルートが不正です。もう一度トップページからやり直してください<br>';
    //URLで直接アクセスした場合にエラーをログに出力する処理を追加
    log_error('アクセスルートが不正です。');
} elseif ($_POST['mode'] == "KOUSHIN_RESULT") {
    //入力項目が不足している場合にエラーが表示される処理の追加
    if (!empty($_POST['name']) && !empty($_POST['year']) && !empty($_POST['month']) && !empty($_POST['day']) && !empty($_POST['type']) && !empty($_POST['tell']) && !empty($_POST['comment'])) {
        //POSTの取得を追加
        $name = $_POST['name'];
        $type = $_POST['type'];
        $tell = $_POST['tell'];
        $comment = $_POST['comment'];
        //月日を2桁に変更して格納
        $birthday = $_POST['year'] . '-' . sprintf('%02d', $_POST['month']) . '-' . sprintf('%02d', $_POST['day']);
        //関数の引数を追加
        $result = update_profile($_GET['id'], $name, $birthday, $type, $tell, $comment);
        //エラーが発生しなければ表示を行う
        if (!isset($result)) {
            //データを更新した場合にログに出力する処理を追加
            log_syori('データを更新しました。名前:' . $name);
            ?>
                <h1>更新確認</h1><br>
                <!--更新内容の表示処理を追加-->
                名前:<?php 
            echo $name;
            ?>
<br>
                生年月日:<?php 
            echo $birthday;
            ?>
<br>
开发者ID:Taka-Haru,项目名称:Challenge-1,代码行数:31,代码来源:update_result.php


示例12: array

    $page["type"] = PAGE_TYPE_XML;
    $page["file"] = "zabbix_export.xml";
} else {
    $page["title"] = "S_EXPORT_IMPORT";
    $page["file"] = "exp_imp.php";
    $page['hist_arg'] = array('config', 'groupid');
}
include_once "include/page_header.php";
$_REQUEST["config"] = get_request("config", get_profile("web.exp_imp.config", 0));
$fields = array("config" => array(T_ZBX_INT, O_OPT, P_SYS, IN("0,1"), null), "groupid" => array(T_ZBX_INT, O_OPT, null, DB_ID, null), "hosts" => array(T_ZBX_INT, O_OPT, null, DB_ID, null), "templates" => array(T_ZBX_INT, O_OPT, null, DB_ID, null), "items" => array(T_ZBX_INT, O_OPT, null, DB_ID, null), "triggers" => array(T_ZBX_INT, O_OPT, null, DB_ID, null), "graphs" => array(T_ZBX_INT, O_OPT, null, DB_ID, null), "update" => array(T_ZBX_INT, O_OPT, null, DB_ID, null), "rules" => array(T_ZBX_INT, O_OPT, null, DB_ID, null), "preview" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL), "export" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL), "import" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, NULL, NULL));
check_fields($fields);
validate_sort_and_sortorder('h.host', ZBX_SORT_UP);
$preview = isset($_REQUEST['preview']) ? true : false;
$config = get_request('config', 0);
$update = get_request('update', null);
update_profile("web.exp_imp.config", $config, PROFILE_TYPE_INT);
if ($config == 1) {
    $rules = get_request('rules', array());
    foreach (array('host', 'template', 'item', 'trigger', 'graph') as $key) {
        if (!isset($rules[$key]['exist'])) {
            $rules[$key]['exist'] = 0;
        }
        if (!isset($rules[$key]['missed'])) {
            $rules[$key]['missed'] = 0;
        }
    }
} else {
    $params = array();
    $options = array('only_current_node');
    foreach ($options as $option) {
        $params[$option] = 1;
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:exp_imp.php


示例13: get_request

    if (str_in_array($srctbl, array('help_items'))) {
        $itemtype = get_request('itemtype', get_profile('web.popup.itemtype', 0));
        $cmbTypes = new CComboBox('itemtype', $itemtype, 'javascript: submit();');
        foreach ($allowed_item_types as $type) {
            $cmbTypes->addItem($type, item_type2str($type));
        }
        $frmTitle->addItem(array(S_TYPE, SPACE, $cmbTypes));
    }
    if (str_in_array($srctbl, array('triggers', 'logitems', 'items', 'applications', 'graphs', 'simple_graph', 'plain_text'))) {
        $hostid = $PAGE_HOSTS['selected'];
        $cmbHosts = new CComboBox('hostid', $hostid, 'javascript: submit();');
        foreach ($PAGE_HOSTS['hosts'] as $tmp_hostid => $name) {
            $cmbHosts->addItem($tmp_hostid, get_node_name_by_elid($tmp_hostid) . $name);
        }
        $frmTitle->addItem(array(SPACE, S_HOST, SPACE, $cmbHosts));
        update_profile('web.popup.hostid', $hostid);
    }
    if (str_in_array($srctbl, array('triggers', 'hosts'))) {
        $btnEmpty = new CButton('empty', S_EMPTY, get_window_opener($dstfrm, $dstfld1, 0) . get_window_opener($dstfrm, $dstfld2, '') . (isset($_REQUEST['reference']) && $_REQUEST['reference'] == 'dashboard' ? "window.opener.setTimeout('add2favorites();', 1000);" : '') . " close_window(); return false;");
        $frmTitle->addItem(array(SPACE, $btnEmpty));
    }
}
show_table_header($page['title'], $frmTitle);
if ($srctbl == 'hosts') {
    $table = new CTableInfo(S_NO_HOSTS_DEFINED);
    $table->setHeader(array(S_HOST, S_DNS, S_IP, S_PORT, S_STATUS, S_AVAILABILITY));
    $sql_from = '';
    $sql_where = '';
    if ($groupid > 0) {
        $sql_from .= ',hosts_groups hg ';
        $sql_where .= ' AND hg.groupid=' . $groupid . ' AND h.hostid=hg.hostid ';
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:popup.php


示例14: session_start

<?php

//session_save_path('../tmp');
include_once "db.php";
session_start();
if (isset($_SESSION["user"])) {
    $type = $_GET["type"];
    $userid = $_SESSION["user"]["userid"];
    if ($type == "updateprofile") {
        $data = $_GET["data"];
        $result = update_profile($userid, $data);
        echo $result;
    } else {
        if ($type == "rating") {
            submit_your_rating($userid, $_GET["composerid"], $_GET["rating"]);
            echo "submitted rating!";
        } else {
            echo "submitted wrong type!";
        }
    }
} else {
    echo "Cannot submit rating when not logged in.";
}
开发者ID:jeremyrobson,项目名称:mycl,代码行数:23,代码来源:ajax.php


示例15: array

**/
require_once "include/config.inc.php";
require_once "include/screens.inc.php";
require_once "include/forms.inc.php";
require_once "include/maps.inc.php";
$page["title"] = "S_SCREENS";
$page["file"] = "screenconf.php";
$page['hist_arg'] = array('config');
include_once "include/page_header.php";
$_REQUEST['config'] = get_request('config', get_profile('web.screenconf.config', 0));
//		VAR			TYPE	OPTIONAL FLAGS	VALIDATION	EXCEPTION
$fields = array("config" => array(T_ZBX_INT, O_OPT, P_SYS, IN("0,1"), null), "screenid" => array(T_ZBX_INT, O_NO, P_SYS, DB_ID, '(isset({config})&&({config}==0))&&(isset({form})&&({form}=="update"))'), "hsize" => array(T_ZBX_INT, O_OPT, null, BETWEEN(1, 100), '(isset({config})&&({config}==0))&&isset({save})'), "vsize" => array(T_ZBX_INT, O_OPT, null, BETWEEN(1, 100), '(isset({config})&&({config}==0))&&isset({save})'), "slideshowid" => array(T_ZBX_INT, O_NO, P_SYS, DB_ID, '(isset({config})&&({config}==1))&&(isset({form})&&({form}=="update"))'), "name" => array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'), "delay" => array(T_ZBX_INT, O_OPT, null, BETWEEN(1, 86400), '(isset({config})&&({config}==1))&&isset({save})'), "steps" => array(null, O_OPT, null, null, null), "new_step" => array(null, O_OPT, null, null, null), "move_up" => array(T_ZBX_INT, O_OPT, P_ACT, BETWEEN(0, 65534), null), "move_down" => array(T_ZBX_INT, O_OPT, P_ACT, BETWEEN(0, 65534), null), "edit_step" => array(T_ZBX_INT, O_OPT, P_ACT, BETWEEN(0, 65534), null), "add_step" => array(T_ZBX_STR, O_OPT, P_ACT, null, null), "cancel_step" => array(T_ZBX_STR, O_OPT, P_ACT, null, null), "sel_step" => array(T_ZBX_INT, O_OPT, P_ACT, BETWEEN(0, 65534), null), "del_sel_step" => array(T_ZBX_STR, O_OPT, P_ACT, null, null), "clone" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), "save" => array(T_ZBX_STR, O_OPT, P_SYS | P_ACT, null, null), "delete" => 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_INT, O_OPT, null, null, null));
check_fields($fields);
validate_sort_and_sortorder('s.name', ZBX_SORT_UP);
$config = $_REQUEST['config'] = get_request('config', 0);
update_profile('web.screenconf.config', $_REQUEST['config'], PROFILE_TYPE_INT);
if (0 == $config) {
    if (isset($_REQUEST["screenid"])) {
        if (!screen_accessible($_REQUEST["screenid"], PERM_READ_WRITE)) {
            access_deny();
        }
    }
    if (isset($_REQUEST['clone']) && isset($_REQUEST['screenid'])) {
        unset($_REQUEST['screenid']);
        $_REQUEST['form'] = 'clone';
    } else {
        if (isset($_REQUEST['save'])) {
            if (isset($_REQUEST["screenid"])) {
                // TODO check permission by new value.
                $result = update_screen($_REQUEST["screenid"], $_REQUEST["name"], $_REQUEST["hsize"], $_REQUEST["vsize"]);
                $audit_action = AUDIT_ACTION_UPDATE;
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:screenconf.php


示例16: make_refresh_menu

            make_refresh_menu('mainpage', $_REQUEST['favid'], $_REQUEST['favcnt'], array('elementid' => $elementid), $menu, $submenu);
            print 'page_menu["menu_' . $_REQUEST['favid'] . '"] = ' . zbx_jsvalue($menu['menu_' . $_REQUEST['favid']]) . ';';
        }
    }
}
if (PAGE_TYPE_JS == $page['type'] || PAGE_TYPE_HTML_BLOCK == $page['type']) {
    exit;
}
$config = $_REQUEST['config'];
$_REQUEST['elementid'] = get_request('elementid', get_profile('web.screens.elementid', null));
if (2 != $_REQUEST['fullscreen']) {
    update_profile('web.screens.elementid', $_REQUEST['elementid']);
}
$_REQUEST['period'] = get_request('period', get_profile('web.screens.period', ZBX_PERIOD_DEFAULT, null, $_REQUEST['elementid']));
if ($_REQUEST['period'] >= ZBX_MIN_PERIOD) {
    update_profile('web.screens.period', $_REQUEST['period'], PROFILE_TYPE_INT, $_REQUEST['elementid']);
}
$slides_wdgt = new CWidget('hat_slides');
$elementid = get_request('elementid', null);
if ($elementid <= 0) {
    $elementid = null;
}
$text = S_SLIDESHOWS;
$form = new CForm();
$form->setMethod('get');
$form->addVar('config', S_SLIDESHOWS);
$form->addVar('fullscreen', $_REQUEST['fullscreen']);
if (isset($_REQUEST['period'])) {
    $form->addVar('period', $_REQUEST['period']);
}
if (isset($_REQUEST['stime'])) {
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:slides.php


示例17: update_profile

//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
include 'includes/sc-includes.php';
$pagetitle = "Profile";
//UPDATE PROFILE
if ($_POST['email']) {
    update_profile($_POST['email'], $_POST['password'], $_POST['home']);
    set_msg('Profile Updated');
    $_SESSION['user'] = $_POST['email'];
    header('Location: profile.php');
    die;
}
mysql_select_db($database_contacts, $contacts);
$query_profile = "SELECT * FROM users WHERE user_id = " . $row_userinfo['user_id'];
$profile = mysql_query($query_profile, $contacts) or die(mysql_error());
$row_profile = mysql_fetch_assoc($profile);
$totalRows_profile = mysql_num_rows($profile);
$title_text = "Update Profile";
include 'includes/header.php';
?>
<div class="container">
  <div class="leftcolumn">
开发者ID:jmreardon,项目名称:donor-track,代码行数:31,代码来源:profile.php


示例18: time

    $_REQUEST['nav_time'] = time();
    $_REQUEST['triggerid'] = 0;
    $_REQUEST['show_unknown'] = 0;
}
$_REQUEST['nav_time'] = get_request('nav_time', get_profile('web.events.filter.nav_time', time()));
$_REQUEST['triggerid'] = get_request('triggerid', get_profile('web.events.filter.triggerid', 0));
$show_unknown = get_request('show_unknown', get_profile('web.events.filter.show_unknown', 0));
if (isset($_REQUEST['filter_set']) || isset($_REQUEST['filter_rst'])) {
    update_profile('web.events.filter.nav_time', $_REQUEST['nav_time'], PROFILE_TYPE_INT);
    update_profile('web.events.filter.triggerid', $_REQUEST['triggerid']);
    update_profile('web.events.filter.show_unknown', $show_unknown, PROFILE_TYPE_INT);
}
// --------------
validate_sort_and_sortorder('e.clock', ZBX_SORT_DOWN);
$source = get_request('source', EVENT_SOURCE_TRIGGERS);
update_profile('web.events.source', $source, PROFILE_TYPE_INT);
$source = get_request('source', EVENT_SOURCE_TRIGGERS);
$r_form = new CForm();
$r_form->setMethod('get');
$r_form->setAttribute('name', 'events_menu');
$r_form->addVar('fullscreen', $_REQUEST['fullscreen']);
//	$r_form->addVar('nav_time',$_REQUEST['nav_time']);
if (EVENT_SOURCE_TRIGGERS == $source) {
    if (isset($_REQUEST['triggerid']) && $_REQUEST['triggerid'] > 0) {
        $sql = 'SELECT DISTINCT hg.groupid, hg.hostid ' . ' FROM hosts_groups hg, functions f, items i' . ' WHERE i.itemid=f.itemid ' . ' AND hg.hostid=i.hostid ' . ' AND f.triggerid=' . $_REQUEST['triggerid'];
        if ($host_group = DBfetch(DBselect($sql, 1))) {
            $_REQUEST['groupid'] = $host_group['groupid'];
            $_REQUEST['hostid'] = $host_group['hostid'];
        } else {
            unset($_REQUEST['triggerid']);
        }
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:events.php


示例19: update_profile

//入力されてるか確認する
if (empty($name) || empty($_POST['year']) || empty($_POST['month']) || empty($_POST['day']) || empty($type) || empty($tell) || empty($comment)) {
    echo "入力されてない項目があります。";
    ?>
      <form action="<?php 
    echo UPDATE;
    ?>
?id=<?php 
    echo $_GET['id'];
    ?>
" method="POST">
          <input type="submit" value="編集画面に戻る">
      </form>
    <?php 
} else {
    $result = update_profile($id, $name, $birthday, $type, $tell, $comment);
    //エラーが発生しなければ表示を行う
    if (!isset($result)) {
        ?>
    <h1>更新確認</h1>
    以上の内容で更新しました。<br>
    <?php 
    } else {
        echo 'データの更新に失敗しました。次記のエラーにより処理を中断します:' . $result;
    }
}
echo return_top();
?>
  </body>
</html>
开发者ID:masaki4680,项目名称:camp-challenge,代码行数:30,代码来源:update_result.php


示例20: CCol

} else {
    if (HTTPTEST_STATE_UNKNOWN == $httptest_data['curstate']) {
        $status['msg'] = S_UNKNOWN;
        $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'];
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:httpdetails.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP update_progress_bar函数代码示例发布时间:2022-05-23
下一篇:
PHP update_product_meta函数代码示例发布时间: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