Advertisement
JonneOpettaja

subjects_index.php

Jul 25th, 2019
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1. <?php require_once('../../../private/initialize.php'); ?>
  2.  
  3. <?php
  4.   //tietokannan tapaan toimiva array
  5.   $subjects = [
  6.     ['id' => '1', 'position' => '1', 'visible' => '1', 'menu_name' => 'About Globe Bank'],
  7.     ['id' => '2', 'position' => '2', 'visible' => '1', 'menu_name' => 'Consumer'],
  8.     ['id' => '3', 'position' => '3', 'visible' => '1', 'menu_name' => 'Small Business'],
  9.     ['id' => '4', 'position' => '4', 'visible' => '1', 'menu_name' => 'Commercial'],
  10.   ];
  11. ?>
  12.  
  13. <?php $page_title = 'Subjects'; ?>
  14. <?php include(SHARED_PATH . '/staff_header.php'); ?>
  15.  
  16. <div id="content">
  17.   <div class="subjects listing">
  18.     <h1>Subjects</h1>
  19.  
  20.     <div class="actions">
  21.       <a class="action" href="">Create New Subject</a>
  22.     </div>
  23.  
  24.     <table class="list">
  25.       <tr>
  26.         <th>ID</th>
  27.         <th>Position</th>
  28.         <th>Visible</th>
  29.         <th>Name</th>
  30.         <th>&nbsp;</th>
  31.         <th>&nbsp;</th>
  32.         <th>&nbsp;</th>
  33.       </tr>
  34.  
  35.       <?php foreach($subjects as $subject) { ?>
  36.         <tr>
  37.           <td><?php echo $subject['id']; ?></td>
  38.           <td><?php echo $subject['position']; ?></td>
  39.           <td><?php echo $subject['visible'] == 1 ? 'true' : 'false'; ?></td>
  40.             <td><?php echo $subject['menu_name']; ?></td>
  41.           <td><a class="action" href="">View</a></td>
  42.           <td><a class="action" href="">Edit</a></td>
  43.           <td><a class="action" href="">Delete</a></td>
  44.           </tr>
  45.       <?php } ?>
  46.     </table>
  47.  
  48.   </div>
  49.  
  50. </div>
  51.  
  52. <?php include(SHARED_PATH . '/staff_footer.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement