2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
38 /*********************************************************************************
41 ********************************************************************************/
42 // cn: bug 6078: zlib breaks test-settings
44 if(ini_get('zlib.output_compression') == 1) { // ini_get() returns 1/0, not value
45 if(!ini_set('zlib.output_compression', 'Off')) { // returns False on failure
46 $iniError = $mod_strings['ERR_INI_ZLIB'];
50 // hack to allow "&", "%" and "+" through a $_GET var
51 // set by ie_test_open_popup() javascript call
52 foreach($_REQUEST as $k => $v) {
53 $v = str_replace('::amp::', '&', $v);
54 $v = str_replace('::plus::', '+', $v);
55 $v = str_replace('::percent::', '%', $v);
59 if(ob_get_level() > 0) {
63 if(ob_get_level() < 1) {
68 require_once('modules/InboundEmail/language/'.$current_language.'.lang.php');
77 $novalidate_cert = '';
80 ///////////////////////////////////////////////////////////////////////////////
83 $popupBoolean = false;
84 if (isset($_REQUEST['target']) && $_REQUEST['target'] == 'Popup') {
87 if (isset($_REQUEST['target1']) && $_REQUEST['target1'] == 'Popup') {
93 $msg = $mod_strings['LBL_TEST_WAIT_MESSAGE'];
96 if(isset($_REQUEST['ssl']) && ($_REQUEST['ssl'] == "true" || $_REQUEST['ssl'] == 1)) {
97 $msg .= $mod_strings['LBL_FIND_SSL_WARN'];
102 $ie = new InboundEmail();
103 if(!empty($_REQUEST['ie_id'])) {
104 $ie->retrieve($_REQUEST['ie_id']);
106 $ie->email_user = $_REQUEST['email_user'];
107 $ie->server_url = $_REQUEST['server_url'];
108 $ie->port = $_REQUEST['port'];
109 $ie->protocol = $_REQUEST['protocol'];
110 //Bug 23083.Special characters in email password results in IMAP authentication failure
111 if(!empty($_REQUEST['email_password'])) {
112 $ie->email_password = html_entity_decode($_REQUEST['email_password'], ENT_QUOTES);
113 $ie->email_password = str_rot13($ie->email_password);
115 $ie->mailbox = 'INBOX';
118 $msg = $ie->connectMailserver(true);
122 ///////////////////////////////////////////////////////////////////////////////
124 ///////////////////////////////////////////////////////////////////////////////
129 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
130 <title>SugarCRM - Commercial Open Source CRM</title>
131 '.SugarThemeRegistry::current()->getCSS().'
132 <script type="text/javascript">
133 function setMailbox(box) {
134 var mb = opener.document.getElementById("mailbox");
140 <body style="margin: 10px">*/'
142 <table width="100%" cellpadding="0" cellspacing="0" border="0">
145 '.SugarThemeRegistry::current()->getImage('h3Arrow', 'border="0"', 11, 11, ".gif", $mod_strings['LBL_POPUP_TITLE']).'
148 <h3> '.$title.'</h3>
154 <div id="testSettingsMsg">
157 <div id="testSettingsTic"></div>
158 <div id="testSettingsErr">'.$iniError.'</div>
163 /* echo ' <tr><td> </td><td> </td></tr><tr>
167 <input name="close" type="button" title="'.$mod_strings['LBL_CLOSE_POPUP'].'" value=" '.$mod_strings['LBL_CLOSE_POPUP'].' " onClick="window.close()">
177 ///////////////////////////////////////////////////////////////////////////////