SMC satellite image added : ps
This commit is contained in:
parent
fad9c90653
commit
da6f0b8be3
@ -615,7 +615,7 @@ class smc_creditpd
|
||||
} else
|
||||
{
|
||||
|
||||
$all_pd_images = $CI->PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1 , 'img_name !=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
$all_pd_images = $CI->PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1 ),SMC_CREDIT_PD_DOCS);
|
||||
|
||||
// $all_form_names = array('pd_form_id'=>19,'pd_form_name'=>"photograph");
|
||||
// $form_name[19] = "photograph";
|
||||
@ -634,7 +634,12 @@ class smc_creditpd
|
||||
$src_local_file = XLPATH.'/tmp/'.$doc_name.'.png';
|
||||
$ifp = fopen( $src_local_file, 'wb' );
|
||||
$img = explode( ',', $image['img'] );
|
||||
fwrite( $ifp, base64_decode( $img[ 1 ] ) );
|
||||
// fwrite( $ifp, base64_decode( $img[ 1 ] ) );
|
||||
if($doc_name == "satellite"){
|
||||
fwrite( $ifp, base64_decode($image['img']) );
|
||||
}else{
|
||||
fwrite( $ifp, base64_decode( $img[ 1 ] ) );
|
||||
}
|
||||
fclose( $ifp );
|
||||
$MyFile = file_get_contents($src_local_file);
|
||||
$CI->zip->add_data('pdimages/'.$doc_name.'.png',$MyFile);
|
||||
@ -687,7 +692,7 @@ class smc_creditpd
|
||||
}
|
||||
else
|
||||
{
|
||||
$all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1,'img_name!=' => 'satellite'),SMC_CREDIT_PD_DOCS);
|
||||
$all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
||||
// $all_pd_images = $CI->SMC_Credit_PD_Model->selectCustomRecords(array('doc_id', 'fk_smc_credit_pd_id','img','img_name','isactive'),array('fk_smc_credit_pd_id' => $pdid,'isactive' => 1),SMC_CREDIT_PD_DOCS);
|
||||
|
||||
$data_to_view['all_pd_images'] = $all_pd_images;
|
||||
|
||||
@ -522,7 +522,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
echo '<td>';
|
||||
echo '<div class="gallery">';
|
||||
echo '<img src="'.$all_pd_images[$photo_iter]['img'].'" alt="" width="200" height="200">';
|
||||
|
||||
if($all_pd_images[$photo_iter]['img_name'] == "satellite"){
|
||||
$satellite = 'data:image/gif;base64,'.$all_pd_images[$photo_iter]['img'];
|
||||
echo '<img src = "'.$satellite.'" alt = "PD Visted Location Satellite Image " width="200" height="200">';
|
||||
}else{
|
||||
echo '<img src="'.$all_pd_images[$photo_iter]['img'].'" alt="" width="200" height="200">';
|
||||
}
|
||||
|
||||
echo '<div class="desc">'.$all_pd_images[$photo_iter]['img_name'] .'</div>';
|
||||
echo '</div>';
|
||||
echo '</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user