Guest User

Untitled

a guest
Aug 18th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. Printing website correctly
  2. while (!feof($file_handle)){`
  3. $csvText = fgetcsv($file_handle, 1024);
  4. $username = $csvText[1];
  5. $password = $csvText[2];
  6. $profile = $csvText[3];
  7. $daysValid = $csvText[4];
  8. $expiry = $csvText[5];
  9.  
  10. if($pos == 0)
  11. {
  12. if($count == 5){
  13. echo "<p><br /></p>";
  14.  
  15. $count = 0;
  16. }else{
  17. $count++;
  18. }
  19. echo "<div class='itemRow'>";
  20. echo "<div class='left'>";
  21. $pos = 1;
  22. ?>
  23. <h4 class="centre">Internet Access Voucher</h4>
  24. <img class="image" src="./icon.jpg" />
  25. <div class="info">
  26. <table>
  27. <tr>
  28. <td>
  29. Username
  30. </td>
  31. </tr>
  32. <tr>
  33. <td>
  34. Password
  35. </td>
  36. </tr>
  37. <tr>
  38. <td>
  39. Profile
  40. </td>
  41. </tr>
  42. <tr>
  43. <td>
  44. Valid for
  45. </td>
  46. </tr>
  47. <tr>
  48. <td>
  49. Expiry date
  50. </td>
  51. </tr>
  52. </table>
  53. </div>
  54. <div class="uniqueInfo">
  55. <table>
  56. <tr>
  57. <td>
  58. <?php echo $username;?>
  59. </td>
  60. </tr>
  61. <tr>
  62. <td>
  63. <?php echo $password;?>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>
  68. <?php echo $profile;?>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td>
  73. <?php echo $daysValid;?>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>
  78. <?php echo $expiry;?>
  79. </td>
  80. </tr>
  81. </table>
  82. </div>
  83. <p class="centre"><br />Please remember to disconnect to stop each session.</p>
  84. </div>
  85. <br />
  86.  
  87. <?php
  88. } else {
  89. ?>
  90. <div class="right">
  91. <h4 class="centre">Internet Access Voucher</h4>
  92. <img class="imageRight" src="./icon.jpg" />
  93. <div class="infoRight">
  94. <table>
  95. <tr>
  96. <td>
  97. Username
  98. </td>
  99. </tr>
  100. <tr>
  101. <td>
  102. Password
  103. </td>
  104. </tr>
  105. <tr>
  106. <td>
  107. Profile
  108. </td>
  109. </tr>
  110. <tr>
  111. <td>
  112. Valid for
  113. </td>
  114. </tr>
  115. <tr>
  116. <td>
  117. Expiry date
  118. </td>
  119. </tr>
  120. </table>
  121. </div>
  122. <div class="uniqueInfoRight">
  123. <table>
  124. <tr>
  125. <td>
  126. <?php echo $username;?>
  127. </td>
  128. </tr>
  129. <tr>
  130. <td>
  131. <?php echo $password;?>
  132. </td>
  133. </tr>
  134. <tr>
  135. <td>
  136. <?php echo $profile;?>
  137. </td>
  138. </tr>
  139. <tr>
  140. <td>
  141. <?php echo $daysValid;?>
  142. </td>
  143. </tr>
  144. <tr>
  145. <td>
  146. <?php echo $expiry;?>
  147. </td>
  148. </tr>
  149. </table>
  150. </div>
  151. <p class="centre"><br />Please remember to disconnect to stop each session.</p>
  152. </div>
  153.  
  154. </div>
  155.  
  156. <?php
  157. $pos = 0;
  158. }
  159. }
  160. ?>
  161.  
  162. .centre
  163. {
  164. text-align:center;
  165. }
  166.  
  167. .itemRow
  168. {
  169. position:relative;
  170. top:0px;
  171. }
  172.  
  173. .left
  174. {
  175. width:500px;
  176. position:relative;
  177. font-family:Comic Sans, Comic sans MS, cursive;
  178. /*border-style:solid;
  179. border-width:1px;*/
  180. }
  181.  
  182. .right
  183. {
  184. width:500px;
  185. position:absolute;
  186. left:600px;
  187. top:-20px;
  188. font-family:Comic Sans, Comic sans MS, cursive;
  189. /*(border-style:solid;
  190. border-width:1px;*/
  191. }
  192.  
  193. .image
  194. {
  195. position:absolute;
  196. top:70px;
  197. }
  198.  
  199. .info
  200. {
  201. position:relative;
  202. left:63px;
  203. }
  204.  
  205. .uniqueInfo
  206. {
  207. position:absolute;
  208. left:250px;
  209. top:42px;
  210. }
  211.  
  212. .infoRight
  213. {
  214. position:relative;
  215. left:63px;
  216. top:0px;
  217. }
  218.  
  219. .uniqueInfoRight
  220. {
  221. position:absolute;
  222. left:250px;
  223. top:65px;
  224. }
  225.  
  226. .imageRight
  227. {
  228. position:absolute;
  229. top:90px;
  230. }
  231.  
  232. if($count == 5){
  233. echo "<p><br /></p>";
  234.  
  235. <br style="clear: both;" />
Add Comment
Please, Sign In to add comment