Subversion Repositories oidplus

Rev

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

Rev 350 Rev 360
Line 30... Line 30...
30
 
30
 
31
?><!DOCTYPE html>
31
?><!DOCTYPE html>
32
<html lang="en">
32
<html lang="en">
33
 
33
 
34
<head>
34
<head>
35
        <title>OIDplus Update</title>
35
        <title><?php echo _L('OIDplus Update'); ?></title>
36
        <meta name="robots" content="noindex">
36
        <meta name="robots" content="noindex">
37
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
37
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
38
        <link rel="stylesheet" href="../setup/setup.css">
38
        <link rel="stylesheet" href="../setup/setup.css">
39
        <?php
39
        <?php
40
        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) {
40
        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) {
Line 45... Line 45...
45
        ?>
45
        ?>
46
</head>
46
</head>
47
 
47
 
48
<body>
48
<body>
49
 
49
 
50
<h1>Update OIDplus</h1>
-
 
51
 
-
 
52
<?php
50
<?php
53
 
51
 
-
 
52
echo '<h1>'._L('Update OIDplus').'</h1>';
-
 
53
 
54
if (isset($_REQUEST['update_now'])) {
54
if (isset($_REQUEST['update_now'])) {
55
        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) {
55
        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) {
56
                $secret = OIDplus::baseConfig()->getValue('RECAPTCHA_PRIVATE', '');
56
                $secret = OIDplus::baseConfig()->getValue('RECAPTCHA_PRIVATE', '');
57
                $response = $_POST["g-recaptcha-response"];
57
                $response = $_POST["g-recaptcha-response"];
58
                $verify = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret={$secret}&response={$response}");
58
                $verify = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret={$secret}&response={$response}");
59
                $captcha_success = json_decode($verify);
59
                $captcha_success = json_decode($verify);
60
        }
60
        }
61
        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false) && ($captcha_success->success==false)) {
61
        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false) && ($captcha_success->success==false)) {
62
                echo '<p><font color="red"><b>CAPTCHA not sucessfully verified</b></font></p>';
62
                echo '<p><font color="red"><b>'._L('CAPTCHA not successfully verified').'</b></font></p>';
63
                echo '<p><a href="index.php">Try again</a></p>';
63
                echo '<p><a href="index.php">'._L('Try again').'</a></p>';
64
        } else {
64
        } else {
65
                if (!OIDplusAuthUtils::adminCheckPassword($_REQUEST['admin_password'])) {
65
                if (!OIDplusAuthUtils::adminCheckPassword($_REQUEST['admin_password'])) {
66
                        echo '<p><font color="red"><b>Wrong password</b></font></p>';
66
                        echo '<p><font color="red"><b>'._L('Wrong password').'</b></font></p>';
67
                        echo '<p><a href="index.php">Try again</a></p>';
67
                        echo '<p><a href="index.php">'._L('Try again').'</a></p>';
68
                } else {
68
                } else {
69
                        $svn = new phpsvnclient(OIDPLUS_REPO);
69
                        $svn = new phpsvnclient(OIDPLUS_REPO);
70
                        $svn->versionFile = 'oidplus_version.txt';
70
                        $svn->versionFile = 'oidplus_version.txt';
71
                        echo '<h2>Updating ...</h2>';
71
                        echo '<h2>'._L('Updating ...').'</h2>';
72
 
72
 
73
                        ob_start();
73
                        ob_start();
74
                        $svn->updateWorkingCopy(dirname(__DIR__).'/oidplus_version.txt', '/trunk', dirname(__DIR__), false);
74
                        $svn->updateWorkingCopy(dirname(__DIR__).'/oidplus_version.txt', '/trunk', dirname(__DIR__), false);
75
 
75
 
76
                        // START DIRTY HACK: Manually update the external repos, since we cannot handle external repos at the moment (TODO)
76
                        // START DIRTY HACK: Manually update the external repos, since we cannot handle external repos at the moment (TODO)
Line 88... Line 88...
88
                        $cont = str_replace(realpath(dirname(__DIR__)), '...', $cont);
88
                        $cont = str_replace(realpath(dirname(__DIR__)), '...', $cont);
89
                        ob_end_clean();
89
                        ob_end_clean();
90
 
90
 
91
                        echo '<pre>'.$cont.'</pre>';
91
                        echo '<pre>'.$cont.'</pre>';
92
 
92
 
93
                        echo '<p><a href="index.php">Back to update page</a></p>';
93
                        echo '<p><a href="index.php">'._L('Back to update page').'</a></p>';
94
                        echo '<hr>';
94
                        echo '<hr>';
95
                }
95
                }
96
        }
