Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(validation_errors() != null){
- echo '<div class="alert alert-danger">';
- echo validation_errors();
- echo '</div>';
- unset($errorMsg);
- }
- if(isset($errorMsg)){
- echo '<div class="alert alert-danger">';
- echo $errorMsg;
- echo '</div>';
- unset($errorMsg);
- }else if(isset($successMsg)){
- echo '<div class="alert alert-success">';
- echo $successMsg;
- echo '</div>';
- unset($successMsg);
- }
- ?>
- <form method="post">
- <p><label>Select Excel File</label>
- <select name="bulan" class="form-control" required>
- <option value="">Bulan</option>
- <?php
- $bln=array(1=>"01","02","03","04","05","06","07","08","09","10","11","12");
- for($bulan=1; $bulan<=12; $bulan++){
- echo "<option value=$bulan>$bln[$bulan]</option>";}
- ?>
- </select>
- </br>
- <select name="tahun" class="form-control" required>
- <option value="">Tahun</option>
- <?php
- for($thn=date('Y')-1; $thn<=date('Y')+1; $thn++){
- echo "<option value=$thn>$thn</option>";}
- ?>
- </select>
- </br></p>
- <?php
- if (count($trobosan)>0) {
- $i=1;
- ?>
- <table id="example1" class="table table-bordered table-striped">
- <thead>
- <tr>
- <th>No</th>
- <th>Nama</th>
- <th>Bayar IR (Y/N)</th>
- <th>Catatan</th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($trobosan as $key=>$list){
- ?>
- <tr>
- <td><?php echo $i;?></td>
- <td><input type="hidden" name="<?php echo 'id_user'.$i;?>" value="<?php echo 'id_user'.$i;?>"><?php echo $list['nama'];?></td>
- <td><input type="checkbox" name="<?php echo 'bayar'.$i;?>"></td>
- <td><textarea name="<?php echo 'catatan'.$i;?>"></textarea></td>
- </tr>
- <?php
- $i++;
- }
- ?>
- </tbody>
- <tfoot>
- <tr>
- <th>No</th>
- <th>Nama</th>
- <th>Bayar IR (Y/N)</th>
- <th>Catatan</th>
- </tr>
- </tfoot>
- </table>
- <?php
- }else{
- ?>
- <p class="text-muted">Data Not Available..</p>
- <?php
- }
- ?>
- </p>
- <input type="submit" name="Submit" value="Import" class="btn btn-info col-md-12" />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement