Advertisement
Guest User

Untitled

a guest
Apr 4th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. <?php
  2.  
  3. $server = "localhost";
  4. $username = "root";
  5. $password = "";
  6.  
  7. $conn = new mysqli($server, $username, $password, "test");
  8. $conn2 = new mysqli($server, $username, $password, "eve");
  9.  
  10. $result = $conn->query("SELECT * FROM starbases;")
  11.  
  12. ?>
  13.  
  14. <!DOCTYPE html>
  15. <html lang="en">
  16. <head>
  17. <meta charset="utf-8">
  18. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  19. <meta name="viewport" content="width=device-width, initial-scale=1">
  20. <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
  21. <meta name="description" content="">
  22. <meta name="author" content="">
  23. <link rel="icon" href="../../favicon.ico">
  24.  
  25. <title>Dashboard Template for Bootstrap</title>
  26.  
  27. <!-- Bootstrap core CSS -->
  28. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  29. <link href="css/style.css" rel="stylesheet">
  30.  
  31. <!-- Custom styles for this template -->
  32. <link href="dashboard.css" rel="stylesheet">
  33. </head>
  34.  
  35. <body>
  36. <nav class="navbar navbar-inverse navbar-fixed-top">
  37. <div class="container-fluid">
  38. <div class="navbar-header">
  39. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  40. <span class="sr-only">Toggle navigation</span>
  41. <span class="icon-bar"></span>
  42. <span class="icon-bar"></span>
  43. <span class="icon-bar"></span>
  44. </button>
  45. <a class="navbar-brand" href="#">Project name</a>
  46. </div>
  47. <div id="navbar" class="navbar-collapse collapse">
  48. <ul class="nav navbar-nav navbar-right">
  49. <li><a href="#">Dashboard</a></li>
  50. <li><a href="#">Settings</a></li>
  51. <li><a href="#">Profile</a></li>
  52. <li><a href="#">Help</a></li>
  53. </ul>
  54. <form class="navbar-form navbar-right">
  55. <input type="text" class="form-control" placeholder="Search...">
  56. </form>
  57. </div>
  58. </div>
  59. </nav>
  60.  
  61. <div class="container-fluid">
  62. <div class="row">
  63. <div class="col-sm-3 col-md-2 sidebar">
  64. <ul class="nav nav-sidebar">
  65. <li class="active"><a href="#">Eins <span class="sr-only">(current)</span></a></li>
  66. <li><a href="#">Zwei</a></li>
  67. <li><a href="#">Drei</a></li>
  68. <li><a href="#">vier</a></li>
  69. </ul>
  70. </div>
  71. <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
  72. <h1 class="page-header">Dashboard</h1>
  73. <div class="table-responsive">
  74. <table class="table">
  75. <tr>
  76. <th>Name</th>
  77. <th>Ort</th>
  78. <th>Typ</th>
  79. <th>Fuel Blocks</th>
  80. <th>Fuel reicht bis</th>
  81. <th>Strontium</th>
  82. <th>Corp Access aktiv</th>
  83. </tr>
  84. <?php
  85. while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
  86. $result2=$conn2->query("SELECT itemName FROM mapDenormalize WHERE itemID = ".$row["moonID"]);
  87. $location = $result2->fetch_array(MYSQLI_ASSOC);
  88. $result2= $conn2->query("SELECT typeName FROM invTypes WHERE typeID = ".$row["typeID"]);
  89. echo $conn2->error;
  90. $type = $result2->fetch_array(MYSQLI_ASSOC);
  91.  
  92. echo "<tr>";
  93. echo "<td>".$row["itemID"]."</td>";
  94. echo "<td>".$location["itemName"]."</td>";
  95. echo "<td>".$type["typeName"]."</td>";
  96. echo "<td>".$row["fuel"]."</td>";
  97. echo "<td>-</td>";
  98. echo "<td>".$row["strontium"]."</td>";
  99. echo "<td>".$row["allowCorpMembers"]."</td>";
  100. echo "</tr>";
  101. }
  102. ?>
  103. </table>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108.  
  109. <!-- Bootstrap core JavaScript
  110. ================================================== -->
  111. <!-- Placed at the end of the document so the pages load faster -->
  112. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  113. </body>
  114. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement