Flyhi Satellite fixes : ps
This commit is contained in:
parent
737e5a13e1
commit
3297edbc52
@ -760,12 +760,21 @@ 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['product_id'] = $flyhipd_data[0]['product_id'];
|
||||
$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();
|
||||
//$view_name = $flyhipd_data[0]['short_name'].'_'.$flyhipd_data[0]['abbr'];
|
||||
$view_name = $flyhipd_data[0]['short_name'];
|
||||
$html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true);
|
||||
// echo $html_content;die();
|
||||
//echo $html_content;die();
|
||||
$pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||
//End of PDF Gen using DOM PDF
|
||||
$output_file = $this->external_path ."/sales_pd/" .$pd_id. "/temp.pdf";
|
||||
@ -1814,7 +1823,9 @@ class Flyhi_Controller extends REST_Controller {
|
||||
if(!empty($_FILES['video_file']))
|
||||
{
|
||||
$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'];
|
||||
$file_name_wo_extension = explode('.', ($records['filename']))[0];
|
||||
$file_type = explode('/', ($_FILES['video_file']['type']))[1];
|
||||
@ -2623,4 +2634,14 @@ $this->load->view("digital_locker",$view_data);
|
||||
// header('Content-Type: application/pdf');
|
||||
// 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
|
||||
|
||||
@ -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>
|
||||
<p><b>GPS Coordinates of location where PD Visit was done : <?php echo $geo_location ? $geo_location : '-'; ?></b></p>
|
||||
<?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
|
||||
}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