Merge branch 'master' of bitbucket.org:venbaittech/ams
This commit is contained in:
commit
e49dbb3f99
@ -338,6 +338,7 @@ public function add_or_edit_asset_amc()
|
||||
$data['valid_from'] = $this->input->post('valid_from');
|
||||
$data['valid_to'] = $this->input->post('valid_to');
|
||||
$data['created_by'] = user()->id;
|
||||
$data['type'] = 3; //(amc service provider type = 3 * in third_parties table)
|
||||
$createAMCData = $this->MY_Model->insert($data, 'amc');
|
||||
//$this->view_asset_details(md5($this->input->post('asset_id_for_add')));
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id_for_add')));
|
||||
@ -371,16 +372,19 @@ public function add_or_edit_asset_insurance()
|
||||
{
|
||||
$value = $this->input->post();
|
||||
unset($value['asset_id_for_add']);
|
||||
$editInsuranceData = $this->MY_Model->edit_option($value, $this->input->post('id'), 'asset_insurance');
|
||||
$editInsuranceData = $this->MY_Model->edit_option($value, $this->input->post('id'), 'amc');
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id')));
|
||||
}else{
|
||||
$data['asset_id'] = $this->input->post('asset_id_for_add');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$data['insurance_company'] = $this->input->post('insurance_company');
|
||||
$data['cost'] = $this->input->post('cost');
|
||||
$data['description'] = $this->input->post('description');
|
||||
$data['valid_from'] = $this->input->post('valid_from');
|
||||
$data['valid_to'] = $this->input->post('valid_to');
|
||||
$data['created_by'] = user()->id;
|
||||
$createInsuranceData = $this->MY_Model->insert($data, 'asset_insurance');
|
||||
$data['type'] = 4; //(insurance company type = 4 * in third_parties table)
|
||||
$createInsuranceData = $this->MY_Model->insert($data, 'amc');
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id_for_add')));
|
||||
}
|
||||
}
|
||||
@ -463,7 +467,7 @@ public function deleteAssetInsurance($id)
|
||||
$split = preg_split('/_/', $id);
|
||||
$key = $split[0];
|
||||
$asset_id = $split[1];
|
||||
$Data = $this->Asset_model->delete_by_md5_id($key,user()->business_id,'asset_insurance');
|
||||
$Data = $this->Asset_model->delete_by_md5_id($key,user()->business_id,'amc');
|
||||
redirect('asset/view_asset_details/'.md5($asset_id));
|
||||
}
|
||||
|
||||
|
||||
@ -56,6 +56,7 @@ public function get_amc_with_join($id,$business_id)
|
||||
$this->db->where('A.business_id', $business_id);
|
||||
$this->db->where('md5(A.asset_id)', $id);
|
||||
$this->db->where('is_active', 1);
|
||||
$this->db->where('A.type', 3);
|
||||
$query = $this->db->get();
|
||||
$query = $query->result();
|
||||
return $query;
|
||||
@ -67,6 +68,7 @@ public function get_amc_by_id_with_join($id)
|
||||
$this->db->join('third_parties', 'third_parties.id = A.service_provider', 'left');
|
||||
$this->db->where('md5(A.id)', $id);
|
||||
$this->db->where('is_active', 1);
|
||||
$this->db->where('A.type', 3);
|
||||
$query = $this->db->get();
|
||||
$query = $query->row();
|
||||
return $query;
|
||||
@ -75,11 +77,12 @@ public function get_amc_by_id_with_join($id)
|
||||
public function get_insurance_with_join($id,$business_id)
|
||||
{
|
||||
$this->db->select('A.* , third_parties.name as insurance_company_name ');
|
||||
$this->db->from('asset_insurance A');
|
||||
$this->db->from('amc A');
|
||||
$this->db->join('third_parties', 'third_parties.id = A.insurance_company', 'left');
|
||||
$this->db->where('A.business_id', $business_id);
|
||||
$this->db->where('md5(A.asset_id)', $id);
|
||||
$this->db->where('is_active', 1);
|
||||
$this->db->where('A.type', 4);
|
||||
$query = $this->db->get();
|
||||
$query = $query->result();
|
||||
return $query;
|
||||
@ -87,10 +90,11 @@ public function get_insurance_with_join($id,$business_id)
|
||||
public function get_insurance_by_id_with_join($id)
|
||||
{
|
||||
$this->db->select('A.* , third_parties.name as insurance_company_name ');
|
||||
$this->db->from('asset_insurance A');
|
||||
$this->db->from('amc A');
|
||||
$this->db->join('third_parties', 'third_parties.id = A.insurance_company', 'left');
|
||||
$this->db->where('md5(A.id)', $id);
|
||||
$this->db->where('is_active', 1);
|
||||
$this->db->where('A.type', 4);
|
||||
$query = $this->db->get();
|
||||
$query = $query->row();
|
||||
return $query;
|
||||
|
||||
@ -39,13 +39,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 ">Description</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input type="text" class="form-control" name="description" value="<?php if(isset($assetAMCData)) { echo $assetAMCData->description; } ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 ">Valid From</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
@ -70,6 +63,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 ">Description</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input type="text" class="form-control" name="description" value="<?php if(isset($assetAMCData)) { echo $assetAMCData->description; } ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@ -35,6 +35,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 ">Cost</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input type="text" class="form-control" name="cost" value="<?php if(isset($assetInsuranceData)) { echo $assetInsuranceData->cost; } ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
@ -61,6 +67,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-form-label col-md-3 col-sm-3 ">Description</label>
|
||||
<div class="col-md-9 col-sm-9 ">
|
||||
<input type="text" class="form-control" name="description" value="<?php if(isset($assetInsuranceData)) { echo $assetInsuranceData->description; } ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@ -130,12 +130,12 @@
|
||||
<table class="table table-bordered table-striped" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
<th class="column-title" width="13.5%">Service Provider </th>
|
||||
<th class="column-title" width="13.5%">Cost </th>
|
||||
<th class="column-title" width="13.5%">Description </th>
|
||||
<th class="column-title" width="15%">Service Provider </th>
|
||||
<th class="column-title" width="13%">Cost </th>
|
||||
<th class="column-title" width="13.5%">Valid From </th>
|
||||
<th class="column-title" width="13.5%">Valid To </th>
|
||||
<th class="column-title" width="13.5%">Expire on </th>
|
||||
<th class="column-title" width="15%">Description </th>
|
||||
<th class="column-title" width="10%">Action </th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -143,13 +143,12 @@
|
||||
<tbody>
|
||||
<?php foreach ($asset_amc as $key => $value) { ?>
|
||||
<tr class="even pointer">
|
||||
|
||||
<td class=" "><?php echo $value->service_provider_name; ?></td>
|
||||
<td class=" "><?php echo $value->cost; ?></td>
|
||||
<td class=" "><?php echo $value->description; ?></td>
|
||||
<td class=" "><?php echo my_date_show($value->valid_from); ?></td>
|
||||
<td class=" "><?php echo my_date_show($value->valid_to); ?></td>
|
||||
<td class=" "><?php echo day_different($value->valid_to)." days left"; ?></td>
|
||||
<td class=" "><?php echo $value->description; ?></td>
|
||||
<td>
|
||||
|
||||
<a class="asset_amc" id="<?php echo md5($value->id); ?>" data-toggle="modal" data-target=".bs-example-modal-sm" style="font-size: 16px;">
|
||||
@ -176,10 +175,13 @@
|
||||
<table class="table table-bordered table-striped" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr class="headings">
|
||||
<th class="column-title" width="25%">Insurance Company </th>
|
||||
<th class="column-title" width="25%">Valid From </th>
|
||||
<th class="column-title" width="25%">Valid To </th>
|
||||
<th class="column-title" width="20%">Action </th>
|
||||
<th class="column-title" width="15%">Insurance Company </th>
|
||||
<th class="column-title" width="13%">Cost </th>
|
||||
<th class="column-title" width="13.5%">Valid From </th>
|
||||
<th class="column-title" width="13.5%">Valid To </th>
|
||||
<th class="column-title" width="13.5%">Expire on </th>
|
||||
<th class="column-title" width="15%">Description </th>
|
||||
<th class="column-title" width="10%">Action </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@ -187,8 +189,11 @@
|
||||
<?php foreach ($asset_insurance as $key => $value) { ?>
|
||||
<tr class="even pointer">
|
||||
<td class=" "><?php echo $value->insurance_company_name; ?></td>
|
||||
<td class=" "><?php echo $value->cost; ?></td>
|
||||
<td class=" "><?php echo my_date_show($value->valid_from); ?></td>
|
||||
<td class=" "><?php echo my_date_show($value->valid_to); ?></td>
|
||||
<td class=" "><?php echo day_different($value->valid_to)." days left"; ?></td>
|
||||
<td class=" "><?php echo $value->description; ?></td>
|
||||
<td>
|
||||
|
||||
<a class="asset_insurance" id="<?php echo md5($value->id); ?>" data-toggle="modal" data-target=".bs-example-modal-sm" style="font-size: 16px;">
|
||||
|
||||
0
application/modules/Business/.gitkeep
Normal file
0
application/modules/Business/.gitkeep
Normal file
458
application/modules/Business/controllers/Business.php
Normal file
458
application/modules/Business/controllers/Business.php
Normal file
@ -0,0 +1,458 @@
|
||||
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* AMS
|
||||
*
|
||||
* @package HMVC
|
||||
* @author Venba
|
||||
* @copyright 2022 Venba
|
||||
* @license https://venbainfotech.com/licenses/MIT MIT License
|
||||
* @link <URI> (description)
|
||||
* @version GIT: $Id$
|
||||
* @since Version 0.0.1
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
class Business extends Admin_Controller
|
||||
{
|
||||
/**
|
||||
* [__construct description]
|
||||
*
|
||||
* @method __construct
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// To inherit directly the attributes of the parent class.
|
||||
parent::__construct();
|
||||
$this->load->model('MY_Model');
|
||||
$this->load->model('Business_model');
|
||||
$this->load->helper(array('form', 'url'));
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function business_list()
|
||||
{
|
||||
|
||||
$business_list = $this->Business_model->get_business_details();
|
||||
$this->layout->set('tableData', $business_list);
|
||||
$this->layout->buffer('main_content', 'Business/business_list');
|
||||
$this->layout->render('default_layout');
|
||||
|
||||
}
|
||||
|
||||
public function add_business()
|
||||
{
|
||||
|
||||
$this->layout->set('stateData', $this->MY_Model->select('state'));
|
||||
|
||||
|
||||
$this->layout->buffer('main_content', 'Business/add_business');
|
||||
$this->layout->render('default_layout');
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function create_business()
|
||||
{
|
||||
$data = $this->input->post();
|
||||
|
||||
$data['created_by'] = user()->id;
|
||||
//file upload confic
|
||||
$logo_file['upload_path'] = APPPATH. '../assets/uploads/logo';
|
||||
$logo_file['allowed_types'] = 'gif|jpg|png';
|
||||
$logo_file['max_size'] = 80000;
|
||||
//upload
|
||||
$this->load->library('upload', $logo_file);
|
||||
$this->upload->initialize($logo_file);
|
||||
if ( ! $this->upload->do_upload('logo'))
|
||||
{
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
} else{
|
||||
$upload_logo = $this->upload->data();
|
||||
$data['logo'] = $upload_logo['file_name'];
|
||||
}
|
||||
//print_r($data); die();
|
||||
$table="business";
|
||||
$add_admin = 0;
|
||||
if($this->input->post('add_admin'))
|
||||
{
|
||||
$add_admin = $this->input->post('add_admin');
|
||||
unset($data['add_admin']);
|
||||
}
|
||||
|
||||
//$create_assets = $this->MY_Model->insert($data,$table);
|
||||
if($add_admin == 1)
|
||||
{
|
||||
redirect('user/addUser');
|
||||
}else{
|
||||
redirect('business/business_list');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function get_business($id)
|
||||
{
|
||||
//select dropdown values
|
||||
$this->layout->set('stateData', $this->MY_Model->select('state'));
|
||||
// select business value by id
|
||||
$table="business";
|
||||
$businessData = $this->Business_model->get_business_by_md5_id($id);
|
||||
|
||||
$this->layout->set('businessData', $businessData);
|
||||
$this->layout->buffer('main_content', 'Business/edit_business');
|
||||
$this->layout->render('default_layout');
|
||||
|
||||
}
|
||||
|
||||
public function edit_business()
|
||||
{
|
||||
$action = $this->input->post();
|
||||
$id = $this->input->post('id');
|
||||
|
||||
//file upload confic
|
||||
$logo_file['upload_path'] = APPPATH. '../assets/uploads/logo';
|
||||
$logo_file['allowed_types'] = 'gif|jpg|png';
|
||||
$logo_file['max_size'] = 80000;
|
||||
//upload
|
||||
$this->load->library('upload', $logo_file);
|
||||
$this->upload->initialize($logo_file);
|
||||
if ( ! $this->upload->do_upload('logo'))
|
||||
{
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
unset($action['logo']);
|
||||
} else{
|
||||
$upload_logo = $this->upload->data();
|
||||
$action['logo'] = $upload_logo['file_name'];
|
||||
}
|
||||
|
||||
$table="business";
|
||||
$assetData = $this->MY_Model->edit_option($action, $id, $table);
|
||||
redirect('business/business_list');
|
||||
|
||||
}
|
||||
|
||||
public function deleteAsset($id)
|
||||
{
|
||||
$Data = $this->Asset_model->delete_by_md5_id($id,user()->business_id,'asset');
|
||||
redirect('asset/assetList');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function view_asset_details($id)
|
||||
{
|
||||
$tab = $this->session->flashdata();
|
||||
// $tab = 1;
|
||||
//print_r($tab);die();
|
||||
// select asset value by id
|
||||
$table="asset";
|
||||
$assetData = $this->Asset_model->get_asset_by_md5_id($id,user()->business_id);
|
||||
// select asset sub values by id
|
||||
$asset_value = $this->Asset_model->get_by_asset_id($id,'asset_value',user()->business_id);
|
||||
$asset_usage = $this->Asset_model->get_by_asset_id($id,'asset_usage',user()->business_id);
|
||||
$asset_amc = $this->Asset_model->get_amc_with_join($id,user()->business_id);
|
||||
$asset_insurance = $this->Asset_model->get_insurance_with_join($id,user()->business_id);
|
||||
$asset_images = $this->Asset_model->get_by_asset_id($id,'asset_images',user()->business_id);
|
||||
$data = array('asset_id'=>$assetData->id,'asset_value' => $asset_value ,'asset_usage' => $asset_usage , 'asset_amc' =>$asset_amc ,'asset_insurance'=>$asset_insurance, 'asset_images'=>$asset_images,'tab'=>$tab);
|
||||
$sub_asset_value_htmlPage = $this->load->view('asset_sub_value_list.php',$data,true);
|
||||
$this->layout->set('sub_asset_value_htmlPage', $sub_asset_value_htmlPage);
|
||||
$this->layout->set('editData', $assetData);
|
||||
$this->layout->set('viewData', 1);
|
||||
$this->layout->buffer('main_content', 'Asset/edit_asset');
|
||||
$this->layout->render('default_layout');
|
||||
|
||||
}
|
||||
|
||||
// public function getAssetDetails($id)
|
||||
// {
|
||||
// $asset_value = $this->Asset_model->get_by_asset_id($id,'asset_value',user()->business_id);
|
||||
// $asset_usage = $this->Asset_model->get_by_asset_id($id,'asset_usage',user()->business_id);
|
||||
// $asset_amc = $this->Asset_model->get_by_asset_id($id,'amc',user()->business_id);
|
||||
// $data = array('asset_value' => $asset_value ,'asset_usage' => $asset_usage , 'asset_amc' =>$asset_amc);
|
||||
|
||||
// $htmlPage = $this->load->view('asset_sub_value_list.php',$data,true);
|
||||
// echo json_encode($htmlPage);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
public function getAssetValueForm($id)
|
||||
{
|
||||
|
||||
$split = preg_split('/_/', $id);
|
||||
if(count($split) > 1)
|
||||
{
|
||||
$data = array('asset_id'=> $split[0], 'heading'=>'Add Asset Values' , 'submit_button_title'=>'Submit');
|
||||
}else{
|
||||
$asset_value_data = $this->MY_Model->get_by_md5_id($id,'asset_value');
|
||||
$data = array('assetValueData'=>$asset_value_data ,'heading'=>'Edit Asset Values' , 'submit_button_title'=>'Update');
|
||||
}
|
||||
|
||||
$htmlPage = $this->load->view('asset_value_form.php',$data,true);
|
||||
echo json_encode($htmlPage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function add_or_edit_asset_value()
|
||||
{
|
||||
if($this->input->post('id'))
|
||||
{
|
||||
$value = $this->input->post();
|
||||
unset($value['asset_id_for_add']);
|
||||
$editAssetValueData = $this->MY_Model->edit_option($value, $this->input->post('id'), 'asset_value');
|
||||
//$this->view_asset_details(md5($this->input->post('asset_id')));
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id')));
|
||||
}else{
|
||||
$data['asset_id'] = $this->input->post('asset_id_for_add');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$data['type'] = $this->input->post('type');
|
||||
$data['name'] = $this->input->post('name');
|
||||
$data['value'] = $this->input->post('value');
|
||||
$data['percentage'] = $this->input->post('percentage');
|
||||
$data['description'] = $this->input->post('description');
|
||||
$data['created_by'] = user()->id;
|
||||
$createAssetValueData = $this->MY_Model->insert($data, 'asset_value');
|
||||
//$this->view_asset_details(md5($this->input->post('asset_id_for_add')));
|
||||
$this->session->set_flashdata(1);
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id_for_add')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getAssetUsageForm($id)
|
||||
{
|
||||
$split = preg_split('/_/', $id);
|
||||
|
||||
if(count($split) > 1)
|
||||
{
|
||||
$data = array('asset_id'=> $split[0], 'heading'=>'Add Asset Usage' , 'submit_button_title'=>'Submit');
|
||||
}else{
|
||||
$asset_usage_data = $this->MY_Model->get_by_md5_id($id,'asset_usage');
|
||||
$data = array('assetUsageData'=>$asset_usage_data ,'heading'=>'Edit Asset Usage' , 'submit_button_title'=>'Update');
|
||||
}
|
||||
|
||||
$htmlPage = $this->load->view('asset_usage_form.php',$data,true);
|
||||
echo json_encode($htmlPage);
|
||||
}
|
||||
|
||||
public function add_or_edit_asset_usage()
|
||||
{
|
||||
if($this->input->post('id'))
|
||||
{
|
||||
$value = $this->input->post();
|
||||
unset($value['asset_id_for_add']);
|
||||
$editAssetUsageData = $this->MY_Model->edit_option($value, $this->input->post('id'), 'asset_usage');
|
||||
// $this->view_asset_details(md5($this->input->post('asset_id')));
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id')));
|
||||
}else{
|
||||
$data['asset_id'] = $this->input->post('asset_id_for_add');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$data['date_from'] = $this->input->post('date_from');
|
||||
$data['date_to'] = $this->input->post('date_to');
|
||||
$data['quater'] = $this->input->post('quater');
|
||||
$data['shift'] = $this->input->post('shift');
|
||||
$data['created_by'] = user()->id;
|
||||
$createAssetUsageData = $this->MY_Model->insert($data, 'asset_usage');
|
||||
//$this->view_asset_details(md5($this->input->post('asset_id_for_add')));
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id_for_add')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function getAssetAMCForm($id)
|
||||
{
|
||||
$split = preg_split('/_/', $id);
|
||||
$serviceProviderData = $this->MY_Model->select_by_business_id_and_type('third_parties',user()->business_id,3);
|
||||
if(count($split) > 1)
|
||||
{
|
||||
$data = array('asset_id'=> $split[0], 'serviceProviderData'=>$serviceProviderData, 'heading'=>'Add AMC' , 'submit_button_title'=>'Submit');
|
||||
}else{
|
||||
$asset_amc_data = $this->Asset_model->get_amc_by_id_with_join($id);
|
||||
$data = array('serviceProviderData'=>$serviceProviderData,'assetAMCData'=>$asset_amc_data ,'heading'=>'Edit AMC' , 'submit_button_title'=>'Update');
|
||||
}
|
||||
|
||||
$htmlPage = $this->load->view('asset_amc_form.php',$data,true);
|
||||
echo json_encode($htmlPage);
|
||||
}
|
||||
|
||||
public function add_or_edit_asset_amc()
|
||||
{
|
||||
if($this->input->post('id'))
|
||||
{
|
||||
$value = $this->input->post();
|
||||
unset($value['asset_id_for_add']);
|
||||
$editAMCData = $this->MY_Model->edit_option($value, $this->input->post('id'), 'amc');
|
||||
//$this->view_asset_details(md5($this->input->post('asset_id')));
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id')));
|
||||
}else{
|
||||
$data['asset_id'] = $this->input->post('asset_id_for_add');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$data['service_provider'] = $this->input->post('service_provider');
|
||||
$data['cost'] = $this->input->post('cost');
|
||||
$data['description'] = $this->input->post('description');
|
||||
$data['valid_from'] = $this->input->post('valid_from');
|
||||
$data['valid_to'] = $this->input->post('valid_to');
|
||||
$data['created_by'] = user()->id;
|
||||
$data['type'] = 3; //(amc service provider type = 3 * in third_parties table)
|
||||
$createAMCData = $this->MY_Model->insert($data, 'amc');
|
||||
//$this->view_asset_details(md5($this->input->post('asset_id_for_add')));
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id_for_add')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getAssetInsuranceForm($id)
|
||||
{
|
||||
$split = preg_split('/_/', $id);
|
||||
$insuranceData = $this->MY_Model->select_by_business_id_and_type('third_parties',user()->business_id,4);
|
||||
if(count($split) > 1)
|
||||
{
|
||||
$data = array('asset_id'=> $split[0], 'insuranceData'=>$insuranceData, 'heading'=>'Add AMC' , 'submit_button_title'=>'Submit');
|
||||
}else{
|
||||
$asset_insurance_data = $this->Asset_model->get_insurance_by_id_with_join($id);
|
||||
$data = array('insuranceData'=>$insuranceData,'assetInsuranceData'=>$asset_insurance_data ,'heading'=>'Edit AMC' , 'submit_button_title'=>'Update');
|
||||
}
|
||||
|
||||
$htmlPage = $this->load->view('asset_insurance_form.php',$data,true);
|
||||
echo json_encode($htmlPage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function add_or_edit_asset_insurance()
|
||||
{
|
||||
if($this->input->post('id'))
|
||||
{
|
||||
$value = $this->input->post();
|
||||
unset($value['asset_id_for_add']);
|
||||
$editInsuranceData = $this->MY_Model->edit_option($value, $this->input->post('id'), 'amc');
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id')));
|
||||
}else{
|
||||
$data['asset_id'] = $this->input->post('asset_id_for_add');
|
||||
$data['business_id'] = user()->business_id;
|
||||
$data['insurance_company'] = $this->input->post('insurance_company');
|
||||
$data['cost'] = $this->input->post('cost');
|
||||
$data['description'] = $this->input->post('description');
|
||||
$data['valid_from'] = $this->input->post('valid_from');
|
||||
$data['valid_to'] = $this->input->post('valid_to');
|
||||
$data['created_by'] = user()->id;
|
||||
$data['type'] = 4; //(insurance company type = 4 * in third_parties table)
|
||||
$createInsuranceData = $this->MY_Model->insert($data, 'amc');
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id_for_add')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function getAssetImageForm($id)
|
||||
{
|
||||
|
||||
$data = array('asset_id'=> $id, 'heading'=>'Add Image' , 'submit_button_title'=>'Submit');
|
||||
$htmlPage = $this->load->view('asset_image_form.php',$data,true);
|
||||
echo json_encode($htmlPage);
|
||||
}
|
||||
|
||||
public function add_asset_image()
|
||||
{
|
||||
|
||||
$data['business_id'] = user()->business_id;
|
||||
$data['created_by'] = user()->id;
|
||||
$data['asset_id'] = $this->input->post('asset_id');
|
||||
|
||||
//file upload confic
|
||||
$asset_image['upload_path'] = APPPATH. '../assets/uploads/';
|
||||
$asset_image['allowed_types'] = 'gif|jpg|png';
|
||||
$asset_image['max_size'] = 80000;
|
||||
//upload
|
||||
$this->load->library('upload', $asset_image);
|
||||
$this->upload->initialize($asset_image);
|
||||
if ( ! $this->upload->do_upload('image'))
|
||||
{
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
} else{
|
||||
$upload_asset_image = $this->upload->data();
|
||||
$data['image'] = $upload_asset_image['file_name'];
|
||||
}
|
||||
//print_r($data);die();
|
||||
$table="asset_images";
|
||||
$create_assets = $this->MY_Model->insert($data,$table);
|
||||
redirect('asset/view_asset_details/'.md5($this->input->post('asset_id')));
|
||||
|
||||
}
|
||||
|
||||
public function deleteAssetValue($id)
|
||||
{
|
||||
$split = preg_split('/_/', $id);
|
||||
$key = $split[0];
|
||||
$asset_id = $split[1];
|
||||
$Data = $this->Asset_model->delete_by_md5_id($key,user()->business_id,'asset_value');
|
||||
redirect('asset/view_asset_details/'.md5($asset_id));
|
||||
}
|
||||
public function deleteAssetUsage($id)
|
||||
{
|
||||
$split = preg_split('/_/', $id);
|
||||
$key = $split[0];
|
||||
$asset_id = $split[1];
|
||||
$Data = $this->Asset_model->delete_by_md5_id($key,user()->business_id,'asset_usage');
|
||||
redirect('asset/view_asset_details/'.md5($asset_id));
|
||||
}
|
||||
public function deleteAssetAMC($id)
|
||||
{
|
||||
$split = preg_split('/_/', $id);
|
||||
$key = $split[0];
|
||||
$asset_id = $split[1];
|
||||
$Data = $this->Asset_model->delete_by_md5_id($key,user()->business_id,'amc');
|
||||
redirect('asset/view_asset_details/'.md5($asset_id));
|
||||
}
|
||||
public function deleteAssetImage($id)
|
||||
{
|
||||
$split = preg_split('/_/', $id);
|
||||
$key = $split[0];
|
||||
$asset_id = $split[1];
|
||||
$Data = $this->Asset_model->delete_by_md5_id($key,user()->business_id,'asset_images');
|
||||
redirect('asset/view_asset_details/'.md5($asset_id));
|
||||
}
|
||||
public function deleteAssetInsurance($id)
|
||||
{
|
||||
$split = preg_split('/_/', $id);
|
||||
$key = $split[0];
|
||||
$asset_id = $split[1];
|
||||
$Data = $this->Asset_model->delete_by_md5_id($key,user()->business_id,'amc');
|
||||
redirect('asset/view_asset_details/'.md5($asset_id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
0
application/modules/Business/models/.gitkeep
Normal file
0
application/modules/Business/models/.gitkeep
Normal file
44
application/modules/Business/models/Business_model.php
Normal file
44
application/modules/Business/models/Business_model.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
class Business_model extends MY_Model {
|
||||
|
||||
public function get_business_details()
|
||||
{
|
||||
$this->db->select('B.* , state.name as state_name ');
|
||||
$this->db->from('business B');
|
||||
$this->db->join('state', 'state.id = B.state', 'left');
|
||||
$this->db->order_by('B.id','ASC');
|
||||
$this->db->where('B.is_active', 1);
|
||||
$query = $this->db->get();
|
||||
$query = $query->result();
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function get_business_by_md5_id($id)
|
||||
{
|
||||
$this->db->select('B.* , state.name as state_name ');
|
||||
$this->db->from('business B');
|
||||
$this->db->join('state', 'state.id = B.state', 'left');
|
||||
$this->db->where('B.is_active', 1);
|
||||
$this->db->where('md5(B.id)', $id);
|
||||
$query = $this->db->get();
|
||||
$query = $query->row();
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function delete_by_md5_id($id,$business_id,$table)
|
||||
{
|
||||
$this->db->where('md5(id)', $id);
|
||||
$this->db->where('business_id', $business_id);
|
||||
$this->db->set('is_active',0);
|
||||
$this->db->update($table);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
0
application/modules/Business/views/.gitkeep
Normal file
0
application/modules/Business/views/.gitkeep
Normal file
148
application/modules/Business/views/add_business.php
Normal file
148
application/modules/Business/views/add_business.php
Normal file
@ -0,0 +1,148 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Add Business</h3>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul>
|
||||
<h6>Business Information</h6>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Business/create_business" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="uid" value="<?php echo rand(100000,999999); ?>">
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Business Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="business_name" name="business_name" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Email<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="email" name="email" required="required" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Phone<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="phone" name="phone" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Logo </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="logo" name="logo" class="typeFile" type="file" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="x_title"> </div> <br />
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Address<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="address" name="address" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">City<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">State<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="state" name="state" required="required" class="form-control" >
|
||||
<option value=""> Select state </option>
|
||||
<?php foreach ($stateData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">country<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="country" name="country" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Pin code<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5">
|
||||
<input id="pincode" name="pincode" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="col-md-1 col-sm-1">
|
||||
<input type="checkbox" name="add_admin" class="form-control" value="1" >
|
||||
</div>
|
||||
<label class="control-label col-md-5 col-sm-5" for="first-name">do you want to add admin</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<button class="btn btn-secondary" onclick="history.back()">Cancel</button>
|
||||
<button class="btn btn-primary" type="reset">Reset</button>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
82
application/modules/Business/views/business_list.php
Normal file
82
application/modules/Business/views/business_list.php
Normal file
@ -0,0 +1,82 @@
|
||||
|
||||
<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 echo $value->status; ?></td>
|
||||
|
||||
<td style=" text-align: center; font-size: 16px;">
|
||||
<a href="<?php echo base_url()?>business/get_business/<?php echo md5($value->id);?>" ><i class="fa fa-pencil"></i></a>
|
||||
|
||||
|
||||
<a href="<?php echo base_url()?>business/delete_business/<?php echo md5($value->id);?>" ><i class="fa fa-trash"></i></a>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div style="display:none" id="sub-value">
|
||||
|
||||
</div>
|
||||
|
||||
156
application/modules/Business/views/edit_business.php
Normal file
156
application/modules/Business/views/edit_business.php
Normal file
@ -0,0 +1,156 @@
|
||||
|
||||
<!-- Body page content -->
|
||||
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="page-title">
|
||||
|
||||
<div class="title_left">
|
||||
<h3>Edit Business</h3>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-sm btn-primary" style="float: right;" href="<?php echo base_url();?>business/business_list">Business List</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 ">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
|
||||
</li>
|
||||
</ul>
|
||||
<h6>Business Information</h6>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<br />
|
||||
<form id="" data-parsley-validate class="form-horizontal form-label-left" method="post" action="<?php echo base_url();?>Business/edit_business" enctype="multipart/form-data">
|
||||
|
||||
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
||||
<input type="hidden" name="id" value="<?php echo $businessData->id; ?>">
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Business Name<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="business_name" name="business_name" value="<?php echo $businessData->business_name; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Email<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input type="text" id="email" name="email" value="<?php echo $businessData->email; ?>" required="required" class="form-control ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name"> Phone<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="phone" name="phone" value="<?php echo $businessData->phone; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Select Logo<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="logo" name="logo" class="typeFile" type="file" value="<?php echo $businessData->logo; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">Status <a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="status" name="status" value="<?php echo $businessData->status; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br /> <div class="x_title"> </div> <br />
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Address<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="address" name="address" value="<?php echo $businessData->address; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">City<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="city" name="city" value="<?php echo $businessData->city; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="last-name">State<a style="color:red;">*</a></label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<select id="state" name="state" required="required" class="form-control" >
|
||||
<option value="<?php echo $businessData->state; ?>"> <?php echo $businessData->state_name; ?> </option>
|
||||
<?php foreach ($stateData as $key => $value) { ?>
|
||||
<option value="<?php echo $value->id; ?>"><?php echo $value->name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">country<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5 ">
|
||||
<input id="country" name="country" value="<?php echo $businessData->country; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="item form-group">
|
||||
<label class="control-label col-md-1 col-sm-1 " for="first-name">Pin code<a style="color:red;">*</a> </label>
|
||||
<div class="col-md-5 col-sm-5">
|
||||
<input id="pincode" name="pincode" value="<?php echo $businessData->pincode; ?>" required="required" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="item form-group">
|
||||
<div class="col-md-6 col-sm-6 offset-md-7">
|
||||
<button class="btn btn-primary" onclick="history.back()">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Body page content -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -56,6 +56,11 @@
|
||||
cursor: pointer;
|
||||
width:100%;
|
||||
}
|
||||
.logo
|
||||
{
|
||||
width:30px;
|
||||
height:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
<div class="col-md-3 left_col menu_fixed">
|
||||
<div class="left_col scroll-view">
|
||||
<div class="navbar nav_title" style="border: 0;">
|
||||
<a href="index.html" class="site_title"><i class="fa fa-paw"></i> <span>
|
||||
<a href="index.html" class="site_title">
|
||||
<?php if(check_auth() && is_superadmin()) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/logo/<?php echo $settings->logo;?>" class="img-circle logo">
|
||||
<?php } else if(check_auth() && is_admin() || is_user()) { ?>
|
||||
<img src="<?php echo base_url(); ?>/assets/uploads/logo/<?php echo $business->logo;?>" class="img-circle logo">
|
||||
<?php } ?>
|
||||
<span>
|
||||
<?php if(check_auth() && is_admin() || is_user())
|
||||
{echo $business->business_name;}
|
||||
else if(check_auth() && is_superadmin())
|
||||
@ -14,7 +20,7 @@
|
||||
<!-- menu profile quick info -->
|
||||
<div class="profile clearfix">
|
||||
<div class="profile_pic">
|
||||
<img src="<?php echo base_url(); ?>/assets/default/images/img.jpg" alt="..." class="img-circle profile_img">
|
||||
<img src="<?php echo base_url(); ?>/assets/default/images/img.jpg" alt="..." class="img-circle profile_img">
|
||||
</div>
|
||||
<div class="profile_info">
|
||||
<span>Welcome,</span>
|
||||
@ -47,8 +53,8 @@
|
||||
<?php if(check_auth() && is_superadmin() ) { ?>
|
||||
<li><a><i class="fa fa-archive"></i> Business <span class="fa fa-chevron-down"></span></a>
|
||||
<ul class="nav child_menu">
|
||||
<li><a href="<?php echo base_url();?>#">Business List</a></li>
|
||||
<li><a href="<?php echo base_url();?>#">Add Business</a></li>
|
||||
<li><a href="<?php echo base_url();?>business/business_list">Business List</a></li>
|
||||
<li><a href="<?php echo base_url();?>business/add_business">Add Business</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
BIN
assets/uploads/logo/lion-roar.png
Normal file
BIN
assets/uploads/logo/lion-roar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/uploads/logo/lovepik.png
Normal file
BIN
assets/uploads/logo/lovepik.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
assets/uploads/logo/lovepik1.png
Normal file
BIN
assets/uploads/logo/lovepik1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
assets/uploads/logo/venba-information-technology.png
Normal file
BIN
assets/uploads/logo/venba-information-technology.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
Loading…
Reference in New Issue
Block a user