PageRenderTime 53ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/MantisBT/signup_page.php

https://bitbucket.org/crypticrod/sr_wp_code
PHP | 135 lines | 99 code | 10 blank | 26 comment | 15 complexity | 37270189ea913728170222cb0221b875 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, GPL-3.0, LGPL-2.0, AGPL-3.0
  1. <?php
  2. # MantisBT - a php based bugtracking system
  3. # MantisBT is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # MantisBT is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
  15. /**
  16. * @package MantisBT
  17. * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
  18. * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
  19. * @link http://www.mantisbt.org
  20. */
  21. /**
  22. * MantisBT Core API's
  23. */
  24. require_once( 'core.php' );
  25. # Check for invalid access to signup page
  26. if ( OFF == config_get_global( 'allow_signup' ) || LDAP == config_get_global( 'login_method' ) ) {
  27. print_header_redirect( 'login_page.php' );
  28. }
  29. # signup page shouldn't be indexed by search engines
  30. html_robots_noindex();
  31. html_page_top1();
  32. html_page_top2a();
  33. $t_key = mt_rand( 0,99999 );
  34. ?>
  35. <br />
  36. <div align="center">
  37. <form name="signup_form" method="post" action="signup.php">
  38. <?php echo form_security_field( 'signup' ); ?>
  39. <table class="width50" cellspacing="1">
  40. <tr>
  41. <td class="form-title" colspan="3">
  42. <?php echo lang_get( 'signup_title' ) ?>
  43. </td>
  44. </tr>
  45. <tr class="row-1">
  46. <td class="category" width="30%">
  47. <?php echo lang_get( 'username' ) ?>:
  48. </td>
  49. <td width="70%" colspan="2">
  50. <input type="text" name="username" size="32" maxlength="<?php echo DB_FIELD_SIZE_USERNAME;?>" />
  51. </td>
  52. </tr>
  53. <tr class="row-2">
  54. <td class="category">
  55. <?php echo lang_get( 'email' ) ?>:
  56. </td>
  57. <td colspan="2">
  58. <?php print_email_input( 'email', '' ) ?>
  59. </td>
  60. </tr>
  61. <?php
  62. $t_allow_passwd = helper_call_custom_function( 'auth_can_change_password', array() );
  63. if( ON == config_get( 'signup_use_captcha' ) && get_gd_version() > 0 && ( true == $t_allow_passwd ) ) {
  64. # captcha image requires GD library and related option to ON
  65. ?>
  66. <tr class="row-1">
  67. <td class="category">
  68. <?php echo lang_get( 'signup_captcha_request' ) ?>:
  69. </td>
  70. <td>
  71. <?php print_captcha_input( 'captcha', '' ) ?>
  72. </td>
  73. <td>
  74. <img src="make_captcha_img.php?public_key=<?php echo $t_key ?>" alt="visual captcha" />
  75. <input type="hidden" name="public_key" value="<?php echo $t_key ?>" />
  76. </td>
  77. </tr>
  78. <?php
  79. }
  80. if( false == $t_allow_passwd ) {
  81. ?>
  82. <tr class="row-1">
  83. <td class="category">
  84. </td>
  85. <td colspan="2">
  86. <?php echo lang_get( 'no_password_request' ) ?>
  87. </td>
  88. </tr>
  89. <?php
  90. }
  91. ?>
  92. <tr>
  93. <td colspan="3">
  94. <br />
  95. <?php echo lang_get( 'signup_info' ) ?>
  96. <br /><br />
  97. </td>
  98. </tr>
  99. <tr>
  100. <td class="center" colspan="3">
  101. <input type="submit" class="button" value="<?php echo lang_get( 'signup_button' ) ?>" />
  102. </td>
  103. </tr>
  104. </table>
  105. </form>
  106. </div>
  107. <?php
  108. echo '<br /><div align="center">';
  109. print_login_link();
  110. echo '&#160;';
  111. print_lost_password_link();
  112. echo '</div>';
  113. if ( ON == config_get( 'use_javascript' ) ) {
  114. ?>
  115. <!-- Autofocus JS -->
  116. <?php if ( ON == config_get( 'use_javascript' ) ) { ?>
  117. <script type="text/javascript" language="JavaScript">
  118. <!--
  119. window.document.signup_form.username.focus();
  120. // -->
  121. </script>
  122. <?php
  123. }
  124. }
  125. html_page_bottom1a( __FILE__ );