Changeset 3163 for branches/2.2/expressoMail1_2/inc/show_img.php
- Timestamp:
- 08/17/10 11:26:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/inc/show_img.php
r3018 r3163 30 30 echo $image; 31 31 } 32 else if($_SESSION['phpgw_info']['expressomail']['contact_photo']){ 33 $data = $_SESSION['phpgw_info']['expressomail']['contact_photo']; 34 35 if($data) { 36 37 $photo = imagecreatefromstring($data[0]); 38 if($photo){ 39 $width = imagesx($photo); 40 $height = imagesy($photo); 41 $twidth = 60; 42 $theight = 80; 43 $small_photo = imagecreatetruecolor ($twidth, $theight); 44 imagecopyresampled($small_photo, $photo, 0, 0, 0, 0,$twidth, $theight, $width, $height); 45 imagejpeg($small_photo,'',100); 46 unset($_SESSION['phpgw_info']['expressomail']['contact_photo']); 32 else{ 33 $expires = 60*60*24*30; /* 30 days */ 34 header("Cache-Control: maxage=".$expires); 35 header("Pragma: public"); 36 header("Expires: ".gmdate('D, d M Y H:i:s', time()+$expires)); 37 if($_SESSION['phpgw_info']['expressomail']['contact_photo']){ 38 $data = $_SESSION['phpgw_info']['expressomail']['contact_photo']; 39 40 if($data) { 41 42 $photo = imagecreatefromstring($data[0]); 43 if($photo){ 44 $width = imagesx($photo); 45 $height = imagesy($photo); 46 $twidth = 60; 47 $theight = 80; 48 $small_photo = imagecreatetruecolor ($twidth, $theight); 49 imagecopyresampled($small_photo, $photo, 0, 0, 0, 0,$twidth, $theight, $width, $height); 50 imagejpeg($small_photo,'',100); 51 unset($_SESSION['phpgw_info']['expressomail']['contact_photo']); 52 } 47 53 } 48 54 } 55 else 56 readfile("./../../contactcenter/templates/default/images/photo_celepar.png"); 49 57 } 50 else51 readfile("./../../contactcenter/templates/default/images/photo_celepar.png");52 58 ?>
Note: See TracChangeset
for help on using the changeset viewer.