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 File Completeness Check</title> |
35 | <title><?php echo _L('OIDplus File Completeness Check'); ?></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>OIDplus File Completeness Check</h1> |
- | |
51 | - | ||
52 | <?php |
50 | <?php |
53 | 51 | ||
- | 52 | echo '<h1>'._L('OIDplus File Completeness Check').'</h1>'; |
|
- | 53 | ||
54 | echo '<p><input type="button" onclick="document.location=\'index.php\'" value="Go back to updater"></p>'; |
54 | echo '<p><input type="button" onclick="document.location=\'index.php\'" value="'._L('Go back to updater').'"></p>'; |
55 | 55 | ||
56 | if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) { |
56 | if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false)) { |
57 | $secret = OIDplus::baseConfig()->getValue('RECAPTCHA_PRIVATE', ''); |
57 | $secret = OIDplus::baseConfig()->getValue('RECAPTCHA_PRIVATE', ''); |
58 | $response = $_POST["g-recaptcha-response"]; |
58 | $response = $_POST["g-recaptcha-response"]; |
59 | $verify = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret={$secret}&response={$response}"); |
59 | $verify = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret={$secret}&response={$response}"); |
60 | $captcha_success = json_decode($verify); |
60 | $captcha_success = json_decode($verify); |
61 | } |
61 | } |
62 | 62 | ||
63 | if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false) && ($captcha_success->success==false)) { |
63 | if (OIDplus::baseConfig()->getValue('RECAPTCHA_ENABLED', false) && ($captcha_success->success==false)) { |
64 | echo '<p><font color="red"><b>CAPTCHA not sucessfully verified</b></font></p>'; |
64 | echo '<p><font color="red"><b>'._L('CAPTCHA not successfully verified').'</b></font></p>'; |
65 | //echo '<p><a href="index.php">Try again</a></p>'; |
65 | //echo '<p><a href="index.php">Try again</a></p>'; |
66 | } else { |
66 | } else { |
67 | if (!OIDplusAuthUtils::adminCheckPassword($_REQUEST['admin_password'])) { |
67 | if (!OIDplusAuthUtils::adminCheckPassword($_REQUEST['admin_password'])) { |
68 | echo '<p><font color="red"><b>Wrong password</b></font></p>'; |
68 | echo '<p><font color="red"><b>'._L('Wrong password').'</b></font></p>'; |
69 | //echo '<p><a href="index.php">Try again</a></p>'; |
69 | //echo '<p><a href="index.php">Try again</a></p>'; |
70 | } else { |
70 | } else { |
71 | $svn = new phpsvnclient(OIDPLUS_REPO); |
71 | $svn = new phpsvnclient(OIDPLUS_REPO); |
72 | 72 | ||
73 | $svn_rev = isset($_REQUEST['svn_version']) && is_numeric($_REQUEST['svn_version']) ? (int)$_REQUEST['svn_version'] : -1; |
73 | $svn_rev = isset($_REQUEST['svn_version']) && is_numeric($_REQUEST['svn_version']) ? (int)$_REQUEST['svn_version'] : -1; |
Line 80... | Line 80... | ||
80 | } |
80 | } |
81 | foreach ($svn_cont as $key => &$c) { |
81 | foreach ($svn_cont as $key => &$c) { |
82 | if ((strpos($c,'userdata/') === 0) && ($c !== 'userdata/info.txt') && ($c !== 'userdata/.htaccess') && ($c !== 'userdata/index.html') && (substr($c,-1) !== '/')) unset($svn_cont[$key]); |
82 | if ((strpos($c,'userdata/') === 0) && ($c !== 'userdata/info.txt') && ($c !== 'userdata/.htaccess') && ($c !== 'userdata/index.html') && (substr($c,-1) !== '/')) unset($svn_cont[$key]); |
83 | } |
83 | } |
84 | echo '<pre>'; |
84 | echo '<pre>'; |
85 | echo $svn_rev == -1 ? "Compare local <--> svn-head\n\n" : "Compare local <--> svn-$svn_rev\n\n"; |
85 | echo $svn_rev == -1 ? _L('Compare local <--> svn-head')."\n\n" : _L('Compare local <--> svn-%1',$svn_rev)."\n\n"; |
86 | echo "=== FILES MISSING ===\n"; |
86 | echo '=== '._L('FILES MISSING').' ==='."\n"; |
87 | $diff = array_diff($svn_cont, $local_cont); |
87 | $diff = array_diff($svn_cont, $local_cont); |
88 | if (count($diff) === 0) echo "Everything OK\n"; |
88 | if (count($diff) === 0) echo _L('Everything OK')."\n"; |
89 | foreach ($diff as $c) echo "$c\n"; |
89 | foreach ($diff as $c) echo "$c\n"; |
90 | echo "\n"; |
90 | echo "\n"; |
91 | 91 | ||
92 | echo "=== ADDITIONAL FILES ===\n"; |
92 | echo '=== '._L('ADDITIONAL FILES').' ==='."\n"; |
93 | $diff = array_diff($local_cont, $svn_cont); |
93 | $diff = array_diff($local_cont, $svn_cont); |
94 | if (count($diff) === 0) echo "Everything OK\n"; |
94 | if (count($diff) === 0) echo _L('Everything OK')."\n"; |
95 | foreach ($diff as $c) echo "$c\n"; |
95 | foreach ($diff as $c) echo "$c\n"; |
96 | echo "\n"; |
96 | echo "\n"; |
97 | echo '</pre>'; |
97 | echo '</pre>'; |
98 | } |
98 | } |
99 | } |
99 | } |