Subversion Repositories oidplus

Rev

Rev 440 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 440 Rev 496
Line 64... Line 64...
64
        echo '<noscript>';
64
        echo '<noscript>';
65
        echo '<p><font color="red">'._L('You need to enable JavaScript to solve the CAPTCHA.').'</font></p>';
65
        echo '<p><font color="red">'._L('You need to enable JavaScript to solve the CAPTCHA.').'</font></p>';
66
        echo '</noscript>';
66
        echo '</noscript>';
67
        echo '<script> grecaptcha.render(document.getElementById("g-recaptcha"), { "sitekey" : "'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'" }); </script>';
67
        echo '<script> grecaptcha.render(document.getElementById("g-recaptcha"), { "sitekey" : "'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'" }); </script>';
68
        echo '<p>'._L('Before logging in, please solve the following CAPTCHA').'</p>';
68
        echo '<p>'._L('Before logging in, please solve the following CAPTCHA').'</p>';
69
        echo '<p>'._L('If the CAPTCHA does not work (e.g. because of wrong keys, please run <a href="%1">setup part 1</a> again or edit %2 manually).',OIDplus::getSystemUrl().'setup/','userdata/baseconfig/config.inc.php').'</p>';
69
        echo '<p>'._L('If the CAPTCHA does not work (e.g. because of wrong keys, please run <a href="%1">setup part 1</a> again or edit %2 manually).',OIDplus::webpath().'setup/','userdata/baseconfig/config.inc.php').'</p>';
70
        echo '<div id="g-recaptcha" class="g-recaptcha" data-sitekey="'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'"></div>';
70
        echo '<div id="g-recaptcha" class="g-recaptcha" data-sitekey="'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'"></div>';
71
 
71
 
72
        if (isset($_REQUEST['sent'])) {
72
        if (isset($_REQUEST['sent'])) {
73
                $secret=OIDplus::baseConfig()->getValue('RECAPTCHA_PRIVATE', '');
73
                $secret=OIDplus::baseConfig()->getValue('RECAPTCHA_PRIVATE', '');
74
                $response=$_POST["g-recaptcha-response"];
74
                $response=$_POST["g-recaptcha-response"];
Line 90... Line 90...
90
 
90
 
91
} else {
91
} else {
92
 
92
 
93
        echo '<p>'._L('Please enter the administrator password you have entered before.').'</p>';
93
        echo '<p>'._L('Please enter the administrator password you have entered before.').'</p>';
94
 
94
 
95
        echo '<p><input type="password" name="admin_password" value=""> (<a href="'.OIDplus::getSystemUrl().'setup/">'._L('Forgot password?').'</a>) ';
95
        echo '<p><input type="password" name="admin_password" value=""> (<a href="'.OIDplus::webpath().'setup/">'._L('Forgot password?').'</a>) ';
96
 
96
 
97
        if (isset($_REQUEST['sent'])) {
97
        if (isset($_REQUEST['sent'])) {
98
                if (!OIDplus::authUtils()->adminCheckPassword($_REQUEST['admin_password'])) {
98
                if (!OIDplus::authUtils()->adminCheckPassword($_REQUEST['admin_password'])) {
99
                        $errors_happened = true;
99
                        $errors_happened = true;
100
                        $edits_possible = false;
100
                        $edits_possible = false;