<?php
$this->load->view('includes/header.php');
echo '<font class="title">'.$menu_path.'</font>';
echo '<br>';
			/* Display system message */
			$this->fungsi->disp_sys_msg();
			echo validation_errors('<p class="field_error">', '</p>');
?>
<form name="form1" method="post" action="<?php echo $form_action ?>">
  <table width="512" border="0">
    <tr>
      <td width="86">Branch</td>
      <td width="7">:</td>
      <td colspan="4"><select name="cb_idcab" id="cb_idcab">
        <?php 

foreach ($cab as $cabs)
{ 
?>
<option value="<?php echo $cabs->idcab; ?>" ><?php echo $cabs->cabname; ?></option>
<?php
}
?>  
      </select></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><input name="txt_awal" type="text" class="txt_field" id="txt_awal" value="<?php echo $row['awal']; ?>" size="12" maxlength="12" /></td>
      <td width="27">To</td>
      <td><input name="txt_akhir" type="text" class="txt_field" id="txt_akhir" value="<?php echo $row['akhir']; ?>" size="12" maxlength="12" /></td>
      <td width="14">&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td width="95"><input type="submit" name="button" id="button" value="Submit" class="button" /></td>
      
      <td>&nbsp;</td>
      <td width="257">&nbsp;</td>
    </tr>
  </table>
</form>
<hr>
<table width="100%">
  <tr>
    <td>Cabang</td>
    <td>Mulai</td>
    <td>Selesai</td>
    <td>Saat ini</td>
    <td>Dibuat tanggal</td>
  </tr>
  <?php foreach($counter as $row){ ?>
    <tr>
      <td><?php echo $this->branch_report_model->get_cabang_byidcab($row->idcab)->row('cabname') ?></td>
      <td><?php echo $row->start ?></td>
      <td><?php echo $row->finish ?></td>
      <td><?php echo $row->counter ?></td>
      <td><?php echo date("d M Y H:i:s", strtotime($row->adddate)) ?></td>
    </tr>
  <?php } ?>
</table>