FaceCrop CSS and PDF link s1 : ps

This commit is contained in:
VE10-Sanjeev 2023-04-25 09:58:21 +05:30
parent dc722781be
commit ff0f79ef71
12 changed files with 739 additions and 734 deletions

View File

@ -4703,13 +4703,16 @@ class PD_Controller extends REST_Controller
if(!empty($applicant_details)){ if(!empty($applicant_details)){
$this->toMakeFaceBoundingBox($pdid,$data['pd_master_details'][0]['fk_lender_id']); $this->toMakeFaceBoundingBox($pdid,$data['pd_master_details'][0]['fk_lender_id']);
} }
$db_result = $this->PD_Model->selectCustomRecords(array('facecrop'), array('fk_pd_id' => $pdid,'isactive'=>1,'facemark_image_generated'=>1), PDAPPLICANTSDETAILS); $db_result = $this->PD_Model->selectCustomRecords(array('facecrop','pd_co_applicant_id'), array('fk_pd_id' => $pdid,'isactive'=>1,'facemark_image_generated'=>1), PDAPPLICANTSDETAILS);
$fc_array = array(); $fc_array = array();
if(!empty($db_result)){ if(!empty($db_result)){
for ($dinx = 0; $dinx < count($db_result); $dinx++) { for ($dinx = 0; $dinx < count($db_result); $dinx++) {
$string = $db_result[$dinx]['facecrop']; $string = $db_result[$dinx]['facecrop'];
// echo gettype($string); // echo gettype($string);
$fc_array[$dinx] = json_decode($string, true); $json_decode = json_decode($string, true);
$fc_array[$dinx]['compare_image'] = !empty($json_decode[0]['compare_image']) ? $json_decode[0]['compare_image'] :array() ;
$fc_array[$dinx]['source_image'] = !empty($json_decode[1]['source_image']) ? $json_decode[1]['source_image'] :array() ;
$fc_array[$dinx]['co_applicant_id'] = $db_result[$dinx]['pd_co_applicant_id'];
} }
} }
$data['facecrop'] = $fc_array; $data['facecrop'] = $fc_array;
@ -5880,13 +5883,16 @@ class PD_Controller extends REST_Controller
} }
} }
$db_result = $this->PD_Model->selectCustomRecords(array('facecrop'), array('fk_pd_id' => $pdid,'isactive'=>1,'facemark_image_generated'=>1), PDAPPLICANTSDETAILS); $db_result = $this->PD_Model->selectCustomRecords(array('facecrop','pd_co_applicant_id'), array('fk_pd_id' => $pdid,'isactive'=>1,'facemark_image_generated'=>1), PDAPPLICANTSDETAILS);
$fc_array = array(); $fc_array = array();
if(!empty($db_result)){ if(!empty($db_result)){
for ($dinx = 0; $dinx < count($db_result); $dinx++) { for ($dinx = 0; $dinx < count($db_result); $dinx++) {
$string = $db_result[$dinx]['facecrop']; $string = $db_result[$dinx]['facecrop'];
// echo gettype($string); // echo gettype($string);
$fc_array[$dinx] = json_decode($string, true); $json_decode = json_decode($string, true);
$fc_array[$dinx]['compare_image'] = !empty($json_decode[0]['compare_image']) ? $json_decode[0]['compare_image'] :array() ;
$fc_array[$dinx]['source_image'] = !empty($json_decode[1]['source_image']) ? $json_decode[1]['source_image'] :array() ;
$fc_array[$dinx]['co_applicant_id'] = $db_result[$dinx]['pd_co_applicant_id'];
} }
} }
$data['facecrop'] = $fc_array; $data['facecrop'] = $fc_array;

View File

