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


PHP getUserSessionObj函数代码示例

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


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

示例1: getUserSessionObj

 * Copyright (c) 2014  Renaissance Computing Institute. All rights reserved.
 *
 * This software is open source. See the bottom of this file for the license.
 *
 * Renaissance Computing Institute,
 * (A Joint Institute between the University of North Carolina at Chapel Hill,
 * North Carolina State University, and Duke University)
 * http://www.renci.org
 *
 * For questions, comments please contact software@renci.org
 *
 */
// get the user session helper object
include_once 'UserHelper.php';
// get the user info object from the session
$userObj = getUserSessionObj();
// is the user logged in
if (!isset($userObj)) {
    header('Location: ../Login/Login.php');
}
/**
 *
 * Creates HTML for a pulldown from a general php array
 * The optional javascript $onChangeJS may contain single quotes, but not double
 * quotes.
 *
 * @param $name
 * @param $id
 * @param $display
 * @param $selectedVal
 * @param $onChangeJS
开发者ID:zekuny,项目名称:RTPUI,代码行数:31,代码来源:Pulldown.php

示例2: getUserSessionObj

 * North Carolina State University, and Duke University)
 * http://www.renci.org
 *
 * For questions, comments please contact software@renci.org
 *
 */
// include the site constants
include_once "Constants.php";
// include the for parameter helper
include_once "GetFormParams.php";
// include the form element helpers
include_once "FormsUtil.php";
// get the user session helper object
include_once 'UserHelper.php';
// get the user info object from the session
$userInfo = getUserSessionObj();
// init the validation variables
$validationMessage = 'Functionality not implemented yet';
$validated = true;
// get whether they clicked proceed or other possible info
getExtraParams(array("Update"));
// set the title name to be displayed in the header
$title = "Note details";
// output the basic header HTML
include "../Includes/header.php";
// message for the user on post operations
if (isset($validationMessage) && !empty($validationMessage)) {
    echo '<div class="' . ($validated == true ? 'info' : 'err') . '">' . $validationMessage . '</div>';
}
// create a new form
echo '<form action="NoteDetails.php" method="post">';
开发者ID:zekuny,项目名称:RTPUI,代码行数:31,代码来源:NoteDetails.php

示例3: doSetEvidence

/**
 * Sets the evidence data for the passed in loc var ID
 *
 */
function doSetEvidence($geneName, $name, $type, $value)
{
    // init a evidence data element
    $evidence = null;
    // init a index
    $i = 0;
    // get the user info object from the session
    $userObj = getUserSessionObj();
    // do we have a evidence object
    if (isset($userObj->Evidence)) {
        // find the evidence if it exists
        foreach ($userObj->Evidence as $item) {
            // is this the one we are looking for
            if ($item->geneName == $geneName) {
                // save the evidence
                $evidence = $item;
                // no need to continue
                break;
            }
            //increment the index counter
            $i++;
        }
    }
    // does the evidence already exist
    if (isset($evidence)) {
        // overwrite the current value
        $userObj->Evidence[$i]->value = $value;
        echo '{"error": "doSetEvidence(' . $geneName . ') - Data overwritten"}';
    } else {
        // create a new evidence object
        $evidence = new Evidence();
        // save the data in the object
        $evidence->setData($geneName, $name, $value, $type);
        // and save it to the user object
        $userObj->Evidence[] = $evidence;
        // encode and send the data
        echo '{"data":' . json_encode($evidence) . '}';
    }
    // terminate the data stream
    die;
}
开发者ID:bpow,项目名称:Hearsay,代码行数:45,代码来源:AjaxData.php


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