示例#1
0
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */
require_once dirname(__FILE__) . '/common.php';
dgr_require('/includes/user.php');
dgr_startup();
try {
    $user = new DGradeUser();
    $style = dgr_get_style('.', $user->get_styleid());
} catch (Exception $e) {
    /* user not logged in */
    dgr_redirect('index.php');
}
if ($user->get_level() == 0) {
    $classes = dgr_get_classes();
    $users = dgr_get_users(true);
    if (isset($_GET['id']) && $_GET['id'] > 0) {
        $classid = $_GET['id'];
        $loadclass = 'true';
    } else {
        $classid = 0;
        $loadclass = 'false';
    }
} else {
    $classid = $user->get_tutored();
    if ($classid == 0) {
        die;
    }
    $loadclass = 'true';
}
?>
示例#2
0
 *      MA 02110-1301, USA.
 */
require_once dirname(__FILE__) . '/common.php';
dgr_require('/includes/user.php');
dgr_startup();
try {
    $user = new DGradeUser();
    $style = dgr_get_style('.', $user->get_styleid());
} catch (Exception $e) {
    /* user not logged in */
    dgr_redirect('index.php');
}
if ($user->get_level() != 0) {
    die;
}
$users = dgr_get_users();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<title>DGrade - <?php 
echo gettext('users');
?>
</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="generator" content="Geany 0.18" />
	<link type="text/css" rel="stylesheet" href="<?php 
echo $style;
} else {
    $classid = $user->get_tutored();
    if ($classid == 0) {
        die;
    }
}
$semesters = dgr_get_semesters();
if ($classid > 0 && count($semesters) > 0) {
    $semid = $semesters[0]['id'];
    $class = new DGradeClass($classid);
    $lc = true;
} else {
    $lc = false;
}
$subjects = dgr_get_subjects();
$teachers = dgr_get_users(true);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<title>DGrade - <?php 
echo gettext('subjects');
?>
</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="generator" content="Geany 0.18" />
	<link type="text/css" rel="stylesheet" href="<?php 
echo $style;