本文整理匯總了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 -->