Exemple #1
0
 public function SystemSecurity()
 {
     $bDoSave = true;
     if (CApi::getCsrfToken('p7admToken') === CPost::get('txtToken')) {
         if (CPost::Has('txtNewPassword') && CPost::Has('txtConfirmNewPassword')) {
             $oWebmailApi = CApi::Manager('webmail');
             if (!$oWebmailApi->validateAdminPassword(trim(CPost::get('txtOldPassword')))) {
                 $bDoSave = false;
                 $this->LastError = CM_PASSWORDS_INVALID_OLD;
             } else {
                 if ((string) CPost::get('txtNewPassword') !== (string) CPost::get('txtConfirmNewPassword')) {
                     $bDoSave = false;
                     $this->LastError = CM_PASSWORDS_NOT_MATCH;
                 } else {
                     if (AP_DUMMYPASSWORD !== (string) CPost::get('txtNewPassword')) {
                         $this->oSettings->SetConf('Common/AdminPassword', md5(trim(CPost::get('txtNewPassword'))));
                     }
                 }
             }
             if ($bDoSave) {
                 if (CPost::Has('txtUserName')) {
                     $this->oSettings->SetConf('Common/AdminLogin', CPost::get('txtUserName'));
                 }
                 $this->saveSettingsXmlWithMessage();
             }
         }
     } else {
         $this->LastError = CApi::I18N('API/INVALID_TOKEN');
     }
 }
<table class="wm_contacts_view">
	<tr>
		<td class="wm_field_title" colspan="2">
			<input type="checkbox" class="wm_checkbox override" name="chEnableAddressBook" id="chEnableAddressBook"
				   value="1" <?php 
$this->Data->PrintCheckedValue('chEnableAddressBook');
?>
 />
			<label id="chEnableAddressBook_label" for="chEnableAddressBook"><?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_ADDRBOOK_ENABLED');
?>
</label>
		</td>
	</tr>
	<tr>
		<td class="wm_field_title">
			<span id="selContactsPerPage_label">
				<?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_ADDRBOOK_CONTACTS');
?>
			</span>
		</td>
		<td class="wm_field_value">
			<select name="selContactsPerPage" class="wm_select override" id="selContactsPerPage">
				<?php 
$this->Data->PrintValue('selContactsPerPageOptions');
?>
			</select>
		</td>
	</tr>
</table>
Exemple #3
0
/* langs */
define('CM_MODE_RESOURCE_USAGE_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_RESOURCE_USAGE'));
define('CM_MODE_HELPDESK_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_HELPDESK'));
define('CM_MODE_SIP_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_SIP'));
define('CM_MODE_TWILIO_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_TWILIO'));
define('CM_MODE_SOCIAL_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_SOCIAL'));
define('CM_MODE_TENANT_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_TENANT'));
define('CM_MODE_BRANDING_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_BRANDING'));
define('CM_MODE_INVITATIONS_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_INVITATIONS'));
define('CM_MODE_DB_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_DATABASE'));
define('CM_MODE_SECURITY_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_SECURITY'));
define('CM_SWITCHER_MODE_NEW_DOMAIN_NAME', CApi::I18N('ADMIN_PANEL/TOOLBAR_BUTTON_NEW_DOMAIN'));
define('CM_SWITCHER_MODE_EDIT_DOMAIN_GENERAL_NAME', CApi::I18N('ADMIN_PANEL/EDIT_DOMAIN_GENERAL_NAME'));
define('CM_SWITCHER_MODE_INVITE_USER_NAME', CApi::I18N('ADMIN_PANEL/TOOLBAR_BUTTON_INVITE_USER'));
define('CM_SWITCHER_MODE_NEW_USER_NAME', CApi::I18N('ADMIN_PANEL/TOOLBAR_BUTTON_NEW_USER'));
define('CM_SWITCHER_MODE_EDIT_USER_GENERAL_NAME', CApi::I18N('ADMIN_PANEL/EDIT_USERS_GENERAL_NAME'));
define('CM_SWITCHER_MODE_EDIT_USER_SIP_NAME', CApi::I18N('ADMIN_PANEL/EDIT_USERS_SIP_NAME'));
define('CM_SWITCHER_MODE_EDIT_USER_TWILIO_NAME', CApi::I18N('ADMIN_PANEL/EDIT_USERS_TWILIO_NAME'));
define('CM_SWITCHER_MODE_EDIT_USER_SOCIAL_NAME', CApi::I18N('ADMIN_PANEL/EDIT_USERS_SOCIAL_NAME'));
define('CM_LANG_NODOMAINS', CApi::I18N('ADMIN_PANEL/INFO_NODOMAINS'));
define('CM_LANG_NODOMAINS_RESULTEMPTY', CApi::I18N('ADMIN_PANEL/INFO_DOMAINS_NOT_FOUND'));
define('CM_LANG_NOUSERSINDOMAIN', CApi::I18N('ADMIN_PANEL/INFO_NOUSERS'));
define('CM_LANG_USERS_RESULTEMPTY', CApi::I18N('ADMIN_PANEL/INFO_USERS_NOT_FOUND'));
define('CM_LANG_TOTAL_USERS', CApi::I18N('ADMIN_PANEL/INFO_USERS_TOTAL'));
define('CM_LANG_ACCOUNT_EXIST', CApi::I18N('ADMIN_PANEL/MSG_USER_EXIST'));
define('CM_LANG_DOMAIN_EXIST', CApi::I18N('ADMIN_PANEL/MSG_DOMAIN_EXIST'));
define('CM_LANG_DELETE_SUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_DELETE_SUCCESSFUL'));
define('CM_LANG_DELETE_UNSUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_DELETE_UNSUCCESSFUL'));
define('CM_PASSWORDS_NOT_MATCH', CApi::I18N('ADMIN_PANEL/MSG_PASSWORD_MISMATCH'));
define('CM_PASSWORDS_INVALID_OLD', CApi::I18N('ADMIN_PANEL/MSG_INVALID_OLD_PASSWORD'));
$this->Data->PrintSelectedValue('optDateFormatMMDDYYYY');
?>
><?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_DATEFORMAT_MMDD');
?>
</option>
				<option value="<?php 
echo EDateFormat::DDMMYYYY;
?>
" <?php 
$this->Data->PrintSelectedValue('optDateFormatDDMMYYYY');
?>
><?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_DATEFORMAT_DDMM');
?>
</option>
				<option value="<?php 
echo EDateFormat::DD_MONTH_YYYY;
?>
" <?php 
$this->Data->PrintSelectedValue('optDateFormatDDMonthYYYY');
?>
><?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_DATEFORMAT_DD_MONTH_YYYY');
?>
</option>
			</select>
		</td>
	</tr>

</table>
 /**
  * @return void
  */
 protected function initAuth()
 {
     $this->iAuthType = AP_SESS_AUTH_TYPE_NONE;
     if ((isset($_GET['login']) || isset($_POST['login'])) && (CPost::Has('AdmloginInput') || CGet::Has('AdmloginInput')) && CPost::Has('AdmpasswordInput')) {
         $sAdmloginInput = CPost::Get('AdmloginInput');
         if (CGet::Has('AdmloginInput')) {
             $sAdmloginInput = CGet::Get('AdmloginInput');
         }
         $sLoginSuffix = CPost::Get('LoginSuffix', '');
         if (CGet::Has('LoginSuffix')) {
             $sLoginSuffix = CGet::Get('LoginSuffix', '');
         }
         if ($this->CallModuleFunction('CCommonModule', 'AuthLogin', array($sAdmloginInput . $sLoginSuffix, CPost::Get('AdmpasswordInput')))) {
             CApi::Location(AP_INDEX_FILE . '?enter');
         } else {
             CSession::Destroy();
             CApi::Location(AP_INDEX_FILE . '?auth_error');
         }
         exit;
     } else {
         if ($this->bSessionIsStarted) {
             $this->CallModuleFunction('CCommonModule', 'AuthCheckSet');
             if ($this->IsTenantAuthType()) {
                 $aTabs =& $this->GetTabs();
                 $aNewTabs = array();
                 foreach ($aTabs as $aTabValue) {
                     if (in_array($aTabValue[0], array(CApi::I18N('ADMIN_PANEL/TABNAME_COMMON'), CApi::I18N('ADMIN_PANEL/TABNAME_DOMAINS'), CApi::I18N('ADMIN_PANEL/TABNAME_USERS')))) {
                         $aNewTabs[] = $aTabValue;
                     }
                 }
                 $aTabs = $aNewTabs;
             }
         } else {
             CSession::Destroy();
             CApi::Location(AP_INDEX_FILE . '?sess_error');
             exit;
         }
     }
 }
Exemple #6
0
    /**
     * @return void
     */
    public function WriteMain()
    {
        $sCurrentMode = $this->GetCurrentMode();
        foreach ($this->aMenu as $sMode => $aItems) {
            if ($sMode === $sCurrentMode && is_array($aItems) && 0 < count($aItems)) {
                echo '<form autocomplete="off" action="' . AP_INDEX_FILE . '?submit" method="POST" id="' . $sMode . '_form"><input type="hidden" name="form_id" value="' . $sMode . '"><table class="wm_settings_common" width="650">';
                foreach ($aItems as $oItem) {
                    if (@file_exists($oItem->Template())) {
                        include $oItem->Template();
                    }
                }
                echo '</table>
<table class="wm_settings_common" width="100%">
	<tr>
		<td>
			<hr />
		</td>
	</tr>
	<tr>
		<td align="right">
			<span class="wm_secondary_info" style="float: left; display: none;">' . CApi::I18N('ADMIN_PANEL/FORM_REQUIRED_FIELDS') . '</span>
			<input type="submit" name="submit_btn" value="' . CApi::I18N('ADMIN_PANEL/FORM_BUTTON_SAVE') . '" class="wm_button" style="width: 100px">
		</td>
	</tr>
</table></form>';
            }
        }
    }
<?php

/*
 * Copyright (C) 2002-2013 AfterLogic Corp. (www.afterlogic.com)
 * Distributed under the terms of the license described in LICENSE
 *
 */