@ -21,8 +21,8 @@ class video_grabber_helper
if($pd_category == '1'){ if($pd_category == '1'){
$pd_master_details = $CI->PD_Model->getPDMasterDetails($pd_id,$random_string);} $pd_master_details = $CI->PD_Model->getPDMasterDetails($pd_id,$random_string);}
} }
// $bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id']; $old_bucket_name = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
$bucket_name = TWILIO_CONTENT_BUCKET_NAME; $new_bucket_name = TWILIO_CONTENT_BUCKET_NAME;
$result_data = array(); $result_data = array();
$query = "SELECT * FROM ".VIDEO_ROOM_INFO." where fk_pd_id = $pdid and isactive = 1 and pd_category = $pd_category"; $query = "SELECT * FROM ".VIDEO_ROOM_INFO." where fk_pd_id = $pdid and isactive = 1 and pd_category = $pd_category";
@ -42,8 +42,13 @@ class video_grabber_helper
if($value['s3_copied']) if($value['s3_copied'])
{ {
// $final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$file_name; if($value['s3_copied'] == 1){
$final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$file_name;
$bucket_name = $old_bucket_name;
}else if($value['s3_copied'] == 0){
$final_key = $file_name; $final_key = $file_name;
$bucket_name = $new_bucket_name;
}
$singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$final_key,'+7 days'); $singed_uri = $CI->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$final_key,'+7 days');
$shortURL = VIDEO_SHORT_URL . substr($video_name,0,6); $shortURL = VIDEO_SHORT_URL . substr($video_name,0,6);

View File

