本文整理汇总了PHP中UserDAO::getAllActiveUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDAO::getAllActiveUsers方法的具体用法?PHP UserDAO::getAllActiveUsers怎么用?PHP UserDAO::getAllActiveUsers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDAO
的用法示例。
在下文中一共展示了UserDAO::getAllActiveUsers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_return
* User: tookuk
* Date: 15.06.15
* Time: 20:41
*/
ini_set("display_errors", 1);
error_reporting(E_ALL);
require_once "../classes/UserDAO.php";
require_once "../classes/AspidAuth.php";
if ($_POST != null) {
$auth = new AspidAuth();
if (!$auth->checkRole("RENEW_LIST")) {
do_return(null, "Нет доступа!");
}
$userDao = new UserDAO();
if (isset($_POST['jsn'])) {
$membersInBase = $userDao->getAllActiveUsers();
foreach ($membersInBase as $member) {
if (!in_array($member['vkuid'], json_decode($_POST['jsn']))) {
$userDao->setUserStatusByVkuid($member['vkuid'], 6);
}
}
do_return("Non-members deactivated", "");
}
$userDao->renewAspid($_POST['vkuid'], $_POST['vkname']);
do_return("Aspid renewed", "");
} else {
do_return("", "POST is empty!");
}
function do_return($msg, $err)
{
echo '
示例2: Navbar
<body style="background-image: none; background-color: #000C00;">
<?php
(new Navbar())->show('USTAV');
?>
<div class="container-fluid blackblock" style="height: 100%;">
<div class="row blackblock lowerblock" style="padding: 60px 0px 60px 0px;">
<?php
$auth = new AspidAuth();
$member = $auth->authOpenAPIMember();
if ($member) {
$userDao = new UserDAO();
$users = $userDao->getAllActiveUsers();
echo '<div class="col-lg-4 col-md-4 col-sm-8 col-xs-8 people-to-award">';
foreach ($users as $user) {
echo '<div class="staff-member-block candidate">
<button class="btn btn-primary btn-choose-award">Выбрать</button>
<input type="hidden" class="is-selected" value="0"/>
<input type="hidden" class="uid" value="' . $user['uid'] . '"/>
<div style="float:right; font-size: larger;">
' . $user['nickname'] . '
</div>
</div>';
}
echo '</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
<button type="button" class="btn btn-labeled btn-danger btn-give-award" style="width:130px;">
<span class="btn-label"><i class="glyphicon glyphicon-star-empty"></i></span><span id="captionRefresh">Наградить</span></button>
示例3: Navbar
<?php
(new Navbar())->show('USTAV');
?>
<div class="container-fluid blackblock lowerblock" style="padding-top: 40px; height: 100%;">
<div class="row">
<?php
$auth = new AspidAuth();
$member = $auth->authOpenAPIMember();
if ($member !== FALSE) {
$privateNavbar = new PrivateNavbar();
$privateNavbar->show($auth);
$userDAO = new UserDAO();
$set = $userDAO->getAllActiveUsers();
if ($set != null) {
echo '
<div id="privateActionArea" class="col-md-12 blackblock lowerblock" style="padding:5px;">
<div id="no-more-tables">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Вконтакте</th>
<th>Позывной</th>
<th>Группа</th>
<th>Должность</th>
</tr>