Exemple #1
0
         }
         header('Pragma: public');
         header('Expires: -1');
         header('Content-Transfer-Encoding: binary');
         header('Content-Type: application/vnd.ms-excel');
         header('Content-Disposition: attachment;filename="eCRFData.csv"');
         header('Cache-Control: max-age=0');
         // output the file
         echo $output;
         exit;
     }
     break;
 case 'locksite':
     if (isset($_POST['lockSite'])) {
         $centre = new Centre($user->getCentre());
         $centre->lockSite();
         $_SESSION['message'] = "You have locked your site for data entry, you may now download your data from Admin->Download your data";
     }
     break;
 case 'certs':
     addIncludePath('/addons/tfpdf');
     addIncludePath('/addons/fpdi');
     // Check first for if the confirmation code is being issued
     $certificate = "lead";
     $name = $user->forename . ' ' . $user->surname;
     // map FPDF to tFPDF so FPDF_TPL can extend it
     class FPDF extends tFPDF
     {
         protected $_tplIdx;
     }
     $pdf = new FPDI();