$v) { $v = str_replace('::amp::', '&', $v); $v = str_replace('::plus::', '+', $v); $v = str_replace('::percent::', '%', $v); $_REQUEST[$k] = $v; } require_once('modules/InboundEmail/language/en_us.lang.php'); global $theme; // GLOBALS global $mod_strings; global $app_strings; global $app_list_strings; global $current_user; global $sugar_config; $jsCustomVersion = $sugar_config['js_custom_version']; $sugar_version = $sugar_version; $title = ''; $msg = ''; $tls = ''; $cert = ''; $ssl = ''; $notls = ''; $novalidate_cert = ''; $useSsl = false; $deletedFoldersList = ""; /////////////////////////////////////////////////////////////////////////////// //// TITLES $popupBoolean = false; if (isset($_REQUEST['target']) && $_REQUEST['target'] == 'Popup') { $popupBoolean = true; } if (isset($_REQUEST['target1']) && $_REQUEST['target1'] == 'Popup') { $popupBoolean = true; } if($popupBoolean) { $title = $mod_strings['LBL_SELECT_SUBSCRIBED_FOLDERS']; $msg = $mod_strings['LBL_TEST_WAIT_MESSAGE']; } $subdcriptionFolderHelp = $app_strings['LBL_EMAIL_SUBSCRIPTION_FOLDER_HELP']; if(isset($_REQUEST['ssl']) && ($_REQUEST['ssl'] == "true" || $_REQUEST['ssl'] == 1)) { $useSsl = true; } $searchField = !empty($_REQUEST['searchField']) ? $_REQUEST['searchField'] : ""; $multipleString = "multiple=\"true\""; if (!empty($searchField)) { $subdcriptionFolderHelp = ""; $multipleString = ""; if ($searchField == 'trash') { $title = $mod_strings['LBL_SELECT_TRASH_FOLDERS']; } else { $title = $mod_strings['LBL_SELECT_SENT_FOLDERS']; } // else } // else $ie = new InboundEmail(); $ie->email_user = $_REQUEST['email_user']; $ie->server_url = $_REQUEST['server_url']; $ie->port = $_REQUEST['port']; $ie->protocol = $_REQUEST['protocol']; //Bug 23083.Special characters in email password results in IMAP authentication failure $ie->email_password = html_entity_decode($_REQUEST['email_password'], ENT_QUOTES); $ie->email_password = str_rot13($ie->email_password); //$ie->mailbox = $_REQUEST['mailbox']; $ie->mailbox = 'INBOX'; if($popupBoolean) { $returnArray = $ie->getFoldersListForMailBox(); $foldersList = $returnArray['foldersList']; if ($returnArray['status']) { $msg = $returnArray['statusMessage']; $requestMailBox = explode(",", $_REQUEST['mailbox']); $foldersListArray = explode(",", $foldersList); $deletedFoldersString = ""; $count = 0; if (!empty($requestMailBox) && !empty($foldersListArray)) { foreach($requestMailBox as $mailbox) { if (!in_array($mailbox, $foldersListArray)) { if ($count != 0) { $deletedFoldersString = $deletedFoldersString . " ,"; } $deletedFoldersString = $deletedFoldersString . $mailbox; $count++; } } // foreach } // if if (!empty($deletedFoldersString)) { $deletedFoldersList = $mod_strings['LBL_DELETED_FOLDERS_LIST']; $deletedFoldersList = sprintf($deletedFoldersList, $deletedFoldersString); } } else { $msg = $returnArray['statusMessage']; } } //// END TITLES /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// //// COMMON CODE echo ''; if (!empty($subdcriptionFolderHelp)) { echo ''; } // if echo ''; echo '
 
'.$msg.'
   
  '.$subdcriptionFolderHelp.'
 
 
   
 
   
'; //// END COMMON CODE /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// //// COMPLETE RENDERING OF THE POPUP echo ''; echo ''; echo ''; echo ''; echo ' ' ?>