Exemplo n.º 1
0
 $externalSAMLForm->addElement("text", "saml_sign_out", _SIGNOUTURL, 'class = "inputText"');
 $externalSAMLForm->addElement("text", "saml_fingerprint", _CERTIFICATEFINGERPRINT, 'class = "inputText"');
 $externalSAMLForm->addElement("text", "saml_targeted_id", "Targeted id", 'class = "inputText"');
 $externalSAMLForm->addElement("text", "saml_first_name", _FIRSTNAME, 'class = "inputText"');
 $externalSAMLForm->addElement("text", "saml_last_name", _LASTNAME, 'class = "inputText"');
 $externalSAMLForm->addElement("text", "saml_email", _EMAIL, 'class = "inputText"');
 $externalSAMLForm->addElement("advcheckbox", "saml_bool_redirect_sign", null, _SIGNSAMLREQUESTS, 'class = "inputCheckBox"', array(0, 1));
 $externalSAMLForm->addElement("advcheckbox", "saml_bool_redirect_validate", null, _VALIDATESAMLREQUESTS, 'class = "inputCheckBox"', array(0, 1));
 $externalSAMLForm->addElement("text", "saml_foo1", "Assertion Consumer Service (ACS) URL", 'class = "inputText inactiveElement" disabled');
 $externalSAMLForm->addElement("text", "saml_foo2", "Single Logout Service URL", 'class = "inputText inactiveElement" disabled');
 $externalSAMLForm->addElement("text", "saml_foo3", "SP Metadata XML", 'class = "inputText inactiveElement" disabled');
 $externalSAMLForm->setDefaults($GLOBALS['configuration']);
 $externalSAMLForm->setDefaults(array('saml_foo1' => G_SERVERNAME . "saml/module.php/saml/sp/saml2-acs.php/efront-sp"));
 $externalSAMLForm->setDefaults(array('saml_foo2' => G_SERVERNAME . "saml/module.php/saml/sp/saml2-logout.php/efront-sp"));
 $externalSAMLForm->setDefaults(array('saml_foo3' => G_SERVERNAME . "saml/module.php/saml/sp/metadata.php/efront-sp"));
 $externalSAMLForm->freeze(array('saml_foo1', 'saml_foo2', 'saml_foo3'));
 if (isset($currentUser->coreAccess['configuration']) && $currentUser->coreAccess['configuration'] != 'change') {
     $externalSAMLForm->freeze();
 } else {
     $externalSAMLForm->addElement("submit", "submit", _SAVE, 'class = "flatButton"');
     if ($externalSAMLForm->isSubmitted() && $externalSAMLForm->validate()) {
         //If the form is submitted and validated
         $values = $externalSAMLForm->exportValues();
         unset($values['submit']);
         foreach ($values as $key => $value) {
             EfrontConfiguration::setValue($key, $value);
         }
         eF_redirect(basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=external&tab=saml&message=" . urlencode(_SUCCESFULLYUPDATECONFIGURATION) . "&message_type=success");
     }
 }
 $smarty->assign("T_EXTERNAL_SAML_FORM", $externalSAMLForm->toArray());
Exemplo n.º 2
0
$generalPHPForm->addElement("advcheckbox", "compress_tests", _COMPRESSTESTS, null, 'class = "inputCheckBox"', array(0, 1));
$generalPHPForm->addElement("text", "max_file_size", _MAXFILESIZE, 'class = "inputText"');
$generalPHPForm->addElement("static", "", _MAXFILEISAFFECTEDANDIS . ' <b>' . FileSystemTree::getUploadMaxSize() . '</b> ' . _KB);
$generalPHPForm->addElement("text", "debug_mode", _DEBUGMODE, null, 'class = "inputText"');
$generalPHPForm->addElement("static", "", _COMMASEPARATEDLISTOFUSERSOR1FORALL);
$generalPHPForm->addRule('memory_limit', _INVALIDFIELDDATA, 'checkParameter', 'id');
$generalPHPForm->addRule('max_execution_time', _INVALIDFIELDDATA, 'checkParameter', 'id');
$generalPHPForm->addRule('max_file_size', _INVALIDFIELDDATA, 'checkParameter', 'id');
$generalPHPForm->addRule('max_file_size', _INVALIDFIELDDATAFORFIELD . ': "' . _MAXFILESIZE . '"', 'numeric', null, 'client');
$generalPHPForm->setDefaults($GLOBALS['configuration']);
isset($configuration['memory_limit']) ? $generalPHPForm->setDefaults(array('memory_limit' => $configuration['memory_limit'])) : $generalPHPForm->setDefaults(array('memory_limit' => (int) ini_get('memory_limit')));
isset($configuration['max_execution_time']) ? $generalPHPForm->setDefaults(array('max_execution_time' => $configuration['max_execution_time'])) : $generalPHPForm->setDefaults(array('max_execution_time' => ini_get('max_execution_time')));
isset($configuration['gz_handler']) ? $generalPHPForm->setDefaults(array('gz_handler' => $configuration['gz_handler'])) : $generalPHPForm->setDefaults(array('gz_handler' => ''));
//		isset($configuration['display_errors'])   ? $generalPHPForm -> setDefaults(array('display_errors'	 => $configuration['display_errors']))	 : $generalPHPForm -> setDefaults(array('display_errors'	 => ini_get('display_errors')));
if ($GLOBALS['configuration']['version_hosted']) {
    $generalPHPForm->freeze(array('memory_limit', 'max_execution_time'));
}
if (isset($currentUser->coreAccess['configuration']) && $currentUser->coreAccess['configuration'] != 'change') {
    $generalPHPForm->freeze();
} else {
    $generalPHPForm->addElement("submit", "submit", _SAVE, 'class = "flatButton"');
    if ($generalPHPForm->isSubmitted() && $generalPHPForm->validate()) {
        //If the form is submitted and validated
        $values = $generalPHPForm->exportValues();
        unset($values['submit']);
        if ($GLOBALS['configuration']['version_hosted']) {
            unset($values['memory_limit']);
            unset($values['max_execution_time']);
        }
        foreach ($values as $key => $value) {
            if ($value == '') {
Exemplo n.º 3
0
            EfrontCache::getInstance()->deleteCache('logo');
            eF_redirect(basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=appearance&tab=logo&message=" . urlencode(_SUCCESFULLYUPDATECONFIGURATION) . "&message_type=success");
        } catch (Exception $e) {
            handleNormalFlowExceptions($e);
        }
    }
}
$smarty->assign("T_APPEARANCE_LOGO_FORM", $appearanceLogoForm->toArray());
$appearanceFaviconForm = new Html_QuickForm("appearance_favicon_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=appearance&tab=favicon", "", null, true);
$appearanceFaviconForm->registerRule('checkParameter', 'callback', 'eF_checkParameter');
$appearanceFaviconForm->addElement('file', 'favicon', _FILENAME);
$appearanceFaviconForm->addElement("static", "", _EACHFILESIZEMUSTBESMALLERTHAN . ' <b>' . FileSystemTree::getUploadMaxSize() . '</b> ' . _KB);
$appearanceFaviconForm->addElement("advcheckbox", "default_favicon", _USEDEFAULTFAVICON, null, 'class = "inputCheckBox"  id = "set_default_favicon" onclick = "$(\'favicon_settings\').select(\'input\').each(function(s) {if (s.type != \'submit\' && s.id != \'set_default_favicon\') s.disabled ? s.disabled = \'\' : s.disabled = \'disabled\' })"', array(0, 1));
$appearanceFaviconForm->setMaxFileSize(FileSystemTree::getUploadMaxSize() * 1024);
if (isset($currentUser->coreAccess['configuration']) && $currentUser->coreAccess['configuration'] != 'change') {
    $appearanceFaviconForm->freeze();
} else {
    $appearanceFaviconForm->addElement("submit", "submit", _SAVE, 'class = "flatButton"');
    if ($appearanceFaviconForm->isSubmitted() && $appearanceFaviconForm->validate()) {
        try {
            //If the form is submitted and validated
            if ($appearanceFaviconForm->exportValue('default_favicon')) {
                EfrontConfiguration::setValue('favicon', '');
            } else {
                $faviconDirectory = new EfrontDirectory(G_LOGOPATH);
                $filesystem = new FileSystemTree(G_LOGOPATH);
                try {
                    $faviconFile = $filesystem->uploadFile('favicon', $logoDirectory);
                    if (strpos($faviconFile['mime_type'], 'image') === false) {
                        throw new EfrontFileException(_NOTANIMAGEFILE, EfrontFileException::NOT_APPROPRIATE_TYPE);
                    }
Exemplo n.º 4
0
 $externalLDAPForm->addElement("text", "ldap_server", _LDAPSERVER, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_port", _LDAPPORT, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_binddn", _LDAPBINDDN, 'class = "inputText"');
 $externalLDAPForm->addElement("password", "ldap_password", _LDAPPASSWORD, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_basedn", _LDAPBASEDN, 'class = "inputText"');
 $externalLDAPForm->addElement("select", "ldap_protocol", _LDAPPROTOCOLVERSION, array('2' => '2', '3' => '3'));
 $externalLDAPForm->addElement("text", "ldap_uid", _LOGINATTRIBUTE, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_cn", _LDAPCOMMONNAME, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_postaladdress", _LDAPADDRESS, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_l", _LDAPLOCALITY, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_telephonenumber", _LDAPTELEPHONENUMBER, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_mail", _LDAPMAIL, 'class = "inputText"');
 $externalLDAPForm->addElement("text", "ldap_preferredlanguage", _LDAPLANGUAGE, 'class = "inputText"');
 $externalLDAPForm->setDefaults($GLOBALS['configuration']);
 if (isset($currentUser->coreAccess['configuration']) && $currentUser->coreAccess['configuration'] != 'change') {
     $externalLDAPForm->freeze();
 } else {
     $externalLDAPForm->addElement("submit", "check_ldap", _CHECKSETTINGS, 'class = "flatButton"');
     $externalLDAPForm->addElement("submit", "submit", _SAVE, 'class = "flatButton"');
     if ($externalLDAPForm->isSubmitted() && $externalLDAPForm->validate()) {
         //If the form is submitted and validated
         $values = $externalLDAPForm->exportValues();
         if (!isset($values['check_ldap'])) {
             unset($values['submit']);
             foreach ($values as $key => $value) {
                 EfrontConfiguration::setValue($key, $value);
             }
             eF_redirect(basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=external&tab=ldap&message=" . urlencode(_SUCCESFULLYUPDATECONFIGURATION) . "&message_type=success");
         } else {
             //debug();
             //ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);