diff options
| author | Carson Fleming <cflems@cflems.net> | 2022-12-12 05:16:41 -0800 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2022-12-12 05:16:41 -0800 |
| commit | 5af11a7f8b7c06bfd942bde87ad4d87177e1afe3 (patch) | |
| tree | 3f87a21a3de41a9715eddc82b0b2a153cc66f32b | |
| parent | 2e575b58a9b3d5040130daedefd532d73c5117c4 (diff) | |
| download | bulletin-5af11a7f8b7c06bfd942bde87ad4d87177e1afe3.tar.gz | |
Render a reCAPTCHA on the signup page
| -rw-r--r-- | inc/config.sample.php | 3 | ||||
| -rw-r--r-- | signup.php | 10 |
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' => '', ); ?> @@ -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"> </div> <div class="halfrowr"> |