define('WM_MODE_LOGGING', 'logging');
define('WM_MODE_DAV', 'dav');
define('WM_SWITCHER_MODE_NEW_DOMAIN', 'newdomain');
define('WM_SWITCHER_MODE_EDIT_DOMAIN_GENERAL', 'editgeneral');
define('WM_SWITCHER_MODE_EDIT_DOMAIN_WEBMAIL', 'editwebmail');
define('WM_SWITCHER_MODE_EDIT_DOMAIN_ADDRESS_BOOK', 'editaddressbook');
define('WM_SWITCHER_MODE_EDIT_DOMAIN_FILES', 'editfiles');
define('WM_SWITCHER_MODE_EDIT_DOMAIN_HELPDESK', 'edithelpdesk');
define('WM_SWITCHER_MODE_EDIT_USERS_GENERAL', 'editgeneral');
/* langs */
define('WM_MODE_DAV_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_MOBILE_SYNC'));
define('WM_MODE_LOGGING_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_LOGGING'));
define('WM_SWITCHER_MODE_NEW_DOMAIN_NAME', CApi::I18N('ADMIN_PANEL/TOOLBAR_BUTTON_NEW_DOMAIN'));
define('WM_SWITCHER_MODE_EDIT_DOMAIN_GENERAL_NAME', CApi::I18N('ADMIN_PANEL/EDIT_DOMAIN_GENERAL_NAME'));
define('WM_SWITCHER_MODE_EDIT_DOMAIN_WEBMAIL_NAME', CApi::I18N('ADMIN_PANEL/EDIT_DOMAIN_WEBMAIL_NAME'));
define('WM_SWITCHER_MODE_EDIT_DOMAIN_ADDRESS_BOOK_NAME', CApi::I18N('ADMIN_PANEL/EDIT_DOMAIN_ADDRESS_BOOK_NAME'));
define('WM_SWITCHER_MODE_EDIT_DOMAIN_FILES_NAME', CApi::I18N('ADMIN_PANEL/EDIT_DOMAIN_FILES_NAME'));
define('WM_SWITCHER_MODE_EDIT_DOMAIN_HELPDESK_NAME', CApi::I18N('ADMIN_PANEL/EDIT_DOMAIN_HELPDESK_NAME'));
define('WM_SWITCHER_MODE_EDIT_USERS_GENERAL_NAME', CApi::I18N('ADMIN_PANEL/EDIT_USERS_GENERAL_NAME'));
define('WM_INFO_LOGCLEARSUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_LOGCLEAR_OK'));
 x-data-label="radioLayout_lable" />
			<label class="wm_settings_layout_icon_side" for="radioLayoutSide"></label>
			
			<input type="radio" class="wm_checkbox override" name="radioLayout" id="radioLayoutBottom"
				value="<?php 
// echo EnumConvert::ToPost(ELayout::Bottom, 'ELayout');
?>
"  <?php 
//$this->Data->PrintCheckedValue('radioLayoutBottom');
?>
  x-data-label="radioLayout_lable" />
			<label class="wm_settings_layout_icon_bottom" for="radioLayoutBottom"></label>
		</td>
	</tr>
	<tr>-->
		<td class="wm_field_title">
			<span id="selAutocheckMail_label">
				<?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_WEBMAIL_AUTO');
?>
			</span>
		</td>
		<td class="wm_field_value">
			<select name="selAutocheckMail" id="selAutocheckMail" class="wm_select override">
				<?php 
$this->Data->PrintValue('selAutocheckMailOptions');
?>
			</select>
		</td>
	</tr>
</table>
Exemple #9
0
?>
/>
		<label for="chSocialDropboxAllow"><?php 
echo CApi::I18N('ADMIN_PANEL/DROPBOX');
?>
</label>
		<br />
		<br />
		<span><?php 
echo CApi::I18N('ADMIN_PANEL/SOCIAL_DROPBOX_SECRET');
?>
</span>
		<br />
		<br />
		<span><?php 
echo CApi::I18N('ADMIN_PANEL/SOCIAL_DROPBOX_KEY');
?>
</span>
	</td>
	<td>
		<br />
		<br />
		<input type="text" id="txtSocialDropboxSecret" name="txtSocialDropboxSecret" value="<?php 
$this->Data->PrintInputValue('txtSocialDropboxSecret');
?>
" size="60" />
		<br />
		<input type="text" id="txtSocialDropboxKey" name="txtSocialDropboxKey" value="<?php 
$this->Data->PrintInputValue('txtSocialDropboxKey');
?>
" size="60" />
<tr>
	<td valign="top" colspan="2">
		<div class="wm_information_com">
			<?php 
echo CApi::I18N('ADMIN_PANEL/HELPDESK_SOCIAL_DESK');
?>
		</div>
	</td>
