Advertisement
Guest User

Untitled

a guest
Apr 16th, 2017
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.97 KB | None | 0 0
  1. <!doctype html>
  2. <!--
  3. Material Design Lite
  4. Copyright 2015 Google Inc. All rights reserved.
  5.  
  6. Licensed under the Apache License, Version 2.0 (the "License");
  7. you may not use this file except in compliance with the License.
  8. You may obtain a copy of the License at
  9.  
  10. https://www.apache.org/licenses/LICENSE-2.0
  11.  
  12. Unless required by applicable law or agreed to in writing, software
  13. distributed under the License is distributed on an "AS IS" BASIS,
  14. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. See the License for the specific language governing permissions and
  16. limitations under the License
  17. -->
  18. <html lang="en">
  19. <head>
  20. <meta charset="utf-8">
  21. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  22. <meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
  23. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  24. <title>My Loans | Library Management System</title>
  25.  
  26. <!-- Add to homescreen for Chrome on Android -->
  27. <meta name="mobile-web-app-capable" content="yes">
  28. <link rel="icon" sizes="192x192" href="images/android-desktop.png">
  29.  
  30. <!-- Add to homescreen for Safari on iOS -->
  31. <meta name="apple-mobile-web-app-capable" content="yes">
  32. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  33. <meta name="apple-mobile-web-app-title" content="Material Design Lite">
  34. <link rel="apple-touch-icon-precomposed" href="images/ios-desktop.png">
  35.  
  36. <!-- Tile icon for Win8 (144x144 + tile color) -->
  37. <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
  38. <meta name="msapplication-TileColor" content="#3372DF">
  39.  
  40. <link rel="shortcut icon" href="images/favicon.png">
  41.  
  42. <!-- 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 -->
  43. <!--
  44. <link rel="canonical" href="http://www.example.com/">
  45. -->
  46.  
  47. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en">
  48. <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
  49. <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.cyan-light_blue.min.css">
  50. <link rel="stylesheet" href="styles.css">
  51. <link rel="stylesheet" href="main.css">
  52. <style>
  53. #view-source {
  54. position: fixed;
  55. display: block;
  56. right: 0;
  57. bottom: 0;
  58. margin-right: 40px;
  59. margin-bottom: 40px;
  60. z-index: 900;
  61. }
  62. </style>
  63. </head>
  64. <body>
  65. <div class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
  66. <header class="demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600">
  67. <div class="mdl-layout__header-row">
  68. <span class="mdl-layout-title">My Loans</span>
  69. <div class="mdl-layout-spacer"></div>
  70. <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
  71. <label class="mdl-button mdl-js-button mdl-button--icon" for="search">
  72. <i class="material-icons">search</i>
  73. </label>
  74. <div class="mdl-textfield__expandable-holder">
  75. <input class="mdl-textfield__input" type="text" id="search">
  76. <label class="mdl-textfield__label" for="search">Search...</label>
  77. </div>
  78. </div>
  79. </div>
  80. </header>
  81. <div class="demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--blue-grey-50">
  82. <header class="demo-drawer-header">
  83. <div class="demo-avatar-dropdown">
  84. <span>Daniel Lim </span>
  85. <div class="mdl-layout-spacer"></div>
  86. <button id="accbtn" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon">
  87. <i class="material-icons" role="presentation">arrow_drop_down</i>
  88. <span class="visuallyhidden">Accounts</span>
  89. </button>
  90. <ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="accbtn">
  91. <li class="mdl-menu__item">Logout</li>
  92. </ul>
  93. </div>
  94. </header>
  95. <nav class="demo-navigation mdl-navigation mdl-color--blue-grey-800">
  96. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">home</i>My Loans</a>
  97. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">inbox</i>My Favourites</a>
  98. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">delete</i>Authors</a>
  99. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">report</i>Publishers</a>
  100. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">forum</i>Suppliers</a>
  101. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">flag</i>Book Suggestions</a>
  102. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">local_offer</i></a>
  103. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">shopping_cart</i>Purchases</a>
  104. <a class="mdl-navigation__link" href=""><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">people</i>Social</a>
  105. <div class="mdl-layout-spacer"></div>
  106. <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>
  107. </nav>
  108. </div>
  109.  
  110. <main class="mdl-layout__content mdl-color--grey-100">
  111. <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
  112. <thead>
  113. <tr>
  114. <th class="mdl-data-table__cell--non-numeric full-width">Loanable</th>
  115. <th>Borrow Date</th>
  116. <th>Due Date</th>
  117. </tr>
  118. </thead>
  119. <tbody>
  120. <?php
  121. $servername = "localhost";
  122. $username = "root";
  123. $password = "";
  124. $dbname = "library";
  125.  
  126. // Create connection
  127. $conn = new mysqli($servername, $username, $password, $dbname);
  128. // Check connection
  129. if ($conn->connect_error) {
  130. die("Connection failed: " . $conn->connect_error);
  131. }
  132.  
  133. $sql = "SELECT l.TITLE AS Loanable, BORROW_DATE as 'Borrow Date', DUE_DATE as 'Due Date'
  134. FROM Loan lo, loanable l
  135. WHERE lo.LOANABLE_ID = l.ID;";
  136. $result = $conn->query($sql);
  137.  
  138. if ($result->num_rows > 0) {
  139. // output data of each row
  140. while($row = $result->fetch_assoc()) {
  141. //echo "<br>". $row["Loanable"]. " - Name: ". $row["Borrow Date"]. " " . $row["Due Date"] . "<br>";
  142. echo
  143. "<tr>" .
  144. "<td class='mdl-data-table__cell--non-numeric full-width'>" . $row["Loanable"] . "</td>" .
  145. "<td>" . $row["Borrow Date"] . "</td>" .
  146. "<td>" . $row["Due Date"] . "</td>" .
  147. "</tr>";
  148. }
  149. } else {
  150. echo "0 results";
  151. }
  152.  
  153. $conn->close();
  154. ?>
  155. </tbody>
  156. </table>
  157. </main>
  158.  
  159. <script src="https://code.getmdl.io/1.3.0/material.min.js"></script>
  160. </body>
  161. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement