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


PHP users::close方法代码示例

本文整理汇总了PHP中users::close方法的典型用法代码示例。如果您正苦于以下问题:PHP users::close方法的具体用法?PHP users::close怎么用?PHP users::close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在users的用法示例。


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

示例1: getClassList

function getClassList($classID)
{
    //print "classID: $classID";
    $users = new users();
    $classList = $users->getClassList($classID, false);
    $users->close();
    //print_r($classList);
    return $classList;
}
开发者ID:anzhao,项目名称:CLAS,代码行数:9,代码来源:configure_ui.php

示例2: dirname

<?php

require_once dirname(__FILE__) . "/includes/global_deploy_config.php";
require_once dirname(__FILE__) . "/includes/common.inc.php";
require_once dirname(__FILE__) . "/database/users.php";
startSession();
// log session end
$users = new users();
$users->recordLogout($_SESSION['user_id']);
$users->close();
// end PHP session
endSession();
// kill Shibboleth session
header("Location: {$logoutURL}");
exit;
开发者ID:anzhao,项目名称:CLAS,代码行数:15,代码来源:logout.php

示例3: json_encode

 *  Copyright (C) 2014  Shane Dawson, University of South Australia, Australia
 *  Copyright (C) 2014  An Zhao, University of South Australia, Australia
 *  Copyright (C) 2014  Dragan Gasevic, University of Edinburgh, United Kingdom
 *  Copyright (C) 2014  Negin Mirriahi, University of New South Wales, Australia
 *  Copyright (C) 2014  Abelardo Pardo, University of Sydney, Australia
 *  Copyright (C) 2014  Alan Kingstone, University of British Columbia, Canada
 *  Copyright (C) 2014  Thomas Dang, , University of British Columbia, Canada
 *  Copyright (C) 2014 John Bratlien, University of British Columbia, Canada 
 *
 *  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 3 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, see <http://www.gnu.org/licenses/>
 */
require_once dirname(__FILE__) . "/../includes/common.inc.php";
require_once dirname(__FILE__) . "/../database/users.php";
startSession();
// TODO: validate input
$groupID = $_GET['group_id'];
$user = new users();
$groupMembers = $user->getGroupMembers($groupID);
$user->close();
print json_encode($groupMembers);
开发者ID:abelardopardo,项目名称:oval,代码行数:31,代码来源:get_group_members.php

示例4: UTIL_setDefaultUISettings

function UTIL_setDefaultUISettings($userIDs, $verbose = true)
{
    // Set the UI setting, put the "time to show annotation parameter here"
    $users = new users();
    foreach ($userIDs as $ID) {
        $users->setUI($ID, "annotation", "yes", "by-default", 0);
    }
    $users->close();
    if ($verbose) {
        print "<b>Set default UI settings for all users added so far</b><br/><br/>";
    }
}
开发者ID:abelardopardo,项目名称:oval,代码行数:12,代码来源:clas_adm.php

示例5: setVideoGroup

 function setVideoGroup($videoID, $groupID)
 {
     //print "setVideoGroup($videoID, $groupID)";
     // TODO: multiple groups per video is NOT yet possible!
     // Does videoGroup need a to use both groupID and videoID as a primary key or can we
     // just use an ID? Currently we can't just insert more entries into videoGroup
     if (is_null($this->getVideoGroup($videoID))) {
         $query = "INSERT INTO videoGroup VALUES ('{$videoID}', {$groupID})";
     } else {
         // this would return an error if more than one group in a video
         $query = "UPDATE videoGroup SET group_id={$groupID} WHERE video_id LIKE '{$videoID}'";
     }
     $result = mysql_query($query, $this->link);
     //print "query: $query<br />";
     if (!$result) {
         die('Invalid query (setVideoGroup): ' . mysql_error());
     }
     //$this->removeVideoGroup($videoID);
     $users = new users();
     $students = $users->getGroupMembers($groupID);
     $instructorsAndTAs = $users->getClassInstructorsAndTAs($groupID);
     $userIDs = array_merge($students, $instructorsAndTAs);
     // grant ownership of video to course instructor and TAs
     $groupOwners = $users->getClassInstructorsAndTAs($groupID);
     $users->close();
     // empty videoOwners before repopulating
     $this->removeVideoOwners($videoID);
     foreach ($groupOwners as $owner) {
         $query = "INSERT INTO videoOwners VALUES ('{$videoID}', {$owner})";
         $result = mysql_query($query, $this->link);
         if (!$result) {
             die('Invalid query (setVideoGroup - adding video owners): ' . mysql_error());
         }
     }
     $this->removeAllUsersFromVideo($videoID);
     $this->addUsersToVideo($videoID, $groupID, $userIDs);
 }
开发者ID:abelardopardo,项目名称:oval,代码行数:37,代码来源:media.php


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