add_subuser.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /*
  3. *
  4. * OGP - Open Game Panel
  5. * Copyright (C) 2008 - 2018 The OGP Development Team
  6. *
  7. * http://www.opengamepanel.org/
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22. *
  23. */
  24. //Open Game Panel Sub User Registration Add On By
  25. // own3mall
  26. function exec_ogp_module()
  27. {
  28. global $db,$view;
  29. if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 )
  30. {
  31. $errmsg = '<table>';
  32. foreach($_SESSION['ERRMSG_ARR'] as $msg)
  33. {
  34. $errmsg .= "<tr><td><img width='8px' src='images/offline.png'/></td><td style='text-align:left;color:red;'>".$msg.'</td></tr>';
  35. }
  36. $errmsg .= '</table><br>';
  37. unset($_SESSION['ERRMSG_ARR']);
  38. }
  39. echo "<h2>".get_lang('create_sub_user')."</h2>";
  40. if(isset($errmsg))
  41. {
  42. echo $errmsg;
  43. $input = $_SESSION['INPUT'];
  44. }
  45. ?>
  46. <form name="loginForm" method="post" action="?m=subusers&p=adduser">
  47. <table>
  48. <tr>
  49. <td class="right">
  50. <?php echo get_lang('login_name'); ?>
  51. </td>
  52. <td class="left">
  53. <input name="users_login" type="text" size="25" id="users_login" value="<?php if(isset($input['users_login'])) echo $input['users_login']; ?>" />
  54. </td>
  55. </tr>
  56. <tr>
  57. <td class="right">
  58. <?php echo get_lang('subuser_password'); ?>
  59. </td>
  60. <td class="left">
  61. <input name="users_passwd" type="password" size="25" id="users_passwd" />
  62. </td>
  63. </tr>
  64. <tr>
  65. <td class="right">
  66. <?php echo get_lang('confirm_password'); ?>
  67. </td>
  68. <td class="left">
  69. <input name="users_cpasswd" type="password" size="25" id="users_cpasswd" />
  70. </td>
  71. </tr>
  72. <tr>
  73. <td>&nbsp;</td>
  74. <td class="left">
  75. <input type="submit" name="Submit" value="<?php echo get_lang('create_sub_user'); ?>" />
  76. </td>
  77. </tr>
  78. </table>
  79. </form>
  80. <?php
  81. }
  82. ?>