@ -468,12 +468,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { box-sizing: border-box; } /* .facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; } .facecrop_row { display: flex; } */
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;} /* .facecrop_column { flex: 33.33%; padding: 5px;} */
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -624,6 +627,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
@ -706,46 +721,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
echo '</tr>
// ########################### Percentage Bar Section ######################################### </tbody>
echo "<h3>Face Comparison</h3>" ; </table>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; //}
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //echo count($person_met_data) != ($pk+1)? '<hr>':'';
for ($i = 0; $i < count($ci); $i++) { $ci = $person['compare_image'];
$similarity = round($ci[$i]["Similarity"]); if(!empty($ci)){
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; $si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -753,29 +756,28 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
<span style="float: left;">Similarity</span>
<span style="float: right;">'.$similarity.' %</span>
<div style="clear:both;"></div>
</div>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b>Loan Applicants:</b></p> <p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">

View File

@ -474,12 +474,15 @@ font-weight: bolder;;
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { box-sizing: border-box; } /* .facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; } .facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;} /* .facecrop_column { flex: 33.33%; padding: 5px;} */
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -631,6 +634,18 @@ font-weight: bolder;;
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
@ -713,45 +728,34 @@ font-weight: bolder;;
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
echo '</tr>
// ########################### Percentage Bar Section ######################################### </tbody>
echo "<h3>Face Comparison</h3>" ; </table>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; //}
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //echo count($person_met_data) != ($pk+1)? '<hr>':'';
for ($i = 0; $i < count($ci); $i++) { $ci = $person['compare_image'];
$similarity = round($ci[$i]["Similarity"]); if(!empty($ci)){
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; $si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -759,29 +763,28 @@ font-weight: bolder;;
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
<span style="float: left;">Similarity</span>
<span style="float: right;">'.$similarity.' %</span>
<div style="clear:both;"></div>
</div>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b>Loan Applicants:</b></p> <p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">

View File

@ -468,12 +468,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { box-sizing: border-box; } /* .facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; } .facecrop_row { display: flex; } */
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;} /* .facecrop_column { flex: 33.33%; padding: 5px;} */
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -625,6 +628,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
@ -707,47 +722,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
echo '</tr>
// ########################### Percentage Bar Section ######################################### </tbody>
echo "<h3>Face Comparison</h3>" ; </table>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; //}
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //echo count($person_met_data) != ($pk+1)? '<hr>':'';
for ($i = 0; $i < count($ci); $i++) { $ci = $person['compare_image'];
$similarity = round($ci[$i]["Similarity"]); if(!empty($ci)){
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; $si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -755,29 +757,29 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
<span style="float: left;">Similarity</span>
<span style="float: right;">'.$similarity.' %</span>
<div style="clear:both;"></div>
</div>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b>Loan Applicants:</b></p> <p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">

View File

@ -470,20 +470,16 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { /* .facecrop { box-sizing: border-box; }
box-sizing: border-box; .facecrop_row { display: flex; } */
}
.facecrop_row {
display: flex;
}
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { /* .facecrop_column { flex: 33.33%; padding: 5px; } */
flex: 33.33%;
padding: 5px;
}
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -629,6 +625,18 @@ if ( isset($pdf) ) {
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
@ -711,42 +719,34 @@ if ( isset($pdf) ) {
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
echo '</tr>
// ########################### Percentage Bar Section ######################################### </tbody>
echo "<h3>Face Comparison</h3>" ; </table>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; //}
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //echo count($person_met_data) != ($pk+1)? '<hr>':'';
for ($i = 0; $i < count($ci); $i++) { $ci = $person['compare_image'];
$similarity = round($ci[$i]["Similarity"]); if(!empty($ci)){
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; $si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -754,29 +754,29 @@ if ( isset($pdf) ) {
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
<span style="float: left;">Similarity</span>
<span style="float: right;">'.$similarity.' %</span>
<div style="clear:both;"></div>
</div>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p> <p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">

View File

@ -467,12 +467,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { box-sizing: border-box; } /* .facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; } .facecrop_row { display: flex; } */
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;} /* .facecrop_column { flex: 33.33%; padding: 5px;} */
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -678,58 +681,60 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
echo "</div>";
echo '<br>'; echo '<br>';
echo '<table class="person_table">
if(!empty($facecrop)){ <tbody>
for ($fc = 0; $fc < count($facecrop); $fc++) { <tr>';
$fc_arr = $facecrop[$fc]; if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); echo '</tr>
// ########################### Percentage Bar Section ######################################### <tr>';
echo "<h3>Face Comparison</h3>" ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; echo '</tr>
for ($i = 0; $i < count($ci); $i++) { </tbody>
$symbol = (round($ci[$i]["Similarity"]) > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; </table>';
echo '<div class="facecrop_row facecrop"> //}
<div class="facecrop_column"> //echo count($person_met_data) != ($pk+1)? '<hr>':'';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> $ci = $person['compare_image'];
</div> if(!empty($ci)){
<div class="facecrop_column">'.$symbol.'</div> $si = $person['source_image'];
<div class="facecrop_column"> $notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> $equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
</div> echo "<h3>Face Comparison : </h3>";
</div>'; echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
echo '<p style="text-align:left;">Similarity foreach (array_chunk($ci, 2) as $row) {
<span style="float:right;">'.round($ci[$i]["Similarity"]).'</span> echo '<tr>';
</p> foreach ($row as $ci_arr_value) {
<div class="progress"> $similarity = round($ci_arr_value["Similarity"]);
<div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:'.round($ci[$i]["Similarity"]).'%"> $symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
'.round($ci[$i]["Similarity"]).' if ($similarity > 80) { // above 81 green
</div> $progress_bar_class = 'rcorners_green';
</div>'; } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
$progress_bar_class = 'rcorners_amber';
} else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red';
}
//########################### Percentage Bar Section #########################################
echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
'.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
echo '<p><span style="float:left;">Similarity</span>
<span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div></td>';
$check_fc_table++;
//########################### End of Percentage Bar Section #########################################
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
}} }
echo'</tbody></table>';
}
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
@ -754,6 +759,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach ($add_on_pd_images as $pd_level_key => $single_pd_images) foreach ($add_on_pd_images as $pd_level_key => $single_pd_images)
{ {

View File

@ -477,12 +477,15 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
font-size: 14px; font-size: 14px;
font-weight: bolder;; font-weight: bolder;;
} }
.facecrop { box-sizing: border-box; } /* .facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; } .facecrop_row { display: flex; } */
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;} /* .facecrop_column { flex: 33.33%; padding: 5px;} */
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -625,6 +628,18 @@ if ( isset($pdf) ) {
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
@ -707,46 +722,34 @@ if ( isset($pdf) ) {
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
echo '</tr>
// ########################### Percentage Bar Section ######################################### </tbody>
echo "<h3>Face Comparison</h3>" ; </table>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; //}
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //echo count($person_met_data) != ($pk+1)? '<hr>':'';
for ($i = 0; $i < count($ci); $i++) { $ci = $person['compare_image'];
$similarity = round($ci[$i]["Similarity"]); if(!empty($ci)){
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; $si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -754,29 +757,29 @@ if ( isset($pdf) ) {
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
<span style="float: left;">Similarity</span>
<span style="float: right;">'.$similarity.' %</span>
<div style="clear:both;"></div>
</div>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p> <p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">

View File

@ -470,13 +470,12 @@ $loan_word = $pd_master_details[0]['lender_short_name'] != 'CFPL' ? 'Loan' : 'Fa
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; }
/* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;}
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
function saveEdits(e) function saveEdits(e)
@ -624,6 +623,17 @@ if ( isset($pdf) ) {
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
@ -696,7 +706,7 @@ if ( isset($pdf) ) {
//print_r($person_met_data);die(); //print_r($person_met_data);die();
echo '<div id="page_break"></div>'; echo '<div id="page_break"></div>';
echo '<p><strong>Person(s) Met:</strong> </p>'; echo '<p><strong>Person(s) Met:</strong> </p>';
echo '<div style="border: 1px solid #0191ed;">'; echo '<div>';
foreach($person_met_data as $pk => $person) foreach($person_met_data as $pk => $person)
{ {
$display_for_person_met =$person['relations'] != "" ? substr_replace($person['relations'],'.',strrpos($person['relations'],','),1) : ''; $display_for_person_met =$person['relations'] != "" ? substr_replace($person['relations'],'.',strrpos($person['relations'],','),1) : '';
@ -707,44 +717,35 @@ if ( isset($pdf) ) {
$person_met_details .= ($display_for_person_met != "" ? ' - ' . $display_for_person_met :''); $person_met_details .= ($display_for_person_met != "" ? ' - ' . $display_for_person_met :'');
} }
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
// ########################### Percentage Bar Section ######################################### echo '</tr>
echo "<h3>Face Comparison</h3>" ; </tbody>
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; </table>';
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //}
for ($i = 0; $i < count($ci); $i++) { //echo count($person_met_data) != ($pk+1)? '<hr>':'';
$similarity = round($ci[$i]["Similarity"]); $ci = $person['compare_image'];
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; if(!empty($ci)){
$si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -752,27 +753,28 @@ if ( isset($pdf) ) {
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo '<p style="text-align:left;">Similarity
<span style="float:right;">'.$similarity.' %</span>
</p>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p> <p contenteditable="true"><b><?php echo $loan_word;?> Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">

View File

@ -466,12 +466,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { box-sizing: border-box; } /* .facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; } .facecrop_row { display: flex; } */
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;} /* .facecrop_column { flex: 33.33%; padding: 5px;} */
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -596,6 +599,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) ) if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
@ -673,60 +687,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
$faceimage_url = array();
for ($i = 0; $i < count($all_applicant_details); $i++) {
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
$faceimage_url = $com_value['doc_url'];
break;
}
}
if(!empty($faceimage_url)){
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
echo '</tr>
// ########################### Percentage Bar Section ######################################### </tbody>
echo "<h3>Face Comparison</h3>" ; </table>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; //}
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //echo count($person_met_data) != ($pk+1)? '<hr>':'';
for ($i = 0; $i < count($ci); $i++) { $ci = $person['compare_image'];
$similarity = round($ci[$i]["Similarity"]); if(!empty($ci)){
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; $si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -734,29 +722,29 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
<span style="float: left;">Similarity</span>
<span style="float: right;">'.$similarity.' %</span>
<div style="clear:both;"></div>
</div>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b>Loan Applicants:</b></p> <p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">

View File

@ -466,13 +466,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { box-sizing: border-box; } /* .facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; } .facecrop_row { display: flex; } */
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;} /* .facecrop_column { flex: 33.33%; padding: 5px;} */
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
function saveEdits(e) function saveEdits(e)
@ -596,6 +598,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) ) if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
@ -673,58 +686,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
$faceimage_url = array();
for ($i = 0; $i < count($all_applicant_details); $i++) {
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
$faceimage_url = $com_value['doc_url'];
break;
}
}
if(!empty($faceimage_url)){
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
echo '</tr>
// ########################### Percentage Bar Section ######################################### </tbody>
echo "<h3>Face Comparison</h3>" ; </table>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; //}
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //echo count($person_met_data) != ($pk+1)? '<hr>':'';
for ($i = 0; $i < count($ci); $i++) { $ci = $person['compare_image'];
$similarity = round($ci[$i]["Similarity"]); if(!empty($ci)){
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; $si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -732,29 +721,28 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
<span style="float: left;">Similarity</span>
<span style="float: right;">'.$similarity.' %</span>
<div style="clear:both;"></div>
</div>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b>Loan Applicants:</b></p> <p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">

View File

@ -466,12 +466,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
padding: 5px; padding: 5px;
/*margin: 10px;*/ /*margin: 10px;*/
} }
.facecrop { box-sizing: border-box; } /* .facecrop { box-sizing: border-box; }
.facecrop_row { display: flex; } .facecrop_row { display: flex; } */
/* Create three equal columns that sits next to each other */ /* Create three equal columns that sits next to each other */
.facecrop_column { flex: 33.33%; padding: 5px;} /* .facecrop_column { flex: 33.33%; padding: 5px;} */
/* ######### TOOLTIP CSS END ######### */ /* ######### TOOLTIP CSS END ######### */
/* #########Person Met,FaceCrop Table Styles######### */
.person_table { border-collapse: collapse; width: 100%; page-break-inside: avoid; }
.person_table td { padding: 8px; }
/* #########End of Person Met,FaceCrop Table Styles######### */
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
@ -597,6 +600,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$temp_person_met['photo'] = ''; $temp_person_met['photo'] = '';
$temp_person_met['id_proof'] = ''; $temp_person_met['id_proof'] = '';
$temp_person_met['face_compare'] = ''; $temp_person_met['face_compare'] = '';
$temp_person_met['compare_image'] = '';
if(!empty($facecrop)){
foreach($facecrop as $fc_key => $fc_value)
{
if($fc_value['co_applicant_id'] == $individual['pd_co_applicant_id']){
$temp_person_met['compare_image'] = $fc_value['compare_image'] ;
$temp_person_met['source_image'] = $fc_value['source_image'] ;
}
}
}
foreach($pd_images[18] as $pm_Key => $pm_value) foreach($pd_images[18] as $pm_Key => $pm_value)
{ {
if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) ) if( !strcasecmp(trim($applicant_name),trim($pm_value['pd_document_title'])) )
@ -674,59 +688,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p>'.$person_met_details.'</p>'; echo '<p>'.$person_met_details.'</p>';
//if($display_for_person_met != "" || $display_for_person_met != null){ //if($display_for_person_met != "" || $display_for_person_met != null){
echo '<br><br>';
//}
if($person['photo'])
{
echo '<img src="'.$person['photo'].'" width="300" height="200" alt=""/>';
}
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
if($person['id_proof'])
{
echo '<img src="'.$person['id_proof'].'" width="300" height="200" alt=""/>';
}
if($person['face_compare'])
{
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$person['face_compare'].'" width="300" height="200" alt=""/>';
}
//echo count($person_met_data) != ($pk+1)? '<hr>':'';
}
$faceimage_url = array();
for ($i = 0; $i < count($all_applicant_details); $i++) {
if($all_applicant_details[$j]['facemark_image_generated'] == 1){
$faceimage_url = $com_value['doc_url'];
break;
}
}
if(!empty($faceimage_url)){
for ($i = 0; $i < count($faceimage_url); $i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
echo '<img src="'.$faceimage_url[$i].'" width="300" height="200" alt=""/>';
}
}
echo '</div>';
echo '<br>'; echo '<br>';
?> echo '<table class="person_table">
<tbody>
<br> <tr>';
<?php if($person['photo']){ echo '<td class="customtd"> <img src="'.$person['photo'].'" width="300" height="200" alt=""/> </td>'; }
if(!empty($facecrop)){ if($person['id_proof']){echo '<td class="customtd"> <img src="'.$person['id_proof'].'" width="300" height="200" alt=""/> </td>'; }
for ($fc = 0; $fc < count($facecrop); $fc++) { echo '</tr>
$fc_arr = $facecrop[$fc]; <tr>';
$ci = !empty($fc_arr[0]['compare_image']) ? $fc_arr[0]['compare_image'] :array() ; if($person['photo']){ echo '<td class="customtd"> '.$person['name'].' Selfie Image </td>'; }
$si = !empty($fc_arr[1]['source_image']) ? $fc_arr[1]['source_image'] : array(); if($person['id_proof']){ echo '<td class="customtd"> '.$person['name'].' ID Proof </td>'; }
echo '</tr>
// ########################### Percentage Bar Section ######################################### </tbody>
echo "<h3>Face Comparison</h3>" ; </table>';
$notequal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>'; //}
$equal_mark ='<span style="font-family: DejaVu Sans; sans-serif;"><center>=</center></span>'; //echo count($person_met_data) != ($pk+1)? '<hr>':'';
for ($i = 0; $i < count($ci); $i++) { $ci = $person['compare_image'];
$similarity = round($ci[$i]["Similarity"]); if(!empty($ci)){
$symbol = ($similarity > 50) ? '<center><h1>'.$equal_mark.'</h1></center>': '<center><h1>'.$notequal_mark.'</h1></center>'; $si = $person['source_image'];
$notequal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>≠</center></span>';
$equal_mark ='<span style="margin-left: inherit;font-family: DejaVu Sans; sans-serif;"><center>=</center></span>';
echo "<h3>Face Comparison : </h3>";
echo '<table class="person_table" style="width:80%;margin-left: auto;margin-right: auto;"><tbody>';
$check_fc_table = 0;
foreach (array_chunk($ci, 2) as $row) {
echo '<tr>';
foreach ($row as $ci_arr_value) {
$similarity = round($ci_arr_value["Similarity"]);
$symbol = ($similarity > 50) ? $equal_mark : $notequal_mark;
if ($similarity > 80) { // above 81 green if ($similarity > 80) { // above 81 green
$progress_bar_class = 'rcorners_green'; $progress_bar_class = 'rcorners_green';
} else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange } else if ($similarity <= 80 && $similarity > 60) { // in between 61 to 80 orange
@ -734,28 +723,28 @@ defined('BASEPATH') OR exit('No direct script access allowed');
} else if ($similarity <= 60) { // below 60 red } else if ($similarity <= 60) { // below 60 red
$progress_bar_class = 'rcorners_red'; $progress_bar_class = 'rcorners_red';
} }
echo '<div class="facecrop_row facecrop"> //########################### Percentage Bar Section #########################################
<div class="facecrop_column"> echo '<td> <div style="border: 1px solid #000; margin: 1px;padding: 12px">';
<img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left"> echo '<div style="display: flex;"><img src="data:image/png;base64,'. $si["base64"].'" alt="'.$si["name"].'" width="50" height="50" align="left">&nbsp;&nbsp;
</div> '.$symbol.'&nbsp;&nbsp;<img src="data:image/png;base64,'. $ci_arr_value["base64"].'" alt="'.$ci_arr_value["name"].'" width="50" height="50" align="right"></div>&nbsp;&nbsp;';
<div class="facecrop_column">'.$symbol.'</div> echo '<p><span style="float:left;">Similarity</span>
<div class="facecrop_column"> <span style="float:right; font-size: 20px;">'.$similarity.' %</span></p>&nbsp;&nbsp;<br><br>';
<img src="data:image/png;base64,'. $ci[$i]["base64"].'" alt="'.$ci[$i]["name"].'" width="50" height="50" align="right"> echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div>
</div> </div></td>';
</div>'; $check_fc_table++;
//########################### End of Percentage Bar Section #########################################
echo'<div style="width: 100%; padding: 0; margin: 7px 0 0 0;">
<span style="float: left;">Similarity</span>
<span style="float: right;">'.$similarity.' %</span>
<div style="clear:both;"></div>
</div>';
echo '<div style="width: 100% !important; "id="'. $progress_bar_class .'"></div><br>';
} }
// ########################### End of Percentage Bar Section ######################################### echo '</tr>';
} }
echo'</tbody></table>';
} }
} // line 711 foreach closed here.
echo '<br>';
echo '</div>';
?> ?>
<br>
<p contenteditable="true"><b>Loan Applicants:</b></p> <p contenteditable="true"><b>Loan Applicants:</b></p>
<table class="scorecard_table"> <table class="scorecard_table">