Esempio n. 1
0
                    }
                }
            }
            $smarty->assign("T_EXTERNAL_LDAP_FORM", $externalLDAPForm->toArray());
        } else {
            $smarty->assign("T_EXTENSION_MISSING", 'ldap');
        }
    }
    #cpp#endif
}
#cpp#endif
if (G_VERSIONTYPE != 'community') {
    #cpp#ifndef COMMUNITY
    if (G_VERSIONTYPE != 'standard') {
        #cpp#ifndef STANDARD
        $externalSAMLForm = new Html_QuickForm("external_saml_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=external&tab=saml", "", null, true);
        $externalSAMLForm->registerRule('checkParameter', 'callback', 'eF_checkParameter');
        $externalSAMLForm->addElement("advcheckbox", "saml_enabled", _ACTIVATESAML, null, 'class = "inputCheckBox"', array(0, 1));
        $externalSAMLForm->addElement("text", "saml_provider", _IDENTITYPROVIDER, 'class = "inputText"');
        $externalSAMLForm->addElement("text", "saml_sign_in", _SIGNINURL, 'class = "inputText"');
        $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');
Esempio n. 2
0
            $user_mail = eF_getTableData("users", "email", "login='******'s_login'] . "'");
            $header = array('From' => $values['system_email'], 'To' => $user_mail[0]['email'], 'Subject' => 'Test email', 'Content-type' => 'text/plain;charset="UTF-8"', 'Content-Transfer-Encoding' => '7bit', 'Date' => date("r"));
            $smtp = Mail::factory('smtp', array('auth' => $values['smtp_auth'] ? true : false, 'host' => $values['smtp_host'], 'password' => $values['smtp_pass'], 'port' => $values['smtp_port'], 'username' => $values['smtp_user'], 'timeout' => $values['smtp_timeout'], 'localhost' => $_SERVER["HTTP_HOST"]));
            $result = $smtp->send($user_mail[0]['email'], $header, 'This is a test email sent from ' . G_SERVERNAME . ' to verify SMTP settings');
            if ($result === true) {
                $message = _EMAILSENDTOYOURADDRESS;
                $message_type = 'success';
            } else {
                $message = $result->getMessage();
                $message_type = 'failure';
            }
        }
    }
}
$smarty->assign("T_GENERAL_SMTP_FORM", $generalSMTPForm->toArray());
$generalPHPForm = new Html_QuickForm("general_php_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=general&tab=php", "", null, true);
$generalPHPForm->registerRule('checkParameter', 'callback', 'eF_checkParameter');
$generalPHPForm->addElement("static", "sidenote", 'M');
$generalPHPForm->addElement("text", "memory_limit", _MEMORYLIMIT, 'class = "inputText" style = "width:35px"');
$generalPHPForm->addElement("static", "sidenote", _SECONDS);
$generalPHPForm->addElement("text", "max_execution_time", _MAXEXECUTIONTIME, 'class = "inputText" style = "width:35px"');
$generalPHPForm->addElement("static", "", _LEAVEBLANKTOUSEPHPINI);
$generalPHPForm->addElement("advcheckbox", "gz_handler", _GZHANDLER, null, 'class = "inputCheckBox"', array(0, 1));
$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');
Esempio n. 3
0
                eF_normalizeImage(G_LOGOPATH . $logoFile['name'], $logoFile['extension'], $values["logo_max_width"], $values["logo_max_height"]);
            } else {
                list($width, $height) = getimagesize(G_LOGOPATH . $logoFile['name']);
                eF_createImage(G_LOGOPATH . $logoFile['name'], $logoFile['extension'], $width, $height, $values["logo_max_width"], $values["logo_max_height"]);
            }
            EfrontConfiguration::setValue('logo_timestamp', time());
            // to avoid browser caching when changing logo dimensions
            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 {
Esempio n. 4
0
        if (!file_exists($path . "phplivedocx_config.php") || is_writable($path . "phplivedocx_config.php")) {
            file_put_contents($path . "phplivedocx_config.php", $phplivedocxConfig);
        } else {
            $message = _PHPLIVEDOCXCONFIGURATIONFILEISNOTWRITABLE;
        }
        eF_redirect(basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=external&tab=livedocx&message=" . urlencode(_SUCCESFULLYUPDATECONFIGURATION) . "&message_type=success");
    }
}
$smarty->assign("T_EXTERNAL_LIVEDOCX_FORM", $externalLiveDocxForm->toArray());
if (G_VERSIONTYPE != 'community') {
    #cpp#ifndef COMMUNITY
    if (G_VERSIONTYPE != 'standard') {
        #cpp#ifndef STANDARD
        $extensions = get_loaded_extensions();
        if (in_array('ldap', $extensions)) {
            $externalLDAPForm = new Html_QuickForm("external_ldap_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=system_config&op=external&tab=ldap", "", null, true);
            $externalLDAPForm->registerRule('checkParameter', 'callback', 'eF_checkParameter');
            $externalLDAPForm->addElement("advcheckbox", "activate_ldap", _ACTIVATELDAP, null, 'class = "inputCheckBox"', array(0, 1));
            $externalLDAPForm->addElement("advcheckbox", "only_ldap", _SUPPORTONLYLDAP, null, 'class = "inputCheckBox"', array(0, 1));
            $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"');