users_online.inc.php
来自「ATutor是一个学习管理系统(LCMS/LMS), 为教师和学生建立一个网络教」· PHP 代码 · 共 45 行
PHP
45 行
<?php/************************************************************************//* ATutor *//************************************************************************//* Copyright (c) 2002-2006 by Greg Gay, Joel Kronenberg & Heidi Hazelton*//* Adaptive Technology Resource Centre / University of Toronto *//* http://atutor.ca *//* *//* 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. *//************************************************************************/// $Id: users_online.inc.php 6467 2006-07-04 18:32:45Z joel $if (!defined('AT_INCLUDE_PATH')) { exit; }global $db;global $_base_path;global $savant;global $system_courses;ob_start(); $sql = "SELECT * FROM ".TABLE_PREFIX."users_online WHERE course_id=$_SESSION[course_id] AND expiry>".time()." ORDER BY login";$result = mysql_query($sql, $db);if ($row = mysql_fetch_assoc($result)) { echo '<ul style="padding: 0px; list-style: none;">'; do { $type = 'class="user"'; if ($system_courses[$_SESSION['course_id']]['member_id'] == $row['member_id']) { $type = 'class="user instructor" title="'._AT('instructor').'"'; } echo '<li style="padding: 3px 0px;"><a href="'.$_base_path.'profile.php?id='.$row['member_id'].'" '.$type.'>'.AT_print($row['login'], 'members.login').'</a></li>'; } while ($row = mysql_fetch_assoc($result)); echo '</ul>';} else { echo '<em>'._AT('none_found').'</em><br />';}echo '<em>'._AT('guests_not_listed').'</em>';$savant->assign('dropdown_contents', ob_get_contents());ob_end_clean();$savant->assign('title', _AT('users_online'));$savant->display('include/box.tmpl.php');?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?