download.php 3.09 KB
<div class="row">
	<div class="col-xs-12">
		<!-- PAGE CONTENT BEGINS -->
		<div class="row">
			<div class="col-xs-12">
					<div class="widget-box">
						<div class="widget-header">
							<h4 class="widget-title">Download Template</h4>
							<div class="widget-toolbar">
								<a href="#" data-action="collapse">
									<i class="ace-icon fa fa-chevron-up"></i>
								</a>
								<a href="#" data-action="close">
									<i class="ace-icon fa fa-times"></i>
								</a>
							</div>
						</div>
					</div>
					<div class="space-4"></div>
					<div class="widget-box"><?php
					$getData = $this->model->selectprepare("download_template", $field=null, $params=null, $where=null, "order by id DESC");
					if($getData->rowCount() >= 1){
						while($data_Show = $getData->fetch(PDO::FETCH_OBJ)){
							$dump_Data[]=$data_Show;
						}?>
						<div class="widget-body">
							<div class="widget-main">
								<table class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
									<thead>
										<tr>
											<th width="50">No</th>
											<th width="150">Keterangan</th>
											<th width="100">Berkas</th>
										</tr>
									</thead>
									<tbody><?php
										$no=1;
										foreach($dump_Data as $key => $object){?>
											<tr>
												<td><?php echo $no;?></td>
												<td><?php echo $object->ket;?></td>
												<td>
													<span class="label label-xs label-primary label-white middle">
														<a href="./berkas/template/<?=$object->file?>" target="_blank"><b>Lihat</b></a>
													</span>
												</td>
											</tr><?php
										$no++;
										}?>
									</tbody>
								</table>
							</div>
						</div><?php
					}?>
					</div>
			</div><!-- /.span -->
		</div><!-- /.row -->
		<!-- PAGE CONTENT ENDS -->
	</div><!-- /.col -->
</div><!-- /.row -->
		
<script src="assets/js/jquery-2.1.4.min.js"></script>

<!-- page specific plugin scripts -->
<script src="assets/js/jquery.dataTables.min.js"></script>
<script src="assets/js/jquery.dataTables.bootstrap.min.js"></script>
<script src="assets/js/dataTables.buttons.min.js"></script>
<script src="assets/js/buttons.flash.min.js"></script>
<script src="assets/js/buttons.html5.min.js"></script>
<script src="assets/js/buttons.print.min.js"></script>
<script src="assets/js/buttons.colVis.min.js"></script>
<script src="assets/js/dataTables.select.min.js"></script>

<!-- inline scripts related to this page -->
<script type="text/javascript">
	jQuery(function($) {				
		//select/deselect a row when the checkbox is checked/unchecked
		$('#simple-table').on('click', 'td input[type=checkbox]' , function(){
			var $row = $(this).closest('tr');
			if($row.is('.detail-row ')) return;
			if(this.checked) $row.addClass(active_class);
			else $row.removeClass(active_class);
		});	
		
		/***************/
		$('.show-details-btn').on('click', function(e) {
			e.preventDefault();
			$(this).closest('tr').next().toggleClass('open');
			$(this).find(ace.vars['.icon']).toggleClass('fa-angle-double-down').toggleClass('fa-angle-double-up');
		});
		/***************/			
	})
</script>