RELATED QC PAGE BRAK MODULE

This commit is contained in:
Velz2020 2019-08-26 19:46:14 +05:30
parent 7d70080401
commit 2f04acd637
5 changed files with 116 additions and 17 deletions

View File

@ -30,7 +30,7 @@
$config['api_user_auth_info'] = array(
'saveNewUser' => array(10),
'updateExistUser' => array(10),
'updateExistUser' => array(10,4,5),
//'getUsersDetails' => array(),
//'triggerNewPD' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),
//'updatePDMaster' => array(1,2,3,10,11,12,13,1,15,16,17,18,19,20),

View File

@ -29,6 +29,7 @@ class PD_Controller extends REST_Controller {
$this->load->model('PD_Model');
$this->load->library('AWS_S3');
$this->load->library('AWS_COGNITO');
$this->load->library('AWS_SNS');
$this->load->helper('GETPDFORMDETAILS');
$this->load->helper('GETPROCESSEDJSON');
@ -5567,7 +5568,14 @@ public function getPDFormDetailsJSON_post()
//$this->demo(5);
//$this->demo(0);
//<body style="font-family:Merriweather;font-size:12px;margin:15px 30px">
//$this->aws_cognito->adminSetUserPassword('aditya.raikar@imgc.com');
//die();
$is_regenerate = 0;
if(isset($records['regenerate']))
{
@ -5648,18 +5656,10 @@ public function getPDFormDetailsJSON_post()
//echo "*******************************************";
$t = $this->load->view('report_templates/JSONTOREPORT',$data,true);
//$t = $this->load->view('temp_html.html',null,true);
echo $t;
die();
//echo $t;
//die();
$t = file_get_contents($this->external_path ."/pd_reports/" . $pdid . "/sample.html");
$total_replaces = substr_count($t,'<span class="tooltip">');
//echo $total_replaces;
//echo $t; die();
//echo "*************************************";
//echo strpos($t,'<span class="tooltip">');
//echo "*************************************";
//$t = substr_replace($t,'X',strpos($t,'<span class="tooltiptext">'),strlen('<span class="tooltiptext">'));
// substr_replace($t,'X',strpos($t,'<span class="tooltiptext">'),strpos($t, '</span>', strpos($t,'<span class="tooltiptext">')));
for($i = 0 ;$i < $total_replaces;$i++)
{
$start_pos = strpos($t,'<span class="tooltiptext">');
@ -5675,7 +5675,13 @@ public function getPDFormDetailsJSON_post()
}
//echo $t;
//$t = file_get_contents($this->external_path ."/pd_reports/" . $pdid . "/sample.html");
$start_pos = strpos($t,'</script>');
$end_pos = $start_pos + 10;
$t = substr_replace($t,'</head><body style="font-family:Merriweather;font-size:12px;margin:15px 30px">',$end_pos,0);
$t = substr_replace($t,'<!DOCTYPE html><html lang="en" id="mydoc" onkeyup="saveEdits(event)"><head>',0,0);
$t = substr_replace($t,'</body></html>',-1,0);
//file_put_contents($this->external_path ."/pd_reports/" . $pdid . "/sample2.html",$t);
//PDF Gen using DOM PDF
//$this->pdfgenerator->setEncryption('test1234');
$pdf_doc = $this->pdfgenerator->generate($t, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
@ -6714,7 +6720,7 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$location_watermarktext="Location: ".$doc['link'];
$font = APPPATH."docs/robold.ttf"; //metion font and it's location
$fontsize="12";
$x = imagesy($imagetobewatermark);
$x = imagesx($imagetobewatermark);
$y = imagesy($imagetobewatermark);
$water_mark_text_color = imagecolorallocate($imagetobewatermark, 225, 0, 0);
@ -7374,6 +7380,18 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$records = $this->post('records');
$pdid = $records['pdid'];
$content = $records['content'];
if($content != "")
{
$report_data = $content;
$start_pos = strpos($report_data,'</script>');
$end_pos = $start_pos + 10;
$report_data = substr_replace($report_data,'</head><body style="font-family:Merriweather;font-size:12px;margin:15px 30px">',$end_pos,0);
$report_data = substr_replace($report_data,'<!DOCTYPE html><html lang="en" id="mydoc" onkeyup="saveEdits(event)"><head>',0,0);
$report_data = substr_replace($report_data,'</body></html>',-1,0);
}
$fk_createdby = $records['fk_createdby'];
$random_string = $records['random_string'];
$pd_report_time = date('Y-m-d-h-i-s');
@ -7455,11 +7473,34 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
$random_string = $this->uri->segment(2);
EXTERNAL_DIR_CHECK::checkExternalDirectory($pdid);
$records = $this->post('myData');
$report_data = '';
if($records)
{
$report_data = $records;
$start_pos = strpos($report_data,'</script>');
$end_pos = $start_pos + 10;
$report_data = substr_replace($report_data,'</head><body style="font-family:Merriweather;font-size:12px;margin:15px 30px">',$end_pos,0);
$report_data = substr_replace($report_data,'<!DOCTYPE html><html lang="en" id="mydoc" onkeyup="saveEdits(event)"><head>',0,0);
$report_data = substr_replace($report_data,'</body></html>',-1,0);
$total_replaces = substr_count($t,'<span class="tooltip">');
for($i = 0 ;$i < $total_replaces;$i++)
{
$start_pos = strpos($t,'<span class="tooltiptext">');
$end_pos = strpos($t, '</span>', strpos($t,'<span class="tooltiptext">'));
$end_pos = $end_pos + 14;
//echo $start_pos.'-';echo $end_pos.'-';echo ($end_pos - $start_pos).'-';
$t = substr_replace($t,'',$start_pos,($end_pos - $start_pos));
$t = substr_replace($t,'',strpos($t,'<span class="tooltip">'),(strlen('<span class="tooltip">')));
}
}
else
{

View File

@ -0,0 +1,58 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
include_once APPPATH.'/vendor/autoload.php';
use Aws\CognitoIdentityProvider\CognitoIdentityProviderClient;
//use Aws\Exception\AwsException;
class AWS_COGNITO
{
private $client;
private $name = "TEST";
private $CI;
private $cognito_properties;
public function __construct()
{
// Construct the parent class
//parent::__construct();
$this->CI =& get_instance();
$this->cognito_properties = array('region'=>'ap-south-1','version'=>'latest','credentials' => array(
'key' =>$this->CI->config->item('cognito_resource_key'),
'secret' => $this->CI->config->item('cognito_resource_secret')
));
$this->client = CognitoIdentityProviderClient::factory($this->cognito_properties);
// echo "Called";
// $this->setCors('lender8');die();
}
public function adminResetPassword($user_name)
{
$result = $this->client->adminResetUserPassword([
'UserPoolId' => $this->CI->config->item('sine_egde_pool_id'), // REQUIRED
'Username' => $user_name, // REQUIRED
]);
print_r($result);
}
public function adminSetUserPassword($user_name)
{
//print_r('adminSetUserPassword');
$result = $this->client->adminSetUserPassword([
'Password' => 'temp1234', // REQUIRED
'Permanent' => false,
'UserPoolId' => $this->CI->config->item('sine_egde_pool_id'), // REQUIRED
'Username' => $user_name, // REQUIRED
]);
print_r($result);
}
}
?>

View File

@ -842,7 +842,7 @@ class PD_Model extends SPARQ_Model {
if($result_array[0]['fk_pd_type'] == "" || $result_array[0]['fk_pd_type'] == null || $result_array[0]['fk_pd_type'] == 0){ $mandatory_fields[] = 'fk_pd_type'; }
if($result_array[0]['fk_customer_segment'] == "" || $result_array[0]['fk_customer_segment'] == null || result_array[0]['fk_customer_segment'] == 0){ $mandatory_fields[] = 'fk_customer_segment'; }
if($result_array[0]['fk_customer_segment'] == "" || $result_array[0]['fk_customer_segment'] == null || $result_array[0]['fk_customer_segment'] == 0){ $mandatory_fields[] = 'fk_customer_segment'; }
if($result_array[0]['loan_amount'] == "" || $result_array[0]['loan_amount'] == null){ $mandatory_fields[] = 'loan_amount'; }

View File

@ -76,7 +76,7 @@
define('ENVIRONMENT','development');
}
//echo ENVIRONMENT;
/*
*---------------------------------------------------------------
* ERROR REPORTING