<h2 class="page-header">
	<?php echo $judul;?>
</h2>
<div class="panel panel-default">
	<div class="panel-heading">
		<div class="row">
			<div class='col-sm-6'>Slogan Text</div>
			<div class='col-sm-6' align='right'>
				<a href="<?=$url?>sloganbanner-new" class="btn btn-success btn-sm"><i class=" fa fa-plus"></i> Tambah</a>
			</div>
		</div>
	</div>
	<div class="panel-body">
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover dataTables" >
				<thead>
					<tr>
						<th width='35'>No</th>
						<th width=''>Text</th>
						<th width='70'>Status</th>
						<th width='70'></th>
					</tr>
				</thead>
				<tbody>
					<?php
						$no=1;
						if(isset($slogan) && count($slogan) > 0): foreach($slogan as $row):  
					?>
					<tr>
						<td align='center'><?=$no;?></td>
						<td align='center'><?=$row['text'];?></td>
						<td align='center'>
							<a href='javascript:void(0);' class="label label-success" id='st-<?php echo $row['id_sloganbanner'];?>' onclick="change_status('st-<?php echo $row['id_sloganbanner'];?>','<?=isset($row['status']) ?  $status[$row['status']] : '-'?>','<?=$row['id_sloganbanner']?>','<?=base_url()?>cms/logic/delete_ajax/sloganbanner/<?=$row['id_sloganbanner']?>')">
								<?php echo isset($row['status']) ?  $status[$row['status']] : '-'?>
							</a>
						</td>
						<td align='center'>
							<a href="<?=$url?>sloganbanner-new?_id=<?=$row['id_sloganbanner']?>" class='btn btn-xs btn-success '><i class="fa fa-edit "></i></a>
							<a class='btn btn-xs btn-danger' onclick="return confirm('Are you sure you want to delete this item?');" href="<?=base_url()?>cms/logic/delete/sloganbanner/<?=$row['id_sloganbanner']?>?part=home" class="text-danger"><i class="fa fa-trash-o"></i></a>					
						</td>
					</tr>
					<?php $no++; endforeach; endif; ?>
				</tbody>
			</table>
		</div>
	</div>
</div>
<form action="<?=base_url()?>cms/logic/homeProses?p=home" method="post" data-parsley-validate enctype="multipart/form-data"> 
		<input type="hidden" name="image_1" value="<?=$data['banner_video']?>" />
		<input type="hidden" name="image_2" value="<?=$data['banner_image']?>" />
	<div class="panel panel-default">
		<div class="panel-heading">
			<div class="row">
				<div class='col-sm-6'>Konten</div>
				<div class='col-sm-6' align='right'></div>
			</div>
		</div>
		<div class="panel-body">  
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Header</label>
					</div>
					<div class="col-sm-5">
						<input type='text' class='form-control' name='banner_header' value='<?=(isset($data['banner_header']) ? $data['banner_header'] : '')?>'>
					</div>
				</div>
			</div>  			
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Text</label>
					</div>
					<div class="col-sm-10">
						<textarea class='form-control tinymce-editoradv' rows='2' name='banner_text'  ><?=(isset($data['banner_text']) ? $data['banner_text'] : '')?></textarea>
					</div>
				</div>
			</div>  
			<div class="form-group">
				<div class="row">
					<div class="col-sm-2">
						<label class="control-label">Video</label>
					</div>
					<div class="col-sm-5"> 
						<?php if(isset($data['banner_video']) && $data['banner_video'] != '' && $data['banner_video'] != ''): ?>
						<a href='<?php echo base_url();?>uploads/home/<?php echo $data['banner_video'];?>' target='_blank'><?=$data['banner_video'];?></a>
						<?php endif?>
						<input name="banner_video" type="file" class="form-control" id="banner_video" <?=(isset($data['banner_video']) ? '' : 'required')?> accept="video/mp4">
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="row">
					<div class="col-sm-2">
						<label class="control-label">Image Poster</label>
					</div>
					<div class="col-sm-5"> 
						<?php if(isset($data['banner_image']) && $data['banner_image'] != '' && $data['banner_image'] != ''): ?>
						<img src='<?php echo base_url();?>uploads/home/<?php echo $data['banner_image'];?>' height='150' class='img'>
						<?php endif?>
						<input name="banner_image" type="file" class="form-control" id="banner_image" <?=(isset($data['banner_image']) ? '' : 'required')?> >
					</div>
				</div>
			</div>			
		</div> 	
		<div class="panel-footer">
			<button type="submit" onclick=" " class="btn btn-primary">Proses</button> 
		</div>
	</div>
</form> 

<form action="<?=base_url()?>cms/logic/homeProses?p=home" method="post" data-parsley-validate enctype="multipart/form-data">  
	<div class="panel panel-default">
		<div class="panel-heading">
			<div class="row">
				<div class='col-sm-6'>Contact</div>
				<div class='col-sm-6' align='right'></div>
			</div>
		</div>
		<div class="panel-body">  
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Telp.</label>
					</div>
					<div class="col-sm-5">
						<input type='text' class='form-control' name='tlp' value='<?=(isset($data['tlp']) ? $data['tlp'] : '')?>'>
					</div>
				</div>
			</div>  			
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Email</label>
					</div>
					<div class="col-sm-5">
						<input type='text' class='form-control' name='tlp' value='<?=(isset($data['tlp']) ? $data['tlp'] : '')?>'>
					</div>
				</div>
			</div>  			
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Alamat</label>
					</div>
					<div class="col-sm-10">
						<textarea class='form-control tinymce-editoradv' rows='2' name='alamat'  ><?=(isset($data['alamat']) ? $data['alamat'] : '')?></textarea>
					</div>
				</div>
			</div>  		
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Facebook</label>
					</div>
					<div class="col-sm-5">
						<input type='text' class='form-control' name='facebook' value='<?=(isset($data['facebook']) ? $data['facebook'] : '')?>'>
					</div>
				</div>
			</div>  			
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Twitter</label>
					</div>
					<div class="col-sm-5">
						<input type='text' class='form-control' name='twitter' value='<?=(isset($data['twitter']) ? $data['twitter'] : '')?>'>
					</div>
				</div>
			</div>  			
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Youtube</label>
					</div>
					<div class="col-sm-5">
						<input type='text' class='form-control' name='youtube' value='<?=(isset($data['youtube']) ? $data['youtube'] : '')?>'>
					</div>
				</div>
			</div>  			
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Instagram</label>
					</div>
					<div class="col-sm-5">
						<input type='text' class='form-control' name='instagram' value='<?=(isset($data['instagram']) ? $data['instagram'] : '')?>'>
					</div>
				</div>
			</div>  			
		</div> 	
		<div class="panel-footer">
			<button type="submit" onclick=" " class="btn btn-primary">Proses</button> 
		</div>
	</div>
</form> 
