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

PHP getUserSessionObj函数代码示例

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

本文整理汇总了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 [email protected]
 *
 */
// 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 [email protected]
 *
 */
// 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;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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