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

PHP get_profile函数代码示例

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

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



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

示例1: curr_file

function curr_file($file_id)
{
    global $db, $tpf, $settings, $code;
    $file = $db->fetch_one_array("select * from {$tpf}files where file_id='{$file_id}'");
    if (!$file) {
        $file['is_del'] = 1;
    } else {
        $file['dl'] = create_down_url($file);
        $in_extract = $code == md5($file['file_key']) ? 1 : 0;
        $file['username'] = $file['p_name'] = @$db->result_first("select username from {$tpf}users where userid='{$file['userid']}' limit 1");
        $rs = $db->fetch_one_array("select folder_id,folder_name from {$tpf}folders where userid='{$file['userid']}' and folder_id='{$file['folder_id']}'");
        $file['file_category'] = $rs['folder_name'] ? '<a href="' . urr("space", "username=" . rawurlencode($file['username']) . "&folder_id=" . $rs['folder_id']) . '" target="_blank">' . $rs['folder_name'] . '</a>' : '- ' . __('uncategory') . ' -';
        $file_key = trim($file['file_key']);
        $tmp_ext = $file['file_extension'] ? '.' . $file['file_extension'] : "";
        $file_extension = $file['file_extension'];
        $file_ext = get_real_ext($file_extension);
        $file['file_description'] = str_replace('<br>', LF, $file[file_description]);
        $file['a_space'] = urr("space", "username=" . rawurlencode($file['username']));
        $file['file_name_min'] = filter_word($file['file_name'] . $tmp_ext);
        $file['file_name'] = filter_word($file['file_name'] . $tmp_ext);
        $file['file_size'] = get_size($file['file_size']);
        $file['p_time'] = $file['file_time'];
        $file['file_time'] = $file['time_hidden'] ? __('hidden') : date("Y-m-d", $file['file_time']);
        $file['credit_down'] = $file['file_credit'] ? (int) $file['file_credit'] : (int) $settings['credit_down'];
        $file['username'] = $file[user_hidden] ? __('hidden') : ($file['username'] ? '<a href="' . $file['a_space'] . '">' . $file['username'] . '</a>' : __('hidden'));
        $file['file_downs'] = $file['stat_hidden'] ? __('hidden') : get_discount($file[userid], $file['file_downs']);
        $file['file_views'] = $file['stat_hidden'] ? __('hidden') : get_discount($file[userid], $file['file_views']);
        $file['file_url'] = $settings['phpdisk_url'] . urr("viewfile", "file_id={$file['file_id']}");
        if (get_plans(get_profile($file[userid], 'plan_id'), 'open_second_page') == 3) {
            $file['a_downfile'] = urr("download", "file_id={$file_id}&key=" . random(32));
            $file['a_downfile2'] = urr("download", "file_id={$file_id}&key=" . random(32));
        }
    }
    return $file;
}
开发者ID:saintho,项目名称:phpdisk,代码行数:35,代码来源:download2.php


