122 lines
4.5 KiB
PHP
122 lines
4.5 KiB
PHP
<head>
|
|
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css'>
|
|
<style>
|
|
.status-success {
|
|
background-color: #c1ffc1;
|
|
color: #008000;
|
|
border-radius:1px;
|
|
font-weight: bold;
|
|
width: 300px;
|
|
height: 200px;
|
|
}
|
|
|
|
.status-danger {
|
|
background-color: #ffb6c1;
|
|
color: #ff0000;
|
|
border-radius: 1px;
|
|
font-weight: bold;
|
|
width: 300px;
|
|
height: 200px;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
|
|
<div class="col-md-12 col-sm-12 ">
|
|
<div class="x_panel">
|
|
<div class="x_title">
|
|
<h2>Business Details </h2>
|
|
|
|
<ul class="nav navbar-right panel_toolbox">
|
|
<a href="<?php echo base_url();?>Business/add_business" class="btn btn-sm btn-primary">Add Business</a>
|
|
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
|
</ul>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
<div class="x_content">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="card-box table-responsive">
|
|
|
|
<table id="datatable" class="table table-striped table-bordered dataTable no-footer" width="100%">
|
|
<thead>
|
|
<tr class="headings">
|
|
<th class="column-title">Business Name </th>
|
|
<th class="column-title">Email </th>
|
|
<th class="column-title">Phone </th>
|
|
<th class="column-title">Address </th>
|
|
<th class="column-title">City </th>
|
|
<th class="column-title">State </th>
|
|
<th class="column-title">Pincode </th>
|
|
<th class="column-title">Country </th>
|
|
<th class="column-title">Logo </th>
|
|
<th class="column-title">status </th>
|
|
<th class="column-title" >Action </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php foreach ($tableData as $key => $value) { ?>
|
|
<tr class="even pointer">
|
|
|
|
<td class=" "> <?php echo $value->business_name; ?> </td>
|
|
<td class=" "><?php echo $value->email; ?> </td>
|
|
<td class=" "><?php echo $value->phone; ?></td>
|
|
<td class=" "><?php echo $value->address; ?></td>
|
|
<td class=" "><?php echo $value->city; ?></td>
|
|
<td class=" "><?php echo $value->state_name; ?></td>
|
|
<td class=" "><?php echo $value->pincode; ?></td>
|
|
<td class=" "><?php echo $value->country; ?> </td>
|
|
<td class=" "><?php echo $value->logo; ?> </td>
|
|
<td class=" ">
|
|
<?php if ($value->is_active == 1) { ?>
|
|
<span class="status-success">Active</span>
|
|
<?php } else if ($value->is_active == 0){ ?>
|
|
<span class="status-danger">In-active</span>
|
|
<?php } ?>
|
|
</td>
|
|
<td style=" text-align: center; font-size: 16px;">
|
|
<?php if ($value->is_active == 1) { ?>
|
|
<a href="<?php echo base_url()?>Business/get_business/<?php echo md5($value->uid);?>" ><i class="fa fa-pencil" title="Edit"></i></a>
|
|
<a href="<?php echo base_url()?>Business/delete_business/<?php echo $value->id;?>" ><i class="fa fa-times-circle-o" aria-hidden="true" style="font-size:20px;" title="deactivate"></i></a>
|
|
<?php } ?>
|
|
<?php if ($value->is_active == 0) { ?>
|
|
<a href="<?php echo base_url()?>Business/activate_business/<?php echo $value->id;?>" ><i class="green fa fa-check-circle" style="font-size:20px;" title="activate"></i></a>
|
|
<?php } ?>
|
|
</td>
|
|
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div style="display:none" id="sub-value">
|
|
|
|
</div>
|
|
|
|
<div class="modal fade bs-example-modal-lg" id="ItemModal" tabindex="-1" role="dialog" aria-hidden="true"></div>
|
|
|
|
<script>
|
|
$(document).on('click','.bi-card-list',function(){
|
|
var id = $(this).attr("id")
|
|
$.ajax({
|
|
type: "get",
|
|
url: "<?php echo base_url()?>User/view_business_history/"+id,
|
|
success: function(response) {
|
|
response = JSON.parse(response);
|
|
console.log(response);
|
|
$('.bs-example-modal-lg').html(response);
|
|
$('.bs-example-modal-lg').modal("show");
|
|
},
|
|
error: function(jqXHR, textStatus, err) { alert('text status '+textStatus+', err '+err) }
|
|
});
|
|
});
|
|
</script>
|