Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • b8432e2f2d3d2ef41381319703ce5258b4ffe40e
  • master par défaut protégée
  • rust-playlist-sync
  • rust
  • fix-qt-deprecated-qvariant-type
  • fix-mpris-qtwindow-race-condition
  • rust-appimage-wayland
  • windows-build-rebased
  • v2.5 protégée
  • v2.4 protégée
  • v2.3-1 protégée
  • v2.3 protégée
  • v2.2 protégée
  • v2.1 protégée
  • v2.0 protégée
  • v1.8-3 protégée
  • v1.8-2 protégée
  • v1.8-1 protégée
  • v1.8 protégée
  • v1.7 protégée
  • v1.6 protégée
  • v1.5 protégée
  • v1.4 protégée
  • v1.3 protégée
  • v1.2 protégée
  • v1.1 protégée
  • v1.0 protégée
27 résultats

qthelper.hh

Blame
  • adminEdit.php 3,86 Kio
    <?php
    session_start();
    require_once"fonction.php";
    $bdd=bdd();
    
    ?>
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
      <title>Com-Ensiie</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="./bootstrap/css/bootstrap.css">
      <link rel="stylesheet" href="./bootstrap/css/mystyle.css">
    </head>
    <body>
      <div class="container-fluid">
      <div class="jumbotron">
          <h1><span style="color: white">Com-Ensiie</span></h1>
    <?php
    if(isset($_SESSION['pseudo'])){
      $pseudo=$_SESSION['pseudo'];
    ?>
           </div>
           <button type="button" class="btn btn-success btn-right" onclick="location.href='./deconnexion.php'" >Deconnexion</button>
           <button type="button" class="btn btn-success btn-right" onclick="location.href='./edit.php'" >Edit</button>
           <button type="button" class="btn btn-success btn-right" onclick="location.href='./newtopics.php'" >Nouveau sujet</button>
           <label for="hello"><?php echo "Vous êtes connectés entant que : $pseudo";?></label>
           </div>
    <?php
    }
    else
    {
    ?>
      </div>
        <button type="button" class="btn btn-success btn-right" onclick="location.href='./login.php'" >Se connecter</button>
        <button type="button" class="btn btn-success btn-right" onclick="location.href='./register.php'">S'enregistrer</button>
      </div>
    <?php
    }
    ?>
      <nav class="navbar navbar-inverse">
        <div class="navbar-header">
          <a class="navbar-brand" href="./accueil.php">Com-Ensiie</a>
        </div>
                <?php
                  $dn2 = pg_query("SELECT * FROM keys ORDER BY name asc");
                  while($reponse=pg_fetch_assoc($dn2))
                {
                ?>
                  <div class="navbar-header">
                    <ul class="nav navbar-nav">
                    <li class="dropdown active"><a href="./topiclist.php?category=<?php echo $reponse['name']; ?>"><?php echo $reponse['name']; ?></a></li>
                    </ul>
                  </div>            
                <?php
                }
                ?>
      </nav>
    </div>
        
    
    
    <div class="container-fluid text-center">    
      <div class="row content">
        <div class="col-sm-2 sidenav">
          <?php
          if ($_SESSION['su']=='t') {
          ?>
          <div>
          <button type="button" class="btn btn-info btn-right" onclick="location.href='./adminEdit.php'" >Edit users</button><br><br>
        </div>
          <div>
          <button type="button" class="btn btn-info btn-right" onclick="location.href='./adminEditTopics.php'" >Edit toppics</button>
        </div>
          <?php
        }
        $requete= pg_query("SELECT * FROM users ORDER BY pseudo");
          ?>
        </div>
        <div class="col-lg-8 text-left"> 
            <div class="col-lg-15 lg-8 text-left"> 
                <table class="table">
                  <col width="20%">
                  <col width="60%">
                  <col width="20%">
                    <thead>
                      <tr>
                      <th class="lead">Psudo</th>
                      <th class="lead">Action</th>
                      </tr>
                    </thead>
    
                      <?php
                      
                      while($reponse=pg_fetch_assoc($requete))
                      {
                        ?>
                      <tr>
                        <?php
                        if($reponse['pseudo']!=$_SESSION['pseudo']){
                          ?>
                        <td><?php echo $reponse['pseudo'];?></td>
                        <td><button type="button" class="btn btn-warning btn-right" onclick="location.href='./adminDelete.php?pseudo=<?php echo $reponse['pseudo'];?>'">Supprimer</button></td>
                        <td><button type="button" class="btn btn-warning btn-right" onclick="location.href='./adminPerm.php?pseudo=<?php echo $reponse['pseudo'];?>'">Permissions</button></td>
                      </tr>
                        <?php
                      }
                      }
                      ?>
                </table>  
      </div>
        </div>
      
        
      </div>
    </div>
        <div class="footer"></div>
    </div>
    </body>
    </html>