96
        }
97
 
97
 
98
} else {
98
} else {
Line 111... Line 111...
111
                        $this->setStatus($this->status);
111
                        $this->setStatus($this->status);
112
                        $this->setHeadline($this->content);
112
                        $this->setHeadline($this->content);
113
                }
113
                }
114
        }
114
        }
115
 
115
 
116
        ?>
-
 
117
 
-
 
118
        <p><u>There are two possibilities how to keep OIDplus up-to-date:</u></p>
116
        echo '<p><u>'._L('There are two possibilities how to keep OIDplus up-to-date').':</u></p>';
119
 
117
 
120
        <p><b>Method A</b>: Install OIDplus using the subversion tool in your SSH/Linux shell using the command <code>svn co <?php echo htmlentities(OIDPLUS_REPO); ?>/trunk</code>
-
 
121
        and update it regularly with the command <code>svn update</code> . This will automatically download the latest version and also check for
118
        echo '<p><b>'._L('Method A').'</b>: '._L('Install OIDplus using the subversion tool in your SSH/Linux shell using the command <code>svn co %1</code> and update it regularly with the command <code>svn update</code> . This will automatically download the latest version and check for conflicts. Highly recommended if you have a Shell/SSH access to your webspace!',htmlentities(OIDPLUS_REPO).'/trunk').'</p>';
122
        conflicts. Highly recommended if you have a Shell/SSH access to your webspace!</p>
-
 
123
 
-
 
124
        <p><b>Method B:</b> Install OIDplus by downloading a ZIP file from www.viathinksoft.com, which contains a SVN snapshot, and extract it to your webspace.
-
 
125
        The ZIP file contains a file named "oidplus_version.txt" which contains the SVN revision of the snapshot. This update-tool will then try to update your files
-
 
126
        on-the-fly by downloading them from the ViaThinkSoft SVN repository directly into your webspace directory.
-
 
127
        A change conflict detection is NOT implemented.
-
 
128
        It is required that the files on your webspace have
-
 
129
        create/write/delete permissions. Only recommended if you have no access to the SSH/Linux shell.</p>
-
 
130
 
119
 
131
        <hr>
120
        echo '<p><b>'._L('Method B').':</b> '._L('Install OIDplus by downloading a ZIP file from www.viathinksoft.com, which contains an SVN snapshot, and extract it to your webspace. The ZIP file contains a file named "oidplus_version.txt" which contains the SVN revision of the snapshot. This update-tool will then try to update your files on-the-fly by downloading them from the ViaThinkSoft SVN repository directly into your webspace directory. A change conflict detection is NOT implemented. It is required that the files on your webspace have create/write/delete permissions. Only recommended if you have no access to the SSH/Linux shell.').'</p>';
132
 
121
 
133
        <?php
122
        echo '<hr>';
134
 
123
 
135
        $svn_wc_exists = is_dir(OIDplus::basePath().'/.svn');
124
        $svn_wc_exists = is_dir(OIDplus::basePath().'/.svn');
136
        $snapshot_exists = file_exists(OIDplus::basePath().'/oidplus_version.txt');
125
        $snapshot_exists = file_exists(OIDplus::basePath().'/oidplus_version.txt');
137
 
126
 
