Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include_once ('../configuration.php');
  4. require_once ('../includes/class.php');
  5. include_once ('../includes/fonctions.php');
  6. include_once ('../includes/connexion.php');
  7.  
  8. define( "SITE_TITRE", "Connexion");
  9. include_once ('../includes/head.php');
  10. ?>
  11. <body>
  12.  
  13. <!-- Navigation -->
  14. <?php include '../includes/menu.php' ?>
  15.  
  16. <!-- Effet de trais sur bg -->
  17. <span id="sliced_bg"></span>
  18.  
  19.  
  20. <div id="wrapper">
  21. <!-- Page Content -->
  22. <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;">
  23. <?php
  24. // Si il a cliqué sur Se connecter sur la page steam
  25. if(isset($_GET['login']))
  26. {
  27. $user->signIn();
  28. }
  29.  
  30. // Si il appuie sur Déconnection
  31. if (isset($_GET['logout']))
  32. {
  33. session_unset ();
  34. session_destroy ();
  35. header('Location: /user/');
  36. }
  37.  
  38. // Si il n'est pas déja connecté
  39. if(!isset($_SESSION["steamID"]))
  40. {
  41. ?>
  42. <form action="?login" method="post">
  43. <input type="image" src="http://cdn.steamcommunity.com/public/images/signinthroughsteam/sits_large_border.png"/>
  44. </form>
  45. <?php
  46. }
  47. else // Sinon
  48. {
  49. echo 'Vous êtes connecté en tant que<br><br>';
  50. echo $user->GetPlayerSummaries($_SESSION["steamID"])->personaname;
  51.  
  52. echo '<br>';
  53. echo "<img src='".$user->GetPlayerSummaries($_SESSION["steamID"])->avatarfull."' alt='avatar full'>";
  54. echo '<br><br>';
  55.  
  56. /* DECONNECTER SI VOUS VOULEZ AVOIR TOUTES LES VARIABLES DE RENVOYER PAR STEAM*/
  57. // var_dump ($user->GetPlayerSummaries($_SESSION["steamID"]));
  58.  
  59. $query = "SELECT * from ".DB_PREFIX."admin where steamid = '".$_SESSION["steamID"]."'";
  60. if($arr = $pdo->query($query)->fetch())
  61. echo '<a href="admin/"> Panel Admin </a>';
  62.  
  63. }
  64. ?>
  65. </div>
  66. </div>
  67. </body>
  68.  
  69. <?php include '../includes/footer.php'; ?>
  70. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement