Advertisement
Nautiluss

username change

May 14th, 2024
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.27 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. if (isset($_SESSION['id']) && isset($_SESSION['user_name'])) {
  5.  
  6.  ?>
  7. <!DOCTYPE html>
  8. <html id="suka">
  9.  
  10. <body>
  11. <div style="position:fixed; top:5vh; left:5vh; width: 100px; height: 100px; justify-content: flex-start; align-items: flex-start; gap: 10px; display: inline-flex">
  12.     <img style=" position:absolute; top:5%; left:5%; width: 80px; height: 80px; border-radius: 9999px" src="src/media/logo.png" />
  13.   </div>
  14.   <div style="position:fixed; top:9vh; left:13vh; width: 175px; height: 30px; padding: 10px; justify-content: center; align-items: center; display: inline-flex">
  15.     <a href="index.php" class="mont" style="text-decoration: none;">UNO-WTF.TK</a>
  16.   </div>
  17.   <div>
  18.   <a href="home.php" class="mont" style="position:fixed; text-decoration: none; top:9vh; right:20vh;  width: 205px; height: 30px; padding: 10px;" >Личный кабинет</a>
  19.   <a href="forum.php" class="mont" style="position:fixed; text-decoration: none; top:9vh; right:5vh;  width: 100px; height: 30px; padding: 10px;">Форум</a>
  20.   </div>
  21.   </body>
  22.  
  23. <head>
  24.     <title>Профиль: <?php echo $_SESSION['user_name']; ?></title>
  25.      <link rel="stylesheet" type="text/css" href="style.css">
  26.     <link rel="stylesheet" href="fonts/fonts.css">
  27. </head>
  28. <body>
  29.  
  30. <body style="background: #11191F; display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: column;">
  31. <div style="width: 415px; height: 400px; position: fixed; left: 3%; top:30%">
  32.      <div style="width: 415px; height: 400px; left: 0px; top: 0px; position: absolute; background: #141E26; border-radius: 65px"></div>
  33.      <a href="settings.php" class="mont" style="filter: drop-shadow(0 0 0px #ffffff); text-decoration: none; width: 253px; height: 40px; left: 81px; top: 177px; position: absolute; ">⚙    Настройки</a>
  34.      <a href="safety.php" class="mont" style="filter: drop-shadow(0 0 0px #ffffff); text-decoration: none; width: 253px; height: 40px; left: 81px; top: 269px; position: absolute; ">🔐    Безопасность</a>
  35.      <a href="avatar.php" class="mont" style="filter: drop-shadow(0 0 0px #ffffff); text-decoration: none; width: 253px; height: 40px; left: 81px; top: 85px; position: absolute; ">🖼    Аватар </a>
  36.      </div>
  37.  
  38.  
  39.  
  40.      <div style="width: 603px; height: 400px; position: fixed; top:30%; right: 2%;">
  41.       <div class="wow" style="width: 603px; height: 400px; left: 0px; top: 0px; position: absolute; background: #141E26; border-radius: 65px;"></div>
  42.       <a href="logout.php" style="z-index:1; text-decoration: none; position:absolute; right:25%; top:80%;">
  43.       <button  type="submit" style="    float: right; background: #000AFF; padding: 10px 15px; color: #fff; border-radius: 5px; left: 180vh; border: none;">Выйти из аккаунта</button>
  44.       </a>
  45.       <button onclick="confirmDelete()" style="z-index:1; text-decoration: none; position:absolute; right:50%; top:80%; background: #000AFF; padding: 10px 15px; color: #fff; border-radius: 5px; border: none;">Удалить аккаунт</button>
  46.       <script>
  47.             function confirmDelete() {
  48.                 if (confirm("Вы уверены, что хотите удалить свой аккаунт?")) {
  49.                     window.location = "dell_acc.php";
  50.                 }else{
  51.                   window.location = "settings.php";
  52.                 }
  53.             }
  54.       </script>
  55.       <div class="wow" style="width: 160.94px; left: 45%; top: 82px; position: absolute; text-align:centr;"><?php echo $_SESSION['user_name']; ?></div>
  56.       <img style="width: 122.23px; height: 120px; left: 240.39px; top: 140px; border-radius: 9999px; position: absolute" src="<?php echo $_SESSION['avatar']; ?>" />
  57.       <div class="wow" style="width: 265.85px; height: 28px; left: 30%; top: 25px; position: absolute; ">Добро пожаловать,</div>
  58.     </div>
  59.  
  60.  
  61.  
  62.      <div style="width: 741px; height: 400px; position: fixed; top: 30%; left: 28%;">
  63.      
  64.       <div class="wow" style="width: 650px; height: 400px; left: 0px; top: 0px; position: absolute; background: #141E26; border-radius: 65px">
  65.       <?php if (isset($_GET['error'])) { ?>
  66.             <p class="error" style="position:fixed; right:5%; top:20%; width:500px; hight:100px;"><?php echo $_GET['error']; ?></p>
  67.         <?php } ?>  
  68.     </div>
  69.       <form action="update_nickname.php" method="post"  style="width: 500px; border: 2px solid #141E26; padding: 30px; background: #141E26; border-radius: 15px; z-index:4; position:absolute; top:0%; left:10%;">  
  70.       <h2 style="color: #ccc; text-align: center; margin-bottom: 40px;">Смена UserName</h2>
  71.       <h4 style="color: #FF0000;  text-align: center; margin-bottom: 40px;">ПОСЛЕ СМЕНЫ USERNAME СЕССИЯ БУДЕТ ПРИНУДИТЕЛЬНО ОКОНЧЕННА!</h4>
  72.       <label for="new_nickname"></label><br>
  73.         <input type="text" id="new_nickname" maxlength="11"  name="new_nickname"><br>
  74.         <input type="submit" class="wow" style="background: #141E26;" value="Изменить UserName">
  75.       </form>
  76.     </div>
  77.  
  78.      <script src="./src/visual/dop.js"></script>
  79.      <script src="./src/visual/back.js"></script>
  80.      <script src="./src/visual/app.js"></script>
  81. </body>
  82. </html>
  83.  
  84. <?php
  85. }else{
  86.      header("Location: index.php");
  87.      exit();
  88. }
  89.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement