summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/config.sample.php3
-rw-r--r--signup.php10
2 files changed, 13 insertions, 0 deletions
diff --git a/inc/config.sample.php b/inc/config.sample.php
index f6b44d1..5c14806 100644
--- a/inc/config.sample.php
+++ b/inc/config.sample.php
@@ -35,5 +35,8 @@ $b_config = array(
'mg_key' => '',
'mg_dom' => '',
+ // ReCAPTCHA config
+ 'recaptcha_api_key' => '',
+ 'recaptcha_api_secret' => '',
);
?>
diff --git a/signup.php b/signup.php
index 6b79dc9..392d792 100644
--- a/signup.php
+++ b/signup.php
@@ -71,6 +71,7 @@ else $e_msg = 'An unknown error has occurred.';
<title>Sign Up / Bulletin</title>
<link rel="stylesheet" type="text/css" href="css/logsup.css" />
<link rel="stylesheet" type="text/css" href="css/chat.css" />
+ <script type="text/javascript" src="https://google.com/recaptcha/api.js" async defer></script>
</head>
<body>
<div id="head">
@@ -136,6 +137,15 @@ if ($e == 2 || $e == 101)
<input size="3" id="inpphone2" name="phone2" type="text" value="<?=htmlentities($_POST['phone2']); ?>" placeholder="224" />
<input size="4" id="inpphone3" name="phone3" type="text" value="<?=htmlentities($_POST['phone3']); ?>" placeholder="6821" />
</div>
+<?php
+ if (!empty($b_config['recaptcha_api_key'])) {
+?>
+ <div class="fullrow">
+ <div class="g-recaptcha" data-sitekey="<?=$b_config['recaptcha_api_key']; ?>"></div>
+ </div>
+<?php
+ }
+?>
<div class="fullrow">
<div class="halfrowl">&nbsp;</div>
<div class="halfrowr">