本文整理汇总了PHP中UserDB::GetAllUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDB::GetAllUsers方法的具体用法?PHP UserDB::GetAllUsers怎么用?PHP UserDB::GetAllUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDB
的用法示例。
在下文中一共展示了UserDB::GetAllUsers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
if (!isset($_SESSION['user']) || $_SESSION['user']['role'] != "admin") {
header("Location: index.php");
}
include_once 'connect.php';
include_once 'db/UserDB.php';
include_once 'db/GenericDB.php';
$db = new DBHandler();
$userDB = new UserDB($db);
$genericDB = new GenericDB($db);
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$_SESSION['settings']['SystemMessage'] = $_POST['generalMessage'];
$_SESSION['settings']['MaxReservationCount'] = $_POST['maxRCount'];
$genericDB->PersistSettings();
}
$genericDB->GetSettings();
$users = $userDB->GetAllUsers();
?>
<!DOCTYPE>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>BookÉTS</title>
<!-- Favicon -->
<link rel="shortcut icon" type="image/icon" href="assets/images/favicon.ico"/>
<!-- Font Awesome -->
<link href="assets/css/font-awesome.css" rel="stylesheet">
<!-- Bootstrap -->