QUES MAS CHANGED6

This commit is contained in:
velz 2018-09-27 15:07:32 +05:30
parent 1865f97df1
commit 1455f95360
6 changed files with 45 additions and 40 deletions

View File

@ -86,7 +86,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
// define login route name for token verification
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listAllQuestions/:any)'); // no errors
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'triggerNewPD'); // no errors
/*********************AWS resources Constants*************************************************/
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');

View File

@ -172,9 +172,10 @@ class PD_Controller extends REST_Controller {
/********For Save New PD while Trigger****/
public function triggerNewPD_post()
{
// echo "TRIGGER";
// //$this->aws_ses->verifyEmailAddress('velmurugan.s@venbainfotech.com');
// die();
echo "TRIGGER";
//$this->aws_ses->verifyEmailIdentity('raro@spindl-e.com');
//$this->aws_ses->sendMail('raro@spindl-e.com');
die();
$pd_details = json_decode($this->post('pd_details'),true);
$pd_applicant_details = json_decode($this->post('pd_applicant_details'),true);
$pd_document_titles = json_decode($this->post('pd_document_titles'),true);

View File

@ -69,7 +69,7 @@ class Question_Management_Controller extends REST_Controller {
$temp_answers = array('fk_question_id' => $question_id, 'answer' =>$answer['answer'] , 'createdon' =>$records['createdon'] , 'fk_createdby' =>$records['fk_createdby']);
$child_id = $this->Question_Management_Models->saveRecords($temp_answers,QUESTIONANSWERS);
$child_id = $this->Question_Management_Model->saveRecords($temp_answers,QUESTIONANSWERS);
}
}

View File

@ -21,7 +21,7 @@ class AWS_SES
//echo "listAllBuckets";
$this->SES = SesClient::factory($this->ses_properties);
$this->createCustomVerificationEmailTemplate();
//$this->verifyEmailAddress();
}
@ -31,7 +31,7 @@ class AWS_SES
// Replace these sample addresses with the addresses of your recipients. If
// your account is still in the sandbox, these addresses must be verified.
$recipient_emails = ['vitvelz@gmail.com'];
$recipient_emails = ['raro@spindl-e.com'];
// Specify a configuration set. If you do not want to use a configuration
// set, comment the following variable, and the
@ -83,27 +83,31 @@ class AWS_SES
}
}
public function verifyEmailAddress($email)
public function verifyEmailIdentity($email = "")
{
$result = $this->SES->verifyEmailIdentity([
'EmailAddress' => $email,
]);
print_r($result);
}
/*
$result = $client->sendCustomVerificationEmail([
'ConfigurationSetName' => '<string>',
'EmailAddress' => '<string>', // REQUIRED
'TemplateName' => '<string>', // REQUIRED
]);*/
public function sendCustomVerificationEmail($email,$template_name = 'myCustom')
{
$result = $this->SES->sendCustomVerificationEmail([
//'ConfigurationSetName' => '<string>',
'EmailAddress' => $email, // REQUIRED
'TemplateName' => $template_name, // REQUIRED
]);
}
public function createCustomVerificationEmailTemplate()
{
$result = $this->SES->createCustomVerificationEmailTemplate([
'FailureRedirectionURL' => 'www.google.com', // REQUIRED
'FailureRedirectionURL' => 'https://www.google.com', // REQUIRED
'FromEmailAddress' => 'vitvelz@gmail.com', // REQUIRED
'SuccessRedirectionURL' => 'www.gmail.com', // REQUIRED
'SuccessRedirectionURL' => 'https://www.gmail.com', // REQUIRED
'TemplateContent' => '<h1>Heading</h1>', // REQUIRED
'TemplateName' => 'myCustom', // REQUIRED
'TemplateSubject' => 'customTemlate', // REQUIRED

View File

@ -14,18 +14,18 @@ class PD_Model extends SPARQ_Model {
{
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.fk_lender_id,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name, PDTRIGGER.lender_applicant_id, PDTRIGGER.pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name, PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.fk_pd_status,PDSTATUS.pd_status_name, PDTRIGGER.pd_specific_clarification, PDTRIGGER.createdon, PDTRIGGER.fk_createdby, PDTRIGGER.updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name, PDTRIGGER.loan_amount');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id AND ENTITY.isactive = 1');
$this->db->JOIN(PRODUCTS.' as PRODUCTS','PDTRIGGER.fk_product_id = PRODUCTS.product_id AND PRODUCTS.isactive = 1');
$this->db->JOIN(SUBPRODUCTS.' as SUBPRODUCTS','PDTRIGGER.fk_subproduct_id = SUBPRODUCTS.subproduct_id AND SUBPRODUCTS.isactive = 1');
$this->db->JOIN(PDTYPE.' as PDTYPE','PDTRIGGER.fk_pd_type = PDTYPE.pd_type_id AND PDTYPE.isactive = 1');
$this->db->JOIN(PDSTATUS.' as PDSTATUS','PDTRIGGER.fk_pd_status = PDSTATUS.pd_status_id AND PDSTATUS.isactive = 1');
$this->db->JOIN(USERPROFILE.' as USERPROFILE','PDTRIGGER.fk_createdby = USERPROFILE.userid AND USERPROFILE.isactive = 1');
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','PDTRIGGER.fk_updatedby = USERPROFILE1.userid AND USERPROFILE1.isactive = 1');
$this->db->JOIN(PDALLOCATIONTYPE.' as PDALLOCATIONTYPE','PDTRIGGER.fk_pd_allocation_type = PDALLOCATIONTYPE.pd_allocation_type_id AND PDALLOCATIONTYPE.isactive = 1');
$this->db->JOIN(USERPROFILE.' as USERPROFILE2','PDTRIGGER.fk_pd_allocation_type = USERPROFILE2.userid AND USERPROFILE2.isactive = 1');
$this->db->JOIN(TEMPLATE.' as TEMPLATE','PDTRIGGER.fk_pd_template_id = TEMPLATE.template_id AND TEMPLATE.isactive = 1');
$this->db->JOIN(CUSTOMERSEGMENT.' as CUSTOMERSEGMENT','PDTRIGGER.fk_customer_segment = CUSTOMERSEGMENT.customer_segment_id AND CUSTOMERSEGMENT.isactive = 1');
$this->db->JOIN(ENTITY.' as AGENCY','PDTRIGGER.pd_agency_id = AGENCY.entity_id AND AGENCY.isactive = 1','LEFT');
$this->db->JOIN(ENTITY.' as ENTITY','PDTRIGGER.fk_lender_id = ENTITY.entity_id ');
$this->db->JOIN(PRODUCTS.' as PRODUCTS','PDTRIGGER.fk_product_id = PRODUCTS.product_id');
$this->db->JOIN(SUBPRODUCTS.' as SUBPRODUCTS','PDTRIGGER.fk_subproduct_id = SUBPRODUCTS.subproduct_id');
$this->db->JOIN(PDTYPE.' as PDTYPE','PDTRIGGER.fk_pd_type = PDTYPE.pd_type_id');
$this->db->JOIN(PDSTATUS.' as PDSTATUS','PDTRIGGER.fk_pd_status = PDSTATUS.pd_status_id');
$this->db->JOIN(USERPROFILE.' as USERPROFILE','PDTRIGGER.fk_createdby = USERPROFILE.userid');
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','PDTRIGGER.fk_updatedby = USERPROFILE1.userid','LEFT');
$this->db->JOIN(PDALLOCATIONTYPE.' as PDALLOCATIONTYPE','PDTRIGGER.fk_pd_allocation_type = PDALLOCATIONTYPE.pd_allocation_type_id');
$this->db->JOIN(USERPROFILE.' as USERPROFILE2','PDTRIGGER.fk_pd_allocation_type = USERPROFILE2.userid');
$this->db->JOIN(TEMPLATE.' as TEMPLATE','PDTRIGGER.fk_pd_template_id = TEMPLATE.template_id');
$this->db->JOIN(CUSTOMERSEGMENT.' as CUSTOMERSEGMENT','PDTRIGGER.fk_customer_segment = CUSTOMERSEGMENT.customer_segment_id');
$this->db->JOIN(ENTITY.' as AGENCY','PDTRIGGER.pd_agency_id = AGENCY.entity_id','LEFT');
$this->db->ORDER_BY('PDTRIGGER.pd_id',$sort);
$this->db->LIMIT($page,$limit);
$result_array = $this->db->GET()->result_array();
@ -36,9 +36,9 @@ class PD_Model extends SPARQ_Model {
{
$this->db->SELECT('PDAPPLICANTSDETAILS.pd_co_applicant_id, PDAPPLICANTSDETAILS.fk_pd_id, PDAPPLICANTSDETAILS.applicant_name, PDAPPLICANTSDETAILS.applicant_type, PDAPPLICANTSDETAILS.mobile_no, PDAPPLICANTSDETAILS.email, PDAPPLICANTSDETAILS.addressline1, PDAPPLICANTSDETAILS.addressline2, PDAPPLICANTSDETAILS.addressline3, PDAPPLICANTSDETAILS.fk_city, PDAPPLICANTSDETAILS.fk_state, PDAPPLICANTSDETAILS.pincode');
$this->db->FROM(PDAPPLICANTSDETAILS.' as PDAPPLICANTSDETAILS');
$this->db->JOIN(STATE.' as STATE','PDAPPLICANTSDETAILS.fk_state = STATE.state_id AND STATE.isactive = 1');
$this->db->JOIN(CITY.' as CITY','PDAPPLICANTSDETAILS.fk_city = CITY.city_id AND CITY.isactive = 1');
$this->db->WHERE('PDAPPLICANTSDETAILS.fk_pd_id = $result["pd_id"] AND PDAPPLICANTSDETAILS.isactive = 1');
$this->db->JOIN(STATE.' as STATE','PDAPPLICANTSDETAILS.fk_state = STATE.state_id ');
$this->db->JOIN(CITY.' as CITY','PDAPPLICANTSDETAILS.fk_city = CITY.city_id');
$this->db->WHERE('PDAPPLICANTSDETAILS.fk_pd_id = $result["pd_id"]');
$result_child_array = $this->db->GET()->result_array();
if(count($result_child_array) != 0)
{

View File

@ -16,10 +16,10 @@ class Question_Management_Model extends SPARQ_Model {
$this->db->SELECT('QUESTIONS.question_id, QUESTIONS.question, QUESTIONS.description, QUESTIONS.fk_question_catagory,QUESTIONCATEGORY.categroy_name, QUESTIONS.fk_question_answertype,QUESTIONANSWERTYPE.answer_type_name,QUESTIONS.isactive, QUESTIONS.createdon, QUESTIONS.fk_createdby, QUESTIONS.updatedon, QUESTIONS.fk_updatedby,concat(USERPROFILE.first_name," " ,USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby');
$this->db->FROM(QUESTIONS.' as QUESTIONS');
$this->db->JOIN(QUESTIONANSWERTYPE.' as QUESTIONANSWERTYPE','QUESTIONS.fk_question_answertype = QUESTIONANSWERTYPE.question_answer_type_id AND QUESTIONANSWERTYPE.isactive = 1');
$this->db->JOIN(QUESTIONCATEGORY.' as QUESTIONCATEGORY','QUESTIONS.fk_question_catagory = QUESTIONCATEGORY.question_categroy_id AND QUESTIONCATEGORY.isactive = 1');
$this->db->JOIN(USERPROFILE.' as USERPROFILE','QUESTIONS.fk_createdby = USERPROFILE.userid AND USERPROFILE.isactive = 1');
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','QUESTIONS.fk_updatedby = USERPROFILE1.userid AND USERPROFILE1.isactive = 1','LEFT');
$this->db->JOIN(QUESTIONANSWERTYPE.' as QUESTIONANSWERTYPE','QUESTIONS.fk_question_answertype = QUESTIONANSWERTYPE.question_answer_type_id');
$this->db->JOIN(QUESTIONCATEGORY.' as QUESTIONCATEGORY','QUESTIONS.fk_question_catagory = QUESTIONCATEGORY.question_categroy_id');
$this->db->JOIN(USERPROFILE.' as USERPROFILE','QUESTIONS.fk_createdby = USERPROFILE.userid');
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','QUESTIONS.fk_updatedby = USERPROFILE1.userid','LEFT');
$this->db->ORDER_BY('QUESTIONS.question_id',$sort);
$this->db->LIMIT($page,$limit);
@ -29,12 +29,12 @@ class Question_Management_Model extends SPARQ_Model {
{
$this->db->SELECT('QUESTIONANSWERS.question_answer_id, QUESTIONANSWERS.fk_question_id, QUESTIONANSWERS.answer, QUESTIONANSWERS.createdon, QUESTIONANSWERS.fk_createdby, QUESTIONANSWERS.updatedon, QUESTIONANSWERS.fk_updatedby, QUESTIONS.isactive');
$this->db->FROM(QUESTIONANSWERS.' as QUESTIONANSWERS');
$this->db->JOIN(QUESTIONS.' as QUESTIONS','QUESTIONANSWERS.fk_question_id = QUESTIONS.question_id AND QUESTIONS.isactive');
$this->db->JOIN(USERPROFILE.' as USERPROFILE','QUESTIONANSWERS.fk_createdby = USERPROFILE.userid AND USERPROFILE.isactive = 1');
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','QUESTIONANSWERS.fk_updatedby = USERPROFILE1.userid AND USERPROFILE1.isactive = 1','LEFT');
$this->db->JOIN(QUESTIONS.' as QUESTIONS','QUESTIONANSWERS.fk_question_id = QUESTIONS.question_id');
$this->db->JOIN(USERPROFILE.' as USERPROFILE','QUESTIONANSWERS.fk_createdby = USERPROFILE.userid ');
$this->db->JOIN(USERPROFILE.' as USERPROFILE1','QUESTIONANSWERS.fk_updatedby = USERPROFILE1.userid','LEFT');
$this->db->where('QUESTIONS.question_id',$r['question_id']);
$answers_data = $this->db->get()->result_array();
//$result[$key]['answers'] = $answers_data;
array_push($result[$key],$answers_data);
}