PageRenderTime 28ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/day34_final_project/Final_Project/Group-4_CodeArtisan/bitm-final-project-master-bb727a6b10ebe8331078472b3bb62c2367544f1e/Views/offeredcourse.php

https://gitlab.com/redwan4re/web-apps-php-26
PHP | 173 lines | 145 code | 28 blank | 0 comment | 22 complexity | 7c7d9b1d8381c16b7b2b9d4daa6d82c2 MD5 | raw file
  1. <?php
  2. include_once '../vendor/autoload.php';
  3. use App\course\Course;
  4. $objIndex = new Course();
  5. $allData = $objIndex->ShowAllCourse();
  6. $i = 1;
  7. $serial = 1;
  8. ?>
  9. <?php include_once 'header.php'; ?>
  10. <!-- Page header -->
  11. <div class="page-header">
  12. <div class="page-header-content">
  13. <div class="page-title">
  14. <h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold">List</span> Of All Courses</h4>
  15. </div><?php $objIndex->sessionMsg('deleteSuccess') ?>
  16. </div>
  17. </div>
  18. <!-- /page header -->
  19. <!-- Content area -->
  20. <div class="content">
  21. <!-- Detached sidebar -->
  22. <?php include_once 'sidebar.php'; ?>
  23. <!-- /detached sidebar -->
  24. <!-- Detached content -->
  25. <div class="container-detached">
  26. <div class="content-detached">
  27. <!-- Grid -->
  28. <div class="row">
  29. <div class="col-md-12">
  30. <!-- Horizontal form -->
  31. <div class="panel panel-flat">
  32. <div class="panel-body">
  33. <div class="table-responsive">
  34. <table class="table table-columned footable" data-page-size="10"
  35. data-next-text="Next" data-previous-text="Previous">
  36. <thead>
  37. <tr class="disabled bg-teal-600">
  38. <th>#</th>
  39. <th>Course<br>Name</th>
  40. <th>Duration</th>
  41. <th>Type</th>
  42. <th>Course<br>Price</th>
  43. <th colspan="3"><center>Action</center></th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <?php
  48. foreach ($allData as $singleData) {
  49. if($singleData['is_offer']==1){
  50. continue;
  51. }
  52. if ($singleData['is_delete'] == 1) {
  53. continue;
  54. }
  55. ?>
  56. <tr class="<?php
  57. if ($i % 2 == 0) {
  58. echo "info";
  59. } else {
  60. echo "alpha-slate";
  61. }
  62. $i++;
  63. ?>">
  64. <td><?php echo $serial++; ?></td>
  65. <td><?php echo $singleData['title']; ?></td>
  66. <td><?php
  67. if ($singleData['duration'] == '15_days') {
  68. echo "15 Days Long";
  69. }
  70. if ($singleData['duration'] == '1_month') {
  71. echo "1 Month Long";
  72. }
  73. if ($singleData['duration'] == '2_months') {
  74. echo "2 Months Long";
  75. }
  76. if ($singleData['duration'] == '3_months') {
  77. echo "Maximum 3 Months";
  78. }
  79. ?></td>
  80. <?php
  81. if ($singleData['course_type'] == 2) {
  82. echo '<td><b><span class="text-danger">FREE Course</span></b></td>';
  83. } else {
  84. echo '<td>Paid Course</td>';
  85. }
  86. ?>
  87. <td>
  88. <?php
  89. if ($singleData['course_fee'] == 0) {
  90. echo'Not Applicable';
  91. } else {
  92. echo $singleData['course_fee'];
  93. }
  94. ?>
  95. <?php
  96. if ($singleData['is_offer'] == 0) {
  97. echo '<br><span class="badge bg-danger-400">Offered</span>';
  98. }
  99. ?>
  100. </td>
  101. <td class="text-center">
  102. <a class="btn bg-teal" type="button" href="show.php?id=<?php echo $singleData['unique_id']; ?>">
  103. <i class="icon-enlarge6 position-left"></i>
  104. Details
  105. </a>
  106. </td>
  107. <td class="text-center">
  108. <a class="btn bg-teal" type="button" href="edit.php?id=<?php echo $singleData['unique_id']; ?>">
  109. <i class="icon-pencil7 position-left"></i>
  110. Edit
  111. </a>
  112. </td>
  113. <td class="text-center">
  114. <a class="btn bg-teal" type="button" href="trash.php?id=<?php echo $singleData['unique_id']; ?>">
  115. <i class="icon-close2 position-left"></i>
  116. Delete
  117. </a>
  118. </td>
  119. </tr>
  120. <?php
  121. }
  122. ?>
  123. </tbody>
  124. <!-- Pagination -->
  125. <tfoot class="hide-if-no-paging">
  126. <tr>
  127. <td colspan="3">
  128. <div class="pagination text-center"></div>
  129. </td>
  130. </tr>
  131. </tfoot>
  132. <!-- /Pagination -->
  133. </table>
  134. </div>
  135. </div>
  136. </div>
  137. <!-- /horizotal form -->
  138. </div>
  139. </div>
  140. </div>
  141. <!-- /grid -->
  142. </div>
  143. </div>
  144. <!-- /detached content -->
  145. <?php include_once 'footer.php';?>