[ Index ] |
|
Code source de IMP H3 (4.1.5) |
1 <?php 2 /** 3 * $Horde: imp/fetchmail.php,v 1.40.8.6 2007/01/02 13:54:54 jan Exp $ 4 * 5 * Copyright 2002-2007 Nuno Loureiro <nuno@co.sapo.pt> 6 * Copyright 2004-2007 Michael Slusarz <slusarz@bigworm.colorado.edu> 7 * 8 * See the enclosed file COPYING for license information (GPL). If you 9 * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. 10 */ 11 12 @define('IMP_BASE', dirname(__FILE__)); 13 require_once IMP_BASE . '/lib/base.php'; 14 require_once IMP_BASE . '/lib/Fetchmail.php'; 15 require_once 'Horde/Prefs/UI.php'; 16 17 /* No fetchmail for POP3 accounts. */ 18 if ($_SESSION['imp']['base_protocol'] == 'pop3') { 19 echo _("Your account does not support fetching external mail."); 20 exit; 21 } 22 23 /* Initialize Fetchmail libraries. */ 24 $fm_account = new IMP_Fetchmail_Account(); 25 26 /* Run through the action handlers. */ 27 $actionID = Util::getFormData('actionID'); 28 switch ($actionID) { 29 case 'fetchmail_fetch': 30 $fetch_list = Util::getFormData('accounts'); 31 if (!empty($fetch_list)) { 32 IMP_Fetchmail::fetchMail($fetch_list); 33 34 /* Go to the download folder. */ 35 $lmailbox = $fm_account->getValue('lmailbox', $fetch_list[0]); 36 $url = Util::addParameter(Horde::applicationUrl('mailbox.php'), 'mailbox', $lmailbox); 37 if ($prefs->getValue('fetchmail_popup')) { 38 Util::closeWindowJS('opener.focus();opener.location.href="' . $url . '";'); 39 } else { 40 header('Location: ' . $url); 41 } 42 exit; 43 } 44 break; 45 } 46 47 $accounts = $fm_account->getAll('id'); 48 $fetch_url = Horde::applicationUrl('fetchmail.php'); 49 $title = _("Other Mail Accounts"); 50 51 require IMP_TEMPLATES . '/common-header.inc'; 52 53 if ($prefs->getValue('fetchmail_popup')) { 54 $cancel_js = 'window.close();'; 55 } else { 56 require IMP_TEMPLATES . '/menu.inc'; 57 58 if (!Util::getFormData('lmailbox')) { 59 $mbox = 'INBOX'; 60 } else { 61 $mbox = Util::getFormData('lmailbox'); 62 } 63 $cancel_js = 'window.location = \'' . Util::addParameter(Horde::applicationUrl('mailbox.php'), 'mailbox', $mbox) . '\';'; 64 } 65 66 require IMP_TEMPLATES . '/fetchmail/fetchmail.inc'; 67 require $registry->get('templates', 'horde') . '/common-footer.inc';
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 12:30:07 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |