Guest User

Untitled

a guest
May 4th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if(!isset($_SESSION['login'])) {
  4. header('Location: AdminLogin.php');
  5. exit;
  6. }
  7. $user = 'root';
  8. $password = 'root';
  9. $db = 'Senior Internships';
  10. $host = 'localhost';
  11.  
  12. $conn = new mysqli($host, $user, $password, $db);
  13. ?>
  14. <!DOCTYPE html>
  15. <html lang="en">
  16. <head>
  17. <meta name="viewport" content="width=device-width, initial-scale=1">
  18. <title>Internships</title>
  19. <link href="css/Navbar.css" rel="stylesheet">
  20. <link href="css/dropdown.css" rel="stylesheet">
  21. <link href="css/Tables.css" rel="stylesheet">
  22. </head>
  23.  
  24. <body>
  25. <img src="BT-Square-Logo.png" class="logo" alt='BT Logo'>
  26. <script src="js/dropdown.js"></script>
  27. <header>
  28. <div class="container">
  29. <nav>
  30. <ul>
  31. <li><a href='Pre-approved_Internships.php'>Pre-approved Internships</a></li>
  32. <li><a href='Logout.php'>Logout</a></li>
  33. </ul>
  34. </nav>
  35. </div>
  36. </header>
  37. <h2>Students Not Yet Assigned</h2>
  38. <div id="table-wrapper2">
  39. <div id="table-scroll">
  40. <div id="table-wrapper">
  41. <table style="width:100%">
  42. <tr>
  43. <th>First Name</th>
  44. <th>Last Name</th>
  45. <th>1st Area of Interest</th>
  46. <th>2nd Area of Interest</th>
  47. <th>3rd Area of Interest</th>
  48. <th>Internship</th>
  49. </tr>
  50.  
  51. <?php
  52. $result = mysqli_query($conn, "SELECT FName, LName, AreaofInterest1, AreaofInterest2, AreaofInterest3 FROM Seniors WHERE Visibility=0");
  53. while($row = mysqli_fetch_array($result)):
  54. ?>
  55. <tr>
  56. <td><?= $row['FName']; ?></td>
  57. <td><?= $row['LName']; ?></td>
  58. <td><?= $row['AreaofInterest1']; ?></td>
  59. <td><?= $row['AreaofInterest2']; ?></td>
  60. <td><?= $row['AreaofInterest3']; ?></td>
  61. <td>
  62. <select>
  63.  
  64. <?php
  65. $result2 = mysqli_query($conn, "SELECT Company FROM Internships");
  66. while($row2 = mysqli_fetch_array($result2)): ?>
  67. <option vaue="<?= $row2['Company']; ?>"><?= $row2['Company']; ?></option>
  68. <?php endwhile ?>
  69. </select>
  70. </td>
  71. </tr>
  72. <?php endwhile; ?>
  73. </table>
  74. </div>
  75. </div>
  76. </div>
  77. </body>
  78. <footer><p>&copy Eliav Hamburger 2018 Admins login <a href='AdminLogin.php'>here</a></p></footer>
  79. </html>
  80.  
  81. td, th {
  82. padding: 10px;
  83. }
  84. table {
  85. border-collapse: collapse;
  86. border: none;
  87. }
  88. th {
  89. color: white;
  90. background-color: #302e7f;
  91. }
  92. th a {
  93. color: white;
  94. text-decoration: none;
  95. }
  96. tr:nth-child(2n+1) {
  97. background-color: #91A6BB;
  98. }
  99. #table-wrapper {
  100. position:relative;
  101. border-style: solid;
  102. border-radius: 7px;
  103. border-color: #91A6BB;
  104. }
  105. #table-scroll {
  106. height:250px;
  107. overflow:auto;
  108. }
  109. #table-wrapper2 table {
  110. width:100%;
  111. }
  112. #table-wrapper2 table thead th .text {
  113. position:absolute;
  114. top:-20px;
  115. z-index:2;
  116. height:20px;
  117. width:35%;
  118. border:1px solid red;
  119. }
Add Comment
Please, Sign In to add comment