siddharth_application/application/views/configlisting.php
2018-06-23 14:35:34 +05:30

89 lines
2.9 KiB
PHP
Executable File

<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center>Siddharth Industries - Configuration Details</center>
</h1>
</section>
<section class="content">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-primary" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table id="configtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
<thead>
<tr>
<th>Configuration ID</th>
<th>Configuration Name</th>
<th>Description</th>
<th>Create Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<td><?php echo $record->Config_ID?></td>
<td><?php echo $record->ConfigName ?></td>
<td><?php echo $record->Comments ?> </td>
<!-- <td><?php echo $record->CreatedDate?></td> -->
<!-- <td align="right"><?php $dt = new DateTime($record->CreatedDate);
$CreatedDate = $dt->format('d-m-Y'); echo $CreatedDate ?> </td> -->
<?php if(date('d-m-Y',strtotime($record->CreatedDate))=="30-11--0001"){
$cdate = '00-00-0000';
}else{
$cdate = date('d-m-Y',strtotime($record->CreatedDate));
} ?>
<td align="right"><?php echo $cdate;?> </td>
<td><a href="<?php echo base_url().'configurationctrl/editOldconfig?ConfigID='.$record->Config_ID; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>
<a><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script type="text/javascript">
$(function () {
$.fn.dataTable.moment( 'DD-MM-YYYY' );
$('#configtable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"aaSorting": [[ 3, "desc" ]],
"info": true,
"autoWidth": true
});
});
</script>