示例2: View

 function View()
 {
     $this->named_vars = array();
     $this->header_sent = false;
     global $db;
     global $request;
     $env =& environment();
     if (isset($request->resource)) {
         $this->collection = new Collection($request->resource);
     } else {
         $this->collection = new Collection(null);
     }
     $this->named_vars['db'] =& $db;
     $this->named_vars['request'] =& $request;
     $this->named_vars['collection'] =& $this->collection;
     $this->named_vars['response'] =& $this;
     if (get_profile_id()) {
         $this->named_vars['profile'] =& get_profile();
     } else {
         $this->named_vars['profile'] = false;
     }
     if (isset($request->resource) && $request->resource != 'introspection') {
         $this->named_vars['resource'] =& $db->get_table($request->resource);
     } else {
         $this->named_vars['resource'] = false;
     }
     $this->named_vars['prefix'] = $db->prefix;
     $this->controller = $request->controller;
     load_apps();
     $controller_path = controller_path();
     // check for a controller file in controllers/[resource].php
     if (isset($request->resource)) {
         $cont = $controller_path . $request->resource . ".php";
         if (file_exists($cont)) {
             $this->controller = $request->resource . ".php";
         } elseif (isset($request->templates_resource[$request->resource]) && file_exists($controller_path . $request->templates_resource[$request->resource] . ".php")) {
             $this->controller = $request->templates_resource[$request->resource] . ".php";
         } else {
             if (isset($GLOBALS['PATH']['apps'])) {
                 foreach ($GLOBALS['PATH']['apps'] as $k => $v) {
                     if (file_exists($v['controller_path'] . $request->resource . ".php")) {
                         $this->controller = $request->resource . ".php";
                         $controller_path = $v['controller_path'];
                     }
                 }
             }
         }
     }
     if (is_file($controller_path . $this->controller)) {
         require_once $controller_path . $this->controller;
     } else {
         trigger_error('Sorry, the controller was not found at ' . $controller_path . $this->controller, E_USER_ERROR);
     }
     if (!isset($env['content_types'])) {
         trigger_error('Sorry, the content_types array was not found in the configuration file', E_USER_ERROR);
     }
     $this->negotiator = HTTP_Negotiate::choose($env['content_types']);
 }
开发者ID:voitto,项目名称:dbscript,代码行数:58,代码来源:view.php


示例3: profile

	public function profile () {
		checkLogin();
		include_once(RPC_ROOT . 'includes/lib_transaction_ec.php');
		$user_id = intval($_SESSION['user_id']);
		$user_profile = get_profile($user_id);
		$user_profile['user_id'] = $user_id;
		//var_dump($user_profile);exit;
		jsonExit($user_profile);
	}
开发者ID:noikiy,项目名称:mdwp,代码行数:9,代码来源:user.action.php


示例4: show_page

function show_page($page)
{
    $template = "view/templates/default_template.php";
    if (file_exists($template) && is_file($template)) {
        require_once $template;
    } else {
        require_once "view/templates/default_template.php";
    }
    echo get_document_head();
    echo get_header_start();
    if (is_logged_in()) {
        echo get_logout();
    } else {
    }
    echo get_header_end();
    if (is_logged_in()) {
        echo get_menu();
    } else {
        echo get_guest_menu();
    }
    if (is_logged_in()) {
        if ($page == "startpage") {
            echo "startpage";
        } else {
            if ($page == "fileupload") {
                echo get_fileupload();
            } else {
                if ($page == "nyheter") {
                    echo get_news();
                } else {
                    if ($page == "flowing") {
                        echo get_flowing();
                    } else {
                        if ($page == "event") {
                            echo get_event();
                        } else {
                            if ($page == "profile") {
                                $user_id = 1;
                                echo get_profile($user_id);
                            } else {
                                echo get_default("");
                            }
                        }
                    }
                }
            }
        }
    } else {
        echo get_login();
    }
    echo get_footer();
    echo get_document_end();
}
开发者ID:eva-chaunm,项目名称:paraflow,代码行数:53,代码来源:page.php


示例5: profile

function profile()
{
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    switch ($_SERVER['REQUEST_METHOD']) {
        case 'GET':
            return get_profile($_SESSION['user_id']);
            break;
        default:
            return 'This API can not support ' . $_SERVER['REQUEST_METHOD'] . ' method';
            break;
    }
}
开发者ID:jiusanzhou,项目名称:ecapi,代码行数:12,代码来源:lib_controller_profile.php


示例6: post

