Advertisement
Guest User

dank swift ( ͡° ͜ʖ ͡°)

a guest
Dec 11th, 2015
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /** Error reporting */
  3. error_reporti ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°) ( ͡° ͜ʖ ͡°)ng(E_ALL);
  4. ini_set('display_errors', TRUE);
  5. ini_set('display_startup_errors', TRUE);
  6. date_default_timezone_set('Europe/London');
  7. define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
  8. /** Include PHPExcel */
  9. require_once '/var/www/Classes/PHPExcel.php';
  10. $filename=date('d-m-o');
  11. $file;
  12. if(file_exists('/var/www/tables/'.$filename.'.xls'))$file=PHPExcel_IOFactory::load('/var/www/tables/'.$filename.'.xls');
  13. else $file=PHPExcel_IOFactory::load('/var/www/tables/template.xls');
  14. $file->setActiveSheetIndex(0);
  15. $sheet = $file->getActiveSheet();
  16. $number;
  17. switch($_POST['name']){
  18. case 'lyuba': $number=1; break;
  19. case 'ira': $number=2; break;
  20. default:$number=0;break;
  21. }
  22. if($number!=0 && $sheet->getCell('B'.$number)->getValue()=='-'){
  23.     $sheet->setCellValueByColumnAndRow(1,$number,$_POST['t1']);
  24.     $sheet->setCellValueByColumnAndRow(2,$number,$_POST['t2']);
  25.     $objWriter = PHPExcel_IOFactory::createWriter($file, 'Excel5');
  26.     $objWriter->save('/var/www/tables/'.$filename.'.xls');
  27. }
  28.  
  29. header('Content-Type: application/vnd.ms-excel');
  30. header('Content-Disposition: attachment;filename="01simple.xls"');
  31. header('Cache-Control: max-age=0');
  32. // If you're serving to IE 9, then the following may be needed
  33. header('Cache-Control: max-age=1');
  34. // If you're serving to IE over SSL, then the following may be needed
  35. header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
  36. header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
  37. header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
  38. header ('Pragma: public'); // HTTP/1.0
  39. $objWriter = PHPExcel_IOFactory::createWriter($file, 'Excel5');
  40. $objWriter->save('php://output');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement