Файловый менеджер - Редактировать - /var/www/jonas-eriksen.dk/user/index.php
Назад
<?php include('../include.php'); error_reporting(0); ini_set('display_errors', 0); ?> <style> div.container { width: 100%; } </style> <?php $admin = new admin($db); $admin->passwordResetCheck(); $user = new user($db); $u = $user->getUserForConsentForm(5); $users = $user->getAllUsers(0); if (isset($_GET['showAll'])) { $users = $user->getAllUsers(1); } if (isset($_GET['login']) && $_GET['login'] == "true") { echo "Du er allerede logget ind som " . $_SESSION['username']; } include('../static/header.php'); ?> <div class="container"> <div class="row"> <div class="col-lg-12"> <h2>Skytteliste</h2> <?php if (isset($_GET['showAll'])) { echo "<i><a href='/user/'>Skjul slettede</a> </i>"; } else { echo "<i><a href='?showAll'>Vis alle skytter</a> </i><br/>"; } ?> <table id="userTable" class="table-bordered" cellspacing="0" width="100%"> <thead> <tr> <?php if ($admin->admin_level(1)) { echo "<th>CPR</th>"; } ?> <th>Skyttenummer</th> <th>Navn</th> <?php if ($admin->admin_level(0)) { ?> <th>Adresse</th> <th>Fødselsdag</th> <th>Telefon</th> <th>Email</th> <th>Må tages billede af</th> <?php } ?> </tr> </thead> <tfoot> <tr> <?php if ($admin->admin_level(1)) { echo "<th>CPR</th>"; } ?> <th>Skyttenummer</th> <th>Navn</th> <?php if ($admin->admin_level(0)) { ?> <th>Adresse</th> <th>Fødselsdag</th> <th>Telefon</th> <th>Email</th> <th>Må tages billede af</th> <?php } ?> </tr> </tfoot> <tbody> <?php foreach ($users as $row) { $birthday = date_format(new DateTime($row[5]), 'd-m-Y'); if ($row[9] == 1) { $new = " (ny)"; } else { $new = ""; } echo "<tr>"; if ($admin->admin_level(1)) { $cpr = decrypt($row[1], $encryptKey); echo "<td>$cpr</td>"; } echo "<td><a href='/user/profile.php?user=$row[0]'>$row[2]</a></td>"; if (isset($_GET['showAll'])) { if ($row[10]) { echo "<td><a href='/user/profile.php?user=$row[0]' style='color: red;'>$row[3] (Deleted)</a></td>"; } else { echo "<td><a href='/user/profile.php?user=$row[0]'>$row[3]</a></td>"; } } else { echo "<td><a href='/user/profile.php?user=$row[0]'>$row[3] $new</a></td>"; } if ($admin->admin_level(0)) { echo "<td>$row[4]</td>"; echo "<td>$birthday</td>"; echo "<td>$row[6]</td>"; echo "<td>$row[7]</td>"; if ($row[8] == 1) { echo "<td align='center'><img src='/static/checkmark.gif' alt='Ja' width='40'></td>"; } else { echo "<td align='center'><img src='/static/red_cross.png' alt='nej' width='40'></td>"; } echo "<form method='POST'>"; if ($row[9] == 1) { echo "</form>"; echo "</tr>"; } } } echo "</tbody>"; ?> </table> </div> </div> </div> <script> $(document).ready(function () { $('#userTable').DataTable(); }); </script> <?php include('../static/footer.php'); ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка