Index: branches/1.2/expressoMail1_2/inc/class.exporteml.inc.php
===================================================================
--- branches/1.2/expressoMail1_2/inc/class.exporteml.inc.php	(revision 711)
+++ branches/1.2/expressoMail1_2/inc/class.exporteml.inc.php	(revision 1342)
@@ -186,29 +186,4 @@
 	}
 
-	function export_to_archive($id_msg,$folder) {
-		$this->folder = $folder;
-		$this->folder = mb_convert_encoding($this->folder, "UTF7-IMAP","UTF-8");
-		$tempDir = dirname( __FILE__ ) . '/../tmpLclAtt';
-		
-		$phpheader = "<?php header('Content-Type: text/plain');
-				header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
-				header('Pragma: public');
-				header('Expires: 0'); // set expiration time
-	 	 		header('Content-Disposition: attachment; filename=\"fonte_da_mensagem.txt\"');?>";
-		
-		$this->connectImap();
-		$header	 	= $this-> getHeader($id_msg);
-		$body		= $this-> getBody($id_msg);
-		
-		$file = "source_".md5(microtime()).".php";
-		$f = fopen($tempDir.'/'.$file,"w");
-		fputs($f,$phpheader.$header ."\r\n\r\n". $body);
-		fclose($f);
-		$urlPath = 'tmpLclAtt/'.$file;
-		
-		imap_close($this->mbox_stream);
-		return $urlPath;
-	}
-
 	function remove_accents($string) {
 		/*
@@ -220,166 +195,4 @@
 			"áàâãäéèêëíìîïóòôõöúùûüç?\"!@#$%š&*()-=+Ž`[]{}~^,<>;:/?\\|¹²³£¢¬§ªº°ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ",
 			"aaaaaeeeeiiiiooooouuuuc__________________________________________AAAAAEEEEIIIIOOOOOUUUUC");
-	}
-	
-	function get_attachments_in_array($params) {
-		$return_attachments = array();
-
-		$id_number = $params['num_msg'];		
-		$attachments =unserialize(rawurldecode($params['s_attachments']));
-		
-		$tempDir = dirname( __FILE__ ) . '/../tmpLclAtt';
-//		$tempDir = $_SERVER["DOCUMENT_ROOT"]."tmpLclAtt";
-		$tempSubDir = md5(microtime());
-		exec('mkdir ' . $tempDir . '/'.$tempSubDir.'; cd ' . $tempDir . '/'.$tempSubDir);
-		
-		$this-> folder = $params['folder'];
-		$this->folder = mb_convert_encoding($this->folder, "UTF7-IMAP","UTF-8");
-		$this->connectImap();
-
-		include_once("class.imap_attachment.inc.php");
-
-		$imap_attachment = new imap_attachment();
-		$attachments = $imap_attachment->download_attachment($this->mbox_stream, $id_number);
-		
-
-		
-		foreach($attachments as $i => $attachment){
-			if($i && $i == 'names')
-				continue;
-			$fileNameReal = $this->remove_accents($attachment['name']);
-			$ContentType = $this->getFileType($fileNameReal);
-			$fileName = $fileNameReal . ".php";
-			$f = fopen($tempDir . '/'.$tempSubDir.'/'.$fileName,"wb");
-			if(!$f)
-				return $tempDir . '/'.$tempSubDir.'/'.$fileName;			
-
-			$fileContent = imap_fetchbody($this->mbox_stream, $id_number,$attachment['pid'], FT_UID);
-			$urlPath = 'tmpLclAtt/'.$tempSubDir.'/'.$fileName;
-			
-			$headers = "<?php header('Content-Type: ".$ContentType."');
-				header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
-				header('Pragma: public');
-				header('Expires: 0'); // set expiration time
-	 	 		header('Content-Disposition: attachment; filename=\"". addslashes($fileNameReal) ."\"');\n echo ";
-			
-			if($attachment['encoding'] == 'base64') {
-				$headers.=" imap_base64('".$fileContent."');?>";
-			}
-			else if($attachment['encoding'] == 'quoted_printable_decode') {
-				$headers.=" quoted_printable_decode('".$fileContent."');?>";
-			}
-			else {
-				$headers.=" '".$fileContent."';?>";
-			}
-			
-			fputs($f,$headers);
-
-			array_push($return_attachments,array('name' => $fileName,'url' => $urlPath,'pid' =>$attachment['pid']));
-			fclose($f);
-		}
-		imap_close($this->mbox_stream);
-		return $return_attachments;
-	}
-	
-	private function getFileType($nameFile) {
-		$strFileType = strrev(substr(strrev(strtolower($nameFile)),0,4));
-		$ContentType = "application/octet-stream";
-	   	if ($strFileType == ".asf") 
-	   		$ContentType = "video/x-ms-asf";
-	   	if ($strFileType == ".avi")
-	   		$ContentType = "video/avi";
-	   	if ($strFileType == ".doc")
-	   		$ContentType = "application/msword";
-	   	if ($strFileType == ".zip")
-	   		$ContentType = "application/zip";
-	   	if ($strFileType == ".xls")
-	   		$ContentType = "application/vnd.ms-excel";
-	   	if ($strFileType == ".gif")
-	   		$ContentType = "image/gif";
-	   	if ($strFileType == ".jpg" || $strFileType == "jpeg")
-	   		$ContentType = "image/jpeg";
-	   	if ($strFileType == ".wav")
-	   		$ContentType = "audio/wav";
-	   	if ($strFileType == ".mp3")
-	   		$ContentType = "audio/mpeg3";
-	   	if ($strFileType == ".mpg" || $strFileType == "mpeg")
-	   		$ContentType = "video/mpeg";
-	   	if ($strFileType == ".rtf")
-	   		$ContentType = "application/rtf";
-	   	if ($strFileType == ".htm" || $strFileType == "html")
-	   		$ContentType = "text/html";
-	   	if ($strFileType == ".xml") 
-	   		$ContentType = "text/xml";
-	   	if ($strFileType == ".xsl") 
-	   		$ContentType = "text/xsl";
-	   	if ($strFileType == ".css") 
-	   		$ContentType = "text/css";
-	   	if ($strFileType == ".php") 
-	   		$ContentType = "text/php";
-	   	if ($strFileType == ".asp") 
-	   		$ContentType = "text/asp";
-	   	if ($strFileType == ".pdf")
-	   		$ContentType = "application/pdf";
-	   	if ($strFileType == ".txt")
-	   		$ContentType = "text/plain";
-	   	if ($strFileType == ".log")
-	   		$ContentType = "text/plain";
-	   	if ($strFileType == ".wmv")
-	   		$ContentType = "video/x-ms-wmv";
-		if ($strFileType == ".sxc")
-			$ContentType = "application/vnd.sun.xml.calc";
-		if ($strFileType == ".odt")
-			$ContentType = "application/vnd.oasis.opendocument.text";
-		if ($strFileType == ".stc")
-			$ContentType = "application/vnd.sun.xml.calc.template";
-		if ($strFileType == ".sxd")
-			$ContentType = "application/vnd.sun.xml.draw";
-		if ($strFileType == ".std")
-			$ContentType = "application/vnd.sun.xml.draw.template";
-		if ($strFileType == ".sxi")
-			$ContentType = "application/vnd.sun.xml.impress";
-		if ($strFileType == ".sti")
-			$ContentType = "application/vnd.sun.xml.impress.template";
-		if ($strFileType == ".sxm")
-			$ContentType = "application/vnd.sun.xml.math";
-		if ($strFileType == ".sxw")
-			$ContentType = "application/vnd.sun.xml.writer";
-		if ($strFileType == ".sxq")
-			$ContentType = "application/vnd.sun.xml.writer.global";
-		if ($strFileType == ".stw")
-			$ContentType = "application/vnd.sun.xml.writer.template";
-		if ($strFileType == ".ps")
-			$ContentType = "application/postscript";
-		if ($strFileType == ".pps")
-			$ContentType = "application/vnd.ms-powerpoint";
-		if ($strFileType == ".odt")
-			$ContentType = "application/vnd.oasis.opendocument.text";
-		if ($strFileType == ".ott")
-			$ContentType = "application/vnd.oasis.opendocument.text-template";
-		if ($strFileType == ".oth")
-			$ContentType = "application/vnd.oasis.opendocument.text-web";
-		if ($strFileType == ".odm")
-			$ContentType = "application/vnd.oasis.opendocument.text-master";
-		if ($strFileType == ".odg")
-			$ContentType = "application/vnd.oasis.opendocument.graphics";
-		if ($strFileType == ".otg")
-			$ContentType = "application/vnd.oasis.opendocument.graphics-template";
-		if ($strFileType == ".odp")
-			$ContentType = "application/vnd.oasis.opendocument.presentation";
-		if ($strFileType == ".otp")
-			$ContentType = "application/vnd.oasis.opendocument.presentation-template";
-		if ($strFileType == ".ods")
-			$ContentType = "application/vnd.oasis.opendocument.spreadsheet";
-		if ($strFileType == ".ots")
-			$ContentType = "application/vnd.oasis.opendocument.spreadsheet-template";
-		if ($strFileType == ".odc")
-			$ContentType = "application/vnd.oasis.opendocument.chart";
-		if ($strFileType == ".odf")
-			$ContentType = "application/vnd.oasis.opendocument.formula";
-		if ($strFileType == ".odi")
-			$ContentType = "application/vnd.oasis.opendocument.image";
-		if ($strFileType == ".ndl")
-			$ContentType = "application/vnd.lotus-notes";
-		return $ContentType;
 	}
 	
