Commit b9d9b6ef by Jansa Jose

Merge branch 'jansa'

parents 2436d1a4 a3dd8ea9
...@@ -42,16 +42,16 @@ class Webservice extends CI_Controller { ...@@ -42,16 +42,16 @@ class Webservice extends CI_Controller {
$ress = $this->cpf_valid($data['cpf']); $ress = $this->cpf_valid($data['cpf']);
if((isset($ress)) && ($ress == 1)){ if((isset($ress)) && ($ress == 1)){
/*$is_cpf = $this->Webservice_model->is_cpf_exist($data['cpf']); $is_cpf = $this->Webservice_model->is_cpf_exist($data['cpf']);
if($is_cpf['status'] == 'success'){*/ if($is_cpf['status'] == 'success'){
$res = $this->registration_processing_user($data,$type); $res = $this->registration_processing_user($data,$type);
/*}else{ }else{
$res = array( $res = array(
"status"=> "error", "status"=> "error",
"error"=> "CPF Exist", "error"=> "CPF Exist",
"message"=> "CPF Already Exist" "message"=> "CPF Already Exist"
); );
}*/ }
}else{ }else{
$res = array( $res = array(
"status"=> "error", "status"=> "error",
...@@ -2060,6 +2060,14 @@ class Webservice extends CI_Controller { ...@@ -2060,6 +2060,14 @@ class Webservice extends CI_Controller {
// $data['dob'] = strtotime($dob); // $data['dob'] = strtotime($dob);
$ress = $this->cpf_valid($data['dependent_cpf']); $ress = $this->cpf_valid($data['dependent_cpf']);
if($ress == '1'){ if($ress == '1'){
$is_cpf = $this->Webservice_model->is_cpf_exist($data['dependent_cpf']);
if($is_cpf['status'] == 'error'){
$res = array(
"status"=> "error",
"error"=> "CPF Exist",
"message"=> "CPF Already Exist"
);
}else{
$auth_result = $this->Webservice_model->get_userid_frm_authtoken($headers['Auth']); $auth_result = $this->Webservice_model->get_userid_frm_authtoken($headers['Auth']);
$fileName =$auth_result->userid.'_'.$_FILES['dependent_image']['name']; $fileName =$auth_result->userid.'_'.$_FILES['dependent_image']['name'];
$fileName = str_replace('%','a',$fileName); $fileName = str_replace('%','a',$fileName);
...@@ -2100,6 +2108,7 @@ class Webservice extends CI_Controller { ...@@ -2100,6 +2108,7 @@ class Webservice extends CI_Controller {
'data' =>array('dependent_list'=>$new_data) 'data' =>array('dependent_list'=>$new_data)
); );
} }
}
}else{ }else{
$res = array( $res = array(
"status"=> "error", "status"=> "error",
...@@ -2179,6 +2188,14 @@ class Webservice extends CI_Controller { ...@@ -2179,6 +2188,14 @@ class Webservice extends CI_Controller {
if((isset($data['dependent_name'])) && strlen(trim($data['dependent_name']," ")) > 0 && isset($data['dependent_relation']) && strlen(trim($data['dependent_relation']," ")) > 0 && isset($data['dependent_age']) && strlen(trim($data['dependent_age']," ")) > 0 && (isset($_FILES['dependent_image']) && isset($data['dependent_id']) && strlen(trim($data['dependent_id']," ")) > 0) && isset($data['dependent_cpf']) && strlen(trim($data['dependent_cpf']," ")) > 0){ if((isset($data['dependent_name'])) && strlen(trim($data['dependent_name']," ")) > 0 && isset($data['dependent_relation']) && strlen(trim($data['dependent_relation']," ")) > 0 && isset($data['dependent_age']) && strlen(trim($data['dependent_age']," ")) > 0 && (isset($_FILES['dependent_image']) && isset($data['dependent_id']) && strlen(trim($data['dependent_id']," ")) > 0) && isset($data['dependent_cpf']) && strlen(trim($data['dependent_cpf']," ")) > 0){
$ress = $this->cpf_valid($data['dependent_cpf']); $ress = $this->cpf_valid($data['dependent_cpf']);
if($ress == '1'){ if($ress == '1'){
$is_cpf = $this->Webservice_model->is_cpf_exist($data['dependent_cpf']);
if($is_cpf['status'] == 'error'){
$res = array(
"status"=> "error",
"error"=> "CPF Exist",
"message"=> "CPF Already Exist"
);
}else{
$auth_result = $this->Webservice_model->get_userid_frm_authtoken($headers['Auth']); $auth_result = $this->Webservice_model->get_userid_frm_authtoken($headers['Auth']);
$fileName = $auth_result->userid.'_'.$_FILES['dependent_image']['name']; $fileName = $auth_result->userid.'_'.$_FILES['dependent_image']['name'];
$config = set_upload_options('../assets/uploads/profilepic/patient_dependent/'); $config = set_upload_options('../assets/uploads/profilepic/patient_dependent/');
...@@ -2219,6 +2236,7 @@ class Webservice extends CI_Controller { ...@@ -2219,6 +2236,7 @@ class Webservice extends CI_Controller {
'data' =>array('dependent_list'=>$new_data) 'data' =>array('dependent_list'=>$new_data)
); );
} }
}
}else{ }else{
$res = array( $res = array(
"status"=> "error", "status"=> "error",
......
...@@ -4177,9 +4177,9 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender=' ...@@ -4177,9 +4177,9 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$this->db->where('doctor_id',$doc_id); $this->db->where('doctor_id',$doc_id);
$query = $this->db->get()->row_array(); $query = $this->db->get()->row_array();
$query['reedem_earn'] = decrypt_data($query['reedem_earn']); $query['reedem_earn'] = $query['reedem_earn'] == "" ? 0 : decrypt_data($query['reedem_earn']);
$query['future_earn'] = decrypt_data($query['future_earn']); $query['future_earn'] = $query['future_earn'] == "" ? 0 : decrypt_data($query['future_earn']);
$query['total_earn'] = decrypt_data($query['total_earn']); $query['total_earn'] = $query['total_earn'] == "" ? 0 : decrypt_data($query['total_earn']);
return $query; return $query;
} }
......
...@@ -2090,6 +2090,7 @@ $('#home_registernowbtn a').click(function() ...@@ -2090,6 +2090,7 @@ $('#home_registernowbtn a').click(function()
$("#login_submit_patient").click(function() $("#login_submit_patient").click(function()
{ {
$("#loading").show(); $("#loading").show();
//$('#loading').css('display','none');
$('#err-login').addClass('hidden'); $('#err-login').addClass('hidden');
if ($('#login-form-patient').parsley().validate() ) if ($('#login-form-patient').parsley().validate() )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment