* 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 '
<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>
<?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>