mirror of
				https://gitlab.com/animath/si/plateforme-corres2math.git
				synced 2025-11-04 13:12:20 +01:00 
			
		
		
		
	Liste des administrateurs
This commit is contained in:
		@@ -29,6 +29,7 @@ $ROUTES = [];
 | 
			
		||||
 | 
			
		||||
$ROUTES["^(|accueil|index|accueil\.php|accueil\.html|accueil\.py|index\.php|index\.html|index\.py)/?$"] = ["server_files/controllers/index.php"];
 | 
			
		||||
$ROUTES["^(modifier-page)$"] = ["server_files/controllers/index.php", "edit"];
 | 
			
		||||
$ROUTES["^admins$"] = ["server_files/controllers/admins.php"];
 | 
			
		||||
$ROUTES["^ajouter-equipe$"] = ["server_files/controllers/ajouter_equipe.php"];
 | 
			
		||||
$ROUTES["^ajouter-admin$"] = ["server_files/controllers/ajouter_admin.php"];
 | 
			
		||||
$ROUTES["^calendrier/(modifier)$"] = ["server_files/controllers/calendrier.php", "edit"];
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								server_files/controllers/admins.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								server_files/controllers/admins.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
if ($_SESSION["role"] != Role::ADMIN)
 | 
			
		||||
    require_once "server_files/403.php";
 | 
			
		||||
 | 
			
		||||
$admins = User::getAdmins();
 | 
			
		||||
 | 
			
		||||
require_once "server_files/views/admins.php";
 | 
			
		||||
							
								
								
									
										72
									
								
								server_files/views/admins.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								server_files/views/admins.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,72 @@
 | 
			
		||||
<?php
 | 
			
		||||
require_once "header.php";
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
<div class="mt-4 mb-4">
 | 
			
		||||
    <h1 class="display-4">Liste des administrateurs</h1>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<hr />
 | 
			
		||||
 | 
			
		||||
    <table class="table table-striped table-bordered table-hover">
 | 
			
		||||
        <thead>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <th scope="col">
 | 
			
		||||
                Nom
 | 
			
		||||
            </th>
 | 
			
		||||
            <th scope="col">
 | 
			
		||||
                Prénom
 | 
			
		||||
            </th>
 | 
			
		||||
            <th scope="col">
 | 
			
		||||
                Adresse e-mail
 | 
			
		||||
            </th>
 | 
			
		||||
        </tr>
 | 
			
		||||
        </thead>
 | 
			
		||||
        <tbody>
 | 
			
		||||
        <?php
 | 
			
		||||
        /** @var User $admin */
 | 
			
		||||
        foreach ($admins as $admin) {
 | 
			
		||||
            ?>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <a href="/informations/<?= $admin->getId() ?>/<?= $admin->getFirstName() . " " . $admin->getSurname() ?>">
 | 
			
		||||
                        <?= $admin->getSurname() ?>
 | 
			
		||||
                    </a>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <a href="/informations/<?= $admin->getId() ?>/<?= $admin->getFirstName() . " " . $admin->getSurname() ?>">
 | 
			
		||||
                        <?= $admin->getFirstName() ?>
 | 
			
		||||
                    </a>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <a href="mailto:<?= $admin->getEmail() ?>">
 | 
			
		||||
                        <?= $admin->getEmail() ?>
 | 
			
		||||
                    </a>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <?php
 | 
			
		||||
        }
 | 
			
		||||
        ?>
 | 
			
		||||
        </tbody>
 | 
			
		||||
        <tfoot>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <th>
 | 
			
		||||
                Nom
 | 
			
		||||
            </th>
 | 
			
		||||
            <th>
 | 
			
		||||
                Prénom
 | 
			
		||||
            </th>
 | 
			
		||||
            <th>
 | 
			
		||||
                Date d'inscription
 | 
			
		||||
            </th>
 | 
			
		||||
            <?php if ($problem > 0) { ?>
 | 
			
		||||
                <th>
 | 
			
		||||
                    Adresse e-mail
 | 
			
		||||
                </th>
 | 
			
		||||
            <?php } ?>
 | 
			
		||||
        </tr>
 | 
			
		||||
        </tfoot>
 | 
			
		||||
    </table>
 | 
			
		||||
 | 
			
		||||
<?php
 | 
			
		||||
require_once "footer.php";
 | 
			
		||||
@@ -80,6 +80,7 @@
 | 
			
		||||
                                <li class="nav-item active"><a class="nav-link" href="/probleme/4">Problème 4</a></li>
 | 
			
		||||
                                <li class="nav-item active"><a class="nav-link" href="/probleme/0">Équipes sans problème</a></li>
 | 
			
		||||
                                <li class="nav-item active"><a class="nav-link" href="/profils-orphelins">Profils orphelins</a></li>
 | 
			
		||||
                                <li class="nav-item active"><a class="nav-link" href="/admins">Administrateurs</a></li>
 | 
			
		||||
                            </ul>
 | 
			
		||||
                        </li>
 | 
			
		||||
                        <li class="nav-item active">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user