- Timestamp:
- 08/13/10 11:18:42 (14 years ago)
- Location:
- branches/2.2/expressoMail1_2
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
r3138 r3157 3783 3783 return $exporteml->download_all_attachments($params); 3784 3784 } 3785 function get_quota_folders(){ 3786 3787 // Additional Imap Class for not-implemented functions into PHP-IMAP extension. 3788 include_once("class.imapfp.inc.php"); 3789 $imapfp = new imapfp(); 3790 3791 if(!$imapfp->open($this->imap_server,$this->imap_port)) 3792 return $imapfp->get_error(); 3793 if (!$imapfp->login( $this->username,$this->password )) 3794 return $imapfp->get_error(); 3795 3796 $response_array = $imapfp->get_mailboxes_size(); 3797 if ($imapfp->error) 3798 return $imapfp->get_error(); 3799 3800 $data = array(); 3801 $quota_root = $this->get_quota(array('folder_id' => "INBOX")); 3802 $data["quota_root"] = $quota_root; 3803 3804 foreach ($response_array as $idx=>$line) { 3805 $line2 = str_replace('"', "", $line); 3806 $line2 = str_replace(" /vendor/cmu/cyrus-imapd/size (value.shared ",";",str_replace("* ANNOTATION ","",$line2)); 3807 list($folder,$size) = explode(";",$line2); 3808 $size = str_replace(")","",$size); 3809 $quotaPercent = (($size / 1048576) / $data["quota_root"]["quota_limit"])*100; 3810 if ($size < 1048576 && $size > 1024) 3811 $quota_used = round($size / 1024, 0).' Kb'; 3812 else if($size > 1024) 3813 $quota_used = round($size / (1024*1024), 1).' Mb'; 3814 else 3815 $quota_used = $size." b"; 3816 $folder = mb_convert_encoding($folder, "ISO_8859-1", "UTF7-IMAP"); 3817 if(!preg_match('/user\\'.$this->imap_delimiter.$this->username.'\\'.$this->imap_delimiter.'/i',$folder)){ 3818 $folder = $this->functions->getLang("Inbox"); 3819 } 3820 else 3821 $folder = preg_replace('/user\\'.$this->imap_delimiter.$this->username.'\\'.$this->imap_delimiter.'/i','', $folder); 3822 3823 $data[$folder] = array("quota_percent" => sprintf("%.1f",round($quotaPercent,1)), "quota_used" => $quota_used); 3824 } 3825 $imapfp->close(); 3826 return $data; 3827 } 3785 3828 } 3786 3829 ?> -
branches/2.2/expressoMail1_2/js/draw_api.js
r3145 r3157 783 783 "local_messages"); 784 784 connector.loadAllScripts(scripts); 785 // Loading Quota View Folder Component (if exists...) 786 if(Element("table_quota")) 787 expresso.connector.loadScript("InfoQuota"); 785 788 } 786 789 -
branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang
r3147 r3157 1 % used expressoMail1_2 pt-br % utilizado 2 View Quota Usage in Folders expressoMail1_2 pt-br Visualizar quota utilizada por cada pasta 3 You are currently using %1Mb (%2%). expressoMail1_2 pt-br Você está usando atualmente %1Mb (%2%). 1 4 1 Day expressoMail1_2 pt-br 1 Dia 2 5 2 Days expressoMail1_2 pt-br 2 Dias
Note: See TracChangeset
for help on using the changeset viewer.