</tr>
Exemple #11
0
 /**
  * @return void
  */
 public function Handle()
 {
     $sVersion = file_get_contents(PSEVEN_APP_ROOT_PATH . 'VERSION');
     define('PSEVEN_APP_VERSION', $sVersion);
     if (!class_exists('MailSo\\Version')) {
         echo 'MailSo';
         return '';
     } else {
         if (!class_exists('\\CApi') || !\CApi::IsValid()) {
             echo 'AfterLogic API';
             return '';
         }
     }
     $sPathInfo = \trim(\trim($this->oHttp->GetServer('PATH_INFO', '')), ' /');
     if (!empty($sPathInfo)) {
         if ('dav' === \substr($sPathInfo, 0, 3)) {
             $this->oActions->PathInfoDav();
             return '';
         }
     }
     /* @var $oApiIntegrator \CApiIntegratorManager */
     $oApiIntegrator = \CApi::Manager('integrator');
     /* @var $oApiCapability \CApiCapabilityManager */
     $oApiCapability = \CApi::Manager('capability');
     $sResult = '';
     $sQuery = \trim(\trim($this->oHttp->GetServer('QUERY_STRING', '')), ' /');
     $iPos = \strpos($sQuery, '&');
     if (0 < $iPos) {
         $sQuery = \substr($sQuery, 0, $iPos);
     }
     $aPaths = explode('/', $sQuery);
     if (0 < count($aPaths) && !empty($aPaths[0])) {
         $sFirstPart = strtolower($aPaths[0]);
         if ('ping' === $sFirstPart) {
             @header('Content-Type: text/plain; charset=utf-8');
             $sResult = 'Pong';
         } else {
             if ('ajax' === $sFirstPart) {
                 @ob_start();
                 $aResponseItem = null;
                 $sAction = $this->oHttp->GetPost('Action', null);
                 try {
                     \CApi::Log('AJAX: Action: ' . $sAction);
                     if ('AppData' !== $sAction && \CApi::GetConf('labs.webmail.csrftoken-protection', true) && !$this->validateToken()) {
                         throw new \ProjectSeven\Exceptions\ClientException(\ProjectSeven\Notifications::InvalidToken);
                     } else {
                         if (!empty($sAction)) {
                             $sMethodName = 'Ajax' . $sAction;
                             if (method_exists($this->oActions, $sMethodName) && is_callable(array($this->oActions, $sMethodName))) {
                                 $this->oActions->SetActionParams($this->oHttp->GetPostAsArray());
                                 $aResponseItem = call_user_func(array($this->oActions, $sMethodName));
                             } else {
                                 if (\CApi::Plugin()->JsonHookExists($sMethodName)) {
                                     $this->oActions->SetActionParams($this->oHttp->GetPostAsArray());
                                     $aResponseItem = \CApi::Plugin()->RunJsonHook($this->oActions, $sMethodName);
                                 }
                             }
                         }
                     }
                     if (!is_array($aResponseItem)) {
                         throw new \ProjectSeven\Exceptions\ClientException(\ProjectSeven\Notifications::UnknownError);
                     }
                 } catch (\Exception $oException) {
                     //					if ($oException instanceof \ProjectSeven\Exceptions\ClientException &&
                     //						\ProjectSeven\Notifications::AuthError === $oException->getCode())
                     //					{
                     //						$oApiIntegrator = /* @var $oApiIntegrator \CApiIntegratorManager */ \CApi::Manager('integrator');
                     //						$oApiIntegrator->SetLastErrorCode(\ProjectSeven\Notifications::AuthError);
                     //						$oApiIntegrator->LogoutAccount();
                     //					}
                     \CApi::LogException($oException);
                     $sAction = empty($sAction) ? 'Unknown' : $sAction;
                     $aResponseItem = $this->oActions->ExceptionResponse(null, $sAction, $oException);
                 }
                 @header('Content-Type: application/json; charset=utf-8');
                 \CApi::Plugin()->RunHook('ajax.response-result', array($sAction, &$aResponseItem));
                 $sResult = \MailSo\Base\Utils::Php2js($aResponseItem, \CApi::MailSoLogger());
                 //				\CApi::Log('AJAX: Response: '.$sResult);
             } else {
                 if ('upload' === $sFirstPart) {
                     @ob_start();
                     $aResponseItem = null;
                     $sAction = empty($aPaths[1]) ? '' : $aPaths[1];
                     try {
                         $sMethodName = 'Upload' . $sAction;
                         if (method_exists($this->oActions, $sMethodName) && is_callable(array($this->oActions, $sMethodName))) {
                             $sError = '';
                             $sInputName = 'jua-uploader';
                             $iError = UPLOAD_ERR_OK;
                             $_FILES = isset($_FILES) ? $_FILES : null;
                             if (isset($_FILES, $_FILES[$sInputName], $_FILES[$sInputName]['name'], $_FILES[$sInputName]['tmp_name'], $_FILES[$sInputName]['size'], $_FILES[$sInputName]['type'])) {
                                 $iError = isset($_FILES[$sInputName]['error']) ? (int) $_FILES[$sInputName]['error'] : UPLOAD_ERR_OK;
                                 if (UPLOAD_ERR_OK === $iError) {
                                     $this->oActions->SetActionParams(array('AccountID' => $this->oHttp->GetPost('AccountID', ''), 'FileData' => $_FILES[$sInputName], 'AdditionalData' => $this->oHttp->GetPost('AdditionalData', null), 'IsExt' => '1' === (string) $this->oHttp->GetPost('IsExt', '0') ? '1' : '0', 'TenantHash' => (string) $this->oHttp->GetPost('TenantHash', ''), 'Token' => $this->oHttp->GetPost('Token', '')));
                                     \CApi::LogObject($this->oActions->GetActionParams());
                                     $aResponseItem = call_user_func(array($this->oActions, $sMethodName));
                                 } else {
                                     $sError = $this->oActions->convertUploadErrorToString($iError);
                                 }
                             } else {
                                 if (!isset($_FILES) || !is_array($_FILES) || 0 === count($_FILES)) {
                                     $sError = 'size';
                                 } else {
                                     $sError = 'unknown';
                                 }
                             }
                         }
                         if (!is_array($aResponseItem) && empty($sError)) {
                             throw new \ProjectSeven\Exceptions\ClientException(\ProjectSeven\Notifications::UnknownError);
                         }
                     } catch (\Exception $oException) {
                         \CApi::LogException($oException);
                         $aResponseItem = $this->oActions->ExceptionResponse(null, 'Upload', $oException);
                         $sError = 'exception';
                     }
                     if (0 < strlen($sError)) {
                         $aResponseItem['Error'] = $sError;
                     }
                     @ob_get_clean();
                     if ('iframe' === $this->oHttp->GetPost('jua-post-type', '')) {
                         @header('Content-Type: text/html; charset=utf-8');
                     } else {
                         @header('Content-Type: application/json; charset=utf-8');
                     }
                     $sResult = \MailSo\Base\Utils::Php2js($aResponseItem);
                 } else {
                     if ('speclogon' === $sFirstPart || 'speclogoff' === $sFirstPart) {
                         \CApi::SpecifiedUserLogging('speclogon' === $sFirstPart);
                         \CApi::Location('./');
                     } else {
                         if ('sso' === $sFirstPart) {
                             $oApiIntegratorManager = \CApi::Manager('integrator');
                             try {
                                 $sHash = $this->oHttp->GetRequest('hash');
                                 if (!empty($sHash)) {
                                     $sData = \CApi::Cacher()->Get('SSO:' . $sHash, true);
                                     $aData = \CApi::DecodeKeyValues($sData);
                                     if (!empty($aData['Email']) && isset($aData['Password'], $aData['Login'])) {
                                         $oAccount = $oApiIntegratorManager->LoginToAccount($aData['Email'], $aData['Password'], $aData['Login']);
                                         if ($oAccount) {
                                             $oApiIntegratorManager->SetAccountAsLoggedIn($oAccount);
                                         }
                                     }
                                 } else {
                                     $oApiIntegratorManager->LogoutAccount();
                                 }
                             } catch (\Exception $oExc) {
                                 \CApi::LogException($oExc);
                             }
                             \CApi::Location('./');
                         } else {
                             if ('autodiscover' === $sFirstPart) {
                                 $oSettings =& \CApi::GetSettings();
                                 $sInput = \file_get_contents('php://input');
                                 //$sInput = '<?'.'xml version="1.0" encoding="utf-8"?'.'><Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"><Request><EMailAddress>test@afterlogic.com</EMailAddress><AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema></Request></Autodiscover>';
                                 \CApi::Log('#autodiscover:');
                                 \CApi::LogObject($sInput);
                                 $aMatches = array();
                                 $aEmailAddress = array();
                                 \preg_match("/\\<AcceptableResponseSchema\\>(.*?)\\<\\/AcceptableResponseSchema\\>/i", $sInput, $aMatches);
                                 \preg_match("/\\<EMailAddress\\>(.*?)\\<\\/EMailAddress\\>/", $sInput, $aEmailAddress);
                                 if (!empty($aMatches[1]) && !empty($aEmailAddress[1])) {
                                     $sIncMailServer = $oSettings->GetConf('WebMail/ExternalHostNameOfLocalImap');
                                     $sOutMailServer = $oSettings->GetConf('WebMail/ExternalHostNameOfLocalSmtp');
                                     if (0 < \strlen($sIncMailServer) && 0 < \strlen($sOutMailServer)) {
                                         $sResult = \implode("\n", array('<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">', '	<Response xmlns="' . $aMatches[1] . '">', '		<Account>', '			<AccountType>email</AccountType>', '			<Action>settings</Action>', '			<Protocol>', '				<Type>IMAP</Type>', '				<Server>' . $sIncMailServer . '</Server>', '				<LoginName>' . $aEmailAddress[1] . '</LoginName>', '				<Port>143</Port>', '				<SSL>off</SSL>', '				<SPA>off</SPA>', '				<AuthRequired>on</AuthRequired>', '			</Protocol>', '			<Protocol>', '				<Type>SMTP</Type>', '				<Server>' . $sOutMailServer . '</Server>', '				<LoginName>' . $aEmailAddress[1] . '</LoginName>', '				<Port>25</Port>', '				<SSL>off</SSL>', '				<SPA>off</SPA>', '				<AuthRequired>on</AuthRequired>', '			</Protocol>', '		</Account>', '	</Response>', '</Autodiscover>'));
                                     }
                                 }
                                 if (empty($sResult)) {
                                     $usec = $sec = 0;
                                     list($usec, $sec) = \explode(' ', microtime());
                                     $sResult = \implode("\n", array('<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">', empty($aMatches[1]) ? '	<Response>' : '	<Response xmlns="' . $aMatches[1] . '">', '		<Error Time="' . \gmdate('H:i:s', $sec) . \substr($usec, 0, \strlen($usec) - 2) . '" Id="2477272013">', '			<ErrorCode>600</ErrorCode>', '			<Message>Invalid Request</Message>', '			<DebugData />', '		</Error>', '	</Response>', '</Autodiscover>'));
                                 }
                                 header('Content-Type: text/xml');
                                 $sResult = '<' . '?xml version="1.0" encoding="utf-8"?' . '>' . "\n" . $sResult;
                                 \CApi::Log('');
                                 \CApi::Log($sResult);
                             } else {
                                 if ('profile' === $sFirstPart) {
                                     /* @var $oApiIosManager \CApiIosManager */
                                     $oApiIosManager = \CApi::Manager('ios');
                                     $oAccount = $oApiIntegrator->GetLogginedDefaultAccount();
                                     $mResultProfile = $oApiIosManager && $oAccount ? $oApiIosManager->GenerateXMLProfile($oAccount) : false;
                                     if ($mResultProfile !== false) {
                                         header('Content-type: application/x-apple-aspen-config; chatset=utf-8');
                                         header('Content-Disposition: attachment; filename="afterlogic.mobileconfig"');
                                         echo $mResultProfile;
                                     } else {
                                         \CApi::Location('./?IOS/Error');
                                     }
                                 } else {
                                     if ('ios' === $sFirstPart) {
                                         $sResult = file_get_contents(PSEVEN_APP_ROOT_PATH . 'templates/Ios.html');
                                         $iUserId = $oApiIntegrator->GetLogginedUserId();
                                         if (0 < $iUserId) {
                                             $oAccount = $oApiIntegrator->GetLogginedDefaultAccount();
                                             $bError = isset($aPaths[1]) && 'error' === strtolower($aPaths[1]);
                                             // TODO
                                             @setcookie('skip_ios', '1', time() + 3600 * 3600, '/', null, null, true);
                                             $sResult = strtr($sResult, array('{{IOS/HELLO}}' => \CApi::I18N('IOS/HELLO'), '{{IOS/DESC_P1}}' => \CApi::I18N('IOS/DESC_P1'), '{{IOS/DESC_P2}}' => \CApi::I18N('IOS/DESC_P2'), '{{IOS/DESC_P3}}' => \CApi::I18N('IOS/DESC_P3'), '{{IOS/DESC_P4}}' => \CApi::I18N('IOS/DESC_P4'), '{{IOS/DESC_P5}}' => \CApi::I18N('IOS/DESC_P5'), '{{IOS/DESC_P6}}' => \CApi::I18N('IOS/DESC_P6'), '{{IOS/DESC_P7}}' => \CApi::I18N('IOS/DESC_P7'), '{{IOS/DESC_BUTTON_YES}}' => \CApi::I18N('IOS/DESC_BUTTON_YES'), '{{IOS/DESC_BUTTON_SKIP}}' => \CApi::I18N('IOS/DESC_BUTTON_SKIP'), '{{IOS/DESC_BUTTON_OPEN}}' => \CApi::I18N('IOS/DESC_BUTTON_OPEN'), '{{AppVersion}}' => PSEVEN_APP_VERSION, '{{IntegratorLinks}}' => $oApiIntegrator->BuildHeadersLink()));
                                         } else {
                                             \CApi::Location('./');
                                         }
                                     } else {
                                         if ('raw' === $sFirstPart) {
                                             $sAction = empty($aPaths[1]) ? '' : $aPaths[1];
                                             try {
                                                 if (!empty($sAction)) {
                                                     $sMethodName = 'Raw' . $sAction;
                                                     if (method_exists($this->oActions, $sMethodName)) {
                                                         $this->oActions->SetActionParams(array('AccountID' => empty($aPaths[2]) || '0' === (string) $aPaths[2] ? '' : $aPaths[2], 'RawKey' => empty($aPaths[3]) ? '' : $aPaths[3], 'IsExt' => empty($aPaths[4]) ? '0' : ('1' === (string) $aPaths[4] ? '1' : 0), 'TenantHash' => empty($aPaths[5]) ? '' : $aPaths[5]));
                                                         if (!call_user_func(array($this->oActions, $sMethodName))) {
                                                             \CApi::Log('False result.', \ELogLevel::Error);
                                                         }
                                                     } else {
                                                         \CApi::Log('Invalid action.', \ELogLevel::Error);
                                                     }
                                                 } else {
                                                     \CApi::Log('Empty action.', \ELogLevel::Error);
                                                 }
                                             } catch (\Exception $oException) {
                                                 \CApi::LogException($oException, \ELogLevel::Error);
                                             }
                                         } else {
                                             if ('post' === $sFirstPart) {
                                                 $sAction = $this->oHttp->GetPost('Action');
                                                 try {
                                                     if (!empty($sAction)) {
                                                         $sMethodName = 'Post' . $sAction;
                                                         if (method_exists($this->oActions, $sMethodName) && is_callable(array($this->oActions, $sMethodName))) {
                                                             $this->oActions->SetActionParams($this->oHttp->GetPostAsArray());
                                                             if (!call_user_func(array($this->oActions, $sMethodName))) {
                                                                 \CApi::Log('False result.', \ELogLevel::Error);
                                                             }
                                                         } else {
                                                             \CApi::Log('Invalid action.', \ELogLevel::Error);
                                                         }
                                                     } else {
                                                         \CApi::Log('Empty action.', \ELogLevel::Error);
                                                     }
                                                 } catch (\Exception $oException) {
                                                     \CApi::LogException($oException, \ELogLevel::Error);
                                                 }
                                             } else {
                                                 if ($this->oHttp->HasQuery('facebook')) {
                                                     $mResult = \api_Social::Facebook(\api_Social::GetTenantFromCookieByHash());
                                                     if (false !== $mResult && is_array($mResult)) {
                                                         \api_Social::Process($mResult);
                                                     }
                                                 } else {
                                                     if ($this->oHttp->HasQuery('google')) {
                                                         $mResult = \api_Social::Google(\api_Social::GetTenantFromCookieByHash());
                                                         if (false !== $mResult && is_array($mResult)) {
                                                             \api_Social::Process($mResult);
                                                         }
                                                     } else {
                                                         if ($this->oHttp->HasQuery('twitter')) {
                                                             $mResult = \api_Social::Twitter(\api_Social::GetTenantFromCookieByHash());
                                                             if (false !== $mResult && is_array($mResult)) {
                                                                 \api_Social::Process($mResult);
                                                             }
                                                         } else {
                                                             if ($this->oHttp->HasQuery('dropbox')) {
                                                                 $mResult = \api_Social::Dropbox(\api_Social::GetTenantFromCookieByHash());
                                                                 if (false !== $mResult && is_array($mResult)) {
                                                                     \api_Social::Process($mResult);
                                                                 }
                                                             } else {
                                                                 if ($this->oHttp->HasQuery('helpdesk')) {
                                                                     $sResult = $this->indexHTML(true, $this->oHttp->GetQuery('helpdesk'));
                                                                 } else {
                                                                     if ($this->oHttp->HasQuery('invite')) {
                                                                         $aInviteValues = \CApi::DecodeKeyValues($this->oHttp->GetQuery('invite'));
                                                                         $oApiUsersManager = \CApi::Manager('users');
                                                                         $oApiCalendarManager = \CApi::Manager('calendar');
                                                                         if (isset($aInviteValues['organizer'])) {
                                                                             $oAccountOrganizer = $oApiUsersManager->GetAccountOnLogin($aInviteValues['organizer']);
                                                                             if (isset($oAccountOrganizer, $aInviteValues['attendee'], $aInviteValues['calendarId'], $aInviteValues['eventId'], $aInviteValues['action'])) {
                                                                                 $oCalendar = $oApiCalendarManager->GetCalendar($oAccountOrganizer, $aInviteValues['calendarId']);
                                                                                 if ($oCalendar) {
                                                                                     $oEvent = $oApiCalendarManager->GetEvent($oAccountOrganizer, $aInviteValues['calendarId'], $aInviteValues['eventId']);
                                                                                     if ($oEvent && is_array($oEvent) && 0 < count($oEvent) && isset($oEvent[0])) {
                                                                                         if (is_string($sResult)) {
                                                                                             $sResult = file_get_contents(PSEVEN_APP_ROOT_PATH . 'templates/InviteExternal.html');
                                                                                             $dt = new \DateTime();
                                                                                             $dt->setTimestamp($oEvent[0]['startTS']);
                                                                                             if (!$oEvent[0]['allDay']) {
                                                                                                 $sDefaultTimeZone = new \DateTimeZone($oAccountOrganizer->GetDefaultStrTimeZone());
                                                                                                 $dt->setTimezone($sDefaultTimeZone);
                                                                                             }
                                                                                             $sAction = $aInviteValues['action'];
                                                                                             $sActionColor = 'green';
                                                                                             $sActionText = '';
                                                                                             switch (strtoupper($sAction)) {
                                                                                                 case 'ACCEPTED':
                                                                                                     $sActionColor = 'green';
                                                                                                     $sActionText = 'Accepted';
                                                                                                     break;
                                                                                                 case 'DECLINED':
                                                                                                     $sActionColor = 'red';
                                                                                                     $sActionText = 'Declined';
                                                                                                     break;
                                                                                                 case 'TENTATIVE':
                                                                                                     $sActionColor = '#A0A0A0';
                                                                                                     $sActionText = 'Tentative';
                                                                                                     break;
                                                                                             }
                                                                                             $sDateFormat = 'm/d/Y';
                                                                                             $sTimeFormat = 'h:i A';
                                                                                             switch ($oAccountOrganizer->User->DefaultDateFormat) {
                                                                                                 case \EDateFormat::DDMMYYYY:
                                                                                                     $sDateFormat = 'd/m/Y';
                                                                                                     break;
                                                                                                 case \EDateFormat::DD_MONTH_YYYY:
                                                                                                     $sDateFormat = 'd/m/Y';
                                                                                                     break;
                                                                                                 default:
                                                                                                     $sDateFormat = 'm/d/Y';
                                                                                                     break;
                                                                                             }
                                                                                             switch ($oAccountOrganizer->User->DefaultTimeFormat) {
                                                                                                 case \ETimeFormat::F24:
                                                                                                     $sTimeFormat = 'H:i';
                                                                                                     break;
                                                                                                 case \EDateFormat::DD_MONTH_YYYY:
                                                                                                     \ETimeFormat::F12;
                                                                                                     $sTimeFormat = 'h:i A';
                                                                                                     break;
                                                                                                 default:
                                                                                                     $sTimeFormat = 'h:i A';
                                                                                                     break;
                                                                                             }
                                                                                             $sDateTime = $dt->format($sDateFormat . ' ' . $sTimeFormat);
                                                                                             $mResult = array('{{COLOR}}' => $oCalendar->Color, '{{EVENT_NAME}}' => $oEvent[0]['subject'], '{{EVENT_BEGIN}}' => ucfirst(\CApi::ClientI18N('REMINDERS/EVENT_BEGIN', $oAccountOrganizer)), '{{EVENT_DATE}}' => $sDateTime, '{{CALENDAR}}' => ucfirst(\CApi::ClientI18N('REMINDERS/CALENDAR', $oAccountOrganizer)), '{{CALENDAR_NAME}}' => $oCalendar->DisplayName, '{{EVENT_DESCRIPTION}}' => $oEvent[0]['description'], '{{EVENT_ACTION}}' => $sActionText, '{{ACTION_COLOR}}' => $sActionColor);
                                                                                             $sResult = strtr($sResult, $mResult);
                                                                                         } else {
                                                                                             \CApi::Log('Empty template.', \ELogLevel::Error);
                                                                                         }
                                                                                     } else {
                                                                                         \CApi::Log('Event not found.', \ELogLevel::Error);
                                                                                     }
                                                                                 } else {
                                                                                     \CApi::Log('Calendar not found.', \ELogLevel::Error);
                                                                                 }
                                                                                 $sAttendee = $aInviteValues['attendee'];
                                                                                 if (!empty($sAttendee)) {
                                                                                     $oApiCalendarManager->UpdateAppointment($oAccountOrganizer, $aInviteValues['calendarId'], $aInviteValues['eventId'], $sAttendee, $aInviteValues['action']);
                                                                                 }
                                                                             }
                                                                         }
                                                                     } else {
                                                                         if ($this->oHttp->HasQuery('calendar-pub') && 0 < strlen($this->oHttp->GetQuery('calendar-pub'))) {
                                                                             $sResult = $this->indexHTML(false, '', $this->oHttp->GetQuery('calendar-pub'));
                                                                         } else {
                                                                             if ($this->oHttp->HasQuery('files-pub') && 0 < strlen($this->oHttp->GetQuery('files-pub'))) {
                                                                                 $sResult = $this->indexHTML(false, '', '', $this->oHttp->GetQuery('files-pub'));
                                                                             } else {
                                                                                 if ('min' === $sFirstPart || 'window' === $sFirstPart) {
                                                                                     $sAction = empty($aPaths[1]) ? '' : $aPaths[1];
                                                                                     try {
                                                                                         if (!empty($sAction)) {
                                                                                             $sMethodName = $aPaths[0] . $sAction;
                                                                                             if (method_exists($this->oActions, $sMethodName)) {
                                                                                                 if ('Min' === $aPaths[0]) {
                                                                                                     $oMinManager = \CApi::Manager('min');
                                                                                                     $mHashResult = $oMinManager->GetMinByHash(empty($aPaths[2]) ? '' : $aPaths[2]);
                                                                                                     $this->oActions->SetActionParams(array('Result' => $mHashResult, 'Hash' => empty($aPaths[2]) ? '' : $aPaths[2]));
                                                                                                 } else {
                                                                                                     $this->oActions->SetActionParams(array('AccountID' => empty($aPaths[2]) || '0' === (string) $aPaths[2] ? '' : $aPaths[2], 'RawKey' => empty($aPaths[3]) ? '' : $aPaths[3]));
                                                                                                 }
                                                                                                 $mResult = call_user_func(array($this->oActions, $sMethodName));
                                                                                                 $sTemplate = isset($mResult['Template']) && !empty($mResult['Template']) && is_string($mResult['Template']) ? $mResult['Template'] : null;
                                                                                                 if (!empty($sTemplate) && is_array($mResult) && file_exists(PSEVEN_APP_ROOT_PATH . $sTemplate)) {
                                                                                                     $sResult = file_get_contents(PSEVEN_APP_ROOT_PATH . $sTemplate);
                                                                                                     if (is_string($sResult)) {
                                                                                                         $sResult = strtr($sResult, $mResult);
                                                                                                     } else {
                                                                                                         \CApi::Log('Empty template.', \ELogLevel::Error);
                                                                                                     }
                                                                                                 } else {
                                                                                                     if (!empty($sTemplate)) {
                                                                                                         \CApi::Log('Empty template.', \ELogLevel::Error);
                                                                                                     } else {
                                                                                                         if (true === $mResult) {
                                                                                                             $sResult = '';
                                                                                                         } else {
                                                                                                             \CApi::Log('False result.', \ELogLevel::Error);
                                                                                                         }
                                                                                                     }
                                                                                                 }
                                                                                             } else {
                                                                                                 \CApi::Log('Invalid action.', \ELogLevel::Error);
                                                                                             }
                                                                                         } else {
                                                                                             \CApi::Log('Empty action.', \ELogLevel::Error);
                                                                                         }
                                                                                     } catch (\Exception $oException) {
                                                                                         \CApi::LogException($oException);
                                                                                     }
                                                                                 } else {
                                                                                     if ('twilio' === $sFirstPart) {
                                                                                         $sResult = $this->oTwilio->Init($aPaths, $this->oHttp);
                                                                                     } else {
                                                                                         if ('plugins' === $sFirstPart) {
                                                                                             $sType = !empty($aPaths[1]) ? trim($aPaths[1]) : '';
                                                                                             if ('js' === $sType) {
                                                                                                 @header('Content-Type: application/javascript; charset=utf-8');
                                                                                                 $sResult = \CApi::Plugin()->CompileJs();
                                                                                             }
                                                                                         } else {
                                                                                             if ('postlogin' === $sFirstPart && \CApi::GetConf('labs.allow-post-login', false)) {
                                                                                                 $oSettings =& \CApi::GetSettings();
                                                                                                 $sEmail = trim((string) $this->oHttp->GetRequest('Email', ''));
                                                                                                 $sLogin = (string) $this->oHttp->GetRequest('Login', '');
                                                                                                 $sPassword = (string) $this->oHttp->GetRequest('Password', '');
                                                                                                 $sAtDomain = trim($oSettings->GetConf('WebMail/LoginAtDomainValue'));
                                                                                                 if (\ELoginFormType::Login === (int) $oSettings->GetConf('WebMail/LoginFormType') && 0 < strlen($sAtDomain)) {
                                                                                                     $sEmail = \api_Utils::GetAccountNameFromEmail($sLogin) . '@' . $sAtDomain;
                                                                                                     $sLogin = $sEmail;
                                                                                                 }
                                                                                                 if (0 !== strlen($sPassword) && 0 !== strlen($sEmail . $sLogin)) {
                                                                                                     $oAccount = $oApiIntegrator->LoginToAccount($sEmail, $sPassword, $sLogin);
                                                                                                     if ($oAccount instanceof \CAccount) {
                                                                                                         $oApiIntegrator->SetAccountAsLoggedIn($oAccount);
                                                                                                     }
                                                                                                 }
                                                                                                 \CApi::Location('./');
                                                                                             } else {
                                                                                                 if ('mobile' === $sFirstPart) {
                                                                                                     if ($oApiIntegrator && $oApiCapability && $oApiCapability->IsNotLite()) {
                                                                                                         $oApiIntegrator->SetMobile(true);
                                                                                                     }
                                                                                                     \CApi::Location('./');
                                                                                                 } else {
                                                                                                     @ob_start();
                                                                                                     \CApi::Plugin()->RunServiceHandle($sFirstPart, $aPaths);
                                                                                                     $sResult = @ob_get_clean();
                                                                                                     if (0 === strlen($sResult)) {
                                                                                                         $sResult = $this->getIndexHTML();
                                                                                                     }
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     } else {
         $sResult = $this->getIndexHTML();
     }
     // Output result
     echo $sResult;
 }
Exemple #12
0
		<span id="txtNewPassword_label"><?php 
echo CApi::I18N('ADMIN_PANEL/SCREEN_SECURITY_PASSWORD');
?>
</span>
	</td>
	<td>
		<input type="password" class="wm_input" name="txtNewPassword" id="txtNewPassword" value="<?php 
$this->Data->PrintInputValue('txtNewPassword');
?>
" size="30" />
	</td>
</tr>
<tr>
	<td align="left">
		<span id="txtConfirmNewPassword_label"><?php 
echo CApi::I18N('ADMIN_PANEL/SCREEN_SECURITY_CONFIRM_PASSWORD');
?>
</span>
	</td>
	<td>
		<input type="password" class="wm_input" name="txtConfirmNewPassword" id="txtConfirmNewPassword" value="<?php 
$this->Data->PrintInputValue('txtConfirmNewPassword');
?>
" size="30" />
	</td>
</tr>

<input type="hidden" name="txtToken" value="<?php 
$this->Data->PrintInputValue('txtToken');
?>
" />
Exemple #13
0
define('CM_SWITCHER_MODE_NEW_USER', 'newuser');
define('CM_SWITCHER_MODE_EDIT_USER_GENERAL', 'editgeneral');
define('CM_SWITCHER_MODE_EDIT_USER_VOICE', 'editvoice');
define('CM_SWITCHER_MODE_EDIT_USER_TWILIO', 'edittwitio');
/* langs */
define('CM_MODE_RESOURCE_USAGE_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_RESOURCE_USAGE'));
define('CM_MODE_HELPDESK_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_HELPDESK'));
define('CM_MODE_SIP_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_SIP'));
define('CM_MODE_TWILIO_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_TWILIO'));
define('CM_MODE_SOCIAL_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_SOCIAL'));
define('CM_MODE_TENANT_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_TENANT'));
define('CM_MODE_BRANDING_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_BRANDING'));
define('CM_MODE_DB_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_DATABASE'));
define('CM_MODE_SECURITY_NAME', CApi::I18N('ADMIN_PANEL/SUBTABNAME_SECURITY'));
define('CM_SWITCHER_MODE_NEW_DOMAIN_NAME', CApi::I18N('ADMIN_PANEL/TOOLBAR_BUTTON_NEW_DOMAIN'));
define('CM_SWITCHER_MODE_EDIT_DOMAIN_GENERAL_NAME', CApi::I18N('ADMIN_PANEL/EDIT_DOMAIN_GENERAL_NAME'));
define('CM_SWITCHER_MODE_NEW_USER_NAME', CApi::I18N('ADMIN_PANEL/TOOLBAR_BUTTON_NEW_USER'));
define('CM_SWITCHER_MODE_EDIT_USER_GENERAL_NAME', CApi::I18N('ADMIN_PANEL/EDIT_USERS_GENERAL_NAME'));
define('CM_SWITCHER_MODE_EDIT_USER_VOICE_NAME', CApi::I18N('ADMIN_PANEL/EDIT_USERS_VOICE_NAME'));
define('CM_SWITCHER_MODE_EDIT_USER_TWILIO_NAME', CApi::I18N('ADMIN_PANEL/EDIT_USERS_TWILIO_NAME'));
define('CM_LANG_NODOMAINS', CApi::I18N('ADMIN_PANEL/INFO_NODOMAINS'));
define('CM_LANG_NODOMAINS_RESULTEMPTY', CApi::I18N('ADMIN_PANEL/INFO_DOMAINS_NOT_FOUND'));
define('CM_LANG_NOUSERSINDOMAIN', CApi::I18N('ADMIN_PANEL/INFO_NOUSERS'));
define('CM_LANG_USERS_RESULTEMPTY', CApi::I18N('ADMIN_PANEL/INFO_USERS_NOT_FOUND'));
define('CM_LANG_TOTAL_USERS', CApi::I18N('ADMIN_PANEL/INFO_USERS_TOTAL'));
define('CM_LANG_ACCOUNT_EXIST', CApi::I18N('ADMIN_PANEL/MSG_USER_EXIST'));
define('CM_LANG_DOMAIN_EXIST', CApi::I18N('ADMIN_PANEL/MSG_DOMAIN_EXIST'));
define('CM_LANG_DELETE_SUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_DELETE_SUCCESSFUL'));
define('CM_LANG_DELETE_UNSUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_DELETE_UNSUCCESSFUL'));
define('CM_PASSWORDS_NOT_MATCH', CApi::I18N('ADMIN_PANEL/MSG_PASSWORD_MISMATCH'));
Exemple #14
0
		<span id="txtSqlName_label"><?php echo CApi::I18N('ADMIN_PANEL/SCREEN_DATABASE_NAME'); ?></span>
	</td>
	<td>
		<input type="text" class="wm_input" name="txtSqlName" id="txtSqlName" value="<?php $this->Data->PrintInputValue('txtSqlName') ?>" size="35" />
	</td>
</tr>
<tr>
	<td align="left">
		<span id="txtSqlSrc_label"><?php echo CApi::I18N('ADMIN_PANEL/SCREEN_DATABASE_HOST'); ?></span>
	</td>
	<td>
		<input type="text" class="wm_input" name="txtSqlSrc" id="txtSqlSrc" value="<?php $this->Data->PrintInputValue('txtSqlSrc') ?>" size="35" />
	</td>
</tr>

<tr>
	<td align="left">
	</td>
	<td>
		<input type="hidden" name="isTestConnection" id="isTestConnection" value="0" />
		<input type="button" name="test_btn" id="test_btn" value="<?php echo CApi::I18N('ADMIN_PANEL/SCREEN_DATABASE_TEST'); ?>" class="wm_button" style="font-size: 11px;" />
	</td>
</tr>

<tr><td colspan="2"><br /></td></tr>
<tr>
	<td colspan="2" valign="top">
		<input type="button" name="create_btn" id="create_btn" value="<?php echo CApi::I18N('ADMIN_PANEL/SCREEN_DATABASE_CREATE'); ?>" class="wm_button" style="font-size: 11px;" />
		<input type="button" name="update_btn" id="update_btn" value="<?php echo CApi::I18N('ADMIN_PANEL/SCREEN_DATABASE_UPDATE'); ?>" class="wm_button" style="font-size: 11px;" />
	</td>
</tr>
Exemple #15
0
<tr>
	<td align="left" width="80" valign="top"></td>
	<td>
		<div class="wm_information_com" style="margin: 0px 0px 5px 0px;"><?php 
        echo CApi::I18N('ADMIN_PANEL/SOCIAL_GOOGLE_API_KEY_DESCRIPTION');
        ?>
</div>
	</td>
</tr>
<?php 
    }
    ?>
<tr>
	<td>
		<?php 
    echo CApi::I18N('ADMIN_PANEL/SOCIAL_SCOPES');
    ?>
	</td>
	<td>
<?php 
    foreach ($SocialItem->SupportedScopes as $iKey => $sScope) {
        ?>
		<input type="checkbox" class="wm_checkbox" name="<?php 
        echo $sSocialKey;
        ?>
_chSocialScopes[<?php 
        echo $sScope;
        ?>
]" id="<?php 
        echo $sSocialKey;
        ?>
			<label id="chAllowNewUsersRegister_label" for="chAllowNewUsersRegister">
				<?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_REGISTERED_ONLY');
?>
			</label>

			<div class="wm_information_com">
				<?php 
if ($this->Data->getValue('IsDefaultDomain', 'bool')) {
    echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_REGISTERED_ONLY_HINT_SERVER');
} else {
    echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_REGISTERED_ONLY_HINT_DOMAIN');
}
?>
			</div>

			<div class="wm_information_com">
				<?php 
if ($this->Data->getValue('IsDefaultDomain', 'bool')) {
    echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_REGISTERED_ONLY_HINT_NOTSET_SERVER');
} else {
    echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_REGISTERED_ONLY_HINT_NOTSET_DOMAIN');
}
?>
			</div>
		</td>
	</tr>
</table>
<br />

define('AP_TAB_USERS', 'users');
define('AP_TAB_TENANTS', 'tenants');
define('AP_TAB_CHANNELS', 'channels');
define('AP_TAB_SYSTEM', 'system');
define('AP_TAB_COMMON', 'common');
define('AP_TAB_DEFAULT', AP_TAB_SYSTEM);
define('AP_TAB_TENANT_DEFAULT', AP_TAB_COMMON);
define('AP_ORDER_ASC', 0);
define('AP_ORDER_DESC', 1);
define('AP_ORDER_DEFAULT', AP_ORDER_ASC);
define('AP_LINES_PER_PAGE', 20);
define('AP_SESS_MESSAGE', 'apsessmessage');
define('AP_SESS_ERROR', 'apsesserror');
// lang
define('AP_LANG_SAVING', CApi::I18N('ADMIN_PANEL/MSG_SAVING'));
define('AP_LANG_RESULTEMPTY', CApi::I18N('ADMIN_PANEL/MSG_RESULTEMPTY'));
define('AP_LANG_SAVESUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_SAVESUCCESSFUL'));
define('AP_LANG_SAVEUNSUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_SAVEUNSUCCESSFUL'));
define('AP_LANG_CONNECTSUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_CONNECTSUCCESSFUL'));
define('AP_LANG_CONNECTUNSUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_CONNECTUNSUCCESSFUL'));
define('AP_LANG_ERROR', CApi::I18N('ADMIN_PANEL/MSG_ERROR'));
define('AP_LANG_DELETE_SUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_DELETE_SUCCESSFUL'));
define('AP_LANG_DELETE_UNSUCCESSFUL', CApi::I18N('ADMIN_PANEL/MSG_DELETE_UNSUCCESSFUL'));
define('AP_LANG_ADMIN_ONLY_READ', CApi::I18N('ADMIN_PANEL/MSG_ADMIN_ONLY_READ'));
define('AP_REQ_FIELDS_CANNOT_BE_EMPTY', CApi::I18N('ADMIN_PANEL/MSG_FIELDS_CANNOT_BE_EMPTY'));
define('AP_REQ_VALID_PORT', CApi::I18N('ADMIN_PANEL/MSG_INVALID_PORT'));
define('AP_LANG_LOGIN_AUTH_ERROR', CApi::I18N('ADMIN_PANEL/MSG_LOGIN_AUTH_ERROR'));
define('AP_LANG_LOGIN_SESS_ERROR', CApi::I18N('ADMIN_PANEL/MSG_LOGIN_SESS_ERROR'));
define('AP_LANG_LOGIN_ACCESS_ERROR', CApi::I18N('ADMIN_PANEL/MSG_LOGIN_ACCESS_ERROR'));
define('AP_WITHOUT_DOMAIN_NAME', CApi::I18N('ADMIN_PANEL/INFO_NOT_IN_DOMAIN'));
Exemple #18
0
 public function DomainsMainEdit(ap_Table_Screen &$oScreen)
 {
     $iAutocheckMail = 0;
     $sDomainSkin = $sDomainLang = $sDomainZone = '';
     $iMessagesPerPage = $iContactsPerPage = 20;
     $iContactsGABVisibility = EContactsGABVisibility::Off;
     /* @var $oDomain CDomain */
     $oDomain = $this->oAdminPanel->GetMainObject('domain_edit');
     if ($oDomain) {
         $bHideProtocol = true;
         if ($oDomain->IsDefaultDomain || CSession::Has(AP_SESS_DOMAIN_NEXT_EDIT_ID) && $oDomain->IdDomain === CSession::Get(AP_SESS_DOMAIN_NEXT_EDIT_ID, null)) {
             $oScreen->Data->SetValue('classHideIncomingMailProtocol', '');
         }
         if ($bHideProtocol) {
             $oScreen->Data->SetValue('classHideIncomingMailProtocol', 'wm_hide');
             $oScreen->Data->SetValue('textIncomingMailProtocol', '');
         }
         $oScreen->Data->SetValue('txtFilteHrefAdd', '&filter=' . $oDomain->IdDomain);
         $oScreen->Data->SetValue('radioAuthTypeAuthCurrentUser', true);
         $oScreen->Data->SetValue('classHideSsl', $this->oModule->HasSslSupport() ? '' : 'wm_hide');
         $oScreen->Data->SetValue('txtWebDomain', $oDomain->Url);
         $mLinkWebUrl = $this->oAdminPanel->IsTenantAuthType() ? CApi::GetConf('labs.custom-tenant-link-web-domain-help-url', null) : CApi::GetConf('labs.custom-admin-link-web-domain-help-url', null);
         if (null === $mLinkWebUrl) {
             if ($this->oAdminPanel->AType) {
                 $mLinkWebUrl = 'http://www.afterlogic.com/wiki/Configuring_web_domain_names_(Aurora)';
             } else {
                 $mLinkWebUrl = 'http://www.afterlogic.com/wiki/Configuring_web_domain_names_(WebMail_Pro)';
             }
         }
         if (!empty($mLinkWebUrl)) {
             $oScreen->Data->SetValue('linkWebDomain', $mLinkWebUrl);
         }
         $oScreen->Data->SetValue('classLinkWebDomain', empty($mLinkWebUrl) ? 'wm_hide' : '');
         $oScreen->Data->SetValue('chAllowUsersAccessInterfaveSettings', $oDomain->AllowUsersChangeInterfaceSettings);
         $oScreen->Data->SetValue('chAllowUsersAccessAccountsSettings', $oDomain->AllowUsersChangeEmailSettings);
         $oScreen->Data->SetValue('chEnableWebmail', $oDomain->AllowWebMail);
         $oScreen->Data->SetValue('chEnableAddressBook', $oDomain->AllowContacts);
         $iMessagesPerPage = $oDomain->MailsPerPage;
         $iContactsPerPage = $oDomain->ContactsPerPage;
         $iAutocheckMail = $oDomain->AutoCheckMailInterval;
         $iIncomingMailProtocol = $oDomain->IncomingMailProtocol;
         $oScreen->Data->SetValue('optIncomingProtocolIMAP', EMailProtocol::IMAP4 === $iIncomingMailProtocol);
         $oScreen->Data->SetValue('optIncomingProtocolPOP3', EMailProtocol::POP3 === $iIncomingMailProtocol);
         $oScreen->Data->SetValue('txtIncomingMailHost', $oDomain->IncomingMailServer);
         $oScreen->Data->SetValue('txtIncomingMailPort', $oDomain->IncomingMailPort);
         $oScreen->Data->SetValue('chIncomingUseSSL', $oDomain->IncomingMailUseSSL);
         $oScreen->Data->SetValue('txtOutgoingMailHost', $oDomain->OutgoingMailServer);
         $oScreen->Data->SetValue('txtOutgoingMailPort', $oDomain->OutgoingMailPort);
         $oScreen->Data->SetValue('chOutgoingUseSSL', $oDomain->OutgoingMailUseSSL);
         //			$oScreen->Data->SetValue('txtExternalHostNameOfDAVServer', $oDomain->ExternalHostNameOfDAVServer);
         //			$oScreen->Data->SetValue('txtExternalHostNameOfLocalImap', $oDomain->ExternalHostNameOfLocalImap);
         //			$oScreen->Data->SetValue('txtExternalHostNameOfLocalSmtp', $oDomain->ExternalHostNameOfLocalSmtp);
         $sOutPassword = $oDomain->OutgoingMailPassword;
         $oScreen->Data->SetValue('txtOutgoingMailLogin', $oDomain->OutgoingMailLogin);
         $oScreen->Data->SetValue('txtOutgoingMailPassword', empty($sOutPassword) ? '' : AP_DUMMYPASSWORD);
         $iAuthType = $oDomain->OutgoingMailAuth;
         $oScreen->Data->SetValue('radioAuthTypeNoAuth', $iAuthType === ESMTPAuthType::NoAuth);
         $oScreen->Data->SetValue('radioAuthTypeAuthSpecified', $iAuthType === ESMTPAuthType::AuthSpecified);
         $oScreen->Data->SetValue('radioAuthTypeAuthCurrentUser', $iAuthType === ESMTPAuthType::AuthCurrentUser);
         $oScreen->Data->SetValue('chAllowNewUsersRegister', !$oDomain->AllowNewUsersRegister);
         $oScreen->Data->SetValue('IsDefaultDomain', $oDomain->IsDefaultDomain);
         $oScreen->Data->SetValue('domainIsInternal', $oDomain->IsInternal);
         $iLayout = $oDomain->Layout;
         $oScreen->Data->SetValue('radioLayoutSide', $iLayout === ELayout::Side);
         $oScreen->Data->SetValue('radioLayoutBottom', $iLayout === ELayout::Bottom);
     }
     $sMessagesPerPageOptions = '';
     $aMessagesPerPageList = array(10, 20, 30, 50, 75, 100, 150, 200);
     foreach ($aMessagesPerPageList as $iMessageCount) {
         $sSelected = $iMessageCount === $iMessagesPerPage ? ' selected="selected"' : '';
         $sMessagesPerPageOptions .= '<option value="' . $iMessageCount . '"' . $sSelected . '>' . $iMessageCount . '</option>';
     }
     $oScreen->Data->SetValue('selMessagesPerPageOptions', $sMessagesPerPageOptions);
     $sAutocheckMailOptions = '';
     $aAutocheckMailList = array(0, 1, 3, 5, 10, 15, 20, 30);
     foreach ($aAutocheckMailList as $iAutocheckMailValue) {
         $sSelected = $iAutocheckMail === $iAutocheckMailValue ? ' selected="selected"' : '';
         $sAutocheckMailView = CApi::I18N('ADMIN_PANEL/DOMAINS_WEBMAIL_AUTO_OFF');
         if (0 < $iAutocheckMailValue) {
             $sAutocheckMailView = 1 === $iAutocheckMailValue ? $iAutocheckMailValue . ' ' . CApi::I18N('ADMIN_PANEL/DOMAINS_WEBMAIL_AUTO_MIN') : $iAutocheckMailValue . ' ' . CApi::I18N('ADMIN_PANEL/DOMAINS_WEBMAIL_AUTO_MINS');
         }
         $sAutocheckMailOptions .= '<option value="' . $iAutocheckMailValue . '"' . $sSelected . '>' . $sAutocheckMailView . '</option>';
     }
     $oScreen->Data->SetValue('selAutocheckMailOptions', $sAutocheckMailOptions);
     $sContactsPerPageOptions = '';
     $aContactsPerPageList = array(10, 20, 30, 50, 75, 100, 150, 200);
     foreach ($aContactsPerPageList as $iContactsCount) {
         $sSelected = $iContactsPerPage === $iContactsCount ? ' selected="selected"' : '';
         $sContactsPerPageOptions .= '<option value="' . $iContactsCount . '"' . $sSelected . '>' . $iContactsCount . '</option>';
     }
     $oScreen->Data->SetValue('selContactsPerPageOptions', $sContactsPerPageOptions);
 }
?>
/>
		<label for="chSocialTwitterAllow"><?php 
echo CApi::I18N('ADMIN_PANEL/HELPDESK_SOCIAL_TWITTER');
?>
</label>
		<br />
		<br />
		<span><?php 
echo CApi::I18N('ADMIN_PANEL/HELPDESK_SOCIAL_TWITTER_ID');
?>
</span>
		<br />
		<br />
		<span><?php 
echo CApi::I18N('ADMIN_PANEL/HELPDESK_SOCIAL_TWITTER_SECRET');
?>
</span>
	</td>
	<td>
		<br />
		<br />
		<input type="text" id="txtSocialTwitterId" name="txtSocialTwitterId" value="<?php 
$this->Data->PrintInputValue('txtSocialTwitterId');
?>
" size="60" />
		<br />
		<input type="text" id="txtSocialTwitterSecret" name="txtSocialTwitterSecret" value="<?php 
$this->Data->PrintInputValue('txtSocialTwitterSecret');
?>
" size="60" />
Exemple #20
0
							<td>
								<input class="wm_input" type="password" size="20" id="passwordId" name="AdmpasswordInput"
									autocomplete="off" spellcheck="false"
									style="width: 99%; font-size: 16px;" onfocus="this.style.background = '#FFF9B2';"
									onblur="this.style.background = 'white';" value="<?php 
$this->Data->PrintInputValue('AdminPassword');
?>
"
								/>
							</td>
						</tr>
						<tr>
							<td align="right" colspan="2">
								<span class="wm_login_button">
									<input class="wm_button" type="submit" name="enter" value="<?php 
echo CApi::I18N('ADMIN_PANEL/SCREEN_LOGIN_ENTER');
?>
" />
								</span>
							</td>
						</tr>
					</table>
					</div>
				</div>
				<div class="b"></div>
				<div class="a"></div>
			</div>
			<?php 
$this->Data->PrintValue('LoginDemoFooter');
?>
		</form>
						?>" <?php $this->Data->PrintCheckedValue('radioAuthTypeAuthSpecified'); ?> />
					<label id="radioAuthTypeAuthSpecified_label" for="radioAuthTypeAuthSpecified"><?php echo CApi::I18N('ADMIN_PANEL/DOMAINS_SMTP_AUTH_LOGIN'); ?></label>

					&nbsp;&nbsp;&nbsp;

					<input type="text" name="txtOutgoingMailLogin" id="txtOutgoingMailLogin" class="wm_input"
						value="<?php $this->Data->PrintInputValue('txtOutgoingMailLogin'); ?>" />

					<span id="txtOutgoingMailPassword_label">
						<?php echo CApi::I18N('ADMIN_PANEL/DOMAINS_SMTP_AUTH_PASS'); ?>
					</span>
					<input type="password" name="txtOutgoingMailPassword" id="txtOutgoingMailPassword" class="wm_input"
						value="<?php $this->Data->PrintInputValue('txtOutgoingMailPassword'); ?>" />

					<br /><br />

				<?php } ?>

				<input type="radio" class="wm_checkbox" name="radioAuthType" id="radioAuthTypeAuthCurrentUser"
					value="<?php echo EnumConvert::ToPost(ESMTPAuthType::AuthCurrentUser, 'ESMTPAuthType');
					?>" <?php $this->Data->PrintCheckedValue('radioAuthTypeAuthCurrentUser'); ?> />
				<label id="radioAuthTypeAuthCurrentUser_label" for="radioAuthTypeAuthCurrentUser">
					<?php echo CApi::I18N('ADMIN_PANEL/DOMAINS_SMTP_AUTH_USER'); ?>
				</label>

			</fieldset>

		</td>
	</tr>

</table>
Exemple #22
0
    /**
     * @retun void
     */
    public function SwitchersToString()
    {
        $sQueryAction = $this->oTableScreen->Data->getValue('sysQueryAction');
        echo '<form autocomplete="off" action="' . AP_INDEX_FILE . '?ajax" method="POST" id="main_form"><input type="hidden" name="QueryAction" value="' . $sQueryAction . '">';
        $this->oTableScreen->JsAddInitText('$(\'#main_form\').submit(MainAjaxRequest);');
        if (0 < count($this->aTopSwitchers)) {
            echo '<div id="top_switchers_content_div">';
            foreach ($this->aTopSwitchers as $oTopSwitcher) {
                if (@file_exists($oTopSwitcher->Template())) {
                    include $oTopSwitcher->Template();
                }
            }
            echo '</div>';
        }
        echo '<div id="main_tab_container">';
        if (1 < count($this->aSwitchers)) {
            echo '<div id="switchers_tab_div" class="wm_settings_accounts_info" style="width: 100%; margin: 15px 0px">';
            echo '<div class="wm_settings_switcher_indent"></div>';
            end($this->aSwitchers);
            while (false !== ($aModeSwithers = current($this->aSwitchers))) {
                $oFirstItem = isset($aModeSwithers[0]) ? $aModeSwithers[0] : null;
                if ($oFirstItem) {
                    $oFirstItem->WriteTabName(false === prev($this->aSwitchers));
                    $this->oTableScreen->JsAddInitText('$(\'#switcher_tab_id_' . $oFirstItem->Mode() . '\').click(SwitcherTabHandler);');
                }
            }
            echo '</div>';
        }
        $bIsFirst = true;
        reset($this->aSwitchers);
        echo '<div id="switchers_content_div">';
        foreach ($this->aSwitchers as $sMode => $aModeSwithers) {
            $sHideStyle = 'display:none;';
            if ($bIsFirst) {
                $sHideStyle = '';
                $bIsFirst = false;
            }
            echo '<div id="content_custom_tab_' . $sMode . '" class="" style="' . $sHideStyle . '">';
            foreach ($aModeSwithers as $oItem) {
                if (@file_exists($oItem->Template())) {
                    include $oItem->Template();
                }
            }
            echo '</div>';
        }
        echo '</div></div>';
        echo '<br /><br /><hr /><div align="right">
<span class="wm_secondary_info" style="float: left;">' . CApi::I18N('ADMIN_PANEL/FORM_REQUIRED_FIELDS') . '</span>
<input type="submit" class="wm_button" style="width: 100px;" value="' . CApi::I18N('ADMIN_PANEL/FORM_BUTTON_SAVE') . '">
</div>';
        echo '</form>';
    }
<table class="wm_contacts_view">
	<tr>
		<td class="wm_field_value">
			<input type="checkbox" class="wm_checkbox override" name="chEnableWebmail" id="chEnableWebmail"
				   value="1" <?php 
$this->Data->PrintCheckedValue('chEnableWebmail');
?>
 />
			<label id="chEnableWebmail_label" for="chEnableWebmail"><?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_WEBMAIL_ENABLED');
?>
</label>
		</td>
	</tr>
</table>
Exemple #24
0
 /**
  * @return array
  */
 public function GetTimeZoneList()
 {
     return array(CApi::I18N('ADMIN_PANEL/FORM_DEFAULT'), '(GMT -12:00) Eniwetok, Kwajalein, Dateline Time', '(GMT -11:00) Midway Island, Samoa', '(GMT -10:00) Hawaii', '(GMT -09:00) Alaska', '(GMT -08:00) Pacific Time (US & Canada), Tijuana', '(GMT -07:00) Arizona', '(GMT -07:00) Mountain Time (US & Canada)', '(GMT -06:00) Central America', '(GMT -06:00) Central Time (US & Canada)', '(GMT -06:00) Mexico City, Tegucigalpa', '(GMT -06:00) Saskatchewan', '(GMT -05:00) Indiana (East)', '(GMT -05:00) Eastern Time (US & Canada)', '(GMT -05:00) Bogota, Lima, Quito', '(GMT -04:00) Santiago', '(GMT -04:00) Caracas, La Paz', '(GMT -04:00) Atlantic Time (Canada)', '(GMT -03:30) Newfoundland', '(GMT -03:00) Greenland', '(GMT -03:00) Buenos Aires, Georgetown', '(GMT -03:00) Brasilia', '(GMT -02:00) Mid-Atlantic', '(GMT -01:00) Cape Verde Is.', '(GMT -01:00) Azores', '(GMT) Casablanca, Monrovia', '(GMT) Dublin, Edinburgh, Lisbon, London', '(GMT +01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna', '(GMT +01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague', '(GMT +01:00) Brussels, Copenhagen, Madrid, Paris', '(GMT +01:00) Sarajevo, Skopje, Sofija, Warsaw, Zagreb', '(GMT +01:00) West Central Africa', '(GMT +02:00) Athens, Istanbul, Minsk', '(GMT +02:00) Bucharest', '(GMT +02:00) Cairo', '(GMT +02:00) Harare, Pretoria', '(GMT +02:00) Helsinki, Riga, Tallinn, Vilnius', '(GMT +02:00) Israel, Jerusalem Standard Time', '(GMT +03:00) Baghdad', '(GMT +03:00) Arab, Kuwait, Riyadh', '(GMT +03:00) East Africa, Nairobi', '(GMT +03:00) Moscow, St. Petersburg, Volgograd', '(GMT +03:30) Tehran', '(GMT +04:00) Abu Dhabi, Muscat', '(GMT +04:00) Baku, Tbilisi, Yerevan', '(GMT +04:30) Kabul', '(GMT +05:00) Islamabad, Karachi, Sverdlovsk, Tashkent', '(GMT +05:30) Calcutta, Chennai, Mumbai, New Delhi, India Standard Time', '(GMT +05:45) Kathmandu, Nepal', '(GMT +06:00) Ekaterinburg', '(GMT +06:00) Almaty, North Central Asia', '(GMT +06:00) Astana, Dhaka', '(GMT +06:00) Sri Jayawardenepura, Sri Lanka', '(GMT +06:30) Rangoon', '(GMT +07:00) Bangkok, Novosibirsk, Hanoi, Jakarta', '(GMT +08:00) Krasnoyarsk', '(GMT +08:00) Beijing, Chongqing, Hong Kong SAR, Urumqi', '(GMT +08:00) Ulaan Bataar', '(GMT +08:00) Kuala Lumpur, Singapore', '(GMT +08:00) Perth, Western Australia', '(GMT +08:00) Taipei', '(GMT +09:00) Osaka, Sapporo, Tokyo, Irkutsk', '(GMT +09:00) Seoul, Korea Standard time', '(GMT +09:30) Adelaide, Central Australia', '(GMT +09:30) Darwin', '(GMT +10:00) Yakutsk', '(GMT +10:00) Brisbane, East Australia', '(GMT +10:00) Canberra, Melbourne, Sydney, Hobart', '(GMT +10:00) Guam, Port Moresby', '(GMT +10:00) Hobart, Tasmania', '(GMT +11:00) Vladivostok', '(GMT +11:00) Solomon Is., New Caledonia', '(GMT +12:00) Auckland, Wellington, Magadan', '(GMT +12:00) Fiji Islands, Kamchatka, Marshall Is.', '(GMT +13:00) Nuku\'alofa, Tonga');
 }
		<td class="wm_field_value">
			<select name="selTab" id="selSkin" class="wm_select override">
				<?php 
$this->Data->PrintValue('selTabsOptions');
?>
			</select>
		</td>
	</tr>
	<tr>
		<td class="wm_field_value" colspan="2">
			<input type="checkbox" class="wm_checkbox override" value="1"
				name="chAllowUsersAccessInterfaveSettings" id="chAllowUsersAccessInterfaveSettings"
				<?php 
$this->Data->PrintCheckedValue('chAllowUsersAccessInterfaveSettings');
?>
 />
			<label id="chAllowUsersAccessInterfaveSettings_label" for="chAllowUsersAccessInterfaveSettings">
				<?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_ACCESS_INTERFACE');
?>
			</label>
			
			<div class="wm_information_com">
				<?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_GENERAL_ACCESS_INTERFACE_HINT');
?>
			</div>
		</td>
	</tr>
</table>
<br />
Exemple #26
0
$this->Data->PrintInputValue('txtSqlSrc');
?>
" size="35" />
	</td>
</tr>

<tr>
	<td align="left">
	</td>
	<td>
		<input type="hidden" name="isTestConnection" id="isTestConnection" value="0" />
		<input type="button" name="test_btn" id="test_btn" value="<?php 
echo CApi::I18N('ADMIN_PANEL/SCREEN_DATABASE_TEST');
?>
" class="wm_button" style="font-size: 11px;" />
	</td>
</tr>

<tr><td colspan="2"><br /></td></tr>
<tr>
	<td colspan="2" valign="top">
		<input type="button" name="create_btn" id="create_btn" value="<?php 
echo CApi::I18N('ADMIN_PANEL/SCREEN_DATABASE_CREATE');
?>
" class="wm_button" style="font-size: 11px;" />
		<input type="button" name="update_btn" id="update_btn" value="<?php 
echo CApi::I18N('ADMIN_PANEL/SCREEN_DATABASE_UPDATE');
?>
" class="wm_button" style="font-size: 11px;" />
	</td>
</tr>
Exemple #27
0
<?php

return array(
	'NoUsersSelected' => CApi::I18N('ADMIN_PANEL/MSG_NO_USERS_SELECTED'),
	'DeleteUserConfirm' => CApi::I18N('ADMIN_PANEL/CONFIRM_DELETE_USERS'),
	'NoChannelsSelected' => CApi::I18N('ADMIN_PANEL/MSG_NO_CHANNELS_SELECTED'),
	'DeleteChannelConfirm' => CApi::I18N('ADMIN_PANEL/CONFIRM_DELETE_CHANNELS'),
	'NoTenantsSelected' => CApi::I18N('ADMIN_PANEL/MSG_NO_TENANTS_SELECTED'),
	'DeleteTenantConfirm' => CApi::I18N('ADMIN_PANEL/CONFIRM_DELETE_TENANTS'),
	'NoDomainsSelected' => CApi::I18N('ADMIN_PANEL/MSG_NO_DOMAINS_SELECTED'),
	'DeleteDeleteConfirm' => CApi::I18N('ADMIN_PANEL/CONFIRM_DELETE_DOMAINS'),
	'DomainsNextButtonText' => CApi::I18N('ADMIN_PANEL/FORM_BUTTON_NEXT'),
	'DomainsCreateButtonText' => CApi::I18N('ADMIN_PANEL/FORM_BUTTON_CREATE'),
	'FirstPageText' => CApi::I18N('ADMIN_PANEL/PAGE_FIRST'),
	'PreviousPageText' => CApi::I18N('ADMIN_PANEL/PAGE_PREVIOUS'),
	'NextPageText' => CApi::I18N('ADMIN_PANEL/PAGE_NEXT'),
	'LastPageText' => CApi::I18N('ADMIN_PANEL/PAGE_LAST')
);


Exemple #28
0
 /**
  * @param int $iCode
  * @param array $aParams = array()
  * @return string
  */
 public static function GetMessageByCode($iCode, $aParams = array())
 {
     static $aMessages = null;
     if (null === $aMessages) {
         $aMessages = array(self::UserManager_AccountAlreadyExists => CApi::I18N('API/USERMANAGER_ACCOUNT_ALREADY_EXISTS'), self::UserManager_AccountCreateFailed => CApi::I18N('API/USERMANAGER_ACCOUNT_CREATE_FAILED'), self::UserManager_AccountUpdateFailed => CApi::I18N('API/USERMANAGER_ACCOUNT_UPDATE_FAILED'), self::UserManager_AccountAuthenticationFailed => CApi::I18N('API/USERMANAGER_ACCOUNT_AUTHENTICATION_FAILED'), self::UserManager_AccountCreateUserLimitReached => CApi::I18N('API/USERMANAGER_ACCOUNT_CREATE_USER_LIMIT_REACHED'), self::UserManager_AccountDoesNotExist => CApi::I18N('API/USERMANAGER_ACCOUNT_DOES_NOT_EXIST'), self::UserManager_LicenseKeyIsOutdated => CApi::I18N('API/USERMANAGER_LICENSE_KEY_IS_OUTDATED'), self::UserManager_LicenseKeyInvalid => CApi::I18N('API/USERMANAGER_LICENSE_KEY_INVALID'), self::UserManager_IdentityCreateFailed => CApi::I18N('API/USERMANAGER_IDENTIFY_CREATE_FAILED'), self::UserManager_IdentityUpdateFailed => CApi::I18N('API/USERMANAGER_IDENTITI_UPDATE_FAILED'), self::UserManager_AccountConnectToMailServerFailed => CApi::I18N('API/USERMANAGER_ACCOUNT_CONNECT_TO_MAIL_SERVER_FAILED'), self::UserManager_AccountOldPasswordNotCorrect => CApi::I18N('API/USERMANAGER_ACCOUNT_OLD_PASSWORD_NOT_CORRECT'), self::UserManager_AccountNewPasswordUpdateError => CApi::I18N('API/USERMANAGER_ACCOUNT_NEW_PASSWORD_UPDATE_ERROR'), self::UserManager_AccountNewPasswordRejected => CApi::I18N('API/USERMANAGER_ACCOUNT_NEW_PASSWORD_REJECTED'), self::UserManager_CalUserCreateFailed => CApi::I18N('API/USERMANAGER_CALUSER_CREATE_FAILED'), self::UserManager_CalUserUpdateFailed => CApi::I18N('API/USERMANAGER_CALUSER_UPDATE_FAILED'), self::UserManager_CalUserAlreadyExists => CApi::I18N('API/USERMANAGER_CALUSER_ALREADY_EXISTS'), self::UserManager_SocialAccountAlreadyExists => CApi::I18N('API/USERMANAGER_SOCIAL_ACCOUNT_ALREADY_EXISTS'), self::DomainsManager_DomainAlreadyExists => CApi::I18N('API/DOMAINSMANAGER_DOMAIN_ALREADY_EXISTS'), self::DomainsManager_DomainCreateFailed => CApi::I18N('API/DOMAINSMANAGER_DOMAIN_CREATE_FAILED'), self::DomainsManager_DomainUpdateFailed => CApi::I18N('API/DOMAINSMANAGER_DOMAIN_UPDATE_FAILED'), self::DomainsManager_DomainNotEmpty => CApi::I18N('API/DOMAINSMANAGER_DOMAIN_NOT_EMPTY'), self::DomainsManager_DomainDoesNotExist => CApi::I18N('API/DOMAINSMANAGER_DOMAIN_DOES_NOT_EXIST'), self::TenantsManager_TenantAlreadyExists => CApi::I18N('API/TENANTSMANAGER_TENANT_ALREADY_EXISTS'), self::TenantsManager_TenantCreateFailed => CApi::I18N('API/TENANTSMANAGER_TENANT_CREATE_FAILED'), self::TenantsManager_TenantUpdateFailed => CApi::I18N('API/TENANTSMANAGER_TENANT_UPDATE_FAILED'), self::TenantsManager_TenantDoesNotExist => CApi::I18N('API/TENANTSMANAGER_TENANT_DOES_NOT_EXIST'), self::TenantsManager_AccountCreateUserLimitReached => CApi::I18N('API/TENANTSMANAGER_ACCOUNT_CREATE_USER_LIMIT_REACHED'), self::TenantsManager_AccountUpdateUserLimitReached => CApi::I18N('API/TENANTSMANAGER_ACCOUNT_UPDATE_USER_LIMIT_REACHED'), self::TenantsManager_DomainCreateUserLimitReached => CApi::I18N('API/TENANTSMANAGER_DOMAIN_CREATE_USER_LIMIT_REACHED'), self::TenantsManager_QuotaLimitExided => CApi::I18N('API/TENANTS_MANAGER_QUOTA_LIMIT_EXCEEDED'), self::ChannelsManager_ChannelAlreadyExists => CApi::I18N('API/CHANNELSMANAGER_CHANNEL_ALREADY_EXISTS'), self::ChannelsManager_ChannelCreateFailed => CApi::I18N('API/CHANNELSMANAGER_CHANNEL_CREATE_FAILED'), self::ChannelsManager_ChannelUpdateFailed => CApi::I18N('API/CHANNELSMANAGER_CHANNEL_UPDATE_FAILED'), self::ChannelsManager_ChannelDoesNotExist => CApi::I18N('API/CHANNELSMANAGER_CHANNEL_DOES_NOT_EXIST'), self::MailSuiteManager_MailingListAlreadyExists => CApi::I18N('API/MAILSUITEMANAGER_MAILING_LIST_ALREADY_EXISTS'), self::MailSuiteManager_MailingListCreateFailed => CApi::I18N('API/MAILSUITEMANAGER_MAILING_LIST_CREATE_FAILED'), self::MailSuiteManager_MailingListUpdateFailed => CApi::I18N('API/MAILSUITEMANAGER_MAILING_LIST_UPDATE_FAILED'), self::MailSuiteManager_MailingListInvalid => CApi::I18N('API/MAILSUITEMANAGER_MAILING_LIST_INVALID'), self::WebMailManager_AccountDisabled => CApi::I18N('API/WEBMAILMANAGER_ACCOUNT_DISABLED'), self::WebMailManager_AccountWebmailDisabled => CApi::I18N('API/WEBMAILMANAGER_ACCOUNT_WEBMAIL_DISABLED'), self::WebMailManager_AccountCreateOnLogin => CApi::I18N('API/WEBMAILMANAGER_CREATE_ON_LOGIN'), self::WebMailManager_AccountAuthentication => CApi::I18N('API/WEBMAILMANAGER_ACCOUNT_AUTHENTICATION'), self::WebMailManager_DomainDoesNotExist => CApi::I18N('API/WEBMAILMANAGER_DOMAIN_DOES_NOT_EXIST'), self::WebMailManager_AccountConnectToMailServerFailed => CApi::I18N('API/WEBMAILMANAGER_ACCOUNT_CONNECT_TO_MAIL_SERVER_FAILED'), self::Validation_InvalidPort => CApi::I18N('API/VALIDATION_INVALID_PORT'), self::Validation_InvalidEmail => CApi::I18N('API/VALIDATION_INVALID_EMAIL'), self::Validation_FieldIsEmpty => CApi::I18N('API/VALIDATION_FIELD_IS_EMPTY'), self::Validation_InvalidPort_OutInfo => CApi::I18N('API/VALIDATION_INVALID_PORT_OUTINFO'), self::Validation_InvalidEmail_OutInfo => CApi::I18N('API/VALIDATION_INVALID_EMAIL_OUTINFO'), self::Validation_FieldIsEmpty_OutInfo => CApi::I18N('API/VALIDATION_FIELD_IS_EMPTY_OUTINFO'), self::Validation_InvalidParameters => CApi::I18N('API/VALIDATION_INVALID_PARAMETERS'), self::Validation_InvalidTenantName => CApi::I18N('API/VALIDATION_INVALID_TENANT_NAME'), self::Validation_InvalidChannelName => CApi::I18N('API/VALIDATION_INVALID_CHANNEL_NAME'), self::Container_UndefinedProperty => CApi::I18N('API/CONTAINER_UNDEFINED_PROPERTY'), self::Main_SettingLoadError => CApi::I18N('API/MAIN_SETTINGS_LOAD_ERROR'), self::Main_UnknownError => CApi::I18N('API/MAIN_UNKNOWN_ERROR'), self::Main_CustomError => CApi::I18N('API/MAIN_CUSTOM_ERROR'), self::Db_ExceptionError => CApi::I18N('API/DB_EXCEPTION_ERROR'), self::Db_PdoExceptionError => CApi::I18N('API/DB_PDO_EXCEPTION_ERROR'), self::Mail_FolderNameContainDelimiter => CApi::I18N('API/MAIL_FOLDER_NAME_CONTAIN_DELIMITER'), self::Mail_AccountAuthentication => CApi::I18N('API/MAIL_ACCOUNT_AUTHENTICATION'), self::Mail_AccountConnectToMailServerFailed => CApi::I18N('API/MAIL_ACCOUNT_CONNECT_TO_MAIL_SERVER_FAILED'), self::Mail_CannotRenameNonExistenFolder => CApi::I18N('API/MAIL_CANNOT_RENAME_NON_EXITEN_FOLDER'), self::Mail_CannotSendMessage => CApi::I18N('API/MAIL_CANNOT_SEND_MESSAGE'), self::Mail_MailboxUnavailable => CApi::I18N('API/MAIL_MAILBOX_UNAVAILABLE'), self::Fetcher_ConnectToMailServerFailed => CApi::I18N('API/FETCHER_CONNECT_TO_MAIL_SERVER_FAILED'), self::Fetcher_AuthError => CApi::I18N('API/FETCHER_AUTH_ERROR'), self::Sabre_Exception => CApi::I18N('API/SABRE_EXCEPTION'), self::Sabre_PreconditionFailed => CApi::I18N('API/SABRE_PRECONDITION_FAILED'));
     }
     return isset($aMessages[$iCode]) ? 0 < count($aParams) ? strtr($aMessages[$iCode], $aParams) : $aMessages[$iCode] : CApi::I18N('API/UNKNOWN_ERROR');
 }
<?php

return array('NoUsersSelected' => CApi::I18N('ADMIN_PANEL/MSG_NO_USERS_SELECTED'), 'DeleteUserConfirm' => CApi::I18N('ADMIN_PANEL/CONFIRM_DELETE_USERS'), 'NoChannelsSelected' => CApi::I18N('ADMIN_PANEL/MSG_NO_CHANNELS_SELECTED'), 'DeleteChannelConfirm' => CApi::I18N('ADMIN_PANEL/CONFIRM_DELETE_CHANNELS'), 'NoTenantsSelected' => CApi::I18N('ADMIN_PANEL/MSG_NO_TENANTS_SELECTED'), 'DeleteTenantConfirm' => CApi::I18N('ADMIN_PANEL/CONFIRM_DELETE_TENANTS'), 'NoDomainsSelected' => CApi::I18N('ADMIN_PANEL/MSG_NO_DOMAINS_SELECTED'), 'DeleteDeleteConfirm' => CApi::I18N('ADMIN_PANEL/CONFIRM_DELETE_DOMAINS'), 'DomainsNextButtonText' => CApi::I18N('ADMIN_PANEL/FORM_BUTTON_NEXT'), 'DomainsCreateButtonText' => CApi::I18N('ADMIN_PANEL/FORM_BUTTON_CREATE'), 'FirstPageText' => CApi::I18N('ADMIN_PANEL/PAGE_FIRST'), 'PreviousPageText' => CApi::I18N('ADMIN_PANEL/PAGE_PREVIOUS'), 'NextPageText' => CApi::I18N('ADMIN_PANEL/PAGE_NEXT'), 'LastPageText' => CApi::I18N('ADMIN_PANEL/PAGE_LAST'), 'AllowWebmailError' => CApi::I18N('ADMIN_PANEL/ALLOW_WEBMAIL_ERROR'), 'FirstCreateDomainName' => CApi::I18N('ADMIN_PANEL/FIRST_CREATE_DOMAIN_NAME'));
		<td align="left" colspan="3">
			<a href="?tab=users<?php 
$this->Data->PrintInputValue('txtFilteHrefAdd');
?>
"><?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_USERLIST');
?>
</a>
		</td>
	</tr>
	<tr class="<?php 
$this->Data->PrintInputValue('classHideOverrideSettings');
?>
">
		<td align="left" colspan="3">
			<input name="hiddenDomainId" type="hidden" value="<?php 
$this->Data->PrintInputValue('hiddenDomainId');
?>
" />
			<input name="chOverrideSettings" type="checkbox" id="chOverrideSettings" class="wm_checkbox" value="1"
				<?php 
$this->Data->PrintCheckedValue('chOverrideSettings');
?>
 />
			<label for="chOverrideSettings"><?php 
echo CApi::I18N('ADMIN_PANEL/DOMAINS_DEFAULT_OVERRIDE');
?>
</label>
		</td>
	</tr>
</table>