Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <!--
- Material Design Lite
- Copyright 2015 Google Inc. All rights reserved.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- https://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License
- -->
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
- <title>My Loans | Library Management System</title>
- <!-- Add to homescreen for Chrome on Android -->
- <meta name="mobile-web-app-capable" content="yes">
- <link rel="icon" sizes="192x192" href="images/android-desktop.png">
- <!-- Add to homescreen for Safari on iOS -->
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="apple-mobile-web-app-title" content="Material Design Lite">
- <link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">
- <!-- Tile icon for Win8 (144x144 + tile color) -->
- <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
- <meta name="msapplication-TileColor" content="#3372DF">
- <link rel="shortcut icon" href="images/favicon.png">
- <!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
- <!--
- <link rel="canonical" href="http://www.example.com/">
- -->
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en">
- <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
- <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.cyan-light_blue.min.css">
- <link rel="stylesheet" href="styles.css">
- <link rel="stylesheet" href="main.css">
- <style>
- #view-source {
- position: fixed;
- display: block;
- right: 0;
- bottom: 0;
- margin-right: 40px;
- margin-bottom: 40px;
- z-index: 900;
- }
- </style>
- </head>
- <body>
- <div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
- <header class="demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600">
- <div class="mdl-layout__header-row">
- <span class="mdl-layout-title">My Loans</span>
- <div class="mdl-layout-spacer"></div>
- <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
- <label class="mdl-button mdl-js-button mdl-button--icon" for="search">
- <i class="material-icons">search</i>
- </label>
- <div class="mdl-textfield__expandable-holder">
- <input class="mdl-textfield__input" type="text" id="search">
- <label class="mdl-textfield__label" for="search">Search...</label>
- </div>
- </div>
- </div>
- </header>
- <div class="demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50">
- <header class="demo-drawer-header">
- <div class="demo-avatar-dropdown">
- <span>Daniel Lim </span>
- <div class="mdl-layout-spacer"></div>
- <button id="accbtn" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon">
- <i class="material-icons" role="presentation">arrow_drop_down</i>
- <span class="visuallyhidden">Accounts</span>
- </button>
- <ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="accbtn">
- <li class="mdl-menu__item">Logout</li>
- </ul>
- </div>
- </header>
- <nav class="demo-navigation mdl-navigation mdl-color--blue-grey-800">
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">home</i>My Loans</a>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">inbox</i>My Favourites</a>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">delete</i>Authors</a>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">report</i>Publishers</a>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">forum</i>Suppliers</a>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">flag</i>Book Suggestions</a>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">local_offer</i></a>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">shopping_cart</i>Purchases</a>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">people</i>Social</a>
- <div class="mdl-layout-spacer"></div>
- <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">help_outline</i><span class="visuallyhidden">Help</span></a>
- </nav>
- </div>
- <main class="mdl-layout__content mdl-color--grey-100">
- <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
- <thead>
- <tr>
- <th class="mdl-data-table__cell--non-numeric full-width">Loanable</th>
- <th>Borrow Date</th>
- <th>Due Date</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "library";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT l.TITLE AS Loanable, BORROW_DATE as 'Borrow Date', DUE_DATE as 'Due Date'
- FROM Loan lo, loanable l
- WHERE lo.LOANABLE_ID = l.ID;";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- // output data of each row
- while($row = $result->fetch_assoc()) {
- //echo "<br>". $row["Loanable"]. " - Name: ". $row["Borrow Date"]. " " . $row["Due Date"] . "<br>";
- echo
- "<tr>" .
- "<td class='mdl-data-table__cell--non-numeric full-width'>" . $row["Loanable"] . "</td>" .
- "<td>" . $row["Borrow Date"] . "</td>" .
- "<td>" . $row["Due Date"] . "</td>" .
- "</tr>";
- }
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
- </tbody>
- </table>
- </main>
- <script src="https://code.getmdl.io/1.3.0/material.min.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement