Example #1
0
 public function getContent()
 {
     $user = User::listUser();
     foreach ($user as $value) {
         $list[] = $value;
         $this->tpl->user = $list;
     }
     return $this->fetch($this->name . DS . "content.tpl");
 }
Example #2
0
<?php

$user = new User();
$userList = $user->listUser();
foreach ($userList as $data) {
    echo $data['username'];
}
Example #3
0
<?php

include_once LIB_PATH . "Table/User.class.php";
$tb_user = new User();
$list = $tb_user->listUser();
/*
if ($list) {
    foreach ($list as $key => $value) {
        $date = $value['log_time'];



    }    
}
*/
$tpl->list = $list;
Example #4
0
$param["at"] = $tools->sql_injection_anti($_GET['at']);
if (empty($param["at"])) {
    $param["at"] = 0;
}
$param["limit"] = 50;
$param['account'] = $_SESSION['account'];
include_once LIB_PATH . "Table/User.class.php";
$tb_user = new User();
$counts = $tb_user->countUser();
$tpl->counts = $counts;
$pageBar['url'] = "index.php?page=user/list&at=";
$pageBar['current'] = floor($param["at"]);
// 當前頁數
$pageBar['pageNums'] = ceil($counts / $param["limit"]);
// 總頁數
$pageBar['rowNums'] = floor($counts);
// 總筆數
$tpl->pageBar = $pageBar;
$offset = $param["at"] * $param["limit"];
$list = $tb_user->listUser($offset, $param["limit"]);
/*
if ($list) {
    foreach ($list as $key => $value) {
        $date = $value['log_time'];



    }    
}
*/
$tpl->list = $list;
Example #5
0
    while ($i < $size) {
        $tab[] = subject::getAllSubject();
        $i++;
    }
    $subjectTeacher = array();
    $i = 0;
    $j = 0;
    while ($i < $size) {
        $size2 = sizeof($tab[$i]);
        while ($j < $size2) {
            $subjectTeacher[$tab[$i][$j]['teacherId']] = $tab[$i][$j]['subjectName'];
            $j++;
        }
        $i++;
    }
    $alluser = User::listUser();
    $allclass = StudentClass::getAllClass();
    $app->render('admin/gestionUser.php', array('alladmin' => $alladmin, 'allteacher' => $allteacher, 'alluser' => $alluser, 'allclass' => $allclass, 'subjectTeacher' => $subjectTeacher));
})->name('gestionUser');
$app->get('/delUser/:userId', function ($userId) use($app) {
    User::delUser($userId);
    $app->redirect($app->urlFor('gestionUser'));
})->name('delUser');
$app->get('/delTeacher/:teacherId', function ($teacherId) use($app) {
    User::delTeacher($teacherId);
    $app->redirect($app->urlFor('gestionUser'));
})->name('delTeacher');
$app->get('/delAdmin/:adminId', function ($adminId) use($app) {
    User::delAdmin($adminId);
    $app->redirect($app->urlFor('gestionUser'));
})->name('delAdmin');