SHARE
TWEET

Untitled

a guest Jun 26th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   $username = "root";
  3.   $password = "";
  4.   $database = "viagens";
  5.   $mysqli = new mysqli("localhost", $username, $password, $database);
  6.  
  7.   include('root_definition.php');
  8.  
  9.   include(root.'/Components/header.php');
  10.   include(root.'/Components/footer.php');
  11.   include(root.'/Components/abstractLocation.php');
  12.  
  13.   $headerProps = (object) [
  14.     'backgroundImage' => rootHTML.'/Assets/imagens/banners/home.jpg',
  15.     'h1' => 'VIAGENS LEGAIS',
  16.     'title' => 'HOME',
  17.     'active' => 'home'
  18.   ];
  19.  
  20.   headerComponent( $headerProps );
  21.  
  22.   define('loremIpsum', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.');
  23. ?>
  24.  
  25.   <section class="container">
  26.  
  27.       <h2 class="subtitulos">Adicionados Recentemente</h2>
  28.  
  29.       <?php
  30.         $query = "SELECT * FROM pacotes";
  31.  
  32.         if ($result = $mysqli->query($query)) {
  33.           $boolean = false;
  34.           while ($row = $result->fetch_assoc()) {
  35.               $locationProps = (object) [
  36.                   'title' => $row["title"],
  37.                   'image' => $row["image"],
  38.                   'description' => $row["description"],
  39.                   'left' => $boolean
  40.               ];
  41.  
  42.               abstractLocation( $locationProps );
  43.               $boolean = !$boolean;
  44.           }
  45.  
  46.           $result->free();
  47.         }
  48.  
  49.       ?>
  50.  
  51.   </section>
  52.  
  53. <?php footerComponent() ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top