switch ($a) {
case "jobs":
jobsdetail();
break;
case "view":
echo ViewApplicantDetail1();
break;
default:
echo advertjobs();
echo"
:: Application History
";
}
?>
include("../include/bottom.php"); ?>
function advertjobs()
{
global $conn,$hid,$userId;
$get_jobs="SELECT a.*,b.*,d.* FROM CSS_APP_GENERAL a,CSS_JOB_RECIEPT b,CSS_POST_ADVERTISEMENT d where a.CSS_PARENT_ID=$userId
and a.CSS_APPLICANT_ID=b.CSS_APPLICANT_ID and b.CSS_ADVERTISEMENT_ID=d.CSS_ADVERTISEMENT_ID";
//echo $get_jobs; exit;
$temp="";
$temp.="
";
return $temp;
}
function displayJobTitle($jobId){
return "";
}
function jobsdetail()
{
global $conn,$jobid;
$jobid=$_GET["jobid"];
$det_jobs="select j.CSS_JOB_TITLE,j.CSS_JOB_VACANCIES,j.CSS_JOB_EXP,j.CSS_JOB_GRADE,
m.MINISTRY_NAME,j.CSS_JOB_DEPT,j.CSS_JOB_MAX_AGE,c.CITY_NAME,trim(to_char(j.CSS_JOB_POST_DATE,'YYYY')) as PYEAR,
trim(to_char(j.CSS_JOB_CLOSE_DATE,'DD')) || '-' || trim(to_char(j.CSS_JOB_CLOSE_DATE,'MM')) || '-' || trim(to_char(j.CSS_JOB_CLOSE_DATE,'YYYY')) as CDATE
from CSS_JOB_POST j, CSS_MINISTRIES m, CSS_CITY c
where j.CSS_JOB_PLACE=c.CITY_ID and j.CSS_JOB_MINISTRY=m.MINISTRY_ID and j.CSS_JOB_ID=$jobid";
//echo $det_jobs; exit;
$temp="";
$det_rs = OCIParse($conn, $det_jobs);
OCIExecute($det_rs);
OCIFetchInto($det_rs,$det_row, OCI_ASSOC);
$CSS_JOB_TITLE=$det_row["CSS_JOB_TITLE"];
$MINISTRY_NAME=$det_row["MINISTRY_NAME"];
$CSS_JOB_DEPT=$det_row["CSS_JOB_DEPT"];
$CSS_JOB_MAX_AGE=$det_row["CSS_JOB_MAX_AGE"];
$CITY_NAME=$det_row["CITY_NAME"];
$CSS_JOB_VACANCIES=$det_row["CSS_JOB_VACANCIES"];
$CSS_JOB_EXP=$det_row["CSS_JOB_EXP"];
$CSS_JOB_GRADE=$det_row["CSS_JOB_GRADE"];
$CDATE=$det_row["CDATE"];
$PYEAR=$det_row["PYEAR"];
$dept_sql="select CSS_DEPARTMENT_NAME from CSS_MIN_DEPT where CSS_DEPARTMENT_ID=$CSS_JOB_DEPT";
$dept_rs = OCIParse($conn, $dept_sql);
OCIExecute($dept_rs);
OCIFetchInto($dept_rs,$dept_row, OCI_ASSOC);
$CSS_DEPARTMENT_NAME=$dept_row["CSS_DEPARTMENT_NAME"];
$temp.="";
echo $temp;
}
function ViewApplicantDetail1(){
global $conn,$userId;
$temp="";
$aid=$_GET['userId_d'];
//echo $aid; exit;
if ($aid>0){
$display_sql= "select * from CSS_APP_GENERAL where CSS_APPLICANT_ID=$aid";
if($rs_display = OCIParse($conn, $display_sql))
{
OCIExecute($rs_display);
OCIFetchInto($rs_display, $row_display, OCI_ASSOC);
$CSS_islamiat=$row_display["CSS_ISLAMIAT_EXCEPTION"];
if(strlen($CSS_islamiat)==0) $CSS_islamiat='No'; else $CSS_islamiat='Yes';
$CSS_APPLICANT_ID=$row_display["CSS_APPLICANT_ID"];
$CSS_APPLICATION_ID=$row_display["CSS_APPLICATION_ID"];
$CSS_APPLICANT_NAME=$row_display["CSS_APPLICANT_NAME"];
$CSS_FATHER_NAME=$row_display["CSS_FATHER_NAME"];
$CSS_SPOUSE_NAME=$row_display["CSS_SPOUSE_NAME"];
$CSS_SPOUSE_NATIONALITY=$row_display["CSS_SPOUSE_NATIONALITY"];
$CSS_NATIONALITY_STATUS=$row_display["CSS_NATIONALITY_STATUS"];
$CSS_APPLICANT_NATIONALITY=$row_display["CSS_APPLICANT_NATIONALITY"];
$CSS_OLD_NIC=$row_display["CSS_OLD_NIC"];
$CSS_NEW_NIC=$row_display["CSS_NEW_NIC"];
$CSS_GENDER=$row_display["CSS_GENDER"];
$CSS_MARITAL_STATUS=$row_display["CSS_MARITAL_STATUS"];
$CSS_RELIGION=$row_display["CSS_RELIGION"];
$CSS_DOB=$row_display["CSS_DOB"];
$CSS_AGE_RELAXATION=$row_display["CSS_AGE_RELAXATION"];
$CSS_DOMICILE=$row_display["CSS_DOMICILE"];
$GR_DISTRICT_DOMICILE=$row_display["CSS_DISTRICT_DOMICILE"];
$CSS_APPLICANT_EMAIL=$row_display["CSS_APPLICANT_EMAIL"];
$CSS_APPLICANT_PHONE_OFF=$row_display["CSS_APPLICANT_PHONE_OFF"];
$CSS_APPLICANT_PHONE_RES=$row_display["CSS_APPLICANT_PHONE_RES"];
$CSS_APPLICANT_FAX=$row_display["CSS_APPLICANT_FAX"];
$CSS_POSTAL_ADD1=$row_display["CSS_POSTAL_ADD1"];
$CSS_POSTAL_ADD2=$row_display["CSS_POSTAL_ADD2"];
$CSS_PARMANENT_ADD1=$row_display["CSS_PARMANENT_ADD1"];
$CSS_PARMANENT_ADD2=$row_display["CSS_PARMANENT_ADD2"];
$CSS_CENTER=$row_display["CSS_CENTER"];
$CSS_AGEREX1=$row_display["CSS_AGEREX1"];
$CSS_AGEREX2=$row_display["CSS_AGEREX2"];
$CSS_AGEREX3=$row_display["CSS_AGEREX3"];
$CSS_AGEREX4=$row_display["CSS_AGEREX4"];
$CSS_AGEREX5=$row_display["CSS_AGEREX5"];
$CSS_AGEREX6=$row_display["CSS_AGEREX6"];
$CSS_AGEREX7=$row_display["CSS_AGEREX7"];
$CSS_AGEREX8=$row_display["CSS_AGEREX8"];
/*if($aid!=0){
$jobid=returnfield("select CSS_RECIEPT_ID from CSS_JOB_RECIEPT where CSS_APPLICANT_ID=$aid","CSS_RECIEPT_ID");
if ($jobid!=0){
$postBPS=returnfield("select CSS_JOB_SCALE from CSS_JOB_POST where CSS_JOB_ID=$jobid","CSS_JOB_SCALE");
$postName=returnfield("select CSS_JOB_TITLE from CSS_JOB_POST where CSS_JOB_ID=$jobid","CSS_JOB_TITLE");
$ministryId=returnfield("select CSS_JOB_MINISTRY from CSS_JOB_POST where CSS_JOB_ID=$jobid","CSS_JOB_MINISTRY");
$ministryName=returnfield("select MINISTRY_NAME from CSS_MINISTRIES where MINISTRY_ID=$ministryId","MINISTRY_NAME");
$departmentId=returnfield("select CSS_JOB_DEPT from CSS_JOB_POST where CSS_JOB_ID=$jobid","CSS_JOB_DEPT");
$deptName=returnfield("select CSS_DEPARTMENT_NAME from CSS_MIN_DEPT where CSS_DEPARTMENT_ID=$departmentId","CSS_DEPARTMENT_NAME");
$advid=returnfield("select CSS_ADVERT_ID from CSS_JOB_POST where CSS_JOB_ID=$jobid","CSS_ADVERT_ID");
}
if ($advid!=0){
$diaryNo=returnfield("select CSS_DIARY_NO from CSS_BATCH_DIARY where CSS_ADVERTISEMENT_ID=$advid","CSS_DIARY_NO");
$batchNo=returnfield("select CSS_BATCH_NO from CSS_BATCH_DIARY where CSS_ADVERTISEMENT_ID=$advid","CSS_BATCH_NO");
$advid=returnfield("select CSS_ADVERTISEMENT_NO from CSS_POST_ADVERTISEMENT where CSS_ADVERTISEMENT_ID=$advid","CSS_ADVERTISEMENT_NO");
}
}*/
$rt="select * from DOMICILE where DOMICILE_CODE=$CSS_DOMICILE";
$tt=OCIParse($conn,$rt);
OCIExecute($tt);
OCIFetchInto($tt,$art,OCI_ASSOC);
}
}
$temp.="
FEDERAL PUBLIC SERVICE COMMISSION
APPLICATION FORM
FOR COMPETITIVE EXAMINATION (CSS)
For post in BPS-17 under the Federal Government
Reciving Stamp of Head Quarters
T.R
Receiving Stamp of Branch Office
";
$sql = "SELECT CSS_PHOTO FROM CSS_APP_GENERAL where CSS_APPLICANT_ID=$aid";
$stmt = OCIParse ($conn, $sql);
OCIExecute($stmt, OCI_DEFAULT);
OCIFetchInto($stmt, $arr, OCI_ASSOC+OCI_RETURN_LOBS);
$result = $arr['CSS_PHOTO'];
if (strlen($result)>0)
{
$temp.="";
}else{
$temp.="";
}
$temp.="
Batch No. $batchNo
Diary No. $diaryNo
Roll No. ...................
PART-1 (GENERAL INFORMATION)
NOTE:
Be very careful in filling the Application Form paying particular attention to the following:-
» The form is to be filled in Capital Letters.
» No Column is to be left blank.
» Incomplete Application form will be rejected.
(01)
(a) Full Name: ".$CSS_APPLICANT_NAME." (b) Father's Name: ".$CSS_FATHER_NAME."
";
if($GR_DISTRICT_DOMICILE!=0){
$district_name=returnfield("select GR_DISTRICT from DISTRICT where GR_DISTRICT_ID=".$GR_DISTRICT_DOMICILE."","GR_DISTRICT");
}
if($aid!=0){
$sql="select CSS_CENTER_ID from CSS_JOB_RECIEPT where CSS_APPLICANT_ID=".$aid." and CSS_ADVERTISEMENT_ID=".$_GET["jid"]."";
$center_id=returnfield($sql,"CSS_CENTER_ID");
}
if($center_id!=0){
$center_name=returnfield("select CENTER_NAME from CENTER where CENTER_ID=".$center_id."","CENTER_NAME");
}
$temp.="
(04)
Examination Center: Domicile: District of Domicile:
  Name the language in which you have any proficiency (mother tonge first) and grade your ability as
(Excelent Good Fair)
";
OCIFreeStatement($rs_display);
$display_sql= "Select * from CSS_APP_LANGUAGE where CSS_APPLICANT_ID=$aid order by CSS_APPLICANT_LANGUAGE_ID desc";
//echo $display_sql;// exit;
$temp22.="
Particular about father and mother should be given appropriate boxes.
";
OCIFreeStatement($rs_display);
$display_sql= "Select * from CSS_APP_PARENTS where CSS_APPLICANT_ID=$aid order by CSS_PARENT_NAME";
//echo $display_sql;// exit;
$temp2.="
";
OCIFreeStatement($rs_display);
$display_sql= "Select * from CSS_APP_RELATIVE where CSS_APPLICANT_ID=$aid order by CSS_NAME
";
//echo $display_sql;
$temp3.="
Please indicate the order of birth of your brothers and sisters(including yourself).Step-brothers and step-sisters(if any) in the second column. Write brother,sistee,step-brother, step-sister and yourself. In the column for 'occupation' clearly indicate his/her occupation. If pertinent write 'Household' 'student' etc. In the next column mention the highest degree obtained. Class passed or class in which studying.
";
OCIFreeStatement($rs_display);
$display_sql= "select * from CSS_APP_BROTHERS_SISTERS where CSS_APPLICANT_ID=$aid";
//echo $display_sql; exit;
$temp12.="
";
OCIFreeStatement($rs_display);
$display_sql= "Select count(*) as mycount from CSS_APP_PRE_ATTEMPT where CSS_APPLICANT_ID=$aid";
//echo $display_sql;
$temp5.="
Was any disciplinary action, ever taken against you in any educational institution or department or were you ever debarred from government service or any examination/selection held by FPSC, or were you ever convicted for any crime other than a minor traffic offence (Put a cross in relevant box)?
";
OCIFreeStatement($rs_display);
$display_sql= "Select CSS_APP_DISCIPLINE from CSS_APP_PRE_ATTEMPT where CSS_APPLICANT_ID=$aid";
//echo $display_sql; exit;
$temp13.="
List below all institutions where you have been educated and the examinations passed by you. If in any examination, you secured I/II/III position write 1/2/3 in the relecant column otherwise leave that column blank. For institutions in Pakistan give place/district underlocations.for institutions abroad mention the country only.
";
OCIFreeStatement($rs_display);
$display_sql= "select * from CSS_APP_EDUCATION where CSS_APPLICANT_ID=$aid";
//echo $display_sql; exit;
$temp14.="
S. No.
School /College /Institution /University & Location
Distiction achieved/Academic Awards: Prizes, Medals, Scholarships obtained during the academic career. Extra Curricular Activities: Extra-curicular activities in school/college/University i.e. President of students union/Red Cresent Society Scouts/Girl guide etc. Sports:Participation in sports, position and prizes won.
Hobbies:Leisure time (Vacations adn other spare time) Activities.
In this column write 'R' against the qualification that make your eligible for appearing in the examination.In the case you are MBBS. Mark 'M' and if you have graduated from foreign University , enter 'F'
";
$temp.=$temp14;
$temp.="
(15)
Describe your employments, starting the time of completing your education to submitting this application, so as to completely account for the whole of this period. In this Employment Record include all appointments held, professional practice, self-employment and un-employment, if any.
";
OCIFreeStatement($rs_display);
$display_sql= "select * from CSS_APP_EMPLOYMENT where CSS_APPLICANT_ID=$aid";
//echo $display_sql; exit;
$temp15.="
S. No.
Post held and Name of the Office For the period of un-employment write UNEMPLOYED
Division / Department OR Name of Organiztion
Ministry OR Name of Goverment(in Case of Provincial Goverment)
Date (Exact dates must be filled in and no box be left blank)
";
$temp.=$temp15;
//$sql3="select a.*,b.* from CSS_SUBJECT_CHOOSED a,CSS_APP_SUBJECT b where CSS_APPLICANT_ID=$aid and
//a.CSS_SUBJECT_ID=b.CSS_SUBJECT_ID and CSS_ADVERTISEMENT_ID=$_GET[jid]";
//echo $sql;
/*$rs3 = OCIParse($conn,$sql3);
OCIExecute($rs3);
$ik=0;
while(OCIFetchInto($rs3,$arr3,OCI_ASSOC))
{
$arrkeep[$ik]=$arr3[CSS_SUBJECT_ID];
$ik++;
}*/
$temp.="
(16)
A
list of optional subjects is given below.the marks for subjects are
shown against each .Choose the subjects with the total sum of 600
taking in consideration the choosing criteria.
";
$temp16.="
Subjects
(Code No)
Subjects
Marks
";
$sql="select a.*,b.* from CSS_SUBJECT_CHOOSED a,CSS_APP_SUBJECT b where CSS_APPLICANT_ID=$aid and
a.CSS_SUBJECT_ID=b.CSS_SUBJECT_ID and CSS_ADVERTISEMENT_ID=$_GET[jid]";
//echo $sql;
$rs = OCIParse($conn,$sql);
OCIExecute($rs);
while(OCIFetchInto($rs,$arr,OCI_ASSOC))
{
$temp16.="
";
$temp16.="
$arr[CSS_SUBJECT_ID]
$arr[CSS_SUBJECTS]
$arr[CSS_SUBJECT_MARKS]
";
}
$temp16.="
";
for($j=0;$j<10;$j++)
{
$counter[$j]="";
}
$sql3="select * from CSS_OCC_SELECTION where CSS_APPLICANT_ID=$aid and CSS_ADVERTISEMENT_ID=$_GET[jid]";
$rs3=OCIParse($conn,$sql3);
OCIExecute($rs3);
OCIFetchInto($rs3,$arr3,OCI_ASSOC);
$sqle="select * from CSS_OCC_GROUPS";
$rse=OCIParse($conn,$sqle);
OCIExecute($rse);
$count=1;
$temp16.="