138
        if ($svn_wc_exists && $snapshot_exists) {
127
        if ($svn_wc_exists && $snapshot_exists) {
139
                echo '<font color="red">ERROR: Both, oidplus_version.txt and .svn directory exist! Therefore, the version is ambigous!</font>';
128
                echo '<font color="red">'.strtoupper(_L('Error')).': '._L('Both, oidplus_version.txt and .svn directory exist! Therefore, the version is ambiguous!').'</font>';
140
                $job = new VNagMonitorDummy(VNag::STATUS_CRITICAL, "ERROR: Both, oidplus_version.txt and .svn directory exist! Therefore, the version is ambigous!");
129
                $job = new VNagMonitorDummy(VNag::STATUS_CRITICAL, 'Both, oidplus_version.txt and .svn directory exist! Therefore, the version is ambiguous!'); // do not translate
141
                $job->http_visual_output = VNag::OUTPUT_NEVER;
130
                $job->http_visual_output = VNag::OUTPUT_NEVER;
142
                $job->run();
131
                $job->run();
143
                unset($job);
132
                unset($job);
144
        } else if (!$svn_wc_exists && !$snapshot_exists) {
133
        } else if (!$svn_wc_exists && !$snapshot_exists) {
145
                echo '<font color="red">ERROR: Neither oidplus_version.txt, nor .svn directory exist! Therefore, the version cannot be determined and the update needs to be applied manually!</font>';
134
                echo '<font color="red">'.strtoupper(_L('Error')).': '._L('Neither oidplus_version.txt, nor .svn directory exist! Therefore, the version cannot be determined, and the update needs to be applied manually!').'</font>';
146
                $job = new VNagMonitorDummy(VNag::STATUS_CRITICAL, "Neither oidplus_version.txt, nor .svn directory exist! Therefore, the version cannot be determined and the update needs to be applied manually!");
135
                $job = new VNagMonitorDummy(VNag::STATUS_CRITICAL, 'Neither oidplus_version.txt, nor .svn directory exist! Therefore, the version cannot be determined, and the update needs to be applied manually!'); // do not translate
147
                $job->http_visual_output = VNag::OUTPUT_NEVER;
136
                $job->http_visual_output = VNag::OUTPUT_NEVER;
148
                $job->run();
137
                $job->run();
149
                unset($job);
138
                unset($job);
150
        } else if ($svn_wc_exists) {
139
        } else if ($svn_wc_exists) {
151
                echo '<p>You are using <b>method A</b> (SVN working copy).</p>';
140
                echo '<p>'._L('You are using <b>method A</b> (SVN working copy).').'</p>';
152
 
141
 
153
                $local_installation = OIDplus::getVersion();
142
                $local_installation = OIDplus::getVersion();
154
                $svn = new phpsvnclient(OIDPLUS_REPO);
143
                $svn = new phpsvnclient(OIDPLUS_REPO);
155
                $newest_version = 'svn-'.$svn->getVersion();
144
                $newest_version = 'svn-'.$svn->getVersion();
156
 
145
 
157
                echo 'Local installation: ' . ($local_installation ? $local_installation : 'unknown') . '<br>';
146
                echo _L('Local installation: %1',($local_installation ? $local_installation : _L('unknown'))).'<br>';
158
                echo 'Latest published version: ' . ($newest_version ? $newest_version : 'unknown') . '<br>';
147
                echo _L('Latest published version: %1',($newest_version ? $newest_version : _L('unknown'))).'<br>';
159
 
148
 
160
                if (!$local_installation) {
149
                if (!$local_installation) {
161
                        echo '<p><font color="red">The system could not determine the version of your system. (Required: svnupdate shell access or SQLite3). Please update your system manually via the SVN "update" command regularly.</font></p>';
150
                        echo '<p><font color="red">'._L('OIDplus could not determine its version. (Required: svnupdate shell access or SQLite3). Please update your system manually via the SVN "update" command regularly.').'</font></p>';
162
 
151
 
163
                        $job = new VNagMonitorDummy(VNag::STATUS_WARNING, 'The system could not determine the version of your system. (Required: svnupdate shell access or SQLite3). Please update your system manually via the SVN "update" command regularly.');
152
                        $job = new VNagMonitorDummy(VNag::STATUS_WARNING, 'OIDplus could not determine its version. (Required: svnupdate shell access or SQLite3). Please update your system manually via the SVN "update" command regularly.'); // do not translate
164
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
153
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
165
                        $job->run();
154
                        $job->run();
166
                        unset($job);
155
                        unset($job);
167
                } else if ($local_installation == $newest_version) {
156
                } else if ($local_installation == $newest_version) {
168
                        echo '<p><font color="green">You are already using the latest version of OIDplus.</font></p>';
157
                        echo '<p><font color="green">'._L('You are already using the latest version of OIDplus.').'</font></p>';
169
 
158
 
170
                        $job = new VNagMonitorDummy(VNag::STATUS_OK, "You are using the latest version of OIDplus ($local_installation local / $newest_version remote)");
159
                        $job = new VNagMonitorDummy(VNag::STATUS_OK, 'You are using the latest version of OIDplus ('.$local_installation.' local / '.$newest_version.' remote)'); // do not translate
171
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
160
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
172
                        $job->run();
161
                        $job->run();
173
                        unset($job);
162
                        unset($job);
174
                } else {
163
                } else {
175
                        echo '<p><font color="blue">Please enter <code>svn update</code> into the SSH shell to update OIDplus to the latest version.</font></p>';
164
                        echo '<p><font color="blue">'._L('Please enter <code>svn update</code> into the SSH shell to update OIDplus to the latest version.').'</font></p>';
176
 
165
 
177
                        echo '<h2>Preview of update '.$local_installation.' &rarr; '.$newest_version.'</h2>';
166
                        echo '<h2>'._L('Preview of update %1 &rarr; %2',$local_installation,$newest_version).'</h2>';
178
                        $svn = new phpsvnclient(OIDPLUS_REPO);
167
                        $svn = new phpsvnclient(OIDPLUS_REPO);
179
 
168
 
180
                        ob_start();
169
                        ob_start();
181
                        $svn->updateWorkingCopy(str_replace('svn-', '', $local_installation), '/trunk', dirname(__DIR__), true);
170
                        $svn->updateWorkingCopy(str_replace('svn-', '', $local_installation), '/trunk', dirname(__DIR__), true);
182
                        $cont = ob_get_contents();
171
                        $cont = ob_get_contents();
183
                        $cont = str_replace(realpath(dirname(__DIR__)), '...', $cont);
172
                        $cont = str_replace(realpath(dirname(__DIR__)), '...', $cont);
184
                        ob_end_clean();
173
                        ob_end_clean();
185
 
174
 
186
                        echo '<pre>'.$cont.'</pre>';
175
                        echo '<pre>'.$cont.'</pre>';
187
 
176
 
188
                        $job = new VNagMonitorDummy(VNag::STATUS_WARNING, "OIDplus is outdated. ($local_installation local / $newest_version remote)");
177
                        $job = new VNagMonitorDummy(VNag::STATUS_WARNING, 'OIDplus is outdated. ('.$local_installation.' local / '.$newest_version.' remote)'); // do not translate
189
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
178
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
190
                        $job->run();
179
                        $job->run();
191
                        unset($job);
180
                        unset($job);
192
                }
181
                }
193
        } else if ($snapshot_exists) {
182
        } else if ($snapshot_exists) {
194
                echo '<p>You are using <b>method B</b> (Snapshot ZIP file with oidplus_version.txt file).</p>';
183
                echo '<p>'._L('You are using <b>method B</b> (Snapshot ZIP file with oidplus_version.txt file).').'</p>';
195
 
184
 
196
                $local_installation = OIDplus::getVersion();
185
                $local_installation = OIDplus::getVersion();
197
                $svn = new phpsvnclient(OIDPLUS_REPO);
186
                $svn = new phpsvnclient(OIDPLUS_REPO);
198
                $newest_version = 'svn-'.$svn->getVersion();
187
                $newest_version = 'svn-'.$svn->getVersion();
199
 
188
 
200
                echo 'Local installation: ' . $local_installation.'<br>';
189
                echo _L('Local installation: %1',$local_installation).'<br>';
201
                echo 'Latest published version: ' . $newest_version.'<br>';
190
                echo _L('Latest published version: %1',$newest_version).'<br>';
202
 
191
 
203
                if ($local_installation == $newest_version) {
192
                if ($local_installation == $newest_version) {
204
                        echo '<p><font color="green">You are already using the latest version of OIDplus.</font></p>';
193
                        echo '<p><font color="green">'._L('You are already using the latest version of OIDplus.').'</font></p>';
205
 
194
 
206
                        $job = new VNagMonitorDummy(VNag::STATUS_OK, "You are using the latest version of OIDplus ($local_installation local / $newest_version remote)");
195
                        $job = new VNagMonitorDummy(VNag::STATUS_OK, 'You are using the latest version of OIDplus ('.$local_installation.' local / '.$newest_version.' remote)'); // do not translate
207
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
196
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
208
                        $job->run();
197
                        $job->run();
209
                        unset($job);
198
                        unset($job);
210
                } else {
199
                } else {
211
                        echo '<p><font color="blue">To update your OIDplus installation, please enter your password and click the button "Update NOW".</font></p>';
200
                        echo '<p><font color="blue">'._L('To update your OIDplus system, please enter the administrator password and click the button "Update NOW".').'</font></p>';
212
                        echo '<p><font color="red">WARNING: Please make a backup of your files before updating. In case of an error, the OIDplus installation (including this update-assistant) might become unavailable. Also, since the web-update does not contain collission-detection, changes you have applied (like adding, removing or modified files) might get reverted/lost! In case the update fails, you can download and extract the complete <a href="https://www.viathinksoft.com/projects/oidplus">SVN-Snapshot ZIP file</a> again. Since all your data should lay inside the folder "userdata", this should be safe.</font></p>';
201
                        echo '<p><font color="red">'.strtoupper(_L('Warning')).': '._L('Please make a backup of your files before updating. In case of an error, the OIDplus system (including this update-assistant) might become unavailable. Also, since the web-update does not contain collision-detection, changes you have applied (like adding, removing or modified files) might get reverted/lost! In case the update fails, you can download and extract the complete <a href="https://www.viathinksoft.com/projects/oidplus">SVN-Snapshot ZIP file</a> again. Since all your data should lay inside the folder "userdata", this should be safe.').'</font></p>';
213
                        echo '<form method="POST" action="index.php">';
202
                        echo '<form method="POST" action="index.php">';
214
 
203
 
215
                        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) {
204
                        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) {
216
                                echo '<noscript>';
205
                                echo '<noscript>';
217
                                echo '<p><font color="red">You need to enable JavaScript to solve the CAPTCHA.</font></p>';
206
                                echo '<p><font color="red">'._L('You need to enable JavaScript to solve the CAPTCHA.').'</font></p>';
218
                                echo '</noscript>';
207
                                echo '</noscript>';
219
                                echo '<script> grecaptcha.render(document.getElementById("g-recaptcha"), { "sitekey" : "'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'" }); </script>';
208
                                echo '<script> grecaptcha.render(document.getElementById("g-recaptcha"), { "sitekey" : "'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'" }); </script>';
220
                                echo '<div id="g-recaptcha" class="g-recaptcha" data-sitekey="'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'"></div>';
209
                                echo '<div id="g-recaptcha" class="g-recaptcha" data-sitekey="'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'"></div>';
221
                        }
210
                        }
222
 
211
 
223
                        echo '<input type="hidden" name="update_now" value="1">';
212
                        echo '<input type="hidden" name="update_now" value="1">';
224
                        echo '<input type="password" name="admin_password">';
213
                        echo '<input type="password" name="admin_password">';
225
                        echo '<input type="submit" value="Update NOW">';
214
                        echo '<input type="submit" value="'._L('Update NOW').'">';
226
                        echo '</form>';
215
                        echo '</form>';
227
 
216
 
228
                        echo '<h2>Preview of update '.$local_installation.' &rarr; '.$newest_version.'</h2>';
217
                        echo '<h2>'._L('Preview of update %1 &rarr; %2',$local_installation,$newest_version).'</h2>';
229
                        $svn = new phpsvnclient(OIDPLUS_REPO);
218
                        $svn = new phpsvnclient(OIDPLUS_REPO);
230
 
219
 
231
                        ob_start();
220
                        ob_start();
232
                        $svn->updateWorkingCopy(dirname(__DIR__).'/oidplus_version.txt', '/trunk', dirname(__DIR__), true);
221
                        $svn->updateWorkingCopy(dirname(__DIR__).'/oidplus_version.txt', '/trunk', dirname(__DIR__), true);
233
                        $cont = ob_get_contents();
222
                        $cont = ob_get_contents();
234
                        $cont = str_replace(realpath(dirname(__DIR__)), '...', $cont);
223
                        $cont = str_replace(realpath(dirname(__DIR__)), '...', $cont);
235
                        ob_end_clean();
224
                        ob_end_clean();
236
 
225
 
237
                        echo '<pre>'.$cont.'</pre>';
226
                        echo '<pre>'.$cont.'</pre>';
238
 
227
 
239
                        $job = new VNagMonitorDummy(VNag::STATUS_WARNING, "OIDplus is outdated. ($local_installation local / $newest_version remote)");
228
                        $job = new VNagMonitorDummy(VNag::STATUS_WARNING, 'OIDplus is outdated. ('.$local_installation.' local / '.$newest_version.' remote)'); // do not translate
240
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
229
                        $job->http_visual_output = VNag::OUTPUT_NEVER;
241
                        $job->run();
230
                        $job->run();
242
                        unset($job);
231
                        unset($job);
243
                }
232
                }
