Select"; $rowcount++; $tableValue = $mod_row["GR_UNIVERSITY_ID"]; $tableShow = $mod_row["GR_UNIVERSITY_NAME"]; if ($tableValue == $oldvalue) $Select_University = $Select_University . ""; else $Select_University = $Select_University . ""; } // end for return $Select_University; } // end function function DegreeList ($oldvalue,$conn) { $selDegree = "select EIS_DEGREE_ID , EIS_NAME from EIS_DEGREE WHERE GBCE_LIST=1 ORDER BY DEGREE_LEVEL, EIS_NAME"; $rsDegree = OCIParse($conn,$selDegree); OCIExecute($rsDegree); $Select_Degree = ""; $rowcount = 0; while(OCIFetchInto($rsDegree,$mod_row, OCI_ASSOC)) { if ($rowcount == 0 ) $Select_Degree = $Select_Degree . ""; $rowcount++; $tableValue = $mod_row["EIS_DEGREE_ID"]; $tableShow = $mod_row["EIS_NAME"]; if ($tableValue == $oldvalue) $Select_Degree = $Select_Degree . ""; else $Select_Degree = $Select_Degree . ""; } // end for return $Select_Degree; } // end function function GradeList ($oldvalue) { $arrGrade[] = "A"; $arrGrade[] = "B"; $arrGrade[] = "C"; $arrGrade[] = "D"; $arrGrade[] = "E"; $arrGrade[] = "F"; $Select_Grade = ""; //$rowcount = 0; foreach ($arrGrade as $key => $value) { //if ($rowcount == 0) // $Select_Grade = $Select_Grade . ""; //$rowcount++; $tableValue = $value; $tableShow = $value; if ($tableValue == $oldvalue) $Select_Grade = $Select_Grade . ""; else $Select_Grade = $Select_Grade . ""; } // end for return $Select_Grade; } // end function function DivisionList ($oldvalue) { echo $oldvalue; $arrDivision[] = "First"; $arrDivision[] = "Second"; $arrDivision[] = "Third"; //$arrDivision[] = "Fourth"; $Select_Division = ""; $rowcount = 0; foreach ($arrDivision as $key => $value) { if ($rowcount == 0 ) $Select_Division = $Select_Division . ""; $rowcount++; $tableValue = $value; $tableShow = $value; if ($tableValue == $oldvalue) $Select_Division = $Select_Division . ""; else $Select_Division = $Select_Division . ""; } // end for return $Select_Division; } // end function function WeekList ($oldvalue) { for ($i=1;$i<=60;$i++){ $arrWeek[] = $i; } $Select_Week = ""; foreach ($arrWeek as $key => $value) { $tableValue = $value; $tableShow = $value; if ($tableValue == $oldvalue) $Select_Week = $Select_Week . ""; else $Select_Week = $Select_Week . ""; } // end for return $Select_Week; } // end function function NatureList ($oldvalue) { $arrNature[]="Internee"; $arrNature[]="On Job"; //print_r($arrYears); $Select_Years = ""; $rowcount = 0; foreach ($arrNature as $key => $value) { if ($rowcount == 0) $Select_Years = $Select_Years . ""; $rowcount++; $tableValue = $value; $tableShow = $value; if ($tableValue == $oldvalue) $Select_Years = $Select_Years . ""; else $Select_Years = $Select_Years . ""; } // end for return $Select_Years; } // end function function JobStatus ($oldvalue) { $arrJobStatus[] = "Federal Government"; $arrJobStatus[] = "Provincial Government"; $arrJobStatus[] = "Armed Forces"; $arrJobStatus[] = "Semi Government"; $arrJobStatus[] = "Private"; $Select_JobStatus = ""; foreach($arrJobStatus as $key => $value) { $tableValue = $value; $tableShow = $value; if ($tableValue == $oldvalue) $Select_JobStatus = $Select_JobStatus . ""; else $Select_JobStatus = $Select_JobStatus . ""; } // end for return $Select_JobStatus; } // end function function JobNature ($oldvalue) { $arrJobNature[] = "Permanent"; $arrJobNature[] = "Temporary"; $arrJobNature[] = "Officiating"; $arrJobNature[] = "Contract"; $arrJobNature[] = "Adhoc"; $arrJobNature[] = "Daily Wages"; $arrJobNature[] = "Honorary"; $arrJobNature[] = "Part Time"; $arrJobNature[] = "Apprentice"; $Select_JobNature = ""; foreach ($arrJobNature as $key => $value) { $tableValue = $value; $tableShow = $value; if ($tableValue == $oldvalue) $Select_JobNature = $Select_JobNature . ""; else $Select_JobNature = $Select_JobNature . ""; } // end for return $Select_JobNature; } // end function function AgeRelaxArmed($oldvalue) { $arrYears[]="Less than 1 year"; $arrYears[]="1 year"; $arrYears[]="2 years"; $arrYears[]="3 years"; $arrYears[]="4 years"; $arrYears[]="5 years"; $arrYears[]="6 years"; $arrYears[]="7 years"; $arrYears[]="8 years"; $arrYears[]="9 years"; $arrYears[]="10 years"; $arrYears[]="11 years"; $arrYears[]="12 years"; $arrYears[]="13 years"; $arrYears[]="14 years"; $arrYears[]="15 years or above"; //print_r($arrYears); $Select_Years = ""; // $rowcount = 0; foreach ($arrYears as $key => $value) { // if ($rowcount == 0) // $Select_Years = $Select_Years . "\n"; // $rowcount++; $tableValue = $key; $tableShow = $value; if ($tableValue == $oldvalue) $Select_Years = $Select_Years . "\n"; else $Select_Years = $Select_Years . "\n"; } // end for return $Select_Years; } // end function function validjobs_ac ($conn) { $query = "select distinct t.gr_job_id, t.post_name, t.case_no, t.subject from gr_phaseiv_2013_ac t order by t.gr_job_id"; $rjobs = OCIParse($conn,$query); OCIExecute($rjobs); $Select_jobs = ""; $Select_jobs = ""; while(OCIFetchInto($rjobs,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["GR_JOB_ID"]; $tableShow = $mod_row["CASE_NO"]." [ ".$mod_row["POST_NAME"]." ".$mod_row["SUBJECT"]." ]"; $Select_jobs = $Select_jobs . ""; } // end while return $Select_jobs; } // end function function AgeRelaxGovt($oldvalue) { $arrYears[0]="Less than 2 year"; $arrYears[10]="2 years or above"; //print_r($arrYears); $Select_Years = ""; // $rowcount = 0; foreach ($arrYears as $key => $value) { // if ($rowcount == 0) // $Select_Years = $Select_Years . "\n"; // $rowcount++; $tableValue = $key; $tableShow = $value; if ($tableValue == $oldvalue) $Select_Years = $Select_Years . "\n"; else $Select_Years = $Select_Years . "\n"; } // end for return $Select_Years; } // end function function deposit_amount ($amountvalue,$conn) { $deposit = "select GR_AMOUNT_ID, GR_AMOUNT from AMOUNT where FLAG=1 ORDER BY GR_AMOUNT"; $depositnew = OCIParse($conn,$deposit); OCIExecute($depositnew); $Select_amountnew = ""; $Select_amountnew = ""; while(OCIFetchInto($depositnew,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["GR_AMOUNT_ID"]; $tableShow = $mod_row["GR_AMOUNT"]; if ($tableValue == $amountvalue) $Select_amountnew = $Select_amountnew . ""; else $Select_amountnew = $Select_amountnew . ""; } // end for return $Select_amountnew; } // end function function districtList_New ($oldvalue,$conn) { $seldistrictnew = "select GR_DISTRICT_ID, GR_DISTRICT from DISTRICT where FLAG=1 ORDER BY GR_DISTRICT"; $rsdistrictnew = OCIParse($conn,$seldistrictnew); OCIExecute($rsdistrictnew); $Select_districtnew = ""; $Select_districtnew = ""; while(OCIFetchInto($rsdistrictnew,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["GR_DISTRICT_ID"]; $tableShow = $mod_row["GR_DISTRICT"]; if ($tableValue == $oldvalue) $Select_districtnew = $Select_districtnew . ""; else $Select_districtnew = $Select_districtnew . ""; } // end for return $Select_districtnew; } // end function function districtList ($oldvalue,$conn) { $seldistrict = "select GR_DOMICILE_ID,GR_DISTRICT_ID, GR_DISTRICT from DISTRICT ORDER BY GR_DISTRICT"; $rsdistrict = OCIParse($conn,$seldistrict); OCIExecute($rsdistrict); $Select_district = ""; while(OCIFetchInto($rsdistrict,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["GR_DISTRICT_ID"]; $tableShow = $mod_row["GR_DISTRICT"]; $tableClass = $mod_row["GR_DOMICILE_ID"]; if ($tableValue == $oldvalue) $Select_district = $Select_district . ""; else $Select_district = $Select_district . ""; } // end for return $Select_district; } // end function function DomicileList ($oldvalue,$conn) { $selDomicile = "select DOMICILE_NAME, DOMICILE_CODE from DOMICILE WHERE FLAG=1 ORDER BY DOMICILE_NAME"; $rsDomicile = OCIParse($conn,$selDomicile); OCIExecute($rsDomicile); $Select_Domicile = ""; while(OCIFetchInto($rsDomicile,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["DOMICILE_CODE"]; $tableShow = $mod_row["DOMICILE_NAME"]; if ($tableValue == $oldvalue) $Select_Domicile = $Select_Domicile . ""; else $Select_Domicile = $Select_Domicile . ""; } // end for return $Select_Domicile; } // end function function ICT_DomicileList ($oldvalue,$conn) { $selDomicile = "select DOMICILE_NAME, DOMICILE_CODE from DOMICILE WHERE ICT_FLAG=1 ORDER BY DOMICILE_NAME"; $rsDomicile = OCIParse($conn,$selDomicile); OCIExecute($rsDomicile); $Select_Domicile = ""; while(OCIFetchInto($rsDomicile,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["DOMICILE_CODE"]; $tableShow = $mod_row["DOMICILE_NAME"]; if ($tableValue == $oldvalue) $Select_Domicile = $Select_Domicile . ""; else $Select_Domicile = $Select_Domicile . ""; } // end for return $Select_Domicile; } // end function function GB_DomicileList ($oldvalue,$conn) { $selDomicile = "select DOMICILE_NAME, DOMICILE_CODE from DOMICILE WHERE DOMICILE_CODE = 61"; $rsDomicile = OCIParse($conn,$selDomicile); OCIExecute($rsDomicile); $Select_Domicile = ""; while(OCIFetchInto($rsDomicile,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["DOMICILE_CODE"]; $tableShow = $mod_row["DOMICILE_NAME"]; if ($tableValue == $oldvalue) $Select_Domicile = $Select_Domicile . ""; else $Select_Domicile = $Select_Domicile . ""; } // end for //echo $Select_Domicile; exit; return $Select_Domicile; } // end function function AgeRelaxListnew ($oldvalue,$conn) { $selCenter = "select GR_AGE_RELAX_DESC, GR_AGE_RELAX_ID from GR_AGE_RELAX ORDER BY GR_AGE_RELAX_ID"; $rsCenter = OCIParse($conn,$selCenter); OCIExecute($rsCenter); $Select_Center = ""; while(OCIFetchInto($rsCenter,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["GR_AGE_RELAX_ID"]; $tableShow = $mod_row["GR_AGE_RELAX_DESC"]; if ($tableValue == $oldvalue) $Select_Center = $Select_Center . "\n"; else $Select_Center = $Select_Center . "\n"; } // end for return $Select_Center; } // end function function ReligionList ($job_id,$domicile_code,$conn) { //Start: To Get Province ID by Domicile Code $q="select p.gr_province_id from gr_province p, domicile d where p.gr_province_id=d.prov_id and d.domicile_code=" . $domicile_code; $q_parse=OCIParse($conn,$q); OCIExecute($q_parse); OCIFetchInto($q_parse,$q_row, OCI_ASSOC); $province_id= $q_row["GR_PROVINCE_ID"]; //End: To Get Province ID by Domicile Code //Start: To Get Parent Id for Sub Cases by SE $query1="select parent_id from gr_job_post where gr_job_id=".$job_id; $rgender= OCIParse($conn,$query1); OCIExecute($rgender); OCIFetchInto($rgender,$mod_row1, OCI_ASSOC); if($mod_row1['PARENT_ID']) $job_id = $mod_row1['PARENT_ID']; else $job_id = $job_id; // End: To Get Parent Id for Sub Cases by SE $selReligion = "select t.gr_eligible_religion from gr_post_calculation t where t.gr_post_id=" . $job_id . " and t.gr_province_id=" . $province_id; $rsReligion = OCIParse($conn,$selReligion); OCIExecute($rsReligion); $Select_Religion = ""; $Select_Religion = ""; OCIFetchInto($rsReligion,$mod_row, OCI_ASSOC); $tableValue = $mod_row["GR_ELIGIBLE_RELIGION"]; if ($tableValue == "0"){ $Select_Religion = $Select_Religion . ""; } if ($tableValue == "1"){ $Select_Religion = $Select_Religion . ""; } return $Select_Religion; } function CenterListnew ($oldvalue,$conn) { $selCenter = "select CENTER_NAME, CENTER_CODE,CENTER_ID from CENTER where GR_CENTER = 1 ORDER BY Center_NAME"; $rsCenter = OCIParse($conn,$selCenter); OCIExecute($rsCenter); $Select_Center = ""; $Select_Center = ""; while(OCIFetchInto($rsCenter,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["CENTER_ID"]; $tableShow = $mod_row["CENTER_NAME"]; if ($tableValue == $oldvalue) $Select_Center = $Select_Center . "\n"; else $Select_Center = $Select_Center . "\n"; } // end for return $Select_Center; } function InterviewListnew ($oldvalue,$conn) { $selCenter = "select CENTER_NAME, CENTER_CODE,CENTER_ID from CENTER where INTERVIEW_CENTER = 1 ORDER BY Center_NAME"; $rsCenter = OCIParse($conn,$selCenter); OCIExecute($rsCenter); $Select_Center = ""; $Select_Center = ""; while(OCIFetchInto($rsCenter,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["CENTER_ID"]; $tableShow = $mod_row["CENTER_NAME"]; if ($tableValue == $oldvalue) $Select_Center = $Select_Center . "\n"; else $Select_Center = $Select_Center . "\n"; } // end for return $Select_Center; } function validjobs ($conn) { $query = "select jp.GR_JOB_ID, 'F.4-'||jp.gr_case_no||'/'||trim(to_char(jp.GR_JOB_POST_DATE,'YYYY'))||'-R ['||jp.gr_job_title||']'||js.gr_sub_name as GR_JOB_TITLE from GR_JOB_POST jp, gr_job_subs js, gr_job_sub_depend jsd where jp.gr_job_id = jsd.gr_dep_job_id(+) and jsd.gr_sub_id = js.gr_sub_id(+) and jp.gr_job_online = 1 and jp.gr_job_id not in (8173,8224,8225,8288) and GR_ADVERT_ID in( select GR_ADVERTISEMENT_ID from GR_POST_ADVERTISEMENT where (trunc(SYSDATE) - trunc(CLOSE_DATE)) <= 0) order by jp.gr_job_id, to_number(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(jp.gr_case_no,'A',''),'B',''),'C',''),'D',''),'E',''),'F',''),'G',''),'H',''),'I',''),'J',''),'K',''),'L',''),'M',''),'N',''),'O',''),'P',''),'Q',''),'R',''),'S',''),'T',''),'U',''),'V',''),'W',''),'X',''),'Y',''),'Z','')) "; /* $query = "select jp.GR_JOB_ID, 'F.4-'||jp.gr_case_no||'/'||trim(to_char(jp.GR_JOB_POST_DATE,'YYYY'))||'-R ['||jp.gr_job_title||']'||js.gr_sub_name as GR_JOB_TITLE from GR_JOB_POST jp, gr_job_subs js, gr_job_sub_depend jsd where jp.gr_job_id = jsd.gr_dep_job_id(+) and jsd.gr_sub_id = js.gr_sub_id(+) and jp.gr_job_online = 1 and jp.gr_job_id not in (7094) and GR_ADVERT_ID =2117"; */ $rjobs = OCIParse($conn,$query); OCIExecute($rjobs); $Select_jobs = ""; while(OCIFetchInto($rjobs,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["GR_JOB_ID"]; $tableShow = $mod_row["GR_JOB_TITLE"]; $Select_jobs = $Select_jobs . ""; } // end while return $Select_jobs; } // end function function validgender ($job_id,$domicile_code,$conn) { //Start: To Get Province ID by Domicile Code $q_province="select p.gr_province_id from gr_province p, domicile d where p.gr_province_id=d.prov_id and d.domicile_code=" . $domicile_code; $province_parse=OCIParse($conn,$q_province); OCIExecute($province_parse); OCIFetchInto($province_parse,$province_row, OCI_ASSOC); $province_id= $province_row["GR_PROVINCE_ID"]; //End: To Get Province ID by Domicile Code //Start: To Get Parent Id for Sub Cases by SE $query1="select parent_id from gr_job_post where gr_job_id=".$job_id; $rgender= OCIParse($conn,$query1); OCIExecute($rgender); OCIFetchInto($rgender,$mod_row1, OCI_ASSOC); if($mod_row1['PARENT_ID']) $job_id = $mod_row1['PARENT_ID']; else $job_id = $job_id; // End: To Get Parent Id for Sub Cases by SE // job_id & province_id query $query="select GR_ELIGIBLE_GENDER from gr_post_calculation c where c.gr_post_id=".$job_id . " and c.gr_province_id=".$province_id; $rgender = OCIParse($conn,$query); OCIExecute($rgender); $select_genders = ""; OCIFetchInto($rgender,$mod_row, OCI_ASSOC); $tableValue = $mod_row["GR_ELIGIBLE_GENDER"]; //print_r($mod_row); if($tableValue=="0"){ $select_genders.= ""; } if($tableValue=="1"){ $select_genders.= ""; } if($tableValue=="2"){ $select_genders.= ""; } //$select_genders = '"; return $select_genders; } // end function /* Old Backup - 25-09-2017 function validgender ($job_id,$conn) { $query = "select t.gr_eligible_gender from gr_job_post t where gr_job_id=" . $job_id; $rgender = OCIParse($conn,$query); OCIExecute($rgender); $select_genders=""; OCIFetchInto($rgender,$mod_row, OCI_ASSOC); $tableValue = $mod_row["GR_ELIGIBLE_GENDER"]; //print_r($mod_row); if($tableValue=="BOTH"){ $select_genders = ""; } if($tableValue=="MALE"){ $select_genders = ""; } if($tableValue=="FEMALE"){ $select_genders = ""; } $select_genders = '"; return $select_genders; } // end function */ function validdomicile ($job_id,$conn) { /*Ad No.02/2019 for Job Ids 7412,7413,7414,7415 */ $Select_Domicile=""; if($job_id==7412){ $Select_Domicile = $Select_Domicile . ""; return $Select_Domicile; } if($job_id==7413){ $Select_Domicile = $Select_Domicile . ""; return $Select_Domicile; } if($job_id==7414){ $Select_Domicile = $Select_Domicile . ""; return $Select_Domicile; } if($job_id==7415){ $Select_Domicile = $Select_Domicile . ""; return $Select_Domicile; } /*Ad No.02/2019 for Job Ids 7412,7413,7414,7415 */ $query = "select distinct d.domicile_code, d.domicile_name, pr.gr_province_name, t.gr_province_id, jp.northarea from domicile d, gr_post_calculation t, gr_province pr, gr_job_post jp where d.prov_id(+)=pr.gr_province_id and pr.gr_province_id!=3 and pr.gr_province_id=t.gr_province_id and nvl(jp.parent_id,jp.gr_job_id) = t.gr_post_id and t.gr_post_id in(select nvl(parent_id,gr_job_id) from gr_job_post p where gr_post_allocation>0 and p.gr_job_id=" . $job_id . ") order by t.gr_province_id"; $rprovinces = OCIParse($conn,$query); OCIExecute($rprovinces); $Select_provinces = ""; while(OCIFetchInto($rprovinces,$mod_row, OCI_ASSOC)) { if($mod_row["GR_PROVINCE_ID"]==1 && $job_id==7743){ return ICT_DomicileList('',$conn); } if($mod_row["GR_PROVINCE_ID"]==1){ return DomicileList('',$conn); } if($mod_row["GR_PROVINCE_ID"]==8 && $mod_row["NORTHAREA"]==1){ return GB_DomicileList('',$conn); } $tableValue = $mod_row["DOMICILE_CODE"]; $tableShow = $mod_row["DOMICILE_NAME"]; $Select_provinces = $Select_provinces . ""; } // end for return $Select_provinces; } // end function function new_application($data,$conn){ /* $sql= "INSERT INTO NEW_GR_APP_PER_EDU ( GR_APPLICANT_ID, GR_APPLICANT_NAME, GR_JOB_ID, GR_DOB, GR_NEW_NIC, GR_APPLICANT_EMAIL, GR_APP_MOBILE ) VALUES( SQ_GR_LOGIN_INFORMATION.NEXTVAL, '$data->gr_applicant_name', '$data->gr_job_id', to_date('$data->gr_dob','dd-mm-yyyy'), '$data->gr_cnic', '$data->gr_email', '923335556444')"; //return $sql; $sql_ins_stmt = OCIParse($conn, $sql); if (OCIExecute($sql_ins_stmt)) { return "1"; }else{ return OCIError(); } */ $sql= "INSERT INTO NEW_GR_APP ( GR_APPLICANT_ID, GR_APPLICANT_NAME, GR_FATHER_NAME, GR_DOB, GR_CNIC_ISSUE, GR_NEW_NIC, GR_GENDER, GR_RELIGION, GR_POSTAL_ADD, GR_APPLICANT_EMAIL, GR_APPLICANT_PHONE_OFF, GR_APP_MOBILE, GR_AGEREX1, GR_RELAX_YEARS, GR_DOMICILE, GR_DISTRICT_DOMICILE, GR_DISABILITY, GR_HELPER, GR_JOB_ID, TR_DATE, GR_AMOUNT, GR_BANK_BRANCH_NAME, GR_BANK_CODE, GR_BANK_DISTRICT, DATE_APPLIED, GR_CENTER_ID, GR_CENTER_NAME, GR_INTERVIEW_ID, GR_INTERVIEW_NAME, GR_REQUIRED_QUALEXP, GR_RDD, GR_EXAMINATION_ID1, GR_EXAMINATION_NAME1, GR_RESULT_DATE1, GR_UNIVERSITY_ID1, GR_UNIVERSITY_NAME1, GR_BOARD_OTHER1, GR_GRADE1, GR_DIVISION1, GR_CGP1, GR_MAJOR_COURSE_WORKS1, GR_EXAMINATION_ID2, GR_EXAMINATION_NAME2, GR_RESULT_DATE2, GR_UNIVERSITY_ID2, GR_UNIVERSITY_NAME2, GR_BOARD_OTHER2, GR_GRADE2, GR_DIVISION2, GR_CGP2, GR_MAJOR_COURSE_WORKS2, GR_EXAMINATION_ID3, GR_EXAMINATION_NAME3, GR_RESULT_DATE3, GR_UNIVERSITY_ID3, GR_UNIVERSITY_NAME3, GR_BOARD_OTHER3, GR_GRADE3, GR_DIVISION3, GR_CGP3, GR_MAJOR_COURSE_WORKS3, GR_EXAMINATION_ID4, GR_EXAMINATION_NAME4, GR_RESULT_DATE4, GR_UNIVERSITY_ID4, GR_UNIVERSITY_NAME4, GR_BOARD_OTHER4, GR_GRADE4, GR_DIVISION4, GR_CGP4, GR_MAJOR_COURSE_WORKS4, GR_EXAMINATION_ID5, GR_EXAMINATION_NAME5, GR_RESULT_DATE5, GR_UNIVERSITY_ID5, GR_UNIVERSITY_NAME5, GR_BOARD_OTHER5, GR_GRADE5, GR_DIVISION5, GR_CGP5, GR_MAJOR_COURSE_WORKS5, GR_POST_NAME1, GR_BPS1, GR_ORGANIZATION_NAME1, GR_EXP_FROM_DATE1, GR_EXP_TO_DATE1, GR_JOB_STATUS1, GR_JOB_NATURE1, GR_MAIN_DUTIES1, GR_POST_NAME2, GR_BPS2, GR_ORGANIZATION_NAME2, GR_EXP_FROM_DATE2, GR_EXP_TO_DATE2, GR_JOB_STATUS2, GR_JOB_NATURE2, GR_MAIN_DUTIES2, GR_POST_NAME3, GR_BPS3, GR_ORGANIZATION_NAME3, GR_EXP_FROM_DATE3, GR_EXP_TO_DATE3, GR_JOB_STATUS3, GR_JOB_NATURE3, GR_MAIN_DUTIES3, GR_POST_NAME4, GR_BPS4, GR_ORGANIZATION_NAME4, GR_EXP_FROM_DATE4, GR_EXP_TO_DATE4, GR_JOB_STATUS4, GR_JOB_NATURE4, GR_MAIN_DUTIES4, GR_POST_NAME5, GR_BPS5, GR_ORGANIZATION_NAME5, GR_EXP_FROM_DATE5, GR_EXP_TO_DATE5, GR_JOB_STATUS5, GR_JOB_NATURE5, GR_MAIN_DUTIES5, GR_NHMP_EMPLOYEE, GR_NHMP_BELT_NUMBER, GR_NHMP_DESIGNATION, GR_NHMP_PLACE_OF_POSTING, GR_PHOTO ) VALUES( SQ_NEW_GR_APP.NEXTVAL, trim(upper(:GR_APPLICANT_NAME)), trim(upper(:GR_FATHER_NAME)), to_date(:GR_DOB,'dd-mm-yyyy'), to_date(:GR_CNIC_ISSUE,'dd-mm-yyyy'), :GR_NEW_NIC, :GR_GENDER, :GR_RELIGION, upper(:GR_POSTAL_ADD1)||', '||upper(:GR_POSTAL_ADD2), lower(:GR_APPLICANT_EMAIL), :GR_APPLICANT_PHONE_OFF, :GR_APP_MOBILE, upper(:GR_AGEREX1), :GR_RELAX_YEARS, upper(:GR_DOMICILE), upper(:GR_DISTRICT_DOMICILE), upper(:GR_DISABILITY), upper(:GR_HELPER), :GR_JOB_ID, to_date(:TR_DATE,'dd-mm-yyyy'), :GR_AMOUNT, :GR_BANK_BRANCH_NAME, :GR_BANK_CODE, :GR_BANK_DISTRICT, to_date(:DATE_APPLIED,'dd-mm-yyyy hh:mi:ss AM'), :GR_CENTER_ID, upper(:GR_CENTER_NAME), :GR_INTERVIEW_ID, upper(:GR_INTERVIEW_NAME), :GR_REQUIRED_QUALEXP, to_date(:GR_RDD,'dd-mm-yyyy'), :GR_EXAMINATION_ID1, :GR_EXAMINATION_NAME1, to_date(:GR_RESULT_DATE1,'dd-mm-yyyy'), :GR_UNIVERSITY_ID1, :GR_UNIVERSITY_NAME1, :GR_BOARD_OTHER1, :GR_GRADE1, :GR_DIVISION1, :GR_CGP1, :GR_MAJOR_COURSE_WORKS1, :GR_EXAMINATION_ID2, :GR_EXAMINATION_NAME2, to_date(:GR_RESULT_DATE2,'dd-mm-yyyy'), :GR_UNIVERSITY_ID2, :GR_UNIVERSITY_NAME2, :GR_BOARD_OTHER2, :GR_GRADE2, :GR_DIVISION2, :GR_CGP2, :GR_MAJOR_COURSE_WORKS2, :GR_EXAMINATION_ID3, :GR_EXAMINATION_NAME3, to_date(:GR_RESULT_DATE3,'dd-mm-yyyy'), :GR_UNIVERSITY_ID3, :GR_UNIVERSITY_NAME3, :GR_BOARD_OTHER3, :GR_GRADE3, :GR_DIVISION3, :GR_CGP3, :GR_MAJOR_COURSE_WORKS3, :GR_EXAMINATION_ID4, :GR_EXAMINATION_NAME4, to_date(:GR_RESULT_DATE4,'dd-mm-yyyy'), :GR_UNIVERSITY_ID4, :GR_UNIVERSITY_NAME4, :GR_BOARD_OTHER4, :GR_GRADE4, :GR_DIVISION4, :GR_CGP4, :GR_MAJOR_COURSE_WORKS4, :GR_EXAMINATION_ID5, :GR_EXAMINATION_NAME5, to_date(:GR_RESULT_DATE5,'dd-mm-yyyy'), :GR_UNIVERSITY_ID5, :GR_UNIVERSITY_NAME5, :GR_BOARD_OTHER5, :GR_GRADE5, :GR_DIVISION5, :GR_CGP5, :GR_MAJOR_COURSE_WORKS5, :GR_POST_NAME1, :GR_BPS1, :GR_ORGANIZATION_NAME1, to_date(:GR_EXP_FROM_DATE1,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE1,'dd-mm-yyyy'), :GR_JOB_STATUS1, :GR_JOB_NATURE1, :GR_MAIN_DUTIES1, :GR_POST_NAME2, :GR_BPS2, :GR_ORGANIZATION_NAME2, to_date(:GR_EXP_FROM_DATE2,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE2,'dd-mm-yyyy'), :GR_JOB_STATUS2, :GR_JOB_NATURE2, :GR_MAIN_DUTIES2, :GR_POST_NAME3, :GR_BPS3, :GR_ORGANIZATION_NAME3, to_date(:GR_EXP_FROM_DATE3,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE3,'dd-mm-yyyy'), :GR_JOB_STATUS3, :GR_JOB_NATURE3, :GR_MAIN_DUTIES3, :GR_POST_NAME4, :GR_BPS4, :GR_ORGANIZATION_NAME4, to_date(:GR_EXP_FROM_DATE4,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE4,'dd-mm-yyyy'), :GR_JOB_STATUS4, :GR_JOB_NATURE4, :GR_MAIN_DUTIES4, :GR_POST_NAME5, :GR_BPS5, :GR_ORGANIZATION_NAME5, to_date(:GR_EXP_FROM_DATE5,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE5,'dd-mm-yyyy'), :GR_JOB_STATUS5, :GR_JOB_NATURE5, :GR_MAIN_DUTIES5, :GR_NHMP_EMPLOYEE, :GR_NHMP_BELT_NUMBER, :GR_NHMP_DESIGNATION, :GR_NHMP_PLACE_OF_POSTING, EMPTY_BLOB() ) returning GR_PHOTO ,GR_APPLICANT_ID INTO :GR_PHOTO, :GR_APPLICANT_ID"; $lob = OCINewDescriptor($conn, OCI_D_LOB); $stid = ociparse($conn, $sql); //$mobile_num=03+str_replace(substr($data->gr_mobile,strpos($data->gr_mobile,'3')),'-',''); //echo $data->gr_helper."----".$data->gr_disability; $mobile_num='92'.str_replace('-','',substr($data->gr_mobile,strpos($data->gr_mobile,'3'))); $current_date=date('d-m-Y h:i:s A'); //var_dump($data);exit; //print_r($data);exit; $GR_APPLICANT_ID="-1"; OCIBindByName($stid, ':GR_PHOTO', $lob, -1, OCI_B_BLOB); OCIBindByName($stid, ':GR_APPLICANT_ID', $GR_APPLICANT_ID, 32); //echo "---".$data->gr_education[0]->degree_text; exit; ocibindbyname($stid, ':GR_APPLICANT_NAME', $data->gr_applicant_name); ocibindbyname($stid, ':GR_FATHER_NAME', $data->gr_father_name); ocibindbyname($stid, ':GR_DOB', $data->gr_dob); ocibindbyname($stid, ':GR_CNIC_ISSUE', $data->gr_cnic_issue); ocibindbyname($stid, ':GR_NEW_NIC', $data->gr_cnic); ocibindbyname($stid, ':GR_GENDER', $data->gr_gender); ocibindbyname($stid, ':GR_RELIGION', $data->gr_religion); ocibindbyname($stid, ':GR_POSTAL_ADD1', $data->gr_postal_adress1); ocibindbyname($stid, ':GR_POSTAL_ADD2', $data->gr_postal_adress2); ocibindbyname($stid, ':GR_APPLICANT_EMAIL', $data->gr_email); ocibindbyname($stid, ':GR_APPLICANT_PHONE_OFF', $data->gr_phone_off); ocibindbyname($stid, ':GR_APP_MOBILE', $mobile_num); ocibindbyname($stid, ':GR_AGEREX1', $data->gr_age_relaxation); ocibindbyname($stid, ':GR_RELAX_YEARS', $data->gr_relaxation_years); ocibindbyname($stid, ':GR_DOMICILE', $data->gr_domicile); ocibindbyname($stid, ':GR_DISTRICT_DOMICILE', $data->gr_district); ocibindbyname($stid, ':GR_DISABILITY', $data->gr_disability); ocibindbyname($stid, ':GR_HELPER', $data->gr_helper); ocibindbyname($stid, ':GR_JOB_ID', $data->gr_job_id); ocibindbyname($stid, ':TR_DATE', $data->gr_TR_Date); ocibindbyname($stid, ':GR_AMOUNT', $data->gr_TR_Amount); ocibindbyname($stid, ':GR_BANK_BRANCH_NAME', $data->gr_TR_Bank_Branch_Name); ocibindbyname($stid, ':GR_BANK_CODE', $data->gr_TR_Bank_Code); ocibindbyname($stid, ':GR_BANK_DISTRICT', $data->gr_TR_Bank_District); ocibindbyname($stid, ':DATE_APPLIED', $current_date); ocibindbyname($stid, ':GR_CENTER_ID', $data->gr_test_centre); ocibindbyname($stid, ':GR_CENTER_NAME', $data->gr_test_centre_name); ocibindbyname($stid, ':GR_INTERVIEW_ID', $data->gr_interview_centre); ocibindbyname($stid, ':GR_INTERVIEW_NAME', $data->gr_interview_centre_name); ocibindbyname($stid, ':GR_RDD', $data->gr_RDD); ocibindbyname($stid, ':GR_REQUIRED_QUALEXP', $data->gr_REQUIRED_QUALEXP); ocibindbyname($stid, ':GR_EXAMINATION_ID1', $data->gr_education[0]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME1', $data->gr_education[0]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE1', $data->gr_education[0]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID1', $data->gr_education[0]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME1', $data->gr_education[0]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER1', $data->gr_education[0]->other_institute); ocibindbyname($stid, ':GR_GRADE1', $data->gr_education[0]->grade); ocibindbyname($stid, ':GR_DIVISION1', $data->gr_education[0]->division); ocibindbyname($stid, ':GR_CGP1', $data->gr_education[0]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS1', $data->gr_education[0]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID2', $data->gr_education[1]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME2', $data->gr_education[1]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE2', $data->gr_education[1]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID2', $data->gr_education[1]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME2', $data->gr_education[1]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER2', $data->gr_education[1]->other_institute); ocibindbyname($stid, ':GR_GRADE2', $data->gr_education[1]->grade); ocibindbyname($stid, ':GR_DIVISION2', $data->gr_education[1]->division); ocibindbyname($stid, ':GR_CGP2', $data->gr_education[1]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS2', $data->gr_education[1]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID3', $data->gr_education[2]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME3', $data->gr_education[2]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE3', $data->gr_education[2]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID3', $data->gr_education[2]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME3', $data->gr_education[2]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER3', $data->gr_education[2]->other_institute); ocibindbyname($stid, ':GR_GRADE3', $data->gr_education[2]->grade); ocibindbyname($stid, ':GR_DIVISION3', $data->gr_education[2]->division); ocibindbyname($stid, ':GR_CGP3', $data->gr_education[2]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS3', $data->gr_education[2]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID4', $data->gr_education[3]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME4', $data->gr_education[3]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE4', $data->gr_education[3]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID4', $data->gr_education[3]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME4', $data->gr_education[3]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER4', $data->gr_education[3]->other_institute); ocibindbyname($stid, ':GR_GRADE4', $data->gr_education[3]->grade); ocibindbyname($stid, ':GR_DIVISION4', $data->gr_education[3]->division); ocibindbyname($stid, ':GR_CGP4', $data->gr_education[3]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS4', $data->gr_education[3]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID5', $data->gr_education[4]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME5', $data->gr_education[4]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE5', $data->gr_education[4]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID5', $data->gr_education[4]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME5', $data->gr_education[4]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER5', $data->gr_education[4]->other_institute); ocibindbyname($stid, ':GR_GRADE5', $data->gr_education[4]->grade); ocibindbyname($stid, ':GR_DIVISION5', $data->gr_education[4]->division); ocibindbyname($stid, ':GR_CGP5', $data->gr_education[4]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS5', $data->gr_education[4]->major_subjects); ocibindbyname($stid, ':GR_POST_NAME1', $data->gr_experience[0]->experience_post); ocibindbyname($stid, ':GR_BPS1', $data->gr_experience[0]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME1', $data->gr_experience[0]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE1', $data->gr_experience[0]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE1', $data->gr_experience[0]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS1', $data->gr_experience[0]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE1', $data->gr_experience[0]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES1', $data->gr_experience[0]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME2', $data->gr_experience[1]->experience_post); ocibindbyname($stid, ':GR_BPS2', $data->gr_experience[1]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME2', $data->gr_experience[1]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE2', $data->gr_experience[1]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE2', $data->gr_experience[1]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS2', $data->gr_experience[1]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE2', $data->gr_experience[1]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES2', $data->gr_experience[1]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME3', $data->gr_experience[2]->experience_post); ocibindbyname($stid, ':GR_BPS3', $data->gr_experience[2]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME3', $data->gr_experience[2]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE3', $data->gr_experience[2]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE3', $data->gr_experience[2]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS3', $data->gr_experience[2]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE3', $data->gr_experience[2]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES3', $data->gr_experience[2]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME4', $data->gr_experience[3]->experience_post); ocibindbyname($stid, ':GR_BPS4', $data->gr_experience[3]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME4', $data->gr_experience[3]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE4', $data->gr_experience[3]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE4', $data->gr_experience[3]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS4', $data->gr_experience[3]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE4', $data->gr_experience[3]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES4', $data->gr_experience[3]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME5', $data->gr_experience[4]->experience_post); ocibindbyname($stid, ':GR_BPS5', $data->gr_experience[4]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME5', $data->gr_experience[4]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE5', $data->gr_experience[4]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE5', $data->gr_experience[4]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS5', $data->gr_experience[4]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE5', $data->gr_experience[4]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES5', $data->gr_experience[4]->experience_duties); /*Implemented for Adv No 01/2019 for NHMP Departmental Posts of Petrol Office */ if($data->gr_nhmp_employee=="YES") { ocibindbyname($stid, ':GR_NHMP_EMPLOYEE', $data->gr_nhmp_employee); ocibindbyname($stid, ':GR_NHMP_BELT_NUMBER', $data->gr_nhmp_belt_number); ocibindbyname($stid, ':GR_NHMP_DESIGNATION', $data->gr_nhmp_designation); ocibindbyname($stid, ':GR_NHMP_PLACE_OF_POSTING', $data->gr_nhmp_place_of_posting); } else { $tmp=null; ocibindbyname($stid, ':GR_NHMP_EMPLOYEE', $tmp); ocibindbyname($stid, ':GR_NHMP_BELT_NUMBER', $tmp); ocibindbyname($stid, ':GR_NHMP_DESIGNATION', $tmp); ocibindbyname($stid, ':GR_NHMP_PLACE_OF_POSTING', $tmp); } $_SESSION['cnic']=$data->gr_cnic; $_SESSION['job']=$data->gr_job_id; session_write_close(); $r = OCIExecute($stid, OCI_DEFAULT); if($data->gr_picture_path!=""){ if ($lob->savefile($data->gr_picture_path)){ OCICommit($conn); } }else{OCICommit($conn);} if ($r) { // sms code $sql_sms_app="select t.gr_applicant_id, t.gr_app_mobile, s.case_no, s.job_title, t.gr_center_name from new_gr_app t, gr_job_cache s where t.gr_job_id=s.gr_job_id and t.gr_applicant_id = $GR_APPLICANT_ID"; //echo $sql_sms; $rs_sms_app=OCIParse($conn,$sql_sms_app); OCIExecute($rs_sms_app); OCIFetchInto($rs_sms_app,$rs_sms_data_app,OCI_ASSOC); $sms_track_id_app=$rs_sms_data_app["GR_APPLICANT_ID"]; $sms_mobile_app=$rs_sms_data_app["GR_APP_MOBILE"]; $sms_case_no_app=$rs_sms_data_app["CASE_NO"]; $sms_job_title_app=$rs_sms_data_app["JOB_TITLE"]; $sms_gr_center_app=$rs_sms_data_app["GR_CENTER_NAME"]; //SendJobSMS(); // Should be commented as following code is directly embedded $response = file_get_contents('https://bsms.ufone.com/bsms_v8_api/sendapi-0.3.jsp?id=03318590247&message=Your%20Application%20for%20'.urlencode($sms_case_no_app).'%20'.urlencode($sms_job_title_app).'%20received.%20Application%20Tracking%20ID='.urlencode($sms_track_id_app).'%20You%20opted%20test%20center%20at%20'.urlencode($sms_gr_center_app).'&shortcode=FPSC&lang=English&mobilenum='.urlencode($sms_mobile_app).'&password=Ufone_123'); //$response = file_get_contents('https://bsms.ufone.com/bsms_v8_api/sendapi-0.3.jsp?id=03318590247&message=Your%20Application%20has%20been%20submitted%20Successfully%20for%20CE-2020.%20Your%20tracking%20id%20is%20'.urlencode($sms_track_id).'%20and%20you%20have%20chosen%20'.urlencode($sms_test_centre).'%20as%20your%20Exam%20Centre.%20Helpline%20051-111-000-248&shortcode=FPSC&lang=English&mobilenum='.urlencode($sms_mobile).'&password=Ufone_123'); smtpmailer($data->gr_email, 'noreply@fpsc.gov.pk', 'webmanagerfpsc@fpsc.gov.pk', 'FPSC', 'FPSC ONLINE RECRUITMENT SYSTEM', "Your Application has been received in $data->gr_job_name ,
Your tracking id is $GR_APPLICANT_ID




