<!DOCTYPE html>
<?php $admin = 'Master'; $nama = 'ttd';?>
<html lang="en">
<?php include("layout/meta.php");?>
	<body class="no-skin">
	<?php include("layout/navbar.php");?>
		<div class="main-container ace-save-state" id="main-container">
			<script type="text/javascript">
				try{ace.settings.loadState('main-container')}catch(e){}
			</script>
			<?php include("layout/sidebar.php");?>
			<div class="main-content">
			  <div class="main-content-inner">
				<div class="col-xs-12">
				<?php if(!empty($pesan)){ ?>
				<div class="alert alert-<?php echo $alert;?>" role="alert" style="text-align:center;">
				 <strong><?php echo validation_errors(); echo $pesan ;?></strong>
				</div><?php }?>					
					<h3 class="header smaller lighter blue"><?php echo $nama;?></h3>					
					
				  <div class="widget-box">
					<div class="widget-body">										
					<div class="table-header">
						Pesan
					</div>     	
					<table id="tabel-data" class="table table-striped table-bordered  table-hover" width="100%" cellspacing="0">
						<thead>
							<tr>
								<th width="5%" style="text-align: center;">No</th>							
								<th width="20%" style="text-align: left;">idpesan</th>								
								<th width="10%" style="text-align: left;">namapesan</th>								
								<th width="20%" style="text-align: left;">hppesan</th>								
								<th width="20%" style="text-align: left;">namapemakai</th>															
								<th width="10%" style="text-align: left;">alamat</th>								
								<th width="10%" style="text-align: left;">tglpesan</th>								
								<th width="10%" style="text-align: left;">tglpakai</th>								
								<th width="10%" style="text-align: left;">tglselesai</th>								
								<th width="10%" style="text-align: left;">jampakai</th>								
								<th width="10%" style="text-align: left;">keperluan</th>								
								<th width="10%" style="text-align: left;">keterangan</th>								
								<th width="10%" style="text-align: left;">dp1</th>								
								<th width="10%" style="text-align: left;">tgldp1</th>								
								<th width="10%" style="text-align: left;">status</th>								
								<th width="10%" style="text-align: left;">statusdp</th>								
								<th width="10%" style="text-align: left;">siangmalam</th>								
								<th width="10%" style="text-align: left;">pemkot</th>								
								<th width="10%" style="text-align: left;">disetujui</th>								
								<th width="10%" style="text-align: left;">notif</th>								
								<th width="10%" style="text-align: center;">Aksi</th>								
							</tr>
						</thead>
						<tbody>		
						<?php $no=0; foreach($pesanok->result() as $row){ $no++;?>
							<tr>		
								<?php $attribute = array('role' => 'form', 'class' => 'form-horizontal' );
								echo form_open(base_url().'admin/datacek/hapuspesan1', $attribute); ?>								
								<td align="center"><input type="hidden" name="idpesan" value="<?php echo $row->idpesan;?>"><?php echo $no;?></td>							
								<td align="left"><?php echo $row->idpesan;?></td>
								<td align="left"><?php echo $row->namapesan;?></td>
								<td align="left"><?php echo $row->hppesan;?></td>
								<td align="left"><?php echo $row->namapemakai;?></td>	
								<td align="left"><?php echo $row->alamat;?></td>			
								<td align="left"><?php echo $row->tglpesan;?></td>			
								<td align="left"><?php echo $row->tglpakai;?></td>			
								<td align="left"><?php echo $row->tglselesai;?></td>			
								<td align="left"><?php echo $row->jampakai;?></td>			
								<td align="left"><?php echo $row->keperluan;?></td>			
								<td align="left"><?php echo $row->keterangan;?></td>			
								<td align="left"><?php echo $row->dp1;?></td>			
								<td align="left"><?php echo $row->tgldp1;?></td>			
								<td align="left"><?php echo $row->status;?></td>			
								<td align="left"><?php echo $row->statusdp;?></td>			
								<td align="left"><?php echo $row->siangmalam;?></td>			
								<td align="left"><?php echo $row->pemkot;?></td>			
								<td align="left"><?php echo $row->disetujui;?></td>			
								<td align="left"><?php echo $row->notif;?></td>			
								<td align="center">
									<button  type="submit" name="hapus" value="hapus" class="btn-danger"  onclick="return confirm(' Apakah anda yakin akan menghapus data <?php echo $row->headerttd;?> ?')">
									<i class="ace-icon fa fa-trash-o "></i></button>										
									</td>
								<?php echo form_close();?>	
							</tr>
						<?php }?>	
						</tbody>
					</table>
					<hr />
					<div class="table-header">
						Pesan Detail
					</div>  					
					<table id="tabel-data2" class="table table-striped table-bordered  table-hover" width="100%" cellspacing="0">
						<thead>
							<tr>
								<th width="5%" style="text-align: center;">No</th>							
								<th width="20%" style="text-align: left;">idpesandetail</th>								
								<th width="10%" style="text-align: left;">idpesan</th>								
								<th width="20%" style="text-align: left;">tanggal</th>								
								<th width="20%" style="text-align: left;">idfasilitas</th>								
								<th width="10%" style="text-align: left;">hari</th>								
								<th width="10%" style="text-align: left;">jumlah</th>								
								<th width="10%" style="text-align: left;">harga</th>								
								<th width="10%" style="text-align: left;">subtotal</th>														
								<th width="10%" style="text-align: center;">Aksi</th>								
							</tr>
						</thead>
						<tbody>		
						<?php $no=0; foreach($pesandetail->result() as $row){ $no++;?>
							<tr>		
								<?php $attribute = array('role' => 'form', 'class' => 'form-horizontal' );
								echo form_open(base_url().'admin/datacek/hapuspesan2', $attribute); ?>								
								<td align="center"><input type="hidden" name="idpesandetail" value="<?php echo $row->idpesandetail;?>"><?php echo $no;?></td>							
								<td align="left"><?php echo $row->idpesandetail;?></td>
								<td align="left"><?php echo $row->idpesan;?></td>
								<td align="left"><?php echo $row->tanggal;?></td>
								<td align="left"><?php echo $row->idfasilitas;?></td>
								<td align="left"><?php echo $row->hari;?></td>			
								<td align="left"><?php echo $row->jumlah;?></td>			
								<td align="left"><?php echo $row->harga;?></td>			
								<td align="left"><?php echo $row->subtotal;?></td>					
								<td align="center">
									<button  type="submit" name="hapus" value="hapus" class="btn-danger"  onclick="return confirm(' Apakah anda yakin akan menghapus data <?php echo $row->headerttd;?> ?')">
									<i class="ace-icon fa fa-trash-o "></i></button>										
									</td>
								<?php echo form_close();?>	
							</tr>
						<?php }?>	
						</tbody>
					</table>					
					
					</div>
				  </div>
				</div>
				<!-- /.span -->
			  </div>
			  <!-- /.main-content -->
			</div>
			<?php include("layout/footer.php");?>
			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->
		<!-- basic scripts -->
			<?php include("layout/sc_footer.php");?>
	</body>
</html>

<p>pesanhapus1</p>
<?php $attribute = array('role' => 'form', 'class' => 'form-horizontal' );
								echo form_open(base_url().'admin/datacek/pesanhapus1', $attribute); ?>	
<input type="text" name="namafield" >		
<input type="text" name="kondisi" >		
<button type="submit" name="submit"></submit>
</form>
<p>pesanhapus2</p>
<?php $attribute = array('role' => 'form', 'class' => 'form-horizontal' );
								echo form_open(base_url().'admin/datacek/pesanhapus2', $attribute); ?>	
<input type="text" name="namafield" >		
<input type="text" name="kondisi" >		
<button type="submit" name="submit"></submit>
</form>
