當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。