Important Notice:
No hard copy of your application, documents or Bank Challan/Treasury Receipt is required to be sent to FPSC at this stage. The Bank Challan/Treasury Receipt should be preserved and presented at time of test/examination.



Note: This is system generated e-mail. Please do not reply.

Federal Public Service Commission, Islamabad"); $lob->free(); OCIFreeStatement($stid); return $GR_APPLICANT_ID; }else{ return OCIError(); } $lob->free(); OCIFreeStatement($stid); } function new_application_without_pic($data,$conn){ /* $sql= "INSERT INTO NEW_GR_APP_PER_EDU ( GR_APPLICANT_ID, GR_APPLICANT_NAME, GR_JOB_ID, GR_DOB, GR_NEW_NIC, GR_APPLICANT_EMAIL, GR_APP_MOBILE ) VALUES( SQ_GR_LOGIN_INFORMATION.NEXTVAL, '$data->gr_applicant_name', '$data->gr_job_id', to_date('$data->gr_dob','dd-mm-yyyy'), '$data->gr_cnic', '$data->gr_email', '923335556444')"; //return $sql; $sql_ins_stmt = OCIParse($conn, $sql); if (OCIExecute($sql_ins_stmt)) { return "1"; }else{ return OCIError(); } */ $sql= "INSERT INTO NEW_GR_APP ( GR_APPLICANT_ID, GR_APPLICANT_NAME, GR_FATHER_NAME, GR_DOB, GR_CNIC_ISSUE, GR_NEW_NIC, GR_GENDER, GR_RELIGION, GR_POSTAL_ADD, GR_APPLICANT_EMAIL, GR_APPLICANT_PHONE_OFF, GR_APP_MOBILE, GR_AGEREX1, GR_RELAX_YEARS, GR_DOMICILE, GR_DISTRICT_DOMICILE, GR_DISABILITY, GR_HELPER, GR_JOB_ID, TR_DATE, GR_AMOUNT, GR_BANK_BRANCH_NAME, GR_BANK_CODE, GR_BANK_DISTRICT, DATE_APPLIED, GR_CENTER_ID, GR_CENTER_NAME, GR_INTERVIEW_ID, GR_INTERVIEW_NAME, GR_REQUIRED_QUALEXP, GR_RDD, GR_EXAMINATION_ID1, GR_EXAMINATION_NAME1, GR_RESULT_DATE1, GR_UNIVERSITY_ID1, GR_UNIVERSITY_NAME1, GR_BOARD_OTHER1, GR_GRADE1, GR_DIVISION1, GR_CGP1, GR_MAJOR_COURSE_WORKS1, GR_EXAMINATION_ID2, GR_EXAMINATION_NAME2, GR_RESULT_DATE2, GR_UNIVERSITY_ID2, GR_UNIVERSITY_NAME2, GR_BOARD_OTHER2, GR_GRADE2, GR_DIVISION2, GR_CGP2, GR_MAJOR_COURSE_WORKS2, GR_EXAMINATION_ID3, GR_EXAMINATION_NAME3, GR_RESULT_DATE3, GR_UNIVERSITY_ID3, GR_UNIVERSITY_NAME3, GR_BOARD_OTHER3, GR_GRADE3, GR_DIVISION3, GR_CGP3, GR_MAJOR_COURSE_WORKS3, GR_EXAMINATION_ID4, GR_EXAMINATION_NAME4, GR_RESULT_DATE4, GR_UNIVERSITY_ID4, GR_UNIVERSITY_NAME4, GR_BOARD_OTHER4, GR_GRADE4, GR_DIVISION4, GR_CGP4, GR_MAJOR_COURSE_WORKS4, GR_EXAMINATION_ID5, GR_EXAMINATION_NAME5, GR_RESULT_DATE5, GR_UNIVERSITY_ID5, GR_UNIVERSITY_NAME5, GR_BOARD_OTHER5, GR_GRADE5, GR_DIVISION5, GR_CGP5, GR_MAJOR_COURSE_WORKS5, GR_POST_NAME1, GR_BPS1, GR_ORGANIZATION_NAME1, GR_EXP_FROM_DATE1, GR_EXP_TO_DATE1, GR_JOB_STATUS1, GR_JOB_NATURE1, GR_MAIN_DUTIES1, GR_POST_NAME2, GR_BPS2, GR_ORGANIZATION_NAME2, GR_EXP_FROM_DATE2, GR_EXP_TO_DATE2, GR_JOB_STATUS2, GR_JOB_NATURE2, GR_MAIN_DUTIES2, GR_POST_NAME3, GR_BPS3, GR_ORGANIZATION_NAME3, GR_EXP_FROM_DATE3, GR_EXP_TO_DATE3, GR_JOB_STATUS3, GR_JOB_NATURE3, GR_MAIN_DUTIES3, GR_POST_NAME4, GR_BPS4, GR_ORGANIZATION_NAME4, GR_EXP_FROM_DATE4, GR_EXP_TO_DATE4, GR_JOB_STATUS4, GR_JOB_NATURE4, GR_MAIN_DUTIES4, GR_POST_NAME5, GR_BPS5, GR_ORGANIZATION_NAME5, GR_EXP_FROM_DATE5, GR_EXP_TO_DATE5, GR_JOB_STATUS5, GR_JOB_NATURE5, GR_MAIN_DUTIES5, GR_NHMP_EMPLOYEE, GR_NHMP_BELT_NUMBER, GR_NHMP_DESIGNATION, GR_NHMP_PLACE_OF_POSTING ) VALUES( SQ_NEW_GR_APP.NEXTVAL, trim(upper(:GR_APPLICANT_NAME)), trim(upper(:GR_FATHER_NAME)), to_date(:GR_DOB,'dd-mm-yyyy'), to_date(:GR_CNIC_ISSUE,'dd-mm-yyyy'), :GR_NEW_NIC, :GR_GENDER, :GR_RELIGION, upper(:GR_POSTAL_ADD1)||', '||upper(:GR_POSTAL_ADD2), lower(:GR_APPLICANT_EMAIL), :GR_APPLICANT_PHONE_OFF, :GR_APP_MOBILE, upper(:GR_AGEREX1), :GR_RELAX_YEARS, upper(:GR_DOMICILE), upper(:GR_DISTRICT_DOMICILE), upper(:GR_DISABILITY), upper(:GR_HELPER), :GR_JOB_ID, to_date(:TR_DATE,'dd-mm-yyyy'), :GR_AMOUNT, :GR_BANK_BRANCH_NAME, :GR_BANK_CODE, :GR_BANK_DISTRICT, to_date(:DATE_APPLIED,'dd-mm-yyyy hh:mi:ss AM'), :GR_CENTER_ID, upper(:GR_CENTER_NAME), :GR_INTERVIEW_ID, upper(:GR_INTERVIEW_NAME), :GR_REQUIRED_QUALEXP, to_date(:GR_RDD,'dd-mm-yyyy'), :GR_EXAMINATION_ID1, :GR_EXAMINATION_NAME1, to_date(:GR_RESULT_DATE1,'dd-mm-yyyy'), :GR_UNIVERSITY_ID1, :GR_UNIVERSITY_NAME1, :GR_BOARD_OTHER1, :GR_GRADE1, :GR_DIVISION1, :GR_CGP1, :GR_MAJOR_COURSE_WORKS1, :GR_EXAMINATION_ID2, :GR_EXAMINATION_NAME2, to_date(:GR_RESULT_DATE2,'dd-mm-yyyy'), :GR_UNIVERSITY_ID2, :GR_UNIVERSITY_NAME2, :GR_BOARD_OTHER2, :GR_GRADE2, :GR_DIVISION2, :GR_CGP2, :GR_MAJOR_COURSE_WORKS2, :GR_EXAMINATION_ID3, :GR_EXAMINATION_NAME3, to_date(:GR_RESULT_DATE3,'dd-mm-yyyy'), :GR_UNIVERSITY_ID3, :GR_UNIVERSITY_NAME3, :GR_BOARD_OTHER3, :GR_GRADE3, :GR_DIVISION3, :GR_CGP3, :GR_MAJOR_COURSE_WORKS3, :GR_EXAMINATION_ID4, :GR_EXAMINATION_NAME4, to_date(:GR_RESULT_DATE4,'dd-mm-yyyy'), :GR_UNIVERSITY_ID4, :GR_UNIVERSITY_NAME4, :GR_BOARD_OTHER4, :GR_GRADE4, :GR_DIVISION4, :GR_CGP4, :GR_MAJOR_COURSE_WORKS4, :GR_EXAMINATION_ID5, :GR_EXAMINATION_NAME5, to_date(:GR_RESULT_DATE5,'dd-mm-yyyy'), :GR_UNIVERSITY_ID5, :GR_UNIVERSITY_NAME5, :GR_BOARD_OTHER5, :GR_GRADE5, :GR_DIVISION5, :GR_CGP5, :GR_MAJOR_COURSE_WORKS5, :GR_POST_NAME1, :GR_BPS1, :GR_ORGANIZATION_NAME1, to_date(:GR_EXP_FROM_DATE1,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE1,'dd-mm-yyyy'), :GR_JOB_STATUS1, :GR_JOB_NATURE1, :GR_MAIN_DUTIES1, :GR_POST_NAME2, :GR_BPS2, :GR_ORGANIZATION_NAME2, to_date(:GR_EXP_FROM_DATE2,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE2,'dd-mm-yyyy'), :GR_JOB_STATUS2, :GR_JOB_NATURE2, :GR_MAIN_DUTIES2, :GR_POST_NAME3, :GR_BPS3, :GR_ORGANIZATION_NAME3, to_date(:GR_EXP_FROM_DATE3,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE3,'dd-mm-yyyy'), :GR_JOB_STATUS3, :GR_JOB_NATURE3, :GR_MAIN_DUTIES3, :GR_POST_NAME4, :GR_BPS4, :GR_ORGANIZATION_NAME4, to_date(:GR_EXP_FROM_DATE4,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE4,'dd-mm-yyyy'), :GR_JOB_STATUS4, :GR_JOB_NATURE4, :GR_MAIN_DUTIES4, :GR_POST_NAME5, :GR_BPS5, :GR_ORGANIZATION_NAME5, to_date(:GR_EXP_FROM_DATE5,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE5,'dd-mm-yyyy'), :GR_JOB_STATUS5, :GR_JOB_NATURE5, :GR_MAIN_DUTIES5, :GR_NHMP_EMPLOYEE, :GR_NHMP_BELT_NUMBER, :GR_NHMP_DESIGNATION, :GR_NHMP_PLACE_OF_POSTING ) returning GR_APPLICANT_ID INTO :GR_APPLICANT_ID"; //$lob = OCINewDescriptor($conn, OCI_D_LOB); $stid = ociparse($conn, $sql); //$mobile_num=03+str_replace(substr($data->gr_mobile,strpos($data->gr_mobile,'3')),'-',''); //echo $data->gr_helper."----".$data->gr_disability; $mobile_num='92'.str_replace('-','',substr($data->gr_mobile,strpos($data->gr_mobile,'3'))); $current_date=date('d-m-Y h:i:s A'); //var_dump($data);exit; //print_r($data);exit; $GR_APPLICANT_ID="-1"; OCIBindByName($stid, ':GR_APPLICANT_ID', $GR_APPLICANT_ID, 32); //echo "---".$data->gr_education[0]->degree_text; exit; ocibindbyname($stid, ':GR_APPLICANT_NAME', $data->gr_applicant_name); ocibindbyname($stid, ':GR_FATHER_NAME', $data->gr_father_name); ocibindbyname($stid, ':GR_DOB', $data->gr_dob); ocibindbyname($stid, ':GR_CNIC_ISSUE', $data->gr_cnic_issue); ocibindbyname($stid, ':GR_NEW_NIC', $data->gr_cnic); ocibindbyname($stid, ':GR_GENDER', $data->gr_gender); ocibindbyname($stid, ':GR_RELIGION', $data->gr_religion); ocibindbyname($stid, ':GR_POSTAL_ADD1', $data->gr_postal_adress1); ocibindbyname($stid, ':GR_POSTAL_ADD2', $data->gr_postal_adress2); ocibindbyname($stid, ':GR_APPLICANT_EMAIL', $data->gr_email); ocibindbyname($stid, ':GR_APPLICANT_PHONE_OFF', $data->gr_phone_off); ocibindbyname($stid, ':GR_APP_MOBILE', $mobile_num); ocibindbyname($stid, ':GR_AGEREX1', $data->gr_age_relaxation); ocibindbyname($stid, ':GR_RELAX_YEARS', $data->gr_relaxation_years); ocibindbyname($stid, ':GR_DOMICILE', $data->gr_domicile); ocibindbyname($stid, ':GR_DISTRICT_DOMICILE', $data->gr_district); ocibindbyname($stid, ':GR_DISABILITY', $data->gr_disability); ocibindbyname($stid, ':GR_HELPER', $data->gr_helper); ocibindbyname($stid, ':GR_JOB_ID', $data->gr_job_id); ocibindbyname($stid, ':TR_DATE', $data->gr_TR_Date); ocibindbyname($stid, ':GR_AMOUNT', $data->gr_TR_Amount); ocibindbyname($stid, ':GR_BANK_BRANCH_NAME', $data->gr_TR_Bank_Branch_Name); ocibindbyname($stid, ':GR_BANK_CODE', $data->gr_TR_Bank_Code); ocibindbyname($stid, ':GR_BANK_DISTRICT', $data->gr_TR_Bank_District); ocibindbyname($stid, ':DATE_APPLIED', $current_date); ocibindbyname($stid, ':GR_CENTER_ID', $data->gr_test_centre); ocibindbyname($stid, ':GR_CENTER_NAME', $data->gr_test_centre_name); ocibindbyname($stid, ':GR_INTERVIEW_ID', $data->gr_interview_centre); ocibindbyname($stid, ':GR_INTERVIEW_NAME', $data->gr_interview_centre_name); ocibindbyname($stid, ':GR_RDD', $data->gr_RDD); ocibindbyname($stid, ':GR_REQUIRED_QUALEXP', $data->gr_REQUIRED_QUALEXP); ocibindbyname($stid, ':GR_EXAMINATION_ID1', $data->gr_education[0]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME1', $data->gr_education[0]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE1', $data->gr_education[0]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID1', $data->gr_education[0]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME1', $data->gr_education[0]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER1', $data->gr_education[0]->other_institute); ocibindbyname($stid, ':GR_GRADE1', $data->gr_education[0]->grade); ocibindbyname($stid, ':GR_DIVISION1', $data->gr_education[0]->division); ocibindbyname($stid, ':GR_CGP1', $data->gr_education[0]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS1', $data->gr_education[0]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID2', $data->gr_education[1]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME2', $data->gr_education[1]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE2', $data->gr_education[1]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID2', $data->gr_education[1]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME2', $data->gr_education[1]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER2', $data->gr_education[1]->other_institute); ocibindbyname($stid, ':GR_GRADE2', $data->gr_education[1]->grade); ocibindbyname($stid, ':GR_DIVISION2', $data->gr_education[1]->division); ocibindbyname($stid, ':GR_CGP2', $data->gr_education[1]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS2', $data->gr_education[1]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID3', $data->gr_education[2]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME3', $data->gr_education[2]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE3', $data->gr_education[2]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID3', $data->gr_education[2]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME3', $data->gr_education[2]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER3', $data->gr_education[2]->other_institute); ocibindbyname($stid, ':GR_GRADE3', $data->gr_education[2]->grade); ocibindbyname($stid, ':GR_DIVISION3', $data->gr_education[2]->division); ocibindbyname($stid, ':GR_CGP3', $data->gr_education[2]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS3', $data->gr_education[2]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID4', $data->gr_education[3]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME4', $data->gr_education[3]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE4', $data->gr_education[3]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID4', $data->gr_education[3]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME4', $data->gr_education[3]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER4', $data->gr_education[3]->other_institute); ocibindbyname($stid, ':GR_GRADE4', $data->gr_education[3]->grade); ocibindbyname($stid, ':GR_DIVISION4', $data->gr_education[3]->division); ocibindbyname($stid, ':GR_CGP4', $data->gr_education[3]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS4', $data->gr_education[3]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID5', $data->gr_education[4]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME5', $data->gr_education[4]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE5', $data->gr_education[4]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID5', $data->gr_education[4]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME5', $data->gr_education[4]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER5', $data->gr_education[4]->other_institute); ocibindbyname($stid, ':GR_GRADE5', $data->gr_education[4]->grade); ocibindbyname($stid, ':GR_DIVISION5', $data->gr_education[4]->division); ocibindbyname($stid, ':GR_CGP5', $data->gr_education[4]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS5', $data->gr_education[4]->major_subjects); ocibindbyname($stid, ':GR_POST_NAME1', $data->gr_experience[0]->experience_post); ocibindbyname($stid, ':GR_BPS1', $data->gr_experience[0]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME1', $data->gr_experience[0]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE1', $data->gr_experience[0]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE1', $data->gr_experience[0]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS1', $data->gr_experience[0]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE1', $data->gr_experience[0]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES1', $data->gr_experience[0]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME2', $data->gr_experience[1]->experience_post); ocibindbyname($stid, ':GR_BPS2', $data->gr_experience[1]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME2', $data->gr_experience[1]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE2', $data->gr_experience[1]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE2', $data->gr_experience[1]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS2', $data->gr_experience[1]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE2', $data->gr_experience[1]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES2', $data->gr_experience[1]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME3', $data->gr_experience[2]->experience_post); ocibindbyname($stid, ':GR_BPS3', $data->gr_experience[2]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME3', $data->gr_experience[2]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE3', $data->gr_experience[2]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE3', $data->gr_experience[2]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS3', $data->gr_experience[2]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE3', $data->gr_experience[2]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES3', $data->gr_experience[2]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME4', $data->gr_experience[3]->experience_post); ocibindbyname($stid, ':GR_BPS4', $data->gr_experience[3]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME4', $data->gr_experience[3]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE4', $data->gr_experience[3]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE4', $data->gr_experience[3]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS4', $data->gr_experience[3]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE4', $data->gr_experience[3]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES4', $data->gr_experience[3]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME5', $data->gr_experience[4]->experience_post); ocibindbyname($stid, ':GR_BPS5', $data->gr_experience[4]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME5', $data->gr_experience[4]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE5', $data->gr_experience[4]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE5', $data->gr_experience[4]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS5', $data->gr_experience[4]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE5', $data->gr_experience[4]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES5', $data->gr_experience[4]->experience_duties); /*Implemented for Adv No 01/2019 for NHMP Departmental Posts of Petrol Office */ if($data->gr_nhmp_employee=="YES") { ocibindbyname($stid, ':GR_NHMP_EMPLOYEE', $data->gr_nhmp_employee); ocibindbyname($stid, ':GR_NHMP_BELT_NUMBER', $data->gr_nhmp_belt_number); ocibindbyname($stid, ':GR_NHMP_DESIGNATION', $data->gr_nhmp_designation); ocibindbyname($stid, ':GR_NHMP_PLACE_OF_POSTING', $data->gr_nhmp_place_of_posting); } else { $tmp=null; ocibindbyname($stid, ':GR_NHMP_EMPLOYEE', $tmp); ocibindbyname($stid, ':GR_NHMP_BELT_NUMBER', $tmp); ocibindbyname($stid, ':GR_NHMP_DESIGNATION', $tmp); ocibindbyname($stid, ':GR_NHMP_PLACE_OF_POSTING', $tmp); } $_SESSION['cnic']=$data->gr_cnic; $_SESSION['job']=$data->gr_job_id; session_write_close(); $r = OCIExecute($stid, OCI_DEFAULT); OCICommit($conn); if ($r) { // sms code $sql_sms_app="select t.gr_applicant_id, t.gr_app_mobile, s.case_no, s.job_title, t.gr_center_name from new_gr_app t, gr_job_cache s where t.gr_job_id=s.gr_job_id and t.gr_applicant_id = $GR_APPLICANT_ID"; //echo $sql_sms; $rs_sms_app=OCIParse($conn,$sql_sms_app); OCIExecute($rs_sms_app); OCIFetchInto($rs_sms_app,$rs_sms_data_app,OCI_ASSOC); $sms_track_id_app=$rs_sms_data_app["GR_APPLICANT_ID"]; $sms_mobile_app=$rs_sms_data_app["GR_APP_MOBILE"]; $sms_case_no_app=$rs_sms_data_app["CASE_NO"]; $sms_job_title_app=$rs_sms_data_app["JOB_TITLE"]; $sms_gr_center_app=$rs_sms_data_app["GR_CENTER_NAME"]; //SendJobSMS(); // Should be commented as following code is directly embedded $response = file_get_contents('https://bsms.ufone.com/bsms_v8_api/sendapi-0.3.jsp?id=03318590247&message=Your%20Application%20for%20'.urlencode($sms_case_no_app).'%20'.urlencode($sms_job_title_app).'%20received.%20Application%20Tracking%20ID='.urlencode($sms_track_id_app).'%20You%20opted%20test%20center%20at%20'.urlencode($sms_gr_center_app).'&shortcode=FPSC&lang=English&mobilenum='.urlencode($sms_mobile_app).'&password=Ufone_123'); //$response = file_get_contents('https://bsms.ufone.com/bsms_v8_api/sendapi-0.3.jsp?id=03318590247&message=Your%20Application%20has%20been%20submitted%20Successfully%20for%20CE-2020.%20Your%20tracking%20id%20is%20'.urlencode($sms_track_id).'%20and%20you%20have%20chosen%20'.urlencode($sms_test_centre).'%20as%20your%20Exam%20Centre.%20Helpline%20051-111-000-248&shortcode=FPSC&lang=English&mobilenum='.urlencode($sms_mobile).'&password=Ufone_123'); smtpmailer($data->gr_email, 'noreply@fpsc.gov.pk', 'webmanagerfpsc@fpsc.gov.pk', 'FPSC', 'FPSC ONLINE RECRUITMENT SYSTEM', "Your Application has been received in $data->gr_job_name ,
Your tracking id is $GR_APPLICANT_ID