function post(&$vars)
{
    extract($vars);
    if (!get_profile_id()) {
        trigger_error('Sorry, the setting could not be saved', E_USER_ERROR);
    }
    $request->set_param(array('setting', 'profile_id'), get_profile_id());
    if (strpos($request->params['setting']['name'], 'password') !== false) {
        $request->set_param(array('setting', 'value'), md5_encrypt($request->params['setting']['value'], $db->dbname));
    }
    $settingname = $request->params['setting']['name'];
    $set = split('\\.', $settingname);
    if (is_array($set) && $set[0] == 'config') {
        if (!member_of('administrators')) {
            trigger_error('Sorry, you must be an administrator to do that', E_USER_ERROR);
        }
        $s = $Setting->find_by('name', $settingname);
        if ($s) {
            $db->delete_record($s);
        }
    }
    if ($settingname == 'app') {
        $do_install = false;
        $app = $settingname;
        $sources = environment('remote_sources');
        $remote_list = array();
        foreach ($sources as $name => $url) {
            $p = get_profile();
            $url = "http://" . $url . "&p=" . urlencode($p->profile_url) . "&a=" . urlencode($app);
            $curl = curl_init($url);
            curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
            curl_setopt($curl, CURLOPT_HEADER, false);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
            $result = curl_exec($curl);
            if ($result) {
                if (trim($result) == 'install') {
                    $do_install = true;
                }
                continue;
            }
            curl_close($curl);
        }
        if (!$do_install) {
            trigger_error('Sorry, you are not authorized to install ' . $app, E_USER_ERROR);
        }
    }
    $resource->insert_from_post($request);
    header_status('201 Created');
    redirect_to($request->resource);
}
开发者ID:Br3nda,项目名称:openmicroblogger,代码行数:50,代码来源:settings.php


示例7: on_wp_login

 function on_wp_login($who)
 {
     //TODO: standardize the USER-META behavoir
     global $wp_version;
     $langs = wp_native_dashboard_collect_installed_languages();
     if (!isset($_POST['wp_native_dashboard_language']) || !in_array($_POST['wp_native_dashboard_language'], $langs)) {
         return;
     }
     if (version_compare($wp_version, '3.0', '>=')) {
         $user = get_user_by('login', $who);
         update_user_meta((int) $user->ID, 'wp_native_dashboard_language', $_POST['wp_native_dashboard_language']);
     } else {
         update_usermeta(get_profile('ID', $who), 'wp_native_dashboard_language', $_POST['wp_native_dashboard_language']);
     }
 }
开发者ID:TakenokoPro,项目名称:antenna,代码行数:15,代码来源:loginselector.php


示例8: get_discount

function get_discount($uid, $src, $op = 'asc', $dot = 0)
{
    global $db, $tpf, $settings;
    $discount_rate = @$db->result_first("select discount_rate from {$tpf}users where userid='{$uid}'");
    if (!$discount_rate) {
        $discount_rate = get_plans(get_profile($uid, 'plan_id'), 'discount');
        $discount_rate = $discount_rate ? $discount_rate : ($settings[discount_rate] ? $settings[discount_rate] : 0);
    }
    if ($dot) {
        if ($op == 'asc') {
            return @round($src * (1 - $discount_rate / 100), 4);
        } elseif ($op == 'desc') {
            return @round($src / (1 - $discount_rate / 100), 4);
        }
    } else {
        if ($op == 'asc') {
            return ceil($src * (1 - $discount_rate / 100));
        } elseif ($op == 'desc') {
            return ceil($src / (1 - $discount_rate / 100));
        }
    }
}
开发者ID:saintho,项目名称:phpdisk,代码行数:22,代码来源:phpdisk.a.inc.php


示例9: show_user_table

