aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/index.php')
-rw-r--r--web/index.php28
1 files changed, 25 insertions, 3 deletions
diff --git a/web/index.php b/web/index.php
index 1fd4d7d..43be192 100644
--- a/web/index.php
+++ b/web/index.php
@@ -1,15 +1,23 @@
<?php
- define("ZONETAB", "/usr/share/zoneinfo/zone.tab");
+ require_once "config.php";
+
+ if (RECAPTCHA_ENABLED) {
+ require_once "recaptcha.php";
+ }
$timezones = array();
$zonetab = file(ZONETAB);
foreach ($zonetab as $buf) {
- if (substr($buf, 0, 1)=='#') continue;
+ if (substr($buf, 0, 1)=='#') {
+ continue;
+ }
$rec = preg_split('/\s+/', $buf);
$key = $rec[2];
$val = $rec[2];
$c = count($rec);
- for ($i=3;$i<$c;$i++) $val.= ' '.$rec[$i];
+ for ($i=3;$i<$c;$i++) {
+ $val.= ' '.$rec[$i];
+ }
$timezones[$key] = $val;
ksort($timezones);
}
@@ -41,6 +49,20 @@
<p>This wizard will guide you through the creation of your own personalised
Gentoo virtual machine image.</p>
</div>
+ <?php
+ if (RECAPTCHA_ENABLED) {
+ ?>
+ <div id="human" class="step">
+ <h1>Verification</h1>
+
+ <?php
+ echo recaptcha_get_html(RECAPTCHA_PUBLIC_KEY);
+ ?>
+ <br>
+ </div>
+ <?php
+ }
+ ?>
<div id="locale" class="step">
<h1>Locale</h1>