Advertisement
taktikhek

Untitled

Sep 13th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. <?php
  2. if(validation_errors() != null){
  3. echo '<div class="alert alert-danger">';
  4. echo validation_errors();
  5. echo '</div>';
  6. unset($errorMsg);
  7. }
  8.  
  9. if(isset($errorMsg)){
  10. echo '<div class="alert alert-danger">';
  11. echo $errorMsg;
  12. echo '</div>';
  13. unset($errorMsg);
  14. }else if(isset($successMsg)){
  15. echo '<div class="alert alert-success">';
  16. echo $successMsg;
  17. echo '</div>';
  18. unset($successMsg);
  19. }
  20. ?>
  21. <form method="post">
  22. <p><label>Select Excel File</label>
  23. <select name="bulan" class="form-control" required>
  24. <option value="">Bulan</option>
  25. <?php
  26. $bln=array(1=>"01","02","03","04","05","06","07","08","09","10","11","12");
  27. for($bulan=1; $bulan<=12; $bulan++){
  28. echo "<option value=$bulan>$bln[$bulan]</option>";}
  29. ?>
  30. </select>
  31. </br>
  32. <select name="tahun" class="form-control" required>
  33. <option value="">Tahun</option>
  34. <?php
  35. for($thn=date('Y')-1; $thn<=date('Y')+1; $thn++){
  36. echo "<option value=$thn>$thn</option>";}
  37. ?>
  38. </select>
  39. </br></p>
  40. <?php
  41. if (count($trobosan)>0) {
  42. $i=1;
  43. ?>
  44. <table id="example1" class="table table-bordered table-striped">
  45. <thead>
  46. <tr>
  47. <th>No</th>
  48. <th>Nama</th>
  49. <th>Bayar IR (Y/N)</th>
  50. <th>Catatan</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. <?php
  55. foreach($trobosan as $key=>$list){
  56. ?>
  57. <tr>
  58. <td><?php echo $i;?></td>
  59. <td><input type="hidden" name="<?php echo 'id_user'.$i;?>" value="<?php echo 'id_user'.$i;?>"><?php echo $list['nama'];?></td>
  60. <td><input type="checkbox" name="<?php echo 'bayar'.$i;?>"></td>
  61. <td><textarea name="<?php echo 'catatan'.$i;?>"></textarea></td>
  62. </tr>
  63. <?php
  64. $i++;
  65. }
  66. ?>
  67. </tbody>
  68. <tfoot>
  69. <tr>
  70. <th>No</th>
  71. <th>Nama</th>
  72. <th>Bayar IR (Y/N)</th>
  73. <th>Catatan</th>
  74. </tr>
  75. </tfoot>
  76. </table>
  77. <?php
  78. }else{
  79. ?>
  80. <p class="text-muted">Data Not Available..</p>
  81. <?php
  82. }
  83. ?>
  84. </p>
  85. <input type="submit" name="Submit" value="Import" class="btn btn-info col-md-12" />
  86. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement