Source for file user.html.php

Documentation is available at user.html.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @subpackage Users
  5. @copyright  Refer to copyright.php
  6. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  7. @author Mambo Foundation Inc see README.php
  8. */ 
  9.  
  10. /** ensure this file is being included by a parent file */
  11. defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' );
  12.  
  13. class HTML_user {
  14.     function frontpage({
  15. ?>
  16. <div class="componentheading">
  17.     <?php echo T_('Welcome!')?>
  18. </div>
  19.  
  20.     <table cellpadding="0" cellspacing="0" border="0" width="100%">
  21.         <tr>
  22.             <td><?php echo T_('Welcome to the user section of our site')?></td>
  23.         </tr>
  24.     </table>
  25. <?php
  26.     }
  27.  
  28.     function userEdit($row$option,$submitvalue)
  29.     {
  30. ?>
  31.     <script language="javascript" type="text/javascript">
  32.         function submitbutton() {
  33.             var form = document.mosUserForm;
  34.             var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i");
  35.  
  36.             // do field validation
  37.             if (form.name.value == "") {
  38.                 alert( "<?php echo T_('Please enter your name.');?>" );
  39.             } else if (form.username.value == "") {
  40.                 alert( "<?php echo T_('Please enter a user name.');?>" );
  41.             } else if (r.exec(form.username.value) || form.username.value.length < 3) {
  42.                 alert( "<?php printfT_("Please enter a valid %s.  No spaces, more than %d characters and containing only the characters 0-9,a-z, or A-Z")T_('Username:'));?>" );
  43.             } else if (form.email.value == "") {
  44.                 alert( "<?php echo T_('Please enter a valid e-mail address.');?>" );
  45.             } else if ((form.password.value != "") && (form.password.value != form.verifyPass.value)){
  46.                 alert( "<?php echo T_('Password and verification do not match, please try again.');?>" );
  47.             } else if (r.exec(form.password.value)) {
  48.                 alert( "<?php printfT_("Please enter a valid %s.  No spaces, more than %d characters and containing only the characters 0-9,a-z, or A-Z")T_('Password:'));?>" );
  49.             } else {
  50.                 form.submit();
  51.             }
  52.         }
  53.     </script>
  54. <form action="index.php" method="post" name="mosUserForm">
  55.         <div class="componentheading">
  56.             <?php echo T_('Edit Your Details')?>
  57.         </div>
  58.         <table cellpadding="5" cellspacing="0" border="0" width="100%">
  59.     <tr>
  60.       <td width=85><?php echo T_('Your Name:')?></td>
  61.       <td><input class="inputbox" type="text" name="name" value="<?php echo $row->name;?>" size="40" /></td>
  62.     </tr>
  63.     <tr>
  64.       <td><?php echo T_('e-mail:')?></td>
  65.       <td><input class="inputbox" type="text" name="email" value="<?php echo $row->email;?>" size="40" /></td>
  66.     <tr>
  67.       <td><?php echo T_('User Name:')?></td>
  68.       <td><input class="inputbox" type="text" name="username" value="<?php echo $row->username;?>" size="40" /></td>
  69.     </tr>
  70.     <tr>
  71.       <td><?php echo T_('Password:')?></td>
  72.       <td><input class="inputbox" type="password" name="password" value="" size="40" /></td>
  73.     </tr>
  74.     <tr>
  75.       <td><?php echo T_('Verify Password:')?></td>
  76.       <td><input class="inputbox" type="password" name="verifyPass" size="40" /></td>
  77.     </tr>
  78.     <tr>
  79.       <td colspan="2">
  80.         <input class="button" type="button" value="<?php echo $submitvalue?>" onclick="submitbutton()" />
  81.       </td>
  82.     </tr>
  83.   </table>
  84.     <input type="hidden" name="id" value="<?php echo $row->id;?>" />
  85.     <input type="hidden" name="option" value="<?php echo $option;?>">
  86.     <input type="hidden" name="task" value="saveUserEdit" />
  87. </form>
  88. <?php
  89.     }
  90.  
  91.     function confirmation({
  92.         ?>
  93.     <div class="componentheading">
  94.         <?php echo T_('Submission Success!')?>
  95.     </div>
  96.     <table>
  97.         <tr>
  98.             <td><?php echo T_('Your item has been submitted to the site administrators. It will be reviewed before being published on the site.')?></td>
  99.         </tr>
  100.     </table>
  101. <?php
  102.     }
  103. }
  104. ?>

Documentation generated on Mon, 05 May 2008 16:23:59 +0400 by phpDocumentor 1.4.0