244
        }
233
        }
245
 
234
 
246
        echo '<hr>';
235
        echo '<hr>';
247
 
236
 
248
        echo '<p><input type="button" onclick="document.location=\'../\'" value="Go back to OIDplus"></p>';
237
        echo '<p><input type="button" onclick="document.location=\'../\'" value="'._L('Go back to OIDplus').'"></p>';
249
 
238
 
250
        echo '<br><h2>File Completeness Check</h2>';
239
        echo '<br><h2>'._L('File Completeness Check').'</h2>';
251
 
240
 
252
        echo '<p>With this optional tool, you can check if your OIDplus installation is complete and no files are missing.</p>';
241
        echo '<p>'._L('With this optional tool, you can check if your OIDplus installation is complete and no files are missing.').'</p>';
253
 
242
 
254
        echo '<p>Please enter your administrator password to run the tool.</p>';
243
        echo '<p>'._L('Please enter your administrator password to run the tool.').'</p>';
255
 
244
 
256
        echo '<form method="POST" action="check.php">';
245
        echo '<form method="POST" action="check.php">';
257
        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) {
246
        if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) {
258
                echo '<noscript>';
247
                echo '<noscript>';
259
                echo '<p><font color="red">You need to enable JavaScript to solve the CAPTCHA.</font></p>';
248
                echo '<p><font color="red">'._L('You need to enable JavaScript to solve the CAPTCHA.').'</font></p>';
260
                echo '</noscript>';
249
                echo '</noscript>';
261
                echo '<script> grecaptcha.render(document.getElementById("g-recaptcha"), { "sitekey" : "'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'" }); </script>';
250
                echo '<script> grecaptcha.render(document.getElementById("g-recaptcha"), { "sitekey" : "'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'" }); </script>';
262
                echo '<div id="g-recaptcha" class="g-recaptcha" data-sitekey="'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'"></div>';
251
                echo '<div id="g-recaptcha" class="g-recaptcha" data-sitekey="'.OIDplus::baseConfig()->getValue('RECAPTCHA_PUBLIC', '').'"></div>';
263
        }