function show_user_table($members, $offset, $numToDisplay, $cols)
{
    echo "<table class=bordered border=1 cellpadding=5>\n";
    $rows = ceil($numToDisplay / $cols);
    $count = $offset;
    $numMembers = count($members);
    for ($row = 0; $row < $rows; $row++) {
        if ($count >= $numMembers) {
            break;
        }
        echo "<tr>\n";
        for ($col = 0; $col < $cols; $col++) {
            if ($count < $numMembers) {
                $profile = get_profile($members[$count]);
                if (!$profile) {
                    $numMembers--;
                    continue;
                }
                echo "<td class=bordered width=7% height=64><center>";
                $show_picture = $profile->has_picture;
                if (profile_screening() && $profile->verification != 1) {
                    $show_picture = false;
                }
                if ($show_picture) {
                    echo "<a href=\"" . URL_BASE . "view_profile.php?userid={$members[$count]}\"><img src=\"" . URL_BASE . IMAGE_URL . "{$members[$count]}_sm.jpg\"></a>";
                } else {
                    echo "&nbsp;";
                }
                echo "</center></td><td class=bordered width=33% height=64>\n", get_profile_summary($profile), "</td>";
                $count++;
            } else {
                echo "<td width=7% height=64></td><td width=33% height=64></td>";
            }
        }
        echo "</tr>\n";
    }
    echo "</table>\n";
}
开发者ID:Turante,项目名称:boincweb,代码行数:38,代码来源:update_profile_pages.php


示例10: array

$fields = array('period' => array(T_ZBX_INT, O_OPT, P_NZERO, BETWEEN(ZBX_MIN_PERIOD, ZBX_MAX_PERIOD), null), 'from' => array(T_ZBX_INT, O_OPT, P_NZERO, null, null), 'stime' => array(T_ZBX_INT, O_OPT, P_NZERO, null, null), 'border' => array(T_ZBX_INT, O_OPT, P_NZERO, IN('0,1'), null), 'name' => array(T_ZBX_STR, O_OPT, NULL, null, null), 'width' => array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0, 65535), null), 'height' => array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0, 65535), null), 'graphtype' => array(T_ZBX_INT, O_OPT, NULL, IN('2,3'), null), 'graph3d' => array(T_ZBX_INT, O_OPT, P_NZERO, IN('0,1'), null), 'legend' => array(T_ZBX_INT, O_OPT, P_NZERO, IN('0,1'), null), 'items' => array(T_ZBX_STR, O_OPT, NULL, null, null));
check_fields($fields);
$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']);
开发者ID:phedders,项目名称:zabbix,代码行数:31,代码来源:chart7.php