Important Notice:
No hard copy of your application, documents or Bank Challan/Treasury Receipt is required to be sent to FPSC at this stage. The Bank Challan/Treasury Receipt should be preserved and presented at time of test/examination.



Note: This is system generated e-mail. Please do not reply.

Federal Public Service Commission, Islamabad"); OCIFreeStatement($stid); return $GR_APPLICANT_ID; }else{ return OCIError(); } $lob->free(); OCIFreeStatement($stid); } /* Debarred candidate check Implemented from Advertisement No. 01/2015 */ function check_debarred_application($cnic, $job_id, $conn){ $check_deb_status="select count(*) as CNT from debarred_candidates where cnic ='$cnic' and DEBARRED_ACTIVE='Y' and (DEBARRED_FOR_EXAMS = 0 OR DEBARRED_FOR_EXAMS = 2)"; $check_deb_rs = OCIParse($conn, $check_deb_status); OCIExecute($check_deb_rs); OCIFetchInto($check_deb_rs,$cnt_deb_row, OCI_ASSOC); if ($cnt_deb_row["CNT"] > 0) //If any debarred candidate found then return "2" as debarred candidate status { return "2"; }else{ $dup=check_duplicate_application($cnic, $job_id,$conn); // Check for existing application with the same CNIC return $dup; } OCIFreeStatement($check_deb_rs); } function check_duplicate_application($cnic, $job_id,$conn){ $check_job_status="select count(gr_applicant_id) as CNT from new_gr_app where gr_new_nic ='$cnic' and gr_job_id =$job_id"; //echo $check_job_status; exit; $check_job_rs = OCIParse($conn, $check_job_status); OCIExecute($check_job_rs); OCIFetchInto($check_job_rs,$cnt_row, OCI_ASSOC); if ($cnt_row["CNT"] > 0) { return "1"; }else{ return "0"; } OCIFreeStatement($check_job_rs); } function check_withindate_application($job_id,$conn){ $check_job_status="select count(*) as CNTAPP from GR_JOB_POST jp where jp.gr_job_id = $job_id and GR_ADVERT_ID in( select GR_ADVERTISEMENT_ID from GR_POST_ADVERTISEMENT where (trunc(SYSDATE) - trunc(CLOSE_DATE)) <= 0)"; //echo $check_job_status; exit; $check_job_rs = OCIParse($conn, $check_job_status); OCIExecute($check_job_rs); OCIFetchInto($check_job_rs,$cnt_row, OCI_ASSOC); if ($cnt_row["CNTAPP"] > 0) { return "1"; }else{ return "0"; } OCIFreeStatement($check_job_rs); } /* Change of center from ADV 09-2019 -- Duplicate and Valid time checks */ function check_duplicate_centre($job_id,$cnic,$id,$conn){ $check_centre_status="select count(gr_applicant_id) as CNTDUP from gr_centre_change where gr_job_id =$job_id and gr_new_nic ='$cnic' and gr_applicant_id=$id"; //echo $check_job_status; exit; $check_centre_rs = OCIParse($conn, $check_centre_status); OCIExecute($check_centre_rs); OCIFetchInto($check_centre_rs,$cnt_centre_row, OCI_ASSOC); if ($cnt_centre_row["CNTDUP"] > 0) { return "1"; //already change the centre }else{ return "0"; // not change the centre } OCIFreeStatement($check_centre_rs); } function check_withindate_centre($job_id,$conn){ $check_job_status="select count(*) as CNTAPPDATE from GR_JOB_POST jp where jp.gr_job_id = $job_id and (trunc(sysdate)- add_months(jp.gr_tentative_exam_date, -1) <=0)"; //echo $check_job_status; exit; $check_job_rs = OCIParse($conn, $check_job_status); OCIExecute($check_job_rs); OCIFetchInto($check_job_rs,$cnt_row, OCI_ASSOC); if ($cnt_row["CNTAPPDATE"] > 0) { return "1"; //valid application (centre can be change) }else{ return "0"; // date expires or no date provided (centre cannot be changed) } OCIFreeStatement($check_job_rs); } //:: Method For Edit GR Application :: function valid_domicile($job_id,$domicelcode,$conn) { /*Ad No.02/2019 for Job Ids 7412,7413,7414,7415 */ $Select_Domicile=""; if($job_id==7412){ $Select_Domicile = $Select_Domicile . ""; return $Select_Domicile; } if($job_id==7413){ $Select_Domicile = $Select_Domicile . ""; return $Select_Domicile; } if($job_id==7414){ $Select_Domicile = $Select_Domicile . ""; return $Select_Domicile; } if($job_id==7415){ $Select_Domicile = $Select_Domicile . ""; return $Select_Domicile; } /*Ad No.02/2019 for Job Ids 7412,7413,7414,7415 */ $query = "select distinct d.domicile_code, d.domicile_name, pr.gr_province_name, t.gr_province_id, jp.northarea from domicile d, gr_post_calculation t, gr_province pr, gr_job_post jp where d.prov_id(+)=pr.gr_province_id and pr.gr_province_id!=3 and pr.gr_province_id=t.gr_province_id and nvl(jp.parent_id,jp.gr_job_id) = t.gr_post_id and t.gr_post_id in(select nvl(parent_id,gr_job_id) from gr_job_post p where gr_post_allocation>0 and p.gr_job_id=" . $job_id . ") order by t.gr_province_id"; $rprovinces = OCIParse($conn,$query); OCIExecute($rprovinces); $Select_provinces = ""; while(OCIFetchInto($rprovinces,$mod_row, OCI_ASSOC)) { if($mod_row["GR_PROVINCE_ID"]==1){ return DomicileList('',$conn); } if($mod_row["GR_PROVINCE_ID"]==8 && $mod_row["NORTHAREA"]==1){ return GB_DomicileList('',$conn); } $tableValue = $mod_row["DOMICILE_CODE"]; $tableShow = $mod_row["DOMICILE_NAME"]; if($tableValue == $domicelcode) $Select_provinces = $Select_provinces . ""; else $Select_provinces = $Select_provinces . ""; } // end for return $Select_provinces; } // end function /* function update_edits($query,$conn) { $parse = OCIParse($conn,$query); OCIExecute($parse); }*/ function check_no_of_edits($data,$conn){ //Check number of edits after and before the closing of advertisement $query ="select to_date(to_char(pa.close_date,'dd-mm-yyyy'),'DD-MM-YYYY')+1 - to_date(to_char(sysdate,'dd-mm-yyyy'),'dd-mm-yyyy') as DATE_DIFF, ap.edits_before_closing,ap.edits_after_closing from gr_post_advertisement pa , gr_job_post jp,new_gr_app ap where pa.gr_advertisement_id=jp.gr_advert_id and ap.gr_job_id=jp.gr_job_id and jp.gr_job_id=".$data->gr_job_id." and ap.gr_applicant_id=".$data->gr_applicant_id ; $parse = OCIParse($conn,$query); OCIExecute($parse); $date_diff = -1; $edits_before_closing=-1; $edits_after_closing=-1; while(OCIFetchInto($parse,$mod_row, OCI_ASSOC)) { $date_diff=$mod_row["DATE_DIFF"]; $edits_before_closing=$mod_row["EDITS_BEFORE_CLOSING"]; $edits_after_closing=$mod_row["EDITS_AFTER_CLOSING"]; } $rslts=array('date_diff'=>$date_diff,'edits_before_closing'=>$edits_before_closing,'edits_after_closing'=>$edits_after_closing); return $rslts; } function check_no_of_edits_by_nic($cnic,$tracking_id,$conn){ //Check number of edits after and before the closing of advertisement $query ="select to_date(to_char(pa.close_date,'dd-mm-yyyy'),'DD-MM-YYYY')+1 - to_date(to_char(sysdate,'dd-mm-yyyy'),'dd-mm-yyyy') as DATE_DIFF, ap.edits_before_closing,ap.edits_after_closing from gr_post_advertisement pa , gr_job_post jp,new_gr_app ap where pa.gr_advertisement_id=jp.gr_advert_id and ap.gr_job_id=jp.gr_job_id and ap.gr_new_nic='".$cnic."' and ap.gr_applicant_id=".$tracking_id ; $parse = OCIParse($conn,$query); OCIExecute($parse); $date_diff = -1; $edits_before_closing=-1; $edits_after_closing=-1; while(OCIFetchInto($parse,$mod_row, OCI_ASSOC)) { $date_diff=$mod_row["DATE_DIFF"]; $edits_before_closing=$mod_row["EDITS_BEFORE_CLOSING"]; $edits_after_closing=$mod_row["EDITS_AFTER_CLOSING"]; } $rslts=array('date_diff'=>$date_diff,'edits_before_closing'=>$edits_before_closing,'edits_after_closing'=>$edits_after_closing); return $rslts; } function update_application($data,$conn){ $edits_array =check_no_of_edits($data,$conn); $date_diff=$edits_array['date_diff']; $edits_before_closing=$edits_array['edits_before_closing']; $edits_after_closing=$edits_array['edits_after_closing']; $returnVal=""; /* || ($date_diff<0 && $edits_after_closing==0) this will allow edit after closing date if(($date_diff>=0 && $edits_before_closing==0) || ($date_diff<0 && $edits_after_closing==0)) */ if($date_diff>=0 && $edits_before_closing==0) { if($data->gr_picture_path!=""){ $returnVal=update_app_with_pic($data,$conn,$date_diff,$edits_before_closing,$edits_after_closing); } else { $returnVal= update_app_pic_from_db($data,$conn,$date_diff,$edits_before_closing,$edits_after_closing); } } else { $returnVal= "You have updated application maximum number of allowed times"; } /* //Update Edits $query=""; if(($date_diff>=0 && $edits_before_closing==0)) $query ="update new_gr_app a set a.edits_before_closing=a.edits_before_closing+1 where a.gr_applicant_id=".$data->gr_applicant_id ; if(($date_diff<0 && $edits_after_closing==0)) $query ="update new_gr_app a set a.edits_after_closing=a.edits_after_closing+1 where a.gr_applicant_id=".$data->gr_applicant_id ; if($query!="") update_edits($query,$conn); */ return $returnVal; } function update_app_with_pic($data,$conn,$date_diff,$edits_before_closing,$edits_after_closing){ $sql= "INSERT INTO NEW_GR_APP_UPDATE ( GR_APPLICANT_ID, GR_APPLICANT_NAME, GR_FATHER_NAME, GR_DOB, GR_CNIC_ISSUE, GR_NEW_NIC, GR_GENDER, GR_RELIGION, GR_POSTAL_ADD, GR_APPLICANT_EMAIL, GR_APPLICANT_PHONE_OFF, GR_APP_MOBILE, GR_AGEREX1, GR_RELAX_YEARS, GR_DOMICILE, GR_DISTRICT_DOMICILE, GR_DISABILITY, GR_HELPER, GR_JOB_ID, TR_DATE, GR_AMOUNT, GR_BANK_BRANCH_NAME, GR_BANK_CODE, GR_BANK_DISTRICT, DATE_APPLIED, GR_CENTER_ID, GR_CENTER_NAME, GR_INTERVIEW_ID, GR_INTERVIEW_NAME, GR_REQUIRED_QUALEXP, GR_RDD, GR_EXAMINATION_ID1, GR_EXAMINATION_NAME1, GR_RESULT_DATE1, GR_UNIVERSITY_ID1, GR_UNIVERSITY_NAME1, GR_BOARD_OTHER1, GR_GRADE1, GR_DIVISION1, GR_CGP1, GR_MAJOR_COURSE_WORKS1, GR_EXAMINATION_ID2, GR_EXAMINATION_NAME2, GR_RESULT_DATE2, GR_UNIVERSITY_ID2, GR_UNIVERSITY_NAME2, GR_BOARD_OTHER2, GR_GRADE2, GR_DIVISION2, GR_CGP2, GR_MAJOR_COURSE_WORKS2, GR_EXAMINATION_ID3, GR_EXAMINATION_NAME3, GR_RESULT_DATE3, GR_UNIVERSITY_ID3, GR_UNIVERSITY_NAME3, GR_BOARD_OTHER3, GR_GRADE3, GR_DIVISION3, GR_CGP3, GR_MAJOR_COURSE_WORKS3, GR_EXAMINATION_ID4, GR_EXAMINATION_NAME4, GR_RESULT_DATE4, GR_UNIVERSITY_ID4, GR_UNIVERSITY_NAME4, GR_BOARD_OTHER4, GR_GRADE4, GR_DIVISION4, GR_CGP4, GR_MAJOR_COURSE_WORKS4, GR_EXAMINATION_ID5, GR_EXAMINATION_NAME5, GR_RESULT_DATE5, GR_UNIVERSITY_ID5, GR_UNIVERSITY_NAME5, GR_BOARD_OTHER5, GR_GRADE5, GR_DIVISION5, GR_CGP5, GR_MAJOR_COURSE_WORKS5, GR_POST_NAME1, GR_BPS1, GR_ORGANIZATION_NAME1, GR_EXP_FROM_DATE1, GR_EXP_TO_DATE1, GR_JOB_STATUS1, GR_JOB_NATURE1, GR_MAIN_DUTIES1, GR_POST_NAME2, GR_BPS2, GR_ORGANIZATION_NAME2, GR_EXP_FROM_DATE2, GR_EXP_TO_DATE2, GR_JOB_STATUS2, GR_JOB_NATURE2, GR_MAIN_DUTIES2, GR_POST_NAME3, GR_BPS3, GR_ORGANIZATION_NAME3, GR_EXP_FROM_DATE3, GR_EXP_TO_DATE3, GR_JOB_STATUS3, GR_JOB_NATURE3, GR_MAIN_DUTIES3, GR_POST_NAME4, GR_BPS4, GR_ORGANIZATION_NAME4, GR_EXP_FROM_DATE4, GR_EXP_TO_DATE4, GR_JOB_STATUS4, GR_JOB_NATURE4, GR_MAIN_DUTIES4, GR_POST_NAME5, GR_BPS5, GR_ORGANIZATION_NAME5, GR_EXP_FROM_DATE5, GR_EXP_TO_DATE5, GR_JOB_STATUS5, GR_JOB_NATURE5, GR_MAIN_DUTIES5, GR_NHMP_EMPLOYEE, GR_NHMP_BELT_NUMBER, GR_NHMP_DESIGNATION, GR_NHMP_PLACE_OF_POSTING, GR_PHOTO ) VALUES( :GR_APPLICANT_ID, trim(upper(:GR_APPLICANT_NAME)), trim(upper(:GR_FATHER_NAME)), to_date(:GR_DOB,'dd-mm-yyyy'), to_date(:GR_CNIC_ISSUE,'dd-mm-yyyy'), :GR_NEW_NIC, :GR_GENDER, :GR_RELIGION, upper(:GR_POSTAL_ADD1)||', '||upper(:GR_POSTAL_ADD2), lower(:GR_APPLICANT_EMAIL), :GR_APPLICANT_PHONE_OFF, :GR_APP_MOBILE, upper(:GR_AGEREX1), :GR_RELAX_YEARS, upper(:GR_DOMICILE), upper(:GR_DISTRICT_DOMICILE), upper(:GR_DISABILITY), upper(:GR_HELPER), :GR_JOB_ID, to_date(:TR_DATE,'dd-mm-yyyy'), :GR_AMOUNT, :GR_BANK_BRANCH_NAME, :GR_BANK_CODE, :GR_BANK_DISTRICT, to_date(:DATE_APPLIED,'dd-mm-yyyy hh:mi:ss AM'), :GR_CENTER_ID, upper(:GR_CENTER_NAME), :GR_INTERVIEW_ID, upper(:GR_INTERVIEW_NAME), :GR_REQUIRED_QUALEXP, to_date(:GR_RDD,'dd-mm-yyyy'), :GR_EXAMINATION_ID1, :GR_EXAMINATION_NAME1, to_date(:GR_RESULT_DATE1,'dd-mm-yyyy'), :GR_UNIVERSITY_ID1, :GR_UNIVERSITY_NAME1, :GR_BOARD_OTHER1, :GR_GRADE1, :GR_DIVISION1, :GR_CGP1, :GR_MAJOR_COURSE_WORKS1, :GR_EXAMINATION_ID2, :GR_EXAMINATION_NAME2, to_date(:GR_RESULT_DATE2,'dd-mm-yyyy'), :GR_UNIVERSITY_ID2, :GR_UNIVERSITY_NAME2, :GR_BOARD_OTHER2, :GR_GRADE2, :GR_DIVISION2, :GR_CGP2, :GR_MAJOR_COURSE_WORKS2, :GR_EXAMINATION_ID3, :GR_EXAMINATION_NAME3, to_date(:GR_RESULT_DATE3,'dd-mm-yyyy'), :GR_UNIVERSITY_ID3, :GR_UNIVERSITY_NAME3, :GR_BOARD_OTHER3, :GR_GRADE3, :GR_DIVISION3, :GR_CGP3, :GR_MAJOR_COURSE_WORKS3, :GR_EXAMINATION_ID4, :GR_EXAMINATION_NAME4, to_date(:GR_RESULT_DATE4,'dd-mm-yyyy'), :GR_UNIVERSITY_ID4, :GR_UNIVERSITY_NAME4, :GR_BOARD_OTHER4, :GR_GRADE4, :GR_DIVISION4, :GR_CGP4, :GR_MAJOR_COURSE_WORKS4, :GR_EXAMINATION_ID5, :GR_EXAMINATION_NAME5, to_date(:GR_RESULT_DATE5,'dd-mm-yyyy'), :GR_UNIVERSITY_ID5, :GR_UNIVERSITY_NAME5, :GR_BOARD_OTHER5, :GR_GRADE5, :GR_DIVISION5, :GR_CGP5, :GR_MAJOR_COURSE_WORKS5, :GR_POST_NAME1, :GR_BPS1, :GR_ORGANIZATION_NAME1, to_date(:GR_EXP_FROM_DATE1,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE1,'dd-mm-yyyy'), :GR_JOB_STATUS1, :GR_JOB_NATURE1, :GR_MAIN_DUTIES1, :GR_POST_NAME2, :GR_BPS2, :GR_ORGANIZATION_NAME2, to_date(:GR_EXP_FROM_DATE2,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE2,'dd-mm-yyyy'), :GR_JOB_STATUS2, :GR_JOB_NATURE2, :GR_MAIN_DUTIES2, :GR_POST_NAME3, :GR_BPS3, :GR_ORGANIZATION_NAME3, to_date(:GR_EXP_FROM_DATE3,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE3,'dd-mm-yyyy'), :GR_JOB_STATUS3, :GR_JOB_NATURE3, :GR_MAIN_DUTIES3, :GR_POST_NAME4, :GR_BPS4, :GR_ORGANIZATION_NAME4, to_date(:GR_EXP_FROM_DATE4,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE4,'dd-mm-yyyy'), :GR_JOB_STATUS4, :GR_JOB_NATURE4, :GR_MAIN_DUTIES4, :GR_POST_NAME5, :GR_BPS5, :GR_ORGANIZATION_NAME5, to_date(:GR_EXP_FROM_DATE5,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE5,'dd-mm-yyyy'), :GR_JOB_STATUS5, :GR_JOB_NATURE5, :GR_MAIN_DUTIES5, :GR_NHMP_EMPLOYEE, :GR_NHMP_BELT_NUMBER, :GR_NHMP_DESIGNATION, :GR_NHMP_PLACE_OF_POSTING, EMPTY_BLOB() ) returning GR_PHOTO ,GR_APPLICANT_ID INTO :GR_PHOTO, :GR_APPLICANT_ID"; $lob = OCINewDescriptor($conn, OCI_D_LOB); $stid = ociparse($conn, $sql); //$mobile_num=03+str_replace(substr($data->gr_mobile,strpos($data->gr_mobile,'3')),'-',''); //echo $data->gr_helper."----".$data->gr_disability; $mobile_num='92'.str_replace('-','',substr($data->gr_mobile,strpos($data->gr_mobile,'3'))); $current_date=date('d-m-Y h:i:s A'); //var_dump($data);exit; //print_r($data);exit; $GR_APPLICANT_ID=$data->gr_applicant_id; OCIBindByName($stid, ':GR_PHOTO', $lob, -1, OCI_B_BLOB); OCIBindByName($stid, ':GR_APPLICANT_ID', $data->gr_applicant_id, 32); //echo "---".$data->gr_education[0]->degree_text; exit; ocibindbyname($stid, ':GR_APPLICANT_NAME', $data->gr_applicant_name); ocibindbyname($stid, ':GR_FATHER_NAME', $data->gr_father_name); ocibindbyname($stid, ':GR_DOB', $data->gr_dob); ocibindbyname($stid, ':GR_CNIC_ISSUE', $data->gr_cnic_issue); ocibindbyname($stid, ':GR_NEW_NIC', $data->gr_cnic); ocibindbyname($stid, ':GR_GENDER', $data->gr_gender); ocibindbyname($stid, ':GR_RELIGION', $data->gr_religion); ocibindbyname($stid, ':GR_POSTAL_ADD1', $data->gr_postal_adress1); ocibindbyname($stid, ':GR_POSTAL_ADD2', $data->gr_postal_adress2); ocibindbyname($stid, ':GR_APPLICANT_EMAIL', $data->gr_email); ocibindbyname($stid, ':GR_APPLICANT_PHONE_OFF', $data->gr_phone_off); ocibindbyname($stid, ':GR_APP_MOBILE', $mobile_num); ocibindbyname($stid, ':GR_AGEREX1', $data->gr_age_relaxation); ocibindbyname($stid, ':GR_RELAX_YEARS', $data->gr_relaxation_years); ocibindbyname($stid, ':GR_DOMICILE', $data->gr_domicile); ocibindbyname($stid, ':GR_DISTRICT_DOMICILE', $data->gr_district); ocibindbyname($stid, ':GR_DISABILITY', $data->gr_disability); ocibindbyname($stid, ':GR_HELPER', $data->gr_helper); ocibindbyname($stid, ':GR_JOB_ID', $data->gr_job_id); ocibindbyname($stid, ':TR_DATE', $data->gr_TR_Date); ocibindbyname($stid, ':GR_AMOUNT', $data->gr_TR_Amount); ocibindbyname($stid, ':GR_BANK_BRANCH_NAME', $data->gr_TR_Bank_Branch_Name); ocibindbyname($stid, ':GR_BANK_CODE', $data->gr_TR_Bank_Code); ocibindbyname($stid, ':GR_BANK_DISTRICT', $data->gr_TR_Bank_District); ocibindbyname($stid, ':DATE_APPLIED', $current_date); ocibindbyname($stid, ':GR_CENTER_ID', $data->gr_test_centre); ocibindbyname($stid, ':GR_CENTER_NAME', $data->gr_test_centre_name); ocibindbyname($stid, ':GR_INTERVIEW_ID', $data->gr_interview_centre); ocibindbyname($stid, ':GR_INTERVIEW_NAME', $data->gr_interview_centre_name); ocibindbyname($stid, ':GR_RDD', $data->gr_RDD); ocibindbyname($stid, ':GR_REQUIRED_QUALEXP', $data->gr_REQUIRED_QUALEXP); ocibindbyname($stid, ':GR_EXAMINATION_ID1', $data->gr_education[0]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME1', $data->gr_education[0]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE1', $data->gr_education[0]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID1', $data->gr_education[0]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME1', $data->gr_education[0]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER1', $data->gr_education[0]->other_institute); ocibindbyname($stid, ':GR_GRADE1', $data->gr_education[0]->grade); ocibindbyname($stid, ':GR_DIVISION1', $data->gr_education[0]->division); ocibindbyname($stid, ':GR_CGP1', $data->gr_education[0]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS1', $data->gr_education[0]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID2', $data->gr_education[1]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME2', $data->gr_education[1]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE2', $data->gr_education[1]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID2', $data->gr_education[1]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME2', $data->gr_education[1]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER2', $data->gr_education[1]->other_institute); ocibindbyname($stid, ':GR_GRADE2', $data->gr_education[1]->grade); ocibindbyname($stid, ':GR_DIVISION2', $data->gr_education[1]->division); ocibindbyname($stid, ':GR_CGP2', $data->gr_education[1]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS2', $data->gr_education[1]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID3', $data->gr_education[2]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME3', $data->gr_education[2]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE3', $data->gr_education[2]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID3', $data->gr_education[2]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME3', $data->gr_education[2]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER3', $data->gr_education[2]->other_institute); ocibindbyname($stid, ':GR_GRADE3', $data->gr_education[2]->grade); ocibindbyname($stid, ':GR_DIVISION3', $data->gr_education[2]->division); ocibindbyname($stid, ':GR_CGP3', $data->gr_education[2]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS3', $data->gr_education[2]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID4', $data->gr_education[3]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME4', $data->gr_education[3]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE4', $data->gr_education[3]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID4', $data->gr_education[3]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME4', $data->gr_education[3]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER4', $data->gr_education[3]->other_institute); ocibindbyname($stid, ':GR_GRADE4', $data->gr_education[3]->grade); ocibindbyname($stid, ':GR_DIVISION4', $data->gr_education[3]->division); ocibindbyname($stid, ':GR_CGP4', $data->gr_education[3]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS4', $data->gr_education[3]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID5', $data->gr_education[4]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME5', $data->gr_education[4]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE5', $data->gr_education[4]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID5', $data->gr_education[4]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME5', $data->gr_education[4]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER5', $data->gr_education[4]->other_institute); ocibindbyname($stid, ':GR_GRADE5', $data->gr_education[4]->grade); ocibindbyname($stid, ':GR_DIVISION5', $data->gr_education[4]->division); ocibindbyname($stid, ':GR_CGP5', $data->gr_education[4]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS5', $data->gr_education[4]->major_subjects); ocibindbyname($stid, ':GR_POST_NAME1', $data->gr_experience[0]->experience_post); ocibindbyname($stid, ':GR_BPS1', $data->gr_experience[0]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME1', $data->gr_experience[0]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE1', $data->gr_experience[0]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE1', $data->gr_experience[0]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS1', $data->gr_experience[0]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE1', $data->gr_experience[0]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES1', $data->gr_experience[0]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME2', $data->gr_experience[1]->experience_post); ocibindbyname($stid, ':GR_BPS2', $data->gr_experience[1]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME2', $data->gr_experience[1]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE2', $data->gr_experience[1]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE2', $data->gr_experience[1]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS2', $data->gr_experience[1]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE2', $data->gr_experience[1]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES2', $data->gr_experience[1]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME3', $data->gr_experience[2]->experience_post); ocibindbyname($stid, ':GR_BPS3', $data->gr_experience[2]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME3', $data->gr_experience[2]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE3', $data->gr_experience[2]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE3', $data->gr_experience[2]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS3', $data->gr_experience[2]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE3', $data->gr_experience[2]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES3', $data->gr_experience[2]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME4', $data->gr_experience[3]->experience_post); ocibindbyname($stid, ':GR_BPS4', $data->gr_experience[3]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME4', $data->gr_experience[3]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE4', $data->gr_experience[3]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE4', $data->gr_experience[3]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS4', $data->gr_experience[3]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE4', $data->gr_experience[3]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES4', $data->gr_experience[3]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME5', $data->gr_experience[4]->experience_post); ocibindbyname($stid, ':GR_BPS5', $data->gr_experience[4]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME5', $data->gr_experience[4]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE5', $data->gr_experience[4]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE5', $data->gr_experience[4]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS5', $data->gr_experience[4]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE5', $data->gr_experience[4]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES5', $data->gr_experience[4]->experience_duties); /*Implemented for Adv No 01/2019 for NHMP Departmental Posts of Petrol Office */ ocibindbyname($stid, ':GR_NHMP_EMPLOYEE', $data->gr_nhmp_employee); ocibindbyname($stid, ':GR_NHMP_BELT_NUMBER', $data->gr_nhmp_belt_number); ocibindbyname($stid, ':GR_NHMP_DESIGNATION', $data->gr_nhmp_designation); ocibindbyname($stid, ':GR_NHMP_PLACE_OF_POSTING', $data->gr_nhmp_place_of_posting); $_SESSION['cnic']=$data->gr_cnic; $_SESSION['job']=$data->gr_job_id; session_write_close(); $r = OCIExecute($stid, OCI_NO_AUTO_COMMIT); if($data->gr_picture_path!=""){ $lob->savefile($data->gr_picture_path); } /* Start : For updating no of edits*/ $query=""; if(($date_diff>=0 && $edits_before_closing==0)) $query ="update new_gr_app a set a.edits_before_closing=a.edits_before_closing+1 where a.gr_applicant_id=".$data->gr_applicant_id ; if(($date_diff<0 && $edits_after_closing==0)) $query ="update new_gr_app a set a.edits_after_closing=a.edits_after_closing+1 where a.gr_applicant_id=".$data->gr_applicant_id ; if($query!=""){ $stid = oci_parse($conn, $query); $r = OCIExecute($stid, OCI_NO_AUTO_COMMIT); } /* End : For updating no of edits*/ if($r) { OCICommit($conn); $lob->free(); OCIFreeStatement($stid); // sms code $sql_sms="select t.gr_applicant_id, t.gr_app_mobile, s.case_no, s.job_title, t.gr_center_name from new_gr_app_update t, gr_job_cache s where t.gr_job_id=s.gr_job_id and t.gr_applicant_id = $GR_APPLICANT_ID"; //echo $sql_sms; $rs_sms=OCIParse($conn,$sql_sms); OCIExecute($rs_sms); OCIFetchInto($rs_sms,$rs_sms_data,OCI_ASSOC); $sms_track_id=$rs_sms_data["GR_APPLICANT_ID"]; $sms_mobile=$rs_sms_data["GR_APP_MOBILE"]; $sms_case_no=$rs_sms_data["CASE_NO"]; $sms_job_title=$rs_sms_data["JOB_TITLE"]; $sms_job_center=$rs_sms_data["GR_CENTER_NAME"]; //SendJobSMS(); // Should be commented as following code is directly embedded $response = file_get_contents('http://bsms.ufone.com/bsms_app5/sendapi.jsp?id=03343912571&message=Your%20Application%20for%20'.urlencode($sms_case_no).'%20'.urlencode($sms_job_title).'%20updated%20successfully%20against%20tracking%20ID%20'.urlencode($sms_track_id).'%20Your%20opted%20test%20center%20is%20'.urlencode($sms_job_center).'&shortcode=FPSC&lang=English&mobilenum='.urlencode($sms_mobile).'&password=745896'); return $GR_APPLICANT_ID; } else { oci_rollback($conn); $lob->free(); OCIFreeStatement($stid); return oci_error($stid); } } function update_app_pic_from_db($data,$conn,$date_diff,$edits_before_closing,$edits_after_closing){ $sql_update= "INSERT INTO NEW_GR_APP_UPDATE ( GR_APPLICANT_ID, GR_APPLICANT_NAME, GR_FATHER_NAME, GR_DOB, GR_CNIC_ISSUE, GR_NEW_NIC, GR_GENDER, GR_RELIGION, GR_POSTAL_ADD, GR_APPLICANT_EMAIL, GR_APPLICANT_PHONE_OFF, GR_APP_MOBILE, GR_AGEREX1, GR_RELAX_YEARS, GR_DOMICILE, GR_DISTRICT_DOMICILE, GR_DISABILITY, GR_HELPER, GR_JOB_ID, TR_DATE, GR_AMOUNT, GR_BANK_BRANCH_NAME, GR_BANK_CODE, GR_BANK_DISTRICT, DATE_APPLIED, GR_CENTER_ID, GR_CENTER_NAME, GR_INTERVIEW_ID, GR_INTERVIEW_NAME, GR_REQUIRED_QUALEXP, GR_RDD, GR_EXAMINATION_ID1, GR_EXAMINATION_NAME1, GR_RESULT_DATE1, GR_UNIVERSITY_ID1, GR_UNIVERSITY_NAME1, GR_BOARD_OTHER1, GR_GRADE1, GR_DIVISION1, GR_CGP1, GR_MAJOR_COURSE_WORKS1, GR_EXAMINATION_ID2, GR_EXAMINATION_NAME2, GR_RESULT_DATE2, GR_UNIVERSITY_ID2, GR_UNIVERSITY_NAME2, GR_BOARD_OTHER2, GR_GRADE2, GR_DIVISION2, GR_CGP2, GR_MAJOR_COURSE_WORKS2, GR_EXAMINATION_ID3, GR_EXAMINATION_NAME3, GR_RESULT_DATE3, GR_UNIVERSITY_ID3, GR_UNIVERSITY_NAME3, GR_BOARD_OTHER3, GR_GRADE3, GR_DIVISION3, GR_CGP3, GR_MAJOR_COURSE_WORKS3, GR_EXAMINATION_ID4, GR_EXAMINATION_NAME4, GR_RESULT_DATE4, GR_UNIVERSITY_ID4, GR_UNIVERSITY_NAME4, GR_BOARD_OTHER4, GR_GRADE4, GR_DIVISION4, GR_CGP4, GR_MAJOR_COURSE_WORKS4, GR_EXAMINATION_ID5, GR_EXAMINATION_NAME5, GR_RESULT_DATE5, GR_UNIVERSITY_ID5, GR_UNIVERSITY_NAME5, GR_BOARD_OTHER5, GR_GRADE5, GR_DIVISION5, GR_CGP5, GR_MAJOR_COURSE_WORKS5, GR_POST_NAME1, GR_BPS1, GR_ORGANIZATION_NAME1, GR_EXP_FROM_DATE1, GR_EXP_TO_DATE1, GR_JOB_STATUS1, GR_JOB_NATURE1, GR_MAIN_DUTIES1, GR_POST_NAME2, GR_BPS2, GR_ORGANIZATION_NAME2, GR_EXP_FROM_DATE2, GR_EXP_TO_DATE2, GR_JOB_STATUS2, GR_JOB_NATURE2, GR_MAIN_DUTIES2, GR_POST_NAME3, GR_BPS3, GR_ORGANIZATION_NAME3, GR_EXP_FROM_DATE3, GR_EXP_TO_DATE3, GR_JOB_STATUS3, GR_JOB_NATURE3, GR_MAIN_DUTIES3, GR_POST_NAME4, GR_BPS4, GR_ORGANIZATION_NAME4, GR_EXP_FROM_DATE4, GR_EXP_TO_DATE4, GR_JOB_STATUS4, GR_JOB_NATURE4, GR_MAIN_DUTIES4, GR_POST_NAME5, GR_BPS5, GR_ORGANIZATION_NAME5, GR_EXP_FROM_DATE5, GR_EXP_TO_DATE5, GR_JOB_STATUS5, GR_JOB_NATURE5, GR_MAIN_DUTIES5, GR_NHMP_EMPLOYEE, GR_NHMP_BELT_NUMBER, GR_NHMP_DESIGNATION, GR_NHMP_PLACE_OF_POSTING, GR_PHOTO ) VALUES( :GR_APPLICANT_ID, trim(upper(:GR_APPLICANT_NAME)), trim(upper(:GR_FATHER_NAME)), to_date(:GR_DOB,'dd-mm-yyyy'), to_date(:GR_CNIC_ISSUE,'dd-mm-yyyy'), :GR_NEW_NIC, :GR_GENDER, :GR_RELIGION, upper(:GR_POSTAL_ADD1)||', '||upper(:GR_POSTAL_ADD2), lower(:GR_APPLICANT_EMAIL), :GR_APPLICANT_PHONE_OFF, :GR_APP_MOBILE, upper(:GR_AGEREX1), :GR_RELAX_YEARS, upper(:GR_DOMICILE), upper(:GR_DISTRICT_DOMICILE), upper(:GR_DISABILITY), upper(:GR_HELPER), :GR_JOB_ID, to_date(:TR_DATE,'dd-mm-yyyy'), :GR_AMOUNT, :GR_BANK_BRANCH_NAME, :GR_BANK_CODE, :GR_BANK_DISTRICT, to_date(:DATE_APPLIED,'dd-mm-yyyy hh:mi:ss AM'), :GR_CENTER_ID, upper(:GR_CENTER_NAME), :GR_INTERVIEW_ID, upper(:GR_INTERVIEW_NAME), :GR_REQUIRED_QUALEXP, to_date(:GR_RDD,'dd-mm-yyyy'), :GR_EXAMINATION_ID1, :GR_EXAMINATION_NAME1, to_date(:GR_RESULT_DATE1,'dd-mm-yyyy'), :GR_UNIVERSITY_ID1, :GR_UNIVERSITY_NAME1, :GR_BOARD_OTHER1, :GR_GRADE1, :GR_DIVISION1, :GR_CGP1, :GR_MAJOR_COURSE_WORKS1, :GR_EXAMINATION_ID2, :GR_EXAMINATION_NAME2, to_date(:GR_RESULT_DATE2,'dd-mm-yyyy'), :GR_UNIVERSITY_ID2, :GR_UNIVERSITY_NAME2, :GR_BOARD_OTHER2, :GR_GRADE2, :GR_DIVISION2, :GR_CGP2, :GR_MAJOR_COURSE_WORKS2, :GR_EXAMINATION_ID3, :GR_EXAMINATION_NAME3, to_date(:GR_RESULT_DATE3,'dd-mm-yyyy'), :GR_UNIVERSITY_ID3, :GR_UNIVERSITY_NAME3, :GR_BOARD_OTHER3, :GR_GRADE3, :GR_DIVISION3, :GR_CGP3, :GR_MAJOR_COURSE_WORKS3, :GR_EXAMINATION_ID4, :GR_EXAMINATION_NAME4, to_date(:GR_RESULT_DATE4,'dd-mm-yyyy'), :GR_UNIVERSITY_ID4, :GR_UNIVERSITY_NAME4, :GR_BOARD_OTHER4, :GR_GRADE4, :GR_DIVISION4, :GR_CGP4, :GR_MAJOR_COURSE_WORKS4, :GR_EXAMINATION_ID5, :GR_EXAMINATION_NAME5, to_date(:GR_RESULT_DATE5,'dd-mm-yyyy'), :GR_UNIVERSITY_ID5, :GR_UNIVERSITY_NAME5, :GR_BOARD_OTHER5, :GR_GRADE5, :GR_DIVISION5, :GR_CGP5, :GR_MAJOR_COURSE_WORKS5, :GR_POST_NAME1, :GR_BPS1, :GR_ORGANIZATION_NAME1, to_date(:GR_EXP_FROM_DATE1,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE1,'dd-mm-yyyy'), :GR_JOB_STATUS1, :GR_JOB_NATURE1, :GR_MAIN_DUTIES1, :GR_POST_NAME2, :GR_BPS2, :GR_ORGANIZATION_NAME2, to_date(:GR_EXP_FROM_DATE2,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE2,'dd-mm-yyyy'), :GR_JOB_STATUS2, :GR_JOB_NATURE2, :GR_MAIN_DUTIES2, :GR_POST_NAME3, :GR_BPS3, :GR_ORGANIZATION_NAME3, to_date(:GR_EXP_FROM_DATE3,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE3,'dd-mm-yyyy'), :GR_JOB_STATUS3, :GR_JOB_NATURE3, :GR_MAIN_DUTIES3, :GR_POST_NAME4, :GR_BPS4, :GR_ORGANIZATION_NAME4, to_date(:GR_EXP_FROM_DATE4,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE4,'dd-mm-yyyy'), :GR_JOB_STATUS4, :GR_JOB_NATURE4, :GR_MAIN_DUTIES4, :GR_POST_NAME5, :GR_BPS5, :GR_ORGANIZATION_NAME5, to_date(:GR_EXP_FROM_DATE5,'dd-mm-yyyy'), to_date(:GR_EXP_TO_DATE5,'dd-mm-yyyy'), :GR_JOB_STATUS5, :GR_JOB_NATURE5, :GR_MAIN_DUTIES5, :GR_NHMP_EMPLOYEE, :GR_NHMP_BELT_NUMBER, :GR_NHMP_DESIGNATION, :GR_NHMP_PLACE_OF_POSTING, (select case when exists( ( select aa.gr_photo from new_gr_app_update aa where aa.gr_applicant_id=".$data->gr_applicant_id." and aa.date_applied=(select max(aaa.date_applied) from new_gr_app_update aaa where aaa.gr_applicant_id=".$data->gr_applicant_id." ) ) ) then ( select aa.gr_photo from new_gr_app_update aa where aa.gr_applicant_id=".$data->gr_applicant_id." and aa.date_applied=(select max(aaa.date_applied) from new_gr_app_update aaa where aaa.gr_applicant_id=".$data->gr_applicant_id." ) ) else (select gr_photo from new_gr_app aa where aa.gr_applicant_id=".$data->gr_applicant_id.") end from dual) ) returning GR_APPLICANT_ID INTO :GR_APPLICANT_ID"; $stid = ociparse($conn, $sql_update); //$mobile_num=92+str_replace(substr($data->gr_mobile,strpos($data->gr_mobile,'3')),'-',''); //echo $data->gr_helper."----".$data->gr_disability; $mobile_num='92'.str_replace('-','',substr($data->gr_mobile,strpos($data->gr_mobile,'3'))); $current_date=date('d-m-Y h:i:s A'); $GR_APPLICANT_ID=$data->gr_applicant_id; OCIBindByName($stid, ':GR_APPLICANT_ID', $data->gr_applicant_id, 32); ocibindbyname($stid, ':GR_APPLICANT_NAME', $data->gr_applicant_name); ocibindbyname($stid, ':GR_FATHER_NAME', $data->gr_father_name); ocibindbyname($stid, ':GR_DOB', $data->gr_dob); ocibindbyname($stid, ':GR_CNIC_ISSUE', $data->gr_cnic_issue); ocibindbyname($stid, ':GR_NEW_NIC', $data->gr_cnic); ocibindbyname($stid, ':GR_GENDER', $data->gr_gender); ocibindbyname($stid, ':GR_RELIGION', $data->gr_religion); ocibindbyname($stid, ':GR_POSTAL_ADD1', $data->gr_postal_adress1); ocibindbyname($stid, ':GR_POSTAL_ADD2', $data->gr_postal_adress2); ocibindbyname($stid, ':GR_APPLICANT_EMAIL', $data->gr_email); ocibindbyname($stid, ':GR_APPLICANT_PHONE_OFF', $data->gr_phone_off); ocibindbyname($stid, ':GR_APP_MOBILE', $mobile_num); ocibindbyname($stid, ':GR_AGEREX1', $data->gr_age_relaxation); ocibindbyname($stid, ':GR_RELAX_YEARS', $data->gr_relaxation_years); ocibindbyname($stid, ':GR_DOMICILE', $data->gr_domicile); ocibindbyname($stid, ':GR_DISTRICT_DOMICILE', $data->gr_district); ocibindbyname($stid, ':GR_DISABILITY', $data->gr_disability); ocibindbyname($stid, ':GR_HELPER', $data->gr_helper); ocibindbyname($stid, ':GR_JOB_ID', $data->gr_job_id); ocibindbyname($stid, ':TR_DATE', $data->gr_TR_Date); ocibindbyname($stid, ':GR_AMOUNT', $data->gr_TR_Amount); ocibindbyname($stid, ':GR_BANK_BRANCH_NAME', $data->gr_TR_Bank_Branch_Name); ocibindbyname($stid, ':GR_BANK_CODE', $data->gr_TR_Bank_Code); ocibindbyname($stid, ':GR_BANK_DISTRICT', $data->gr_TR_Bank_District); ocibindbyname($stid, ':DATE_APPLIED', $current_date); ocibindbyname($stid, ':GR_CENTER_ID', $data->gr_test_centre); ocibindbyname($stid, ':GR_CENTER_NAME', $data->gr_test_centre_name); ocibindbyname($stid, ':GR_INTERVIEW_ID', $data->gr_interview_centre); ocibindbyname($stid, ':GR_INTERVIEW_NAME', $data->gr_interview_centre_name); ocibindbyname($stid, ':GR_RDD', $data->gr_RDD); ocibindbyname($stid, ':GR_REQUIRED_QUALEXP', $data->gr_REQUIRED_QUALEXP); ocibindbyname($stid, ':GR_EXAMINATION_ID1', $data->gr_education[0]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME1', $data->gr_education[0]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE1', $data->gr_education[0]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID1', $data->gr_education[0]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME1', $data->gr_education[0]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER1', $data->gr_education[0]->other_institute); ocibindbyname($stid, ':GR_GRADE1', $data->gr_education[0]->grade); ocibindbyname($stid, ':GR_DIVISION1', $data->gr_education[0]->division); ocibindbyname($stid, ':GR_CGP1', $data->gr_education[0]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS1', $data->gr_education[0]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID2', $data->gr_education[1]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME2', $data->gr_education[1]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE2', $data->gr_education[1]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID2', $data->gr_education[1]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME2', $data->gr_education[1]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER2', $data->gr_education[1]->other_institute); ocibindbyname($stid, ':GR_GRADE2', $data->gr_education[1]->grade); ocibindbyname($stid, ':GR_DIVISION2', $data->gr_education[1]->division); ocibindbyname($stid, ':GR_CGP2', $data->gr_education[1]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS2', $data->gr_education[1]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID3', $data->gr_education[2]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME3', $data->gr_education[2]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE3', $data->gr_education[2]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID3', $data->gr_education[2]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME3', $data->gr_education[2]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER3', $data->gr_education[2]->other_institute); ocibindbyname($stid, ':GR_GRADE3', $data->gr_education[2]->grade); ocibindbyname($stid, ':GR_DIVISION3', $data->gr_education[2]->division); ocibindbyname($stid, ':GR_CGP3', $data->gr_education[2]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS3', $data->gr_education[2]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID4', $data->gr_education[3]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME4', $data->gr_education[3]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE4', $data->gr_education[3]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID4', $data->gr_education[3]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME4', $data->gr_education[3]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER4', $data->gr_education[3]->other_institute); ocibindbyname($stid, ':GR_GRADE4', $data->gr_education[3]->grade); ocibindbyname($stid, ':GR_DIVISION4', $data->gr_education[3]->division); ocibindbyname($stid, ':GR_CGP4', $data->gr_education[3]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS4', $data->gr_education[3]->major_subjects); ocibindbyname($stid, ':GR_EXAMINATION_ID5', $data->gr_education[4]->degree); ocibindbyname($stid, ':GR_EXAMINATION_NAME5', $data->gr_education[4]->degree_name); ocibindbyname($stid, ':GR_RESULT_DATE5', $data->gr_education[4]->result_date); ocibindbyname($stid, ':GR_UNIVERSITY_ID5', $data->gr_education[4]->institute); ocibindbyname($stid, ':GR_UNIVERSITY_NAME5', $data->gr_education[4]->institute_name); ocibindbyname($stid, ':GR_BOARD_OTHER5', $data->gr_education[4]->other_institute); ocibindbyname($stid, ':GR_GRADE5', $data->gr_education[4]->grade); ocibindbyname($stid, ':GR_DIVISION5', $data->gr_education[4]->division); ocibindbyname($stid, ':GR_CGP5', $data->gr_education[4]->cgpa); ocibindbyname($stid, ':GR_MAJOR_COURSE_WORKS5', $data->gr_education[4]->major_subjects); ocibindbyname($stid, ':GR_POST_NAME1', $data->gr_experience[0]->experience_post); ocibindbyname($stid, ':GR_BPS1', $data->gr_experience[0]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME1', $data->gr_experience[0]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE1', $data->gr_experience[0]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE1', $data->gr_experience[0]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS1', $data->gr_experience[0]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE1', $data->gr_experience[0]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES1', $data->gr_experience[0]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME2', $data->gr_experience[1]->experience_post); ocibindbyname($stid, ':GR_BPS2', $data->gr_experience[1]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME2', $data->gr_experience[1]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE2', $data->gr_experience[1]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE2', $data->gr_experience[1]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS2', $data->gr_experience[1]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE2', $data->gr_experience[1]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES2', $data->gr_experience[1]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME3', $data->gr_experience[2]->experience_post); ocibindbyname($stid, ':GR_BPS3', $data->gr_experience[2]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME3', $data->gr_experience[2]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE3', $data->gr_experience[2]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE3', $data->gr_experience[2]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS3', $data->gr_experience[2]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE3', $data->gr_experience[2]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES3', $data->gr_experience[2]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME4', $data->gr_experience[3]->experience_post); ocibindbyname($stid, ':GR_BPS4', $data->gr_experience[3]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME4', $data->gr_experience[3]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE4', $data->gr_experience[3]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE4', $data->gr_experience[3]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS4', $data->gr_experience[3]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE4', $data->gr_experience[3]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES4', $data->gr_experience[3]->experience_duties); ocibindbyname($stid, ':GR_POST_NAME5', $data->gr_experience[4]->experience_post); ocibindbyname($stid, ':GR_BPS5', $data->gr_experience[4]->experience_BS); ocibindbyname($stid, ':GR_ORGANIZATION_NAME5', $data->gr_experience[4]->experience_OMDD); ocibindbyname($stid, ':GR_EXP_FROM_DATE5', $data->gr_experience[4]->experience_fdate); ocibindbyname($stid, ':GR_EXP_TO_DATE5', $data->gr_experience[4]->experience_tdate); ocibindbyname($stid, ':GR_JOB_STATUS5', $data->gr_experience[4]->experience_status); ocibindbyname($stid, ':GR_JOB_NATURE5', $data->gr_experience[4]->experience_nature); ocibindbyname($stid, ':GR_MAIN_DUTIES5', $data->gr_experience[4]->experience_duties); /*Implemented for Adv No 01/2019 for NHMP Departmental Posts of Petrol Office */ ocibindbyname($stid, ':GR_NHMP_EMPLOYEE', $data->gr_nhmp_employee); ocibindbyname($stid, ':GR_NHMP_BELT_NUMBER', $data->gr_nhmp_belt_number); ocibindbyname($stid, ':GR_NHMP_DESIGNATION', $data->gr_nhmp_designation); ocibindbyname($stid, ':GR_NHMP_PLACE_OF_POSTING', $data->gr_nhmp_place_of_posting); $_SESSION['cnic']=$data->gr_cnic; $_SESSION['job']=$data->gr_job_id; session_write_close(); $r = OCIExecute($stid, OCI_DEFAULT); /* Start : For updating no of edits*/ $query=""; if(($date_diff>=0 && $edits_before_closing==0)) $query ="update new_gr_app a set a.edits_before_closing=a.edits_before_closing+1 where a.gr_applicant_id=".$data->gr_applicant_id ; if(($date_diff<0 && $edits_after_closing==0)) $query ="update new_gr_app a set a.edits_after_closing=a.edits_after_closing+1 where a.gr_applicant_id=".$data->gr_applicant_id ; if($query!=""){ $stid = oci_parse($conn, $query); $r = OCIExecute($stid, OCI_NO_AUTO_COMMIT); } /* End : For updating no of edits*/ if($r) { OCICommit($conn); OCIFreeStatement($stid); // sms code $sql_sms="select t.gr_applicant_id, t.gr_app_mobile, s.case_no, s.job_title, t.gr_center_name from new_gr_app_update t, gr_job_cache s where t.gr_job_id=s.gr_job_id and t.gr_applicant_id = $GR_APPLICANT_ID"; //echo $sql_sms; $rs_sms=OCIParse($conn,$sql_sms); OCIExecute($rs_sms); OCIFetchInto($rs_sms,$rs_sms_data,OCI_ASSOC); $sms_track_id=$rs_sms_data["GR_APPLICANT_ID"]; $sms_mobile=$rs_sms_data["GR_APP_MOBILE"]; $sms_case_no=$rs_sms_data["CASE_NO"]; $sms_job_title=$rs_sms_data["JOB_TITLE"]; $sms_job_center=$rs_sms_data["GR_CENTER_NAME"]; //SendJobSMS(); // Should be commented as following code is directly embedded $response = file_get_contents('http://bsms.ufone.com/bsms_app5/sendapi.jsp?id=03343912571&message=Your%20Application%20for%20'.urlencode($sms_case_no).'%20'.urlencode($sms_job_title).'%20updated%20successfully%20against%20tracking%20ID%20'.urlencode($sms_track_id).'%20Your%20opted%20test%20center%20is%20'.urlencode($sms_job_center).'&shortcode=FPSC&lang=English&mobilenum='.urlencode($sms_mobile).'&password=745896'); return $GR_APPLICANT_ID; } else { oci_rollback($conn); OCIFreeStatement($stid); return oci_error($stid); } } function Religion_List($job_id,$domicile_code,$conn, $u_religion) { //Start: To Get Province ID by Domicile Code $q="select p.gr_province_id from gr_province p, domicile d where p.gr_province_id=d.prov_id and d.domicile_code=" . $domicile_code; $q_parse=OCIParse($conn,$q); OCIExecute($q_parse); OCIFetchInto($q_parse,$q_row, OCI_ASSOC); $province_id= $q_row["GR_PROVINCE_ID"]; //End: To Get Province ID by Domicile Code //Start: To Get Parent Id for Sub Cases by SE $query1="select parent_id from gr_job_post where gr_job_id=".$job_id; $rgender= OCIParse($conn,$query1); OCIExecute($rgender); OCIFetchInto($rgender,$mod_row1, OCI_ASSOC); if($mod_row1['PARENT_ID']) $job_id = $mod_row1['PARENT_ID']; else $job_id = $job_id; // End: To Get Parent Id for Sub Cases by SE $selReligion = "select t.gr_eligible_religion from gr_post_calculation t where t.gr_post_id=" . $job_id . " and t.gr_province_id=" . $province_id; $rsReligion = OCIParse($conn,$selReligion); OCIExecute($rsReligion); $Select_Religion = ""; $Select_Religion = ''; OCIFetchInto($rsReligion,$mod_row, OCI_ASSOC); $tableValue = $mod_row["GR_ELIGIBLE_RELIGION"]; if ($tableValue == "0"){ $selected_muslim = ($u_religion == 'Muslim') ? 'selected' : ""; $selected_n_muslim = ($u_religion == 'Non Muslim') ? 'selected' : ""; //print_r($selected_option);exit; $Select_Religion = $Select_Religion . ''; } if ($tableValue == "1"){ $selected_option = ($u_religion == 'Non Muslim') ? 'selected' : ""; $Select_Religion = $Select_Religion . ''; } return $Select_Religion; } function valid_jobs($conn,$job_id) { $query = "select jp.GR_JOB_ID, 'F.4-'||jp.gr_case_no||'/'||trim(to_char(jp.GR_JOB_POST_DATE,'YYYY'))||'-R ['||jp.gr_job_title||']'||js.gr_sub_name as GR_JOB_TITLE from GR_JOB_POST jp, gr_job_subs js, gr_job_sub_depend jsd where jp.gr_job_id = jsd.gr_dep_job_id(+) and jsd.gr_sub_id = js.gr_sub_id(+) and jp.gr_job_online = 1 and jp.gr_job_id not in (7094) and jp.gr_job_id=$job_id and GR_ADVERT_ID in( select GR_ADVERTISEMENT_ID from GR_POST_ADVERTISEMENT where (trunc(SYSDATE) - trunc(CLOSE_DATE)) <= 0) order by to_number(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(jp.gr_case_no,'A',''),'B',''),'C',''),'D',''),'E',''),'F',''),'G',''),'H',''),'I',''),'J',''),'K',''),'L',''),'M',''),'N',''),'O',''),'P',''),'Q',''),'R',''),'S',''),'T',''),'U',''),'V',''),'W',''),'X',''),'Y',''),'Z','')) "; /* $query = "select jp.GR_JOB_ID, 'F.4-'||jp.gr_case_no||'/'||trim(to_char(jp.GR_JOB_POST_DATE,'YYYY'))||'-R ['||jp.gr_job_title||']'||js.gr_sub_name as GR_JOB_TITLE from GR_JOB_POST jp, gr_job_subs js, gr_job_sub_depend jsd where jp.gr_job_id = jsd.gr_dep_job_id(+) and jsd.gr_sub_id = js.gr_sub_id(+) and jp.gr_job_online = 1 and jp.gr_job_id not in (7094) and jp.gr_job_id=$job_id"; //and GR_ADVERT_ID =2117"; //Ad No 02/2018 */ $r_update_jobs = OCIParse($conn,$query); OCIExecute($r_update_jobs); $Select_jobs = ""; while(OCIFetchInto($r_update_jobs,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["GR_JOB_ID"]; $tableShow = $mod_row["GR_JOB_TITLE"]; $selected = ($job_id == $tableValue) ? ' selected="selected"' : ''; $Select_jobs = $Select_jobs . "$tableShow"; } // end while return $Select_jobs; } /* Change of centre till 1 month before the tentative exam date -- FROM ADV 09-2019 */ function jobs_tentative_exam($conn,$job_id) { $query = "select jp.GR_JOB_ID, 'F.4-'||jp.gr_case_no||'/'||trim(to_char(jp.GR_JOB_POST_DATE,'YYYY'))||'-R '||jp.gr_job_title||' '||js.gr_sub_name||' [ '||pa.gr_advertisement_no ||']' as GR_JOB_TITLE from GR_JOB_POST jp, gr_job_subs js, gr_job_sub_depend jsd, gr_post_advertisement pa where jp.gr_job_id = jsd.gr_dep_job_id(+) and jsd.gr_sub_id = js.gr_sub_id(+) and pa.gr_advertisement_id=jp.gr_advert_id and jp.gr_job_online = 1 and (trunc(sysdate)- add_months(jp.gr_tentative_exam_date, -1) <=0) order by pa.gr_advertisement_id, to_number(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(jp.gr_case_no,'A',''),'B',''),'C',''),'D',''),'E',''),'F',''),'G',''),'H',''),'I',''),'J',''),'K',''),'L',''),'M',''),'N',''),'O',''),'P',''),'Q',''),'R',''),'S',''),'T',''),'U',''),'V',''),'W',''),'X',''),'Y',''),'Z',''))"; $r_update_jobs = OCIParse($conn,$query); OCIExecute($r_update_jobs); $Select_jobs = ""; while(OCIFetchInto($r_update_jobs,$mod_row, OCI_ASSOC)) { $tableValue = $mod_row["GR_JOB_ID"]; $tableShow = $mod_row["GR_JOB_TITLE"]; $selected = ($job_id == $tableValue) ? ' selected="selected"' : ''; $Select_jobs = $Select_jobs . "$tableShow"; } // end while return $Select_jobs; } function edt_update($conn,$gr_applicant_id) { $query= "select * from new_gr_app_update a where a.gr_applicant_id=".$gr_applicant_id . " and a.date_applied=(select max(aa.date_applied) from new_gr_app_update aa where aa.gr_applicant_id=".$gr_applicant_id. ")"; $parse= OCIParse($conn,$query); OCIExecute($parse); oci_fetch_all($parse, $array); // Won't actually be needing the data, so we can unset that. unset($array); $numberofrows = oci_num_rows($parse); if($numberofrows <= 0){ $query= "select * from new_gr_app where gr_applicant_id=".$gr_applicant_id; } $update_rec= OCIParse($conn,$query); OCIExecute($update_rec); OCIFetchInto($update_rec,$mod_row, OCI_ASSOC); return $mod_row; } function center_update($conn,$gr_applicant_id,$gr_job_id) { $query= "select * from new_gr_app_master_12_2017 a where a.gr_applicant_id=$gr_applicant_id and a.gr_job_id=$gr_job_id"; $parse= OCIParse($conn,$query); OCIExecute($parse); oci_fetch_all($parse, $array); // Won't actually be needing the data, so we can unset that. unset($array); $numberofrows = oci_num_rows($parse); if($numberofrows <= 0){ $query= "select * from new_gr_app where gr_applicant_id=".$gr_applicant_id; } $update_rec= OCIParse($conn,$query); OCIExecute($update_rec); OCIFetchInto($update_rec,$mod_row, OCI_ASSOC); return $mod_row; } function valid_gender($job_id,$domicile_code,$conn, $u_gender) { //Start: To Get Province ID by Domicile Code $q_province="select p.gr_province_id from gr_province p, domicile d where p.gr_province_id=d.prov_id and d.domicile_code=" . $domicile_code; $province_parse=OCIParse($conn,$q_province); OCIExecute($province_parse); OCIFetchInto($province_parse,$province_row, OCI_ASSOC); $province_id= $province_row["GR_PROVINCE_ID"]; //End: To Get Province ID by Domicile Code //Start: To Get Parent Id for Sub Cases by SE $query1="select parent_id from gr_job_post where gr_job_id=".$job_id; $rgender= OCIParse($conn,$query1); OCIExecute($rgender); OCIFetchInto($rgender,$mod_row1, OCI_ASSOC); if($mod_row1['PARENT_ID']) $job_id = $mod_row1['PARENT_ID']; else $job_id = $job_id; // End: To Get Parent Id for Sub Cases by SE // job_id & province_id query $query="select GR_ELIGIBLE_GENDER from gr_post_calculation c where c.gr_post_id=".$job_id . " and c.gr_province_id=".$province_id; $rgender = OCIParse($conn,$query); OCIExecute($rgender); $select_genders = ""; OCIFetchInto($rgender,$mod_row, OCI_ASSOC); $tableValue = $mod_row["GR_ELIGIBLE_GENDER"]; if($tableValue=="0"){ $selected_male = ($u_gender == 'Male') ? " selected" : ""; $selected_female = ($u_gender == 'Female') ? " selected" : ""; $select_genders.= ""; } if($tableValue=="1"){ $selected_option = ($u_gender == 'Male') ? " selected" : ""; $select_genders.= ""; } if($tableValue=="2"){ $selected_option = ($u_gender == 'Female') ? " selected" : ""; $select_genders.= ""; } return $select_genders; } // end function //:: Method For Edit GR Application :: function update_centre_new($data,$conn) { $centre_array =check_duplicate_centre($data->gr_job_id,$data->gr_cnic,$data->gr_applicant_id,$conn); if ($centre_array>0) { $_SESSION['cnic']=$data->gr_cnic; $_SESSION['job']=$data->gr_job_id; session_write_close(); echo "You have already Updated your Test Centre"; exit; } $stmt = oci_parse($conn, 'begin GR_UPDATE_CENTER(:cnic, :mcq_center_id, :aps_center_id, :temp, :result, :result_mcq, :result_aps, :result_total, :err_code, :err_msg); end;'); oci_bind_by_name($stmt, ":cnic", $data->gr_cnic); oci_bind_by_name($stmt, ":mcq_center_id", $data->gr_test_centre_mcq); oci_bind_by_name($stmt, ":aps_center_id", $data->gr_test_centre_mcq); oci_bind_by_name($stmt, ":temp", $proc_output,400); oci_bind_by_name($stmt, ":result", $result); oci_bind_by_name($stmt, ":result_mcq", $result_mcq); oci_bind_by_name($stmt, ":result_aps", $result_aps); oci_bind_by_name($stmt, ":result_total", $result_total); oci_bind_by_name($stmt, ":err_code", $err_code); oci_bind_by_name($stmt, ":err_msg", $err_msg); echo " MCQ/WD ".$result_mcq." APS ".$result_aps; exit; /* $update_cnic = $data-> gr_cnic; $sql_update= "UPDATE gr_change_center_2021 SET NEW_CENTER_ID = :NEW_CENTER_ID, GR_CHANGE_DATE = sysdate WHERE GR_NEW_NIC = $update_cnic returning NEW_CENTER_ID INTO :NEW_CENTER_ID"; INSERT INTO gr_change_center_2021 ( GR_APPLICANT_ID, GR_NEW_NIC, GR_JOB_ID, GR_OLD_CENTER_ID, GR_NEW_CENTER_ID, GR_CHANGE_DATE ) VALUES( :GR_APPLICANT_ID, :GR_NEW_NIC, :GR_JOB_ID, :GR_OLD_CENTER_ID, :GR_NEW_CENTER_ID, sysdate ) returning GR_APPLICANT_ID INTO :GR_APPLICANT_ID $stid = ociparse($conn, $sql_update); */ //$mobile_num=92+str_replace(substr($data->gr_mobile,strpos($data->gr_mobile,'3')),'-',''); //echo $data->gr_helper."----".$data->gr_disability; //ocibindbyname($stid, ':NEW_CENTER_ID', $data->gr_test_centre_mcq); $_SESSION['cnic']=$data->gr_cnic; //$_SESSION['job']=$data->gr_job_id; session_write_close(); $r = OCIExecute($stid, OCI_DEFAULT); /* Start : For updating no of edits*/ if($r) { OCICommit($conn); OCIFreeStatement($stid); // sms code $sql_sms="select t.gr_applicant_id, t.gr_app_mobile, s.case_no, s.job_title, t.gr_center_name from new_gr_app_update t, gr_job_cache s where t.gr_job_id=s.gr_job_id and t.gr_applicant_id = $GR_APPLICANT_ID"; //echo $sql_sms; $rs_sms=OCIParse($conn,$sql_sms); OCIExecute($rs_sms); OCIFetchInto($rs_sms,$rs_sms_data,OCI_ASSOC); $sms_track_id=$rs_sms_data["GR_APPLICANT_ID"]; $sms_mobile=$rs_sms_data["GR_APP_MOBILE"]; $sms_case_no=$rs_sms_data["CASE_NO"]; $sms_job_title=$rs_sms_data["JOB_TITLE"]; $sms_job_center=$rs_sms_data["GR_CENTER_NAME"]; //SendJobSMS(); // Should be commented as following code is directly embedded $response = file_get_contents('http://bsms.ufone.com/bsms_app5/sendapi.jsp?id=03343912571&message=Your%20Application%20for%20'.urlencode($sms_case_no).'%20'.urlencode($sms_job_title).'%20updated%20successfully%20against%20tracking%20ID%20'.urlencode($sms_track_id).'%20Your%20opted%20test%20center%20is%20'.urlencode($sms_job_center).'&shortcode=FPSC&lang=English&mobilenum='.urlencode($sms_mobile).'&password=745896'); return $GR_APPLICANT_ID; } else { oci_rollback($conn); OCIFreeStatement($stid); return oci_error($stid); } } ?>