A unf. social network done poorly.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

196 lines
6.3KB

  1. <?php
  2. ini_set('display_errors', '1');
  3. require_once($_SERVER['DOCUMENT_ROOT'] . '/socialtune/includes/session.php');
  4. require_once($_SERVER['DOCUMENT_ROOT'] . '/socialtune/includes/config.php');
  5. require_once($_SERVER['DOCUMENT_ROOT'] . '/socialtune/includes/user-data.php');
  6. if(isset($_SESSION['Authenticated']) && $_SESSION['Authenticated']){
  7. if($_SESSION['Expires'] < time()){
  8. // Log out here.
  9. exit();
  10. header("Location: logout.php");
  11. }
  12. $_SESSION['Expires'] = time() + 86400; // if logged in, set to 24 hours.
  13. //header("Location: Dashboard.php");
  14. }
  15. ?>
  16. <!DOCTYPE html>
  17. <html lang="en">
  18. <head>
  19. <meta charset="utf-8">
  20. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  21. <meta name="viewport" content="width=device-width, initial-scale=1">
  22. <title>SocialTune | Edit Profile</title>
  23. <!--// bootstrap //-->
  24. <link href="css/bootstrap.css" rel="stylesheet">
  25. <link href="css/specialFX.css" rel="stylesheet">
  26. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  27. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  28. <!--[if lt IE 9]>
  29. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  30. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  31. <![endif]-->
  32. <style>
  33. html,
  34. body{
  35. height: 100%;
  36. }
  37. #wrap{
  38. min-height: 100%;
  39. height: auto !important;
  40. height: 100%
  41. margin: 0 auto -60px;
  42. }
  43. #push,
  44. #footer{
  45. height: 60px;
  46. }
  47. @media(max-width: 767px){
  48. #footer{
  49. margin-left: -20px;
  50. margin-right: -20px;
  51. padding-left: 20px;
  52. padding-right: 20px;
  53. }
  54. }
  55. </style>
  56. </head>
  57. <body>
  58. <div id="wrap">
  59. <!--// Navigation //-->
  60. <nav class="navbar navbar-default navbar-fixed-top">
  61. <div class="container">
  62. <div class="navbar-header">
  63. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  64. <span class="sr-only">Toggle Navigation</span>
  65. <span class="icon-bar"></span>
  66. <span class="icon-bar"></span>
  67. <span class="icon-bar"></span>
  68. </button>
  69. <a class="navbar-brand" href="#">Social.Tune</a>
  70. </div>
  71. <div id="navbar" class="navbar-collapse collapse">
  72. <ul class="nav navbar-nav">
  73. <li><a href="dashboard.php">Home</a></li>
  74. <?php if($pending_notification == 1){
  75. echo '<li><span class="relative_blink"><span class="notification_blink"><span class="online_blink">New</span></span></span><a href="notifications.php">Notifications</a></li>';
  76. }else{ echo '<li><a href="notifications.php">Notifications</a><li>'; } // HOLY SHIT THIS IS A CLUSTERFUCK OF BAD. ~~ Ashton
  77. ?>
  78. <li><?php echo'<a href="profile.php?id='.$user_id.'">View Profile</a>'; ?></li>
  79. <li class="active"><a href="edit-profile.php">Edit Profile</a></li>
  80. <li><?php echo '<a href="friends.php?id='.$user_id.'">Friends</a></li>'; ?>
  81. <li><a href="about.php">About</a></li>
  82. <li><a href="logout.php">Log out</a></li>
  83. </ul>
  84. </div>
  85. </div>
  86. </nav>
  87. <!--// Content //-->
  88. <div class="container">
  89. <div class="jumbotron">
  90. <div class="row">
  91. Oh..Hi. Go ahead. Edit something.
  92. <div class="col-md-3"></div>
  93. <div class="col-md-6">
  94. <form method="POST" action="update-profile.php" enctype="multipart/form-data">
  95. <?php
  96. // These might not even really be needed. I'll keep them here for the time being.
  97. $directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']);
  98. $uploadHandler = $_SERVER['HTTP_HOST'] . $directory_self . 'update-profile.php';
  99. $MAX_FILE_SIZE = 300000000; // file size (bytes). Can improve. Later.
  100. // limitations for photo.
  101. ?>
  102. <div class="form-group">
  103. <?php echo '<img src="user-images/'.$user_image_ext.'" style="width: 150px; height: 150px; float: left; margin: 1em 1em 1em 1em;">'; ?>
  104. <label for="DefaultPicture"><br />Change profile picture</label>
  105. <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $MAX_FILE_SIZE; ?>">
  106. <input type="file" name="DefaultPicture" id="DefaultPicture">
  107. <p class="help-block"><br /><br />Nice face~ ° ͜ʖ ͡° </p>
  108. </div>
  109. <div class="form-group">
  110. <?php
  111. echo 'New bio: <br />';
  112. echo '<textarea type="bio" class="form-control" rows="6" name="bio" id="bio" placeholder="'.$user_bio.'"></textarea>';
  113. ?>
  114. </div>
  115. <div class="form-group">
  116. <?php
  117. echo 'Country: <br />';
  118. echo '<input type="country" class="form-control" name="country" id="country" placeholder="'.$user_country.'">';
  119. echo 'State: <br />';
  120. echo '<input type="state" class="form-control" name="state" id="state" placeholder="'.$user_state.'">';
  121. echo 'City/Town: <br />';
  122. echo '<input type="town" class="form-control" name="town" id="town" placeholder="'.$user_town.'">';
  123. ?>
  124. </div>
  125. <div class="col-xs-4"></div>
  126. <div class="col-xs-4"></div>
  127. <div class="col-xs-4">
  128. <center><button type="submit" class="btn btn-primary">Save Changes</button></center>
  129. </div>
  130. </form>
  131. </div>
  132. <div class="col-md-3"></div>
  133. </div>
  134. </div>
  135. <?php /*
  136. echo 'user id: '.$user_id.'<br><br>';
  137. echo 'user email: '.$user_email.'<br><br>';
  138. echo 'user first name: '.$user_First_Name.'<br><br>';
  139. echo 'user last name: '.$user_Last_Name.'<br><br>';
  140. echo 'user bday:'.$user_birthdate.'<br><br>';
  141. echo 'user bio:<br><p>'.$user_bio.'</p><br>';
  142. */
  143. ?>
  144. </div>
  145. <div id="push"></div>
  146. </div>
  147. </div> <!--## ending wrap ##-->
  148. <!--// Footer //-->
  149. <div id="footer">
  150. <div class="container">
  151. <div class="row">
  152. <div class="col-md-4">
  153. <p style="font-size: 12px;">Social.Tune &copy; 2015</p>
  154. </div>
  155. <div class="col-md-8">
  156. <p class="text-right" style="font-size: 12px;">
  157. | <a href="">English</a> | <a href="">汉语</a> | <a href="">日本語</a> |
  158. <a href="">français</a> |<br /> | <a href="">Social-Tune</a> |
  159. <a href="">About Us</a> |<a href="">Contact Us</a> | <a href="">Careers</a> |
  160. <a href="">Privacy</a> | <a href="">License</a> | <a href="">Help</a> |
  161. </p>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. </body>
  168. </html>