phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] hrm/inc class.uiuser.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] hrm/inc class.uiuser.inc.php
Date: Sun, 02 Jul 2006 20:52:48 +0000

CVSROOT:        /sources/phpgroupware
Module name:    hrm
Changes by:     Sigurd Nes <sigurdne>   06/07/02 20:52:48

Modified files:
        inc            : class.uiuser.inc.php 

Log message:
        allow pdf with mod_deflate and IE

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/hrm/inc/class.uiuser.inc.php?cvsroot=phpgroupware&r1=1.22&r2=1.23

Patches:
Index: class.uiuser.inc.php
===================================================================
RCS file: /sources/phpgroupware/hrm/inc/class.uiuser.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- class.uiuser.inc.php        30 Jun 2006 11:07:02 -0000      1.22
+++ class.uiuser.inc.php        2 Jul 2006 20:52:48 -0000       1.23
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package hrm
        * @subpackage user
-       * @version $Id: class.uiuser.inc.php,v 1.22 2006/06/30 11:07:02 
sigurdne Exp $
+       * @version $Id: class.uiuser.inc.php,v 1.23 2006/07/02 20:52:48 
sigurdne Exp $
        */
 
        /**
@@ -918,9 +918,6 @@
                                                        )
                                                );
                
-
-
-
                        $table_header = array(
                                
'start_date'=>array('justification'=>'left','width'=>70),
                                
'sep'=>array('justification'=>'center','width'=>15),
@@ -929,9 +926,6 @@
                                
'what'=>array('justification'=>'left','width'=>300)
                                );
                        
-
-
-
                        $category_old   = '';
                        while (is_array($training) && list(,$entry) = 
each($training))
                        {
@@ -983,62 +977,7 @@
 
                                unset($content);
                        }
-/*
-                       $document= $pdf->ezOutput();
-                       $size=strlen($document);
-
-                       $browser = CreateObject('phpgwapi.browser');
-                       
$browser->content_header('receipt.pdf','application/pdf',$size);
-
-                       echo $document;
-*/
-
-                         $pdfcode= $pdf->ezOutput();
-  
- // $dir = './pdf_files';
-                       $dir = PHPGW_APP_INC  . '/..';
-                       $dir = $dir . SEP . 'pdf_files';
-  
-                       //save the file
-                       if (!file_exists($dir)){
-                       mkdir ($dir,0777);
-                       }
-
-                       $fname = tempnam($dir.SEP,'PDF_').'.pdf';
-  
-                       $fp = fopen($fname,'w');
-                       fwrite($fp,$pdfcode);
-                       fclose($fp);
-  
-                       $fname = 'hrm/pdf_files/'. basename($fname);
-                       echo '<html>
-                       <head>
-                       <SCRIPT LANGUAGE="JavaScript"><!-- 
-                       function go_now ()   { window.location.href = 
"'.$fname.'"; }
-                       //--></SCRIPT>
-                       </head>
-                       <body onLoad="go_now()"; >
-                       <a href="'.$fname.'">click here</a> if you are not 
re-directed.
-                       </body>
-                       </html>
-                       ';
-
-                       // also have a look through the directory, and remove 
the files that are older than a week
-                       if ($d = @opendir($dir))
-                       {
-                               while (($file = readdir($d)) !== false)
-                               {
-                                       if (substr($file,0,4)=="PDF_")
-                                       {
-                                               // then check to see if this 
one is too old
-                                               $ftime = 
filemtime($dir.'/'.$file);
-                                               if (time()-$ftime > 3600*24)
-                                               {
-                                                       unlink($dir.'/'.$file);
-                                               }
-                                       }
-                               }  
-                               closedir($d);
-                       }
+                       $document = $pdf->ezOutput();
+                       $pdf->print_pdf($document,'cv_'.$user_id);  
                }
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]