Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_cache_limiter();
- session_start();
- require('config.php');
- require('functions.php');
- //check for administrative rights
- if (allow_access(Administrators) != "yes")
- {
- include ('no_access.html');
- exit;
- }
- $cars = cars();
- adminheader('List Cars');
- ?>
- <div id="content">
- <h2>Cars List</h2>
- <table border="1" cellspacing="2" cellpadding="2">
- <tr>
- <td><font face="Arial, Helvetica, sans-serif">Year</font></td>
- <td><font face="Arial, Helvetica, sans-serif">Make/Model</font></td>
- <td><font face="Arial, Helvetica, sans-serif">Color</font></td>
- <td><font face="Arial, Helvetica, sans-serif">Plate Number</font></td>
- <td><font face="Arial, Helvetica, sans-serif">Vin Number</font></td>
- <td><font face="Arial, Helvetica, sans-serif">Type</font></td>
- <td><font face="Arial, Helvetica, sans-serif">Active</font></td>
- <td><font face="Arial, Helvetica, sans-serif">Notes</font></td>
- <td><font face="Arial, Helvetica, sans-serif">Edit</font></td>
- </tr>
- <?php
- foreach ($cars as $row){
- $num=count($cars);
- ?>
- <tr>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['car_year'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['car_make_model'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['car_color'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['car_plate'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['car_vin'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['car_type'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['car_active'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['car_notes'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><?php echo $row['authoriz_id_auth'];?></font></td>
- <td><font face="Arial, Helvetica, sans-serif"><a href="edit_cars_form.php?id_cars=<?php echo $row['id_cars'];?>">Edit</a></font></td>
- </tr>
- <?php
- }
- ?>
- </table>
- <?php
- echo "Total Records: $num";
- ?>
- <form name="add Car" action="add_car_form.php">
- <input type="submit" class="button" value="Add A Car"/>
- </form>
- <!-- end .content --></div>
- <!-- end content-container --></div>
- <?php include 'footer.php'; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement