本文整理汇总了PHP中UserController::listUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP UserController::listUsers方法的具体用法?PHP UserController::listUsers怎么用?PHP UserController::listUsers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserController
的用法示例。
在下文中一共展示了UserController::listUsers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UserController
<div id="cart">
<p><a title="logout" name="op" href="../index.php?op=logout">Logout</a></p>
</div>
<br>
</div>
</div>
<!-- END Header -->
<!--Main-->
<div class="wrapper1">
<br>
<h1>These users are registered in our shop:</h1>
<div>
<?php
include_once '../controller/UserController.php';
$user_controller = new UserController();
$user_controller->listUsers();
?>
<br>
</div>
<form action="../index.php" method="post">
<input type="submit" class="submit" name="op" value="Back">
</form>
</div>
</div>
<div id="footer-push"></div>
<!-- END Wrapper -->
<!-- Footer -->
<p class="optimize">
Optimized for Firefox!
</p>
<div id="footer">
示例2: switch
switch ($_POST['sec']) {
case "create":
$controller->createUser($_POST);
break;
case "update":
$controller->updateUser($_POST);
break;
case "updatemyprofile":
$controller->updateMyProfile($_POST);
break;
}
} else {
switch ($_GET['sec']) {
case "Activate":
$controller->__changeStatus($_GET['userId'], 1);
$controller->listUsers('ajax');
break;
case "Inactivate":
$controller->__changeStatus($_GET['userId'], 0);
$controller->listUsers('ajax');
break;
case "delete":
$controller->__deleteUser($_GET['userId']);
$controller->listUsers('ajax');
break;
case "edit":
$controller->editUser($_GET['userId']);
break;
case "new":
$controller->newUser();
break;
示例3: foreach
case "create":
$controller->createUser($_POST);
break;
case "update":
$controller->updateUser($_POST);
break;
case "updatemyprofile":
$controller->updateMyProfile($_POST);
break;
case "activateall":
if (!empty($_POST['ids'])) {
foreach ($_POST['ids'] as $id) {
$controller->__changeStatus($id, 1);
}
}
$controller->listUsers($_POST);
break;
case "inactivateall":
if (!empty($_POST['ids'])) {
foreach ($_POST['ids'] as $id) {
$controller->__changeStatus($id, 0);
}
}
$controller->listUsers($_POST);
break;
case "deleteall":
if (!empty($_POST['ids'])) {
foreach ($_POST['ids'] as $id) {
$controller->__deleteUser($id);
}
}
示例4:
<link rel="stylesheet" type="text/css" href="../scripts/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../scripts/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="../scripts/jscolor/jscolor.js"></script>
<title>420PX</title>
<?php
echo '
<script>
$(function() {
var availableTags = [' . $user_controller->listUsers() . '
];
$( "#user-list" ).autocomplete({
source: availableTags
});
});
</script>';
?>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand" href="layout.php">Accueil</a>
</div>