Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
712
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. <link href="style.css" rel="stylesheet" type="text/css">
  2. <div class="page-margin">
  3. <div class="wowonder-well">
  4. <h3 class="bold"><strong><?php echo "Drive Match"; ?></strong></h3>
  5.  
  6. <!-- Deklaration of variables -->
  7. <?php $userSignedUp = null; $databaseConnectionSuccess = null; ?>
  8.  
  9. <!-- Checking Logged in Status (If User not logged in ->Exit) -->
  10. <?php if ($wo['loggedin'] == false) { header("Location: " . $wo['config']['site_url']); exit(); }?>
  11.  
  12. <!-- Getting Userdata and putting into Array -->
  13. <?php foreach($wo['user'] as $meine_blume){$user[] = $meine_blume; }?>
  14.  
  15. <!-- Putting selected UserData Array in some variables -->
  16. <?php $user_avatar = $user[6]; $user_id = $user[0]; $user_name = $user[1];?>
  17.  
  18. <!-- Getting Connection Data from db.ini -->
  19. <?php $file = parse_ini_file("db.ini");?>
  20.  
  21. <!-- Store Variables information from db.ini -->
  22. <?php $host = trim($file["dbhost"]); $user = trim($file["dbuser"]); $pass = trim($file["dbpass"]); $name = trim($file["dbname"]);?>
  23.  
  24. <!-- db.php to call function from db.php File -->
  25. <?php require("db.php"); $db = new access($host, $user, $pass, $name);?>
  26.  
  27. <!-- If Database Connection Failed header("Location:https://yourbraap.com/404"); exit; -->
  28. <?php
  29. if ($db->connect() == null) {
  30. echo "<h4>ERROR</h4>";
  31. echo "<p>Could not Connect to Database!</p>";
  32. echo "<p>Please retry in a few minutes.</p>";
  33. }
  34. else {
  35. $userSignedUp = $db->userSignedUp();
  36.  
  37. if ($userSignedUp == true){
  38. //User signed up
  39.  
  40.  
  41. }else{
  42. //User NOT signed up
  43. echo "<button class='btn_teilnehmen'>Anmelden!</button>";
  44. }
  45. }
  46. ?>
  47.  
  48. </div>
  49. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement