setLanguageArray($lg); // --------------------------------------------------------- // set font $pdf->SetFont('freesans', '', 12); // add a page $pdf->AddPage(); include('includes/config/config.php'); error_reporting(0); while (ob_get_level()) ob_end_clean(); header("Content-Encoding: None", true); $sql_for_fitness="select g.*, e.file_name,f.state, e.emp_sign as sign, e.qualification,e.registration_no,e.emp_id as sign_id, f.ohc_type_name, f.ohc_logo, f.icon_text, f.image_type from ohc_type f, sickness g left join employee_signature e on g.doctor_last_attended=e.emp_id where g.sickness_id = '".$_POST['flex_sickness_id']."' "; //echo $sql_for_fitness; //print_r($_POST); $result_for_fitness= mysqli_query($conn,$sql_for_fitness); $row_for_fitness= mysqli_fetch_assoc($result_for_fitness); @extract($row_for_fitness); $from_date=strtoupper(date_format(date_create($row_for_fitness['from_date']),"d-M-Y ")); $to_date=strtoupper(date_format(date_create($row_for_fitness['to_date']),"d-M-Y ")); $date_return=strtoupper(date_format(date_create($row_for_fitness['date_return']),"d-M-Y ")); $justifiable_from=strtoupper(date_format(date_create($row_for_fitness['justifiable_from']),"d-M-Y ")); $justifiable_to=strtoupper(date_format(date_create($row_for_fitness['justifiable_to']),"d-M-Y ")); $not_justifiable_from=strtoupper(date_format(date_create($row_for_fitness['not_justifiable_from']),"d-M-Y ")); $not_justifiable_to=strtoupper(date_format(date_create($row_for_fitness['not_justifiable_to']),"d-M-Y ")); $appointment_date=strtoupper(date_format(date_create($row_for_fitness['sickness_date']),"d-M-Y ")); $query_for_patient="select UPPER(a.patient_name) as patient_name,b.dept_name from patient_master a left join department b on a.dept_id=b.dept_id where a.id=$emp_id "; //echo $query_for_patient; $result_for_patient = @mysqli_query($conn,$query_for_patient); $row_for_patient = @mysqli_fetch_array($result_for_patient); // echo $row_emp_sign['modified_by']; $query_for_company="select company_name, company_logo, image_type from company_profile "; //echo $query_for_company; $result_for_company = @mysqli_query($conn,$query_for_company); if($row_for_company = @mysqli_fetch_array($result_for_company)){ @extract($row_for_company); } $path = 'images/'; $filename = $company_name; $filepath = $path.$filename; // If a physical file is not available then create it // If the DB data is fresher than the file then make a new file $result = file_put_contents($filepath, $company_logo); if($result === FALSE) { die(__FILE__.'
Error - Line #'.__LINE__.': Could not create '.$filepath); } $pdf->setCellPaddings( $left = '2px', $top = '2px', $right = '2px', $bottom = '2px'); $pdf->Image($filepath,12, 12, 40, 30, '', '', '', false, 150, '', false, false, 0, false, false, false ); $html = << .tbl1{ font-size:8px; border: 1px solid black; border-collapse: collapse; font-weight:1200; } .tbl1 td{ font-size:8px; border: 1px solid black; border-collapse: collapse; font-weight:1200; padding: 1px; } .tbl2{ font-size:8px; border-collapse: collapse; font-weight:1200; } .tbl2 td{ font-size:10px; border-collapse: collapse; font-weight:1200; padding: 10px; }
MAIHAR IU Department OCCUPATIONAL HEALTH CENTRE
Document No. RCC/MIU/OHC/OPD-04
Revision 0.0
Implementation Date 01.04.2016
Fitness Certificate



कार्यस्थल पर वापसी प्रश्नवाली
व्यावसायिक चिकित्सा विभाग


नाम :   {$row_for_patient['patient_name']}


पास नं :   {$row_for_patient['emp_code']}


डिपार्टमेंट:  {$row_for_patient['dept_name']}
बीमारी के बाद कार्यस्थल पर आपका स्वागत है |
आप कैसा महसूस कर रहे हैं ? सामान्य / कमज़ोर / बीमार
आप दिनांक           {$from_date} से            {$to_date}   तक बीमार थे
आपके बीमार पड़ने की क्या वजह थी? {$sickness_name}
आपने अपना इलाज कहा करवाया? {$agency}
आपने क्या कंपनी की डिस्पेंसरी या अपने अधिकारी को बीमारी के बारे में बताया? (हां / नहीं)



हस्ताक्षर कर्मचारी



हस्ताक्षर चिकित्सक

EOD; $pdf->Ln(); $html =$html. <<




Mr       {$row_for_patient['patient_name']}



Per No./Gate pass No     {$row_for_patient['emp_code']}

Dept./Contractor Name:   {$row_for_patient['dept_name']}

is fit to attend his regular

duties from :     {$date_return}

in the shift alloted to him.

Period of absence is justifiable from       {$justifiable_from}

to       {$justifiable_to}

Not justifiable from : {$not_justifiable_from}

to   {$not_justifiable_to}



Date:   {$sickness_date}



Signatute of Medical Officer stamp



Mr       {$row_for_patient['patient_name']}



Per No./Gate pass No     {$row_for_patient['emp_code']}

Dept./Contractor Name:   {$row_for_patient['dept_name']}

is fit to attend his regular

duties from :     {$date_return}

in the shift alloted to him.

Period of absence is justifiable from       {$justifiable_from}

to       {$justifiable_to}

Not justifiable from : {$not_justifiable_from}

to   {$not_justifiable_to}



Date:   {$sickness_date}



Signatute of Medical Officer stamp

EOD; // $path = 'images/'; // $filename = $file_name; // $filepath = $path.$filename; // // If a physical file is not available then create it // // If the DB data is fresher than the file then make a new file // if(!is_file($filepath) || strtotime($row['last_update']) > filemtime($filepath)) // { // $result = file_put_contents($filepath, $sign); // if($result === FALSE) // { // die(__FILE__.'
Error - Line #'.__LINE__.': Could not create '.$filepath); // } // } // $pdf->Image($filepath,150, 250, 30, 10, $file_type, '', '', false, 150, '', false, false, 0, false, false, false ); // $pdf->Image($filepath,150, 160, 30, 10, $file_type, '', '', false, 150, '', false, false, 0, false, false, false ); $pdf->WriteHTML($html, true, 0, true, 0); $pdf->Output('fitness_Certificate.pdf', 'I'); ?>