示例11: die

            $result['html'] = $smarty->fetch('library/member_info.lbi');
        }
        $result['error'] = 1;
        $result['content'] = $_LANG['login_failure'];
    }
    die($json->encode($result));
} elseif ($action == 'logout') {
    if ((!isset($back_act) || empty($back_act)) && isset($GLOBALS['_SERVER']['HTTP_REFERER'])) {
        $back_act = strpos($GLOBALS['_SERVER']['HTTP_REFERER'], 'user.php') ? './index.php' : $GLOBALS['_SERVER']['HTTP_REFERER'];
    }
    $user->logout();
    $ucdata = empty($user->ucdata) ? "" : $user->ucdata;
    show_message($_LANG['logout'] . $ucdata, array($_LANG['back_up_page'], $_LANG['back_home_lnk']), array($back_act, 'index.php'), 'info');
} elseif ($action == 'profile') {
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    $user_info = get_profile($user_id);
    /* 取出注册扩展字段 */
    $sql = 'SELECT * FROM ' . $ecs->table('reg_fields') . ' WHERE type < 2 AND display = 1 ORDER BY dis_order, id';
    $extend_info_list = $db->getAll($sql);
    $sql = 'SELECT reg_field_id, content ' . 'FROM ' . $ecs->table('reg_extend_info') . " WHERE user_id = {$user_id}";
    $extend_info_arr = $db->getAll($sql);
    $temp_arr = array();
    foreach ($extend_info_arr as $val) {
        $temp_arr[$val['reg_field_id']] = $val['content'];
    }
    foreach ($extend_info_list as $key => $val) {
        switch ($val['id']) {
            case 1:
                $extend_info_list[$key]['content'] = $user_info['msn'];
                break;
            case 2:
开发者ID:flyindance,项目名称:jiayinobs,代码行数:31,代码来源:user.php


示例12: var_export

     $log .= '<? exit; ?>SERVER:' . var_export($_SERVER) . LF;
     $log .= '------------------------------' . LF;
     write_file(PHPDISK_ROOT . 'system/buy_vip.log.php', $log, 'ab+');
 }
 if (!$task || !$money || !$vip_id) {
     die(__('money_or_payment_method_not_select'));
 } else {
     if (!$money) {
         $error = false;
         $sysmsg[] = __('money_invalid');
     }
     $money = $money ? $money : 1;
 }
 if ($task == 'mywealth') {
     form_auth(gpc('formhash', 'P', ''), formhash());
     if (get_profile($pd_uid, 'wealth') < $money) {
         $error = true;
         $sysmsg[] = __('mywealth_too_small');
     }
     if (!$error) {
         $my_order = 'm' . get_order_number();
         $num = @$db->result_first("select count(*) from {$tpf}vip_orders where order_number='{$my_order}' and pay_method='{$task}' and userid='{$pd_uid}'");
         if (!$num) {
             $ins = array('pay_method' => $task, 'userid' => $pd_uid, 'vip_id' => $vip_id, 'order_number' => $my_order, 'total_fee' => $money, 'pay_status' => 'pendding', 'in_time' => $timestamp, 'ip' => $onlineip);
             $db->query_unbuffered("insert into {$tpf}vip_orders set " . $db->sql_array($ins) . ";");
         }
         $db->query_unbuffered("update {$tpf}users set wealth=wealth-{$money} where userid='{$pd_uid}'");
         $md5_sign = md5($my_order . $money . $pd_uid . $task);
         echo '<div align="center">' . __('buy_vip_doing') . '</div>';
         echo '<script>document.location="' . urr("payment", "action={$task}&order_number={$my_order}&sign={$md5_sign}") . '";</script>';
     } else {
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:vip.php


示例13: array_merge

        if (isset($services[$row['serviceid']])) {
            $services[$row['serviceid']] = array_merge($services[$row['serviceid']], $row);
        } else {
            $services[$row['serviceid']] = $row;
        }
        if (isset($row['serviceupid'])) {
            $services[$row['serviceupid']]['childs'][] = array('id' => $row['serviceid'], 'soft' => 0, 'linkid' => 0);
        }
        if (isset($row['servicedownid'])) {
            $services[$row['serviceid']]['childs'][] = array('id' => $row['servicedownid'], 'soft' => 1, 'linkid' => $row['linkid']);
        }
    }
    $treeServ = array();
    createShowServiceTree($services, $treeServ);
    //return into $treeServ parametr
    //permission issue
    $treeServ = del_empty_nodes($treeServ);
    $tree = new CTree($treeServ, array('caption' => bold(S_SERVICE), 'status' => bold(S_STATUS), 'reason' => bold(S_REASON), 'sla' => bold(S_SLA_LAST_7_DAYS), 'sla2' => bold(nbsp(S_SLA)), 'graph' => bold(S_GRAPH)));
    if ($tree) {
        $url = '?fullscreen=' . ($_REQUEST['fullscreen'] ? '0' : '1');
        $fs_icon = new CDiv(SPACE, 'fullscreen');
        $fs_icon->AddOption('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
        $fs_icon->AddAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
        $tab = create_hat(S_IT_SERVICES_BIG, $tree->getHTML(), null, 'hat_services', get_profile('web.srv_status.hats.hat_services.state', 1));
        $tab->Show();
        unset($tab);
    } else {
        error('Can not format Tree. Check logik structure in service links');
    }
}
include_once "include/page_footer.php";
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:srv_status.php


示例14: get_profile

<?php

include "header.php";
include "Queries.php";
include "utils.php";
if (!isset($_SESSION['username'])) {
    die;
}
$username = $_SESSION['username'];
if (isset($_GET['id'])) {
    $username = $_GET['id'];
}
$user_profile = get_profile($username);
if ($user_profile == null) {
    die("Could not get user profile");
}
if (isset($_GET['action'])) {
    if ($_GET['action'] == "addmoderator") {
        if (!isset($_GET['id'])) {
            die("Must specify id for this action");
        }
        make_moderator($_GET['id']);
    } else {
        if ($_GET['action'] == "removemoderator") {
            if (!isset($_GET['id'])) {
                die("Must specify id for this action");
            }
            remove_moderator($_GET['id']);
        } else {
            if ($_GET['action'] == "delete") {
                delete_user($_SESSION['username']);
开发者ID:ekevans8,项目名称:DB_Project,代码行数:31,代码来源:profile.php


示例15: action_account_security

function action_account_security()
{
    // 获取全局变量
    $user = $GLOBALS['user'];
    $_CFG = $GLOBALS['_CFG'];
    $_LANG = $GLOBALS['_LANG'];
    $smarty = $GLOBALS['smarty'];
    $db = $GLOBALS['db'];
    $ecs = $GLOBALS['ecs'];
    $user_id = $_SESSION['user_id'];
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    $user_info = get_profile($user_id);
    $smarty->assign('info', $user_info);
    $smarty->display('user_transaction.dwt');
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:15,代码来源:user.php


示例16: CScript

        $icon->addAction('onclick', new CScript("javascript: rm4favorites('graphid','" . $_REQUEST['graphid'] . "',0);"));
    } else {
        $icon = new CDiv(SPACE, 'iconplus');
        $icon->addOption('title', S_ADD_TO . ' ' . S_FAVORITES);
        $icon->addAction('onclick', new CScript("javascript: add2favorites('graphid','" . $_REQUEST['graphid'] . "');"));
    }
    $icon->addOption('id', 'addrm_fav');
    $url = '?graphid=' . $_REQUEST['graphid'] . ($_REQUEST['fullscreen'] ? '' : '&fullscreen=1');
    $fs_icon = new CDiv(SPACE, 'fullscreen');
    $fs_icon->addOption('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
    $fs_icon->addAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
    $rst_icon = new CDiv(SPACE, 'iconreset');
    $rst_icon->addOption('title', S_RESET);
    $rst_icon->addAction('onclick', new CScript("javascript: graphload(SCROLL_BAR.dom_graphs, " . (time() + 100000000) . ", 3600, false);"));
}
$charts_hat = create_hat(S_GRAPHS_BIG, $p_elements, array($icon, $rst_icon, $fs_icon), 'hat_charts', get_profile('web.charts.hats.hat_charts.state', 1));
$charts_hat->show();
if ($_REQUEST['graphid'] > 0) {
    // NAV BAR
    $stime = get_min_itemclock_by_graphid($_REQUEST['graphid']);
    $stime = is_null($stime) ? 0 : $stime;
    $bstime = time() - $effectiveperiod;
    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,' . $effectiveperiod . ',' . $stime . ',0,' . $bstime . '); showgraphmenu("graph");';
    if ($graphtype == GRAPH_TYPE_NORMAL || $graphtype == GRAPH_TYPE_STACKED) {
        $script .= 'graph_zoom_init("' . $dom_graph_id . '",' . $bstime . ',' . $effectiveperiod . ',ZBX_G_WIDTH,' . $graph_height . ',true);';
    }
    zbx_add_post_js($script);
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:charts.php


示例17: old__construct

 function old__construct($section = 'profile')
 {
     global $path_site;
     global $meta_desc;
     global $meta_addtl;
     global $meta_keywords;
     global $title;
     global $_REQUEST;
     global $states;
     global $ccExpMM;
     global $ccExpYY;
     global $cl;
     global $profnav;
     @($method = $_REQUEST['method']);
     @($action = $_REQUEST['action']);
     @($call = $_REQUEST['call']);
     // a call is an ajax call.
     // SETUP PAGE OUTPUT VARIABLES START \\
     $returnmsg = NULL;
     $disabled = NULL;
     $returnmsg_addAddr = NULL;
     $contentOutput = NULL;
     // PROFILE HOME \\
     if ($section == 'profile') {
         // PROF LEFT NAV ACTIVE START \\
         $profnav['acctinfo'] = 'active';
         // PROF LEFT NAV ACTIVE END \\
         if (!isset($_SESSION['user']['id'])) {
             redirect($path_site . 'profile/login.php');
         }
         // INIT OBJECTS \\
         $returnmsg_prof = NULL;
         if (isset($_REQUEST['submitupdate'])) {
             // check for errors
             if ($errors = $this->checkProfile($_REQUEST)) {
                 $returnmsg_prof = replace_output(ERROR_PROFILE2, array('errors' => $errors));
             } else {
                 // no errors, Login user and start session.
                 if ($this->submitUser($_REQUEST, 'profile')) {
                     // move user back to last
                     $returnmsg_prof = CONF_MSG_1;
                     unset($_REQUEST);
                 } else {
                     $returnmsg_prof = ERROR_MSG_CONTACT2;
                 }
             }
         }
         // Get Profile Information
         $info = get_profile($_SESSION['user']['id']);
         // check if newsletter is selected.
         @($info['agreeNewsletter'] == 1) ? $data_nl = ' checked="checked"' : ($data_nl = NULL);
         $txtStates = NULL;
         $addStates = NULL;
         foreach ($states as $key => $value) {
             $sel = NULL;
             $selAdd = NULL;
             if (stripslashes($info['state']) == $key) {
                 $sel = ' selected="selected"';
             }
             if (@$_REQUEST['addState'] == $key) {
                 $selAdd = ' selected="selected"';
             }
             $txtStates .= '<option value="' . $key . '"' . $sel . '>' . $value . '</option>';
             $addStates .= '<option value="' . $key . '"' . $selAdd . '>' . $value . '</option>';
         }
         // CALL CONTENT AND REPLACE TAGS INSIDE
         $content = $path_site . 'inc/cb/acctProfile.inc';
         $returnOutput = new main_output($content);
         // replace tags from template
         @$returnOutput->replace_tags(array('path_site' => $path_site, 'return_msg' => $returnmsg_prof, 'data_un' => stripslashes($info['username']), 'data_em' => stripslashes($info['email']), 'data_fn' => stripslashes($info['firstName']), 'data_mi' => stripslashes($info['mi']), 'data_ln' => stripslashes($info['lastName']), 'data_addr1' => stripslashes($info['addr1']), 'data_addr2' => stripslashes($info['addr2']), 'data_city' => stripslashes($info['city']), 'states' => $txtStates, 'data_zc1' => substr(stripslashes($info['zip']), 0, 5), 'data_zc2' => substr(stripslashes($info['zip']), 5, 4), 'data_phone1' => substr(stripslashes($info['mainPhone']), 0, 3), 'data_phone2' => substr(stripslashes($info['mainPhone']), 3, 3), 'data_phone3' => substr(stripslashes($info['mainPhone']), 6, 4), 'data_phone4' => substr(stripslashes($info['altPhone']), 0, 3), 'data_phone5' => substr(stripslashes($info['altPhone']), 3, 3), 'data_phone6' => substr(stripslashes($info['altPhone']), 6, 4), 'data_nl' => $data_nl, 'site_baseurl' => SITE_BASEURL_SECURE));
         // Call the output
         $contentOutput .= $returnOutput->output;
         // GET TEMP HEADER
         $temp_notif_output = get_profile_notif();
         // CALL CONTENT AND REPLACE TAGS INSIDE
         $content = $path_site . 'inc/tpl/profile_body.inc';
         $returnOutput = new main_output($content);
         // replace tags from template
         @$returnOutput->replace_tags(array('path_site' => SITE_BASEURL_SECURE, 'site_baseurl' => SITE_BASEURL_SECURE, 'return_msg' => $returnmsg, 'profile_nav' => $cl->compile_profileNav($profnav), 'box_four' => $temp_notif_output . replace_output(file_get_contents($path_site . 'inc/cb/box_four.inc'), array('path_site' => SITE_BASEURL_SECURE, 'header_style' => 'nav', 'list' => replace_output(HH_PM_PROF_NAV1, array('path_site' => SITE_BASEURL_SECURE)), 'content' => $contentOutput))));
         // Call the output
         $this->output .= $returnOutput->output;
     } else {
         if ($section == 'forgot') {
             // see if someone visits the registration page, but it already logged in, send them to thier profile homepage
             if (isset($_SESSION['user']['id'])) {
                 redirect($path_site . 'profile/');
             }
             // else, now check if they're registering or we're processing a registration.
             $returnmsg = NULL;
             if (isset($_REQUEST['submitforgot'])) {
                 // check for errors
                 if ($errors = $this->checkForgot($_REQUEST)) {
                     $returnmsg = replace_output(ERROR_PROFILE2, array('errors' => $errors));
                 } else {
                     // no errors, Login user and start session.
                     if ($this->submitUser($_REQUEST, 'forgot')) {
                         // move user back to last
                         $returnmsg = CONF_PROFILE_FORGOT1;
                         $meta_addtl .= replace_output(META_REDIRECT, array('path_site' => $path_site, 'secs' => '10'));
                         $disabled = ' disabled="disabled"';
//.........这里部分代码省略.........
开发者ID:Jonathonbyrd,项目名称:5TwentyCMS,代码行数:101,代码来源:profile.php


示例18: url_param

        //			$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,
				'interval' 	=> $USER_DETAILS['refresh'],
				'url'	=>	zbx_empty($_SERVER['QUERY_STRING'])?'':'?'.$_SERVER['QUERY_STRING'],
			)
	);
//*/
$url = '?fullscreen=' . ($_REQUEST['fullscreen'] ? '0' : '1');
$fs_icon = new CDiv(SPACE, 'fullscreen');
$fs_icon->AddOption('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
$fs_icon->AddAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
$latest_hat = create_hat(S_LATEST_DATA_BIG, $p_elements, array($fs_icon), ZBX_PAGE_MAIN_HAT, get_profile('web.latest.hats.hat_latest.state', 1));
$latest_hat->Show();
//	add_refresh_objects($refresh_tab);
include_once 'include/page_footer.php';
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:latest.php


示例19: __

");
		}else{
			alert("<?php 
        echo __('not_ie_copy_tips');
        ?>
");
		}	
	}
}
</script>
<?php 
    }
    ?>
</div>
<!-- end not action -->
<?php 
}
?>
<div class="clear"></div>
</div>
<?php 
if (!$pd_uid || !$settings['open_vip']) {
    echo stripslashes(base64_decode(get_plans(get_profile($file[userid], 'plan_id'), 'viewfile_code')));
} elseif ($settings['open_vip'] && get_profile($pd_uid, 'vip_end_time') < $timestamp || get_vip(get_profile($pd_uid, 'vip_id'), 'pop_ads')) {
    echo stripslashes(base64_decode(get_plans(get_profile($file[userid], 'plan_id'), 'viewfile_code')));
}
if (get_profile($file[userid], 'open_custom_stats') && get_profile($file[userid], 'check_custom_stats')) {
    echo stripslashes(get_stat_code($file[userid]));
}
?>
<br /><br />
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:pd_viewfile.tpl.php


示例20: add_audit

                                            $audit_action = $_REQUEST['set_users_status'] == GROUP_STATUS_ENABLED ? AUDIT_ACTION_ENABLE : AUDIT_ACTION_DISABLE;
                                            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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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