Flyhi Satellite fixes : ps
This commit is contained in:
parent
737e5a13e1
commit
3297edbc52
@ -760,7 +760,16 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
$view_data['section9'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
$view_data['section9'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||||
$view_data['product_id'] = $flyhipd_data[0]['product_id'];
|
$view_data['product_id'] = $flyhipd_data[0]['product_id'];
|
||||||
$view_data['geo_location'] = $flyhipd_data[0]['geo_location'];
|
$view_data['geo_location'] = $flyhipd_data[0]['geo_location'];
|
||||||
$view_data['satellite_image'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
|
||||||
|
$satellite_image = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||||
|
if(!empty($satellite_image)){ // checking Entity Available or not
|
||||||
|
$bucket_name = LENDER_BUCKET_NAME_PREFIX.$flyhipd_data[0]['lender_id'];
|
||||||
|
$bucket_key = "sales_pd/".$flyhipd_data[0]['sales_pd_id']."/images/satellite.png";
|
||||||
|
$singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name, $bucket_key,'30 minutes');
|
||||||
|
$img_url = 'data:image/gif;base64,'.$singed_uri;
|
||||||
|
$view_data['satellite_image'] = $img_url;
|
||||||
|
}else{ $view_data['satellite_image'] = ""; }
|
||||||
|
// $view_data['satellite_image'] = $this->Flyhi_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
|
||||||
// die();
|
// die();
|
||||||
//$view_name = $flyhipd_data[0]['short_name'].'_'.$flyhipd_data[0]['abbr'];
|
//$view_name = $flyhipd_data[0]['short_name'].'_'.$flyhipd_data[0]['abbr'];
|
||||||
$view_name = $flyhipd_data[0]['short_name'];
|
$view_name = $flyhipd_data[0]['short_name'];
|
||||||
@ -1814,7 +1823,9 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
if(!empty($_FILES['video_file']))
|
if(!empty($_FILES['video_file']))
|
||||||
{
|
{
|
||||||
$pd_master_details = $this->Flyhi_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $records['pd_id']),SALES_PD_DATA);
|
$pd_master_details = $this->Flyhi_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $records['pd_id']),SALES_PD_DATA);
|
||||||
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['lender_id'];
|
// $bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['lender_id'];
|
||||||
|
$old_bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
|
||||||
|
$new_bucket_name = TWILIO_CONTENT_BUCKET_NAME;
|
||||||
$key = 'pd'.$records['pd_id'].'/video/'.$records['filename'];
|
$key = 'pd'.$records['pd_id'].'/video/'.$records['filename'];
|
||||||
$file_name_wo_extension = explode('.', ($records['filename']))[0];
|
$file_name_wo_extension = explode('.', ($records['filename']))[0];
|
||||||
$file_type = explode('/', ($_FILES['video_file']['type']))[1];
|
$file_type = explode('/', ($_FILES['video_file']['type']))[1];
|
||||||
@ -2623,4 +2634,14 @@ $this->load->view("digital_locker",$view_data);
|
|||||||
// header('Content-Type: application/pdf');
|
// header('Content-Type: application/pdf');
|
||||||
// readfile($tofile);
|
// readfile($tofile);
|
||||||
}
|
}
|
||||||
|
// function dummy_get(){
|
||||||
|
// echo getenv('TEST.S3_RESOURCE_KEY');
|
||||||
|
// echo "\n";
|
||||||
|
// echo getenv('TEST.S3_RESOURCE_SECRET');
|
||||||
|
// echo "\n";
|
||||||
|
// echo($this->config->item('s3_resource_key'));
|
||||||
|
// echo "\n";
|
||||||
|
// echo($this->config->item('s3_resource_secret'));
|
||||||
|
|
||||||
|
// }
|
||||||
}// Class Ends
|
}// Class Ends
|
||||||
|
|||||||
@ -390,7 +390,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
<br><table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Satellite Image of PD Location</th></tr></table><br>
|
<br><table class="scorecard_table"><tr><th class="thlargefont" colspan="10">Satellite Image of PD Location</th></tr></table><br>
|
||||||
<p><b>GPS Coordinates of location where PD Visit was done : <?php echo $geo_location ? $geo_location : '-'; ?></b></p>
|
<p><b>GPS Coordinates of location where PD Visit was done : <?php echo $geo_location ? $geo_location : '-'; ?></b></p>
|
||||||
<?php if($geo_location) { ?>
|
<?php if($geo_location) { ?>
|
||||||
<img style="border:3px solid #0d93a9;" src = "<?php echo 'data:image/gif;base64,'.$satellite_image[0]['img']; ?>" alt = "PD Visted Location Satellite Image " height="300px" width="630px">
|
<img style="border:3px solid #0191ed;" src = "<?php echo $satellite_image; ?>" alt = "PD Visted Location Satellite Image " height="300px" width="630px">
|
||||||
<?php
|
<?php
|
||||||
}else{ echo '<p>Due to location access not provided by loan applicant Geo coordinates on photographs and Satellite image of PD location is not shown</p>';}
|
}else{ echo '<p>Due to location access not provided by loan applicant Geo coordinates on photographs and Satellite image of PD location is not shown</p>';}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user