PageRenderTime 70ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/system/application/helpers/print_exam_permit_helper.php

https://gitlab.com/sylver.gocloud/gocloudasia-college-system-framework
PHP | 184 lines | 175 code | 9 blank | 0 comment | 1 complexity | 844d11009fae15f0106c1e31b3964778 MD5 | raw file
  1. <?php
  2. function print_html($enrollments,$setting,$permit_setting,$gmdate,$max){
  3. $ci =& get_instance();
  4. $html = '
  5. <head>
  6. <style>
  7. html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td,article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary,time, mark, audio, video
  8. {
  9. margin: 0;
  10. padding: 0;
  11. border: 0;
  12. font-size: 10px;
  13. font: inherit;
  14. vertical-align: top;
  15. }
  16. /* HTML5 display-role reset for older browsers */
  17. article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section
  18. {
  19. display: block;
  20. }
  21. td
  22. {
  23. padding: 3px;
  24. }
  25. th
  26. {
  27. border-bottom: 1px solid #000;
  28. font-weight: bold;
  29. font-size:10px;
  30. padding: 3px;
  31. margin: 0px;
  32. text-align: center;
  33. }
  34. td.title
  35. {
  36. border-top: 1px solid #000;
  37. border-right: 1px solid #000;
  38. border-left: 1px solid #000;
  39. font-weight: bold;
  40. }
  41. td.title2
  42. {
  43. border-bottom: #000 1px solid;
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <div>';
  49. $ctr = 0;
  50. foreach($enrollments as $enrollment):
  51. $ctr++;
  52. $html .= '<table style="width:100%; font-size:10px; text-align:center;">
  53. <tr>
  54. <td>
  55. <img src='.base_url().'assets/images/kcplogo.png" style="width:40px;" />
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>
  60. <div style="font-size:10px; text-align:center;">
  61. '.$setting->school_name.'
  62. </div>
  63. <div style="font-size:7px; text-align:center;">
  64. '.$setting->school_name.'
  65. </div>
  66. <div style="font-size:7px; text-align:center;">
  67. '.$setting->school_address.'
  68. </div>
  69. <div style="font-size:7px; text-align:center;">
  70. '.$setting->school_telephone.'
  71. </div>
  72. <div style="font-size:7px; text-align:center;">
  73. '.$setting->email.'
  74. </div>
  75. </td>
  76. </tr>
  77. <tr>
  78. <td style="font-size:7px; text-align:center;">
  79. '.$permit_setting->name.'
  80. </td>
  81. </tr>
  82. <tr>
  83. <td style="text-align:left; width:100%;">
  84. <table style="width:100%;">
  85. <tr>
  86. <td style="font-size:7px; text-align:left;">
  87. Time: '.date("h:i A",$gmdate).',
  88. </td>
  89. <td style="font-size:7px; text-align:left;">
  90. Date: '.date("F d, Y",$gmdate).',
  91. </td>
  92. <td style="font-size:7px; text-align:left;">
  93. Term: '.$enrollment->name.' Sem,
  94. </td>
  95. <td style="font-size:7px; text-align:left;">
  96. SY: '.$enrollment->sy_from.' - '.$enrollment->sy_to.',
  97. <td style="font-size:7px; text-align:left;">
  98. Admission Status: '.$enrollment->status.'
  99. </td>
  100. </tr>
  101. <tr>
  102. <td colspan="2" style="font-size:8px; text-align:left; font-weight:bold;">
  103. ID No#: '.$enrollment->studid.'
  104. </td>
  105. <td colspan="3" style="font-size:8px; text-align:left; font-weight:bold;">
  106. Student Name: '.ucfirst($enrollment->name).'
  107. </td>
  108. </tr>
  109. <tr>
  110. <td colspan="2" style="font-size:7px; text-align:left;">
  111. Course: '.$enrollment->course.',
  112. </td>
  113. <td colspan="3" style="font-size:7px; text-align:left;">
  114. Year: '.$enrollment->year.' Year
  115. </td>
  116. </tr>
  117. </table>
  118. </td>
  119. </td>
  120. <tr>
  121. <td style="width:100%; font-size:7px; text-align:left;">
  122. <table cellpadding="0" cellspacing="0" style="width:100%;">
  123. <tr>
  124. <td style="border-bottom:#000 2px solid;">
  125. Subject Code
  126. </td>
  127. <td style="border-bottom:#000 2px solid;">
  128. Section Code
  129. </td>
  130. <td style="border-bottom:#000 2px solid;">
  131. Subject Description
  132. </td>
  133. <td style="border-bottom:#000 2px solid;">
  134. Units
  135. </td>
  136. <td style="border-bottom:#000 2px solid;">
  137. Lab
  138. </td>
  139. <td style="border-bottom:#000 2px solid;">
  140. Instructor\'s Signature
  141. </td>
  142. <td style="border-bottom:#000 2px solid;">
  143. Date
  144. </td>
  145. <td style="border-bottom:#000 2px solid;">
  146. Remarks
  147. </td>
  148. </tr>
  149. </table>
  150. </td>
  151. </tr>
  152. </table>';
  153. if($ctr<=$max){
  154. $html .= '<pagebreak />';
  155. }
  156. endforeach;
  157. $html .= '</div>
  158. </body>
  159. ';
  160. return $html;
  161. }