252
        }
264
        if (!isset($local_installation)) $local_installation = 'svn-';
253
        if (!isset($local_installation)) $local_installation = 'svn-';
265
        echo '<input type="hidden" name="svn_version" value="'.(substr($local_installation,strlen('svn-'))).'">';
254
        echo '<input type="hidden" name="svn_version" value="'.(substr($local_installation,strlen('svn-'))).'">';
266
        echo '<input type="password" name="admin_password">';
255
        echo '<input type="password" name="admin_password">';
267
        echo '<input type="submit" value="Check">';
256
        echo '<input type="submit" value="'._L('Check').'">';
268
        echo '<p>Attention: This will take some time!</p>';
257
        echo '<p>'._L('Attention: This will take some time!').'</p>';
269
        echo '</form>';
258
        echo '</form>';
270
 
259
 
271
        echo '<h2>VNag integration</h2>';
260
        echo '<h2>'._L('VNag integration').'</h2>';
272
 
261
 
273
        echo '<p>Did you know that this page contains an invisible VNag tag? You can watch this page using the "webreader" plugin of VNag, and then monitor it with any Nagios compatible software! <a href="https://www.viathinksoft.com/projects/vnag">More information</a>.</p>';
262
        echo '<p>'._L('Did you know that this page contains an invisible VNag tag? You can watch this page using the "webreader" plugin of VNag, and then monitor it with any Nagios compatible software! <a href="https://www.viathinksoft.com/projects/vnag">More information</a>.').'</p>';
274
}
263
}
275
 
264
 
276
?>
265
?>
277
 
266
 
278
</body>
267
</body>