/** * Initialize the controller. * * The workflow is: * 1. Import user. * 2. Call parent constructor * 3. Authenticate user * 4. Load language files * DO NOT CHANGE THIS ORDER! */ public function __construct() { $this->User = \BackendUser::getInstance(); parent::__construct(); $this->User->authenticate(); $this->loadLanguageFile('default'); $this->loadLanguageFile('modules'); }
/** * Tests a back end user. * * @runInSeparateProcess * @preserveGlobalState disabled */ public function testBackendUser() { $token = new ContaoToken(BackendUser::getInstance()); $this->assertTrue($token->isAuthenticated()); $this->assertEquals('', $token->getCredentials()); $this->assertEquals([new Role('ROLE_USER'), new Role('ROLE_ADMIN')], $token->getRoles()); }
/** * @param $strType * @param null $strForceLanguage */ public function __construct($strType, $strForceLanguage = null) { if (in_array($strType, $GLOBALS['TL_EMAIL'])) { $this->strType = $strType; } $this->strForceLanguage = $strForceLanguage; // Set default parameters $this->addParameter('host', Idna::decode(Environment::get('host'))); $this->addParameter('admin_name', BackendUser::getInstance()->name); }
/** * {@inheritdoc} * * @return BackendUser|FrontendUser The user object */ public function loadUserByUsername($username) { $this->framework->initialize(); if ($this->isBackendUsername($username)) { return BackendUser::getInstance(); } if ($this->isFrontendUsername($username)) { return FrontendUser::getInstance(); } throw new UsernameNotFoundException('Can only load user "frontend" or "backend".'); }
/** * Check the permission for send or preview message button. * * @param GetGlobalButtonEvent $event The event. * * @return void */ public function checkPermissionSendMessageButton(GetGlobalButtonEvent $event) { $environment = $event->getEnvironment(); $dataDefinition = $environment->getDataDefinition(); if ($dataDefinition->getName() !== 'orm_avisota_message_content' || $event->getKey() !== 'send') { return; } $user = BackendUser::getInstance(); if (!$user->isAdmin || !$user->hasAccess('send', 'avisota_newsletter_permission')) { $event->setHtml(''); } }
/** * @param bool $blnReload * @return array */ public function getLanguages($blnReload = false) { if ($blnReload || !is_array(self::$arrLanguages) || count(self::$arrLanguages) < 1) { // Get all languages $arrSystemLanguages = System::getLanguages(); // Get all used languages $arrLanguages = array(); // If languages are specified if ($GLOBALS['TL_CONFIG']['chooseTranslationLanguages'] == '1') { $arrTranslationLanguages = deserialize($GLOBALS['TL_CONFIG']['translationLanguages']); if (is_array($arrTranslationLanguages) && $arrTranslationLanguages > 0) { foreach ($arrTranslationLanguages as $strLanguage) { $arrLanguages[$strLanguage] = $arrSystemLanguages[$strLanguage]; } } } else { $objRootPages = TranslationFieldsPageModel::findRootPages(); if ($objRootPages !== null) { while ($objRootPages->next()) { $arrLanguages[$objRootPages->language] = $arrSystemLanguages[$objRootPages->language]; } } // If langauge array is empty if (count($arrLanguages) < 1) { // Set all available languages $arrLanguages = System::getLanguages(true); // Set the language of the user to the top if (BackendUser::getInstance()->language != null) { // Get langauge value $strLanguageValue = $arrLanguages[BackendUser::getInstance()->language]; // Remove the current language from the array unset($arrLanguages[BackendUser::getInstance()->language]); // Add old array to a temp array $arrLanguagesTemp = $arrLanguages; // Generate a new array $arrLanguages = array(BackendUser::getInstance()->language => $strLanguageValue); // Merge the old array into the new array $arrLanguages = array_merge($arrLanguages, $arrLanguagesTemp); } } } self::$arrLanguages = $arrLanguages; } return self::$arrLanguages; }
/** * Prepare article icon callback. * * @return string */ public function prepareNewsIconCallback() { $user = BackendUser::getInstance(); return sprintf('system/themes/%s/images/%s', $user->backendTheme, Icons::getTableIcon('tl_article')); }
/** * Get the roots, who has user permission of it. * * @return array|int */ protected function getRoots() { $user = BackendUser::getInstance(); if ($user->isAdmin) { return 0; } return $user->pagemounts; }
/** * Add a list of versions to a template * * @param BackendTemplate|object $objTemplate */ public static function addToTemplate(BackendTemplate $objTemplate) { $arrVersions = array(); $objUser = \BackendUser::getInstance(); $objDatabase = \Database::getInstance(); // Get the total number of versions $objTotal = $objDatabase->prepare("SELECT COUNT(*) AS count FROM tl_version WHERE version>1" . (!$objUser->isAdmin ? " AND userid=?" : ""))->execute($objUser->id); $intLast = ceil($objTotal->count / 30); $intPage = \Input::get('vp') !== null ? \Input::get('vp') : 1; $intOffset = ($intPage - 1) * 30; // Validate the page number if ($intPage < 1 || $intLast > 0 && $intPage > $intLast) { header('HTTP/1.1 404 Not Found'); } // Create the pagination menu $objPagination = new \Pagination($objTotal->count, 30, 7, 'vp', new \BackendTemplate('be_pagination')); $objTemplate->pagination = $objPagination->generate(); // Get the versions $objVersions = $objDatabase->prepare("SELECT pid, tstamp, version, fromTable, username, userid, description, editUrl, active FROM tl_version" . (!$objUser->isAdmin ? " WHERE userid=?" : "") . " ORDER BY tstamp DESC, pid, version DESC")->limit(30, $intOffset)->execute($objUser->id); while ($objVersions->next()) { $arrRow = $objVersions->row(); // Add some parameters $arrRow['from'] = max($objVersions->version - 1, 1); // see #4828 $arrRow['to'] = $objVersions->version; $arrRow['date'] = date(\Config::get('datimFormat'), $objVersions->tstamp); $arrRow['description'] = \StringUtil::substr($arrRow['description'], 32); $arrRow['shortTable'] = \StringUtil::substr($arrRow['fromTable'], 18); // see #5769 if ($arrRow['editUrl'] != '') { $arrRow['editUrl'] = preg_replace('/&(amp;)?rt=[^&]+/', '&rt=' . REQUEST_TOKEN, ampersand($arrRow['editUrl'])); } $arrVersions[] = $arrRow; } $intCount = -1; $arrVersions = array_values($arrVersions); // Add the "even" and "odd" classes foreach ($arrVersions as $k => $v) { $arrVersions[$k]['class'] = ++$intCount % 2 == 0 ? 'even' : 'odd'; try { // Mark deleted versions (see #4336) $objDeleted = $objDatabase->prepare("SELECT COUNT(*) AS count FROM " . $v['fromTable'] . " WHERE id=?")->execute($v['pid']); $arrVersions[$k]['deleted'] = $objDeleted->count < 1; } catch (\Exception $e) { // Probably a disabled module --$intCount; unset($arrVersions[$k]); } } $objTemplate->versions = $arrVersions; }
/** * Add a breadcrumb menu to the file tree * * @param string $strKey * * @throws AccessDeniedException * @throws \RuntimeException */ public static function addFilesBreadcrumb($strKey = 'tl_files_node') { /** @var AttributeBagInterface $objSession */ $objSession = \System::getContainer()->get('session')->getBag('contao_backend'); // Set a new node if (isset($_GET['fn'])) { // Check the path (thanks to Arnaud Buchoux) if (\Validator::isInsecurePath(\Input::get('fn', true))) { throw new \RuntimeException('Insecure path ' . \Input::get('fn', true)); } $objSession->set($strKey, \Input::get('fn', true)); \Controller::redirect(preg_replace('/(&|\\?)fn=[^&]*/', '', \Environment::get('request'))); } $strNode = $objSession->get($strKey); if ($strNode == '') { return; } // Check the path (thanks to Arnaud Buchoux) if (\Validator::isInsecurePath($strNode)) { throw new \RuntimeException('Insecure path ' . $strNode); } // Currently selected folder does not exist if (!is_dir(TL_ROOT . '/' . $strNode)) { $objSession->set($strKey, ''); return; } $objUser = \BackendUser::getInstance(); $strPath = \Config::get('uploadPath'); $arrNodes = explode('/', preg_replace('/^' . preg_quote(\Config::get('uploadPath'), '/') . '\\//', '', $strNode)); $arrLinks = array(); // Add root link $arrLinks[] = \Image::getHtml('filemounts.svg') . ' <a href="' . \Backend::addToUrl('fn=') . '" title="' . \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['selectAllNodes']) . '">' . $GLOBALS['TL_LANG']['MSC']['filterAll'] . '</a>'; // Generate breadcrumb trail foreach ($arrNodes as $strFolder) { $strPath .= '/' . $strFolder; // Do not show pages which are not mounted if (!$objUser->hasAccess($strPath, 'filemounts')) { continue; } // No link for the active folder if ($strPath == $strNode) { $arrLinks[] = \Image::getHtml('folderC.svg') . ' ' . $strFolder; } else { $arrLinks[] = \Image::getHtml('folderC.svg') . ' <a href="' . \Backend::addToUrl('fn=' . $strPath) . '" title="' . \StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['selectNode']) . '">' . $strFolder . '</a>'; } } // Check whether the node is mounted if (!$objUser->hasAccess($strNode, 'filemounts')) { $objSession->set($strKey, ''); throw new AccessDeniedException('Folder ID "' . $strNode . '" is not mounted'); } // Limit tree $GLOBALS['TL_DCA']['tl_files']['list']['sorting']['root'] = array($strNode); // Insert breadcrumb menu $GLOBALS['TL_DCA']['tl_files']['list']['sorting']['breadcrumb'] .= ' <ul id="tl_breadcrumb"> <li>' . implode(' > </li><li>', $arrLinks) . '</li> </ul>'; }
/** * Prepare the list data configuration. * * @return SQLListDataConfig */ protected function prepareListDataConfig() { $user = BackendUser::getInstance(); $config = new SQLListDataConfig(); $config->setTable('tl_calendar'); $config->setKeyColumn('id'); $config->addColumns($this->getColumns()); // Todo is search column must be configured $config->addSearchColumns('title'); $config->setOrderByExpr('title'); $config->setLabelCallback($this->prepareLabelCallback($config)); $config->setIconCallback($this->prepareIconCallback()); if (!$user->isAdmin && count($user->calendars) > 0) { $config->setConditionExpr('id IN (' . implode(', ', $user->calendars) . ')'); } return $config; }
/** * Check the module permission * * @param string $module * * @return bool */ protected function checkModulePermission($module) { $user = BackendUser::getInstance(); if ($user->isAdmin) { return true; } return $user->hasAccess($module, 'modules'); }
/** * Get news archive table icon callback. * * @return string */ public function getNewsArchiveIconCallback() { $user = BackendUser::getInstance(); return sprintf('system/themes/%s/images/%s', $user->backendTheme, Icons::getTableIcon('tl_news_archive')); }
{protect_legend},protect; {info_legend},info', 'mail' => '{title_legend},access_title,type,author; {mail_legend},mail_name,mail_email,mail_loginname,mail_pwd,mail_crypt; {mail_smtp_legend},mail_smtp_host,mail_smtp_port; {mail_imap_legend},mail_imap_host,mail_imap_port; {mail_pop_legend},mail_pop_host,mail_pop_port; {protect_legend},protect; {info_legend},info', 'project' => '{title_legend},access_title,type,author; {webadmin_legend},webadmin_url,webadmin_name,webadmin_pwd; {contao_legend},contao_user,contao_pwd,contao_install_pwd; {local_legend},local_url,local_root; {local_db_legend},local_db_server,local_db_name,local_db_user,local_db_pwd,local_db_charset,local_db_port; {preview_legend},preview_url,preview_root; {preview_db_legend},preview_db_server,preview_db_name,preview_db_user,preview_db_pwd,preview_db_charset,preview_db_port; {preview_ftp_legend},preview_ftp_server,preview_ftp_user,preview_ftp_pwd,preview_ftp_protocol,preview_ftp_port; {preview_ssh_legend},preview_ssh_server,preview_ssh_port,preview_ssh_user,preview_ssh_pwd; {online_legend},online_url,online_root; {online_db_legend},online_db_server,online_db_name,online_db_user,online_db_pwd,online_db_charset,online_db_port; {online_ftp_legend},online_ftp_server,online_ftp_user,online_ftp_pwd,online_ftp_protocol,online_ftp_port; {online_ssh_legend},online_ssh_server,online_ssh_port,online_ssh_user,online_ssh_pwd; {protect_legend},protect; {info_legend},info', 'online_project' => '{title_legend},access_title,type,author; {webadmin_legend},webadmin_url,webadmin_name,webadmin_pwd; {contao_legend},contao_user,contao_pwd,contao_install_pwd; {online_legend},online_url,online_root; {online_db_legend},online_db_server,online_db_name,online_db_user,online_db_pwd,online_db_charset,online_db_port; {online_ftp_legend},online_ftp_server,online_ftp_user,online_ftp_pwd,online_ftp_protocol,online_ftp_port; {online_ssh_legend},online_ssh_server,online_ssh_port,online_ssh_user,online_ssh_pwd; {protect_legend},protect; {info_legend},info'), 'subpalettes' => array('protect' => 'protect_users,protect_groups'), 'fields' => array('id' => array('label' => array('ID'), 'search' => true, 'sql' => "int(10) unsigned NOT NULL auto_increment"), 'pid' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'sorting' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'accessdata' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['accessdata']), 'access_title' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['access_title'], 'filter' => true, 'search' => true, 'sorting' => true, 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'type' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['type'], 'default' => 'weblogin', 'filter' => true, 'search' => true, 'sorting' => true, 'exclude' => true, 'inputType' => 'select', 'options' => $GLOBALS['TL_SADTY'], 'reference' => &$GLOBALS['TL_LANG']['SADTY'], 'eval' => array('helpwizard' => true, 'submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'author' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['author'], 'default' => \Contao\BackendUser::getInstance()->id, 'filter' => true, 'sorting' => true, 'exclude' => true, 'inputType' => 'select', 'foreignKey' => 'tl_user.name', 'eval' => array('doNotCopy' => true, 'mandatory' => true, 'includeBlankOption' => false, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'protect' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['protect'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('encrypt' => true, 'submitOnChange' => true), 'sql' => "varchar(255) NOT NULL default ''"), 'protect_users' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['protect_users'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_user.name', 'eval' => array('encrypt' => true, 'multiple' => true, 'tl_class' => 'w50'), 'sql' => "blob NULL"), 'protect_groups' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['protect_groups'], 'exclude' => true, 'inputType' => 'checkbox', 'foreignKey' => 'tl_user_group.name', 'eval' => array('encrypt' => true, 'multiple' => true, 'tl_class' => 'w50'), 'sql' => "blob NULL"), 'info' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['info'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('encrypt' => true), 'sql' => "mediumtext NULL"), 'weblogin_url' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['weblogin_url'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'tl_class' => 'long'), 'sql' => "mediumtext NULL"), 'weblogin_name' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['weblogin_name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'weblogin_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['weblogin_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'contao_user' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['contao_user'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'contao_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['contao_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'contao_install_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['contao_install_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'encryption_key' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['encryption_key'], 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('encrypt' => true, 'maxlength' => 4096), 'sql' => "text NULL"), 'local_url' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['url'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'tl_class' => 'long'), 'sql' => "mediumtext NULL"), 'local_root' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['root'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'tl_class' => 'long'), 'sql' => "mediumtext NULL"), 'local_db_server' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_server'], 'exclude' => true, 'inputType' => 'text', 'default' => 'localhost', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'local_db_name' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'local_db_user' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_user'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'local_db_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'local_db_charset' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_charset'], 'exclude' => true, 'inputType' => 'text', 'default' => 'UTF-8', 'eval' => array('encrypt' => true, 'maxlength' => 8, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'local_db_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '3306', 'eval' => array('encrypt' => true, 'maxlength' => 4, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_url' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['url'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'tl_class' => 'long'), 'sql' => "mediumtext NULL"), 'preview_root' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['root'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'tl_class' => 'long'), 'sql' => "mediumtext NULL"), 'preview_db_server' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_server'], 'exclude' => true, 'inputType' => 'text', 'default' => 'localhost', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_db_name' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_db_user' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_user'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_db_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_db_charset' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_charset'], 'exclude' => true, 'inputType' => 'text', 'default' => 'UTF-8', 'eval' => array('encrypt' => true, 'maxlength' => 8, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_db_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '3306', 'eval' => array('encrypt' => true, 'maxlength' => 4, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ftp_server' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_server'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ftp_user' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_user'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ftp_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ftp_protocol' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_protocol'], 'exclude' => true, 'inputType' => 'select', 'eval' => array('tl_class' => 'w50'), 'options' => $GLOBALS['TL_SAD_FTP_PROTOCOL'], 'reference' => &$GLOBALS['TL_LANG']['SAD_FTP_PROTOCOL'], 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ftp_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '21', 'eval' => array('encrypt' => true, 'maxlength' => 4, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ssh_server' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ssh_server'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ssh_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ssh_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '22', 'eval' => array('encrypt' => true, 'maxlength' => 4, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ssh_user' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ssh_user'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'preview_ssh_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ssh_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_url' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['url'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'tl_class' => 'long'), 'sql' => "mediumtext NULL"), 'online_root' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['root'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'tl_class' => 'long'), 'sql' => "mediumtext NULL"), 'online_db_server' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_server'], 'exclude' => true, 'inputType' => 'text', 'default' => 'localhost', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_db_name' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_db_user' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_user'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_db_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_db_charset' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_charset'], 'exclude' => true, 'inputType' => 'text', 'default' => 'UTF-8', 'eval' => array('encrypt' => true, 'maxlength' => 8, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_db_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['db_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '3306', 'eval' => array('encrypt' => true, 'maxlength' => 4, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ftp_server' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_server'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ftp_user' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_user'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ftp_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ftp_protocol' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_protocol'], 'exclude' => true, 'inputType' => 'select', 'options' => $GLOBALS['TL_SAD_FTP_PROTOCOL'], 'reference' => &$GLOBALS['TL_LANG']['SAD_FTP_PROTOCOL'], 'eval' => array('encrypt' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ftp_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ftp_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '21', 'eval' => array('encrypt' => true, 'maxlength' => 4, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ssh_server' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ssh_server'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ssh_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ssh_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '22', 'eval' => array('encrypt' => true, 'maxlength' => 4, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ssh_user' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ssh_user'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'online_ssh_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['ssh_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'webadmin_url' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['webadmin_url'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'tl_class' => 'long'), 'sql' => "mediumtext NULL"), 'webadmin_name' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['webadmin_name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'webadmin_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['webadmin_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_name' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_name'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_email' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_email'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'rgxp' => 'email', 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_loginname' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_loginname'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_pwd' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_pwd'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_crypt' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_crypt'], 'exclude' => true, 'inputType' => 'select', 'options' => $GLOBALS['TL_SAD_MAIL_CRYPT'], 'eval' => array('encrypt' => true, 'includeBlankOption' => true, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_smtp_host' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_smtp_host'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_smtp_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_smtp_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '25', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_imap_host' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_imap_host'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_imap_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_imap_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '993', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_pop_host' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_pop_host'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'mail_pop_port' => array('label' => &$GLOBALS['TL_LANG']['tl_secure_accessdata']['mail_pop_port'], 'exclude' => true, 'inputType' => 'text', 'default' => '995', 'eval' => array('encrypt' => true, 'maxlength' => 120, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''")));