| 1 | <?php
|
|---|
| 2 | /**
|
|---|
| 3 | * Users Register
|
|---|
| 4 | *
|
|---|
| 5 | * PHP version 5
|
|---|
| 6 | *
|
|---|
| 7 | * LICENSE: Hotaru CMS is free software: you can redistribute it and/or
|
|---|
| 8 | * modify it under the terms of the GNU General Public License as
|
|---|
| 9 | * published by the Free Software Foundation, either version 3 of
|
|---|
| 10 | * the License, or (at your option) any later version.
|
|---|
| 11 | *
|
|---|
| 12 | * Hotaru CMS is distributed in the hope that it will be useful, but WITHOUT
|
|---|
| 13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|---|
| 14 | * FITNESS FOR A PARTICULAR PURPOSE.
|
|---|
| 15 | *
|
|---|
| 16 | * You should have received a copy of the GNU General Public License along
|
|---|
| 17 | * with Hotaru CMS. If not, see http://www.gnu.org/licenses/.
|
|---|
| 18 | *
|
|---|
| 19 | * @category Content Management System
|
|---|
| 20 | * @package HotaruCMS
|
|---|
| 21 | * @author Nick Ramsay <admin@hotarucms.org>
|
|---|
| 22 | * @copyright Copyright (c) 2009, Hotaru CMS
|
|---|
| 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
|---|
| 24 | * @link http://www.hotarucms.org/
|
|---|
| 25 | */
|
|---|
| 26 |
|
|---|
| 27 | if ($h->cage->post->getAlpha('users_type') == 'register') {
|
|---|
| 28 | $h->vars['rpx_profile']['preferredUsername'] = $h->cage->post->testUsername('username');
|
|---|
| 29 | $h->vars['rpx_profile']['email'] = $h->cage->post->testEmail('email');
|
|---|
| 30 | $h->vars['rpx_profile']['identifier'] = $h->cage->post->testUri('identifier');
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | ?>
|
|---|
| 34 |
|
|---|
| 35 | <h2><?php echo $h->lang["user_signin_register"]; ?></h2>
|
|---|
| 36 |
|
|---|
| 37 | <?php if (!isset($h->vars['rpx_already_exists'])) { ?>
|
|---|
| 38 |
|
|---|
| 39 | <?php echo $h->showMessages(); ?>
|
|---|
| 40 |
|
|---|
| 41 | <div class='user_login_reg'>
|
|---|
| 42 | <?php echo $h->lang["rpx_register_instructions"]; ?>
|
|---|
| 43 |
|
|---|
| 44 | <form name='register_form' action='<?php echo BASEURL; ?>index.php?page=register' method='post'>
|
|---|
| 45 | <table>
|
|---|
| 46 | <tr><td>
|
|---|
| 47 | <?php echo $h->lang["user_signin_register_username"]; ?> </td>
|
|---|
| 48 | <td><input type='text' size=30 name='username' value='<?php echo $h->vars['rpx_profile']['preferredUsername']; ?>' />
|
|---|
| 49 | <br /><small><?php echo $h->lang["user_signin_register_username_error_short"]; ?></small>
|
|---|
| 50 | </td></tr>
|
|---|
| 51 |
|
|---|
| 52 | <tr><td>
|
|---|
| 53 | <?php echo $h->lang["user_signin_register_email"]; ?> </td>
|
|---|
| 54 | <td><input type='text' size=30 name='email' value='<?php echo $h->vars['rpx_profile']['email']; ?>' />
|
|---|
| 55 | </td></tr>
|
|---|
| 56 |
|
|---|
| 57 | <?php
|
|---|
| 58 | if ($h->vars['useRecaptcha']) {
|
|---|
| 59 | $user_signin_settings = $h->getSerializedSettings('user_signin');
|
|---|
| 60 | $recaptcha_pubkey = $user_signin_settings['recaptcha_pubkey'];
|
|---|
| 61 | echo "<tr><td colspan=2>" . $h->lang["rpx_register_captcha"] . "</td></tr>";
|
|---|
| 62 | echo "<tr><td colspan=2>" . recaptcha_get_html($recaptcha_pubkey) . "</td></tr>";
|
|---|
| 63 | }
|
|---|
| 64 | ?>
|
|---|
| 65 |
|
|---|
| 66 | <input type='hidden' name='users_type' value='register' />
|
|---|
| 67 | <input type='hidden' name='rpx' value='true' />
|
|---|
| 68 | <input type='hidden' name='identifier' value='<?php echo $h->vars['rpx_profile']['identifier']; ?>' />
|
|---|
| 69 | <input type='hidden' name='csrf' value='<?php echo $h->csrfToken; ?>' />
|
|---|
| 70 | <tr><td> </td><td style='text-align:right;'><input type='submit' class='submit' value='<?php echo $h->lang['user_signin_register_form_submit']; ?>' /></td></tr>
|
|---|
| 71 | </table>
|
|---|
| 72 | </form>
|
|---|
| 73 | </div>
|
|---|
| 74 |
|
|---|
| 75 | <?php } else { $h->showMessage(); } ?>
|
|---|