/Views/LabInfo/show.php

https://gitlab.com/cserobiul/BITM-LabMs-New · PHP · 152 lines · 133 code · 19 blank · 0 comment · 4 complexity · 95a5a343b64466804feb3f8b7ba87a3d MD5 · raw file

  1. <?php
  2. $data = $labInfoObject->assign($_REQUEST)->show();
  3. if(isset($_SESSION['msg']) && !empty($_SESSION['msg'])){
  4. echo '<h2>'.$_SESSION['msg'].'</h2>';
  5. unset($_SESSION['msg']);
  6. }
  7. ?>
  8. <div class="breadcrumb-line">
  9. <ul class="breadcrumb">
  10. <li><a href="index.php"><i class="icon-home2 position-left"></i> Home</a></li>
  11. <li><a href="?p=allLab">All Lab</a></li>
  12. <li class="active">Lab Details</li>
  13. </ul>
  14. </div>
  15. <br>
  16. <div class="tab-pane">
  17. <a href="?p=addLab">
  18. <button type="button" class="btn border-slate text-slate-800 btn-flat"><i class="icon-plus3 position-left"></i> Add New Lab</button>
  19. </a>
  20. <a href="?p=allLab">
  21. <button type="button" class="btn border-slate text-slate-800 btn-flat"><i class="icon-grid position-left"></i> Show All Lab</button>
  22. </a>
  23. </div>
  24. <br>
  25. <?php if (!empty($data)) { ?>
  26. <div class="panel panel-white">
  27. <div class="panel-heading">
  28. <h5 class="panel-title">Lab Details Information </h5>
  29. <div class="heading-elements">
  30. <a href="?p=editLab&labNo=<?php echo $data['lab_no'] ?>">
  31. <button type="button" class="btn btn-default btn-xs heading-btn"><i class="icon-pencil position-left"></i> Edit</button>
  32. </a>
  33. <button type="button" class="btn btn-default btn-xs heading-btn"><i class="icon-printer position-left"></i> Print</button>
  34. </div>
  35. </div>
  36. <div class="table-responsive">
  37. <table class="table table-lg">
  38. <thead>
  39. <tr>
  40. <th class="col-sm-1">Item</th>
  41. <th class="col-sm-1">Description</th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. <tr>
  46. <td>
  47. <h6 class="no-margin">Lab No</h6>
  48. </td>
  49. <td><?php echo $data['lab_no'] ?></td>
  50. </tr>
  51. <tr>
  52. <td>
  53. <h6 class="no-margin">Lab For </h6>
  54. </td>
  55. <td><?php
  56. $_REQUEST['courseName'] = $data['course_id'];
  57. $courseName = $courseInfoObject->assign($_REQUEST)->getCourseName();
  58. echo ucwords($courseName['title']); ?></td>
  59. </tr>
  60. <tr>
  61. <td>
  62. <h6 class="no-margin">Seat Capacity</h6>
  63. </td>
  64. <td><?php echo $data['seat_capacity'] ?> </td>
  65. </tr>
  66. <tr>
  67. <td>
  68. <h6 class="no-margin">Projector Resolution</h6>
  69. </td>
  70. <td><?php echo $data['projector_resolution'] ?> </td>
  71. </tr>
  72. <tr>
  73. <td>
  74. <h6 class="no-margin">AC Status</h6>
  75. </td>
  76. <td><?php echo $data['ac_status'] ?> </td>
  77. </tr>
  78. <tr>
  79. <td>
  80. <h6 class="no-margin">Student PC Configuration</h6>
  81. </td>
  82. <td><?php
  83. $pcc = unserialize($data['pc_configuration']);
  84. echo 'Processor: '. strtoupper($pcc['processor']);
  85. echo '<br>';
  86. echo 'Ram: '. strtoupper($pcc['ram']);
  87. echo '<br>';
  88. echo 'Brand: '. strtoupper($pcc['brand']);
  89. echo '<br>';
  90. echo 'OS: '. ucwords($pcc['os']);
  91. ?></td>
  92. </tr>
  93. <tr>
  94. <td>
  95. <h6 class="no-margin">Trainer PC Configuration</h6>
  96. </td>
  97. <td><?php
  98. $tpcc = unserialize($data['trainer_pc_configuration']);
  99. echo 'Processor: '. strtoupper($tpcc['processor']);
  100. echo '<br>';
  101. echo 'Ram: '. strtoupper($tpcc['ram']);
  102. echo '<br>';
  103. echo 'Brand: '. strtoupper($tpcc['brand']);
  104. echo '<br>';
  105. echo 'OS: '. ucwords($tpcc['os']);
  106. ?></td>
  107. </tr>
  108. <tr>
  109. <td>
  110. <h6 class="no-margin">Table Capacity</h6>
  111. </td>
  112. <td><?php echo $data['table_capacity'] ?></td>
  113. </tr>
  114. <tr>
  115. <td>
  116. <h6 class="no-margin">Internet Speed</h6>
  117. </td>
  118. <td><?php echo $data['internet_speed'] ?></td>
  119. </tr>
  120. </tbody>
  121. </table>
  122. </div>
  123. </div>
  124. <?php
  125. } else { ?>
  126. <div class="panel panel-white">
  127. <div class="panel-heading">
  128. <h5 class="panel-title">There are no Lab Details Information that you want</h5>
  129. </div>
  130. </div>
  131. <?php }
  132. ?>
  133. <!-- /invoice template -->