Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include_once ('../configuration.php');
- require_once ('../includes/class.php');
- include_once ('../includes/fonctions.php');
- include_once ('../includes/connexion.php');
- define( "SITE_TITRE", "Connexion");
- include_once ('../includes/head.php');
- ?>
- <body>
- <!-- Navigation -->
- <?php include '../includes/menu.php' ?>
- <!-- Effet de trais sur bg -->
- <span id="sliced_bg"></span>
- <div id="wrapper">
- <!-- Page Content -->
- <div class="container" style="width:350px; margin-top:100px; color: #e8e8e8; font-size: 18px; line-height: 26px; background: rgba(0,0,0,0.84); text-align: center; padding: 20px;">
- <?php
- // Si il a cliqué sur Se connecter sur la page steam
- if(isset($_GET['login']))
- {
- $user->signIn();
- }
- // Si il appuie sur Déconnection
- if (isset($_GET['logout']))
- {
- session_unset ();
- session_destroy ();
- header('Location: /user/');
- }
- // Si il n'est pas déja connecté
- if(!isset($_SESSION["steamID"]))
- {
- ?>
- <form action="?login" method="post">
- <input type="image" src="http://cdn.steamcommunity.com/public/images/signinthroughsteam/sits_large_border.png"/>
- </form>
- <?php
- }
- else // Sinon
- {
- echo 'Vous êtes connecté en tant que<br><br>';
- echo $user->GetPlayerSummaries($_SESSION["steamID"])->personaname;
- echo '<br>';
- echo "<img src='".$user->GetPlayerSummaries($_SESSION["steamID"])->avatarfull."' alt='avatar full'>";
- echo '<br><br>';
- /* DECONNECTER SI VOUS VOULEZ AVOIR TOUTES LES VARIABLES DE RENVOYER PAR STEAM*/
- // var_dump ($user->GetPlayerSummaries($_SESSION["steamID"]));
- $query = "SELECT * from ".DB_PREFIX."admin where steamid = '".$_SESSION["steamID"]."'";
- if($arr = $pdo->query($query)->fetch())
- echo '<a href="admin/"> Panel Admin </a>';
- }
- ?>
- </div>
- </div>
- </body>
- <?php include '../includes/footer.php'; ?>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement