edit_user.php
changeset 71 e1b918eaf69a
parent 47 ae140472d97c
child 73 8a239565e9b3
equal deleted inserted replaced
70:47248e2af079 71:e1b918eaf69a
    49 if (!level(10))
    49 if (!level(10))
    50 {
    50 {
    51 	error("You do not have the required access level.");
    51 	error("You do not have the required access level.");
    52 }
    52 }
    53 ?>
    53 ?>
    54     <h2><? echo _('Edit user'); ?> "<? echo get_fullname_from_userid($_GET["id"]) ?>"</h2>
    54     <h2><?php echo _('Edit user'); ?> "<?php echo get_fullname_from_userid($_GET["id"]) ?>"</h2>
    55 <?
    55 <?php
    56 $r = array();
    56 $r = array();
    57 $r = get_user_info($_GET["id"]);
    57 $r = get_user_info($_GET["id"]);
    58 ?>
    58 ?>
    59     <form method="post">
    59     <form method="post">
    60      <input type="HIDDEN" name="number" value="<? echo $_GET["id"] ?>">
    60      <input type="HIDDEN" name="number" value="<?php echo $_GET["id"] ?>">
    61      <table>
    61      <table>
    62       <tr>
    62       <tr>
    63        <td class="n"><? echo _('User name'); ?>:</td>
    63        <td class="n"><?php echo _('User name'); ?>:</td>
    64        <td class="n"><input type="text" class="input" name="username" value="<? echo $r["username"]?>"></td>
    64        <td class="n"><input type="text" class="input" name="username" value="<?php echo $r["username"]?>"></td>
    65       </tr>
    65       </tr>
    66       <tr>
    66       <tr>
    67        <td class="n"><? echo _('Full name'); ?>:</td>
    67        <td class="n"><?php echo _('Full name'); ?>:</td>
    68        <td class="n"><input type="text" class="input" name="fullname" value="<? echo $r["fullname"]?>"></td>
    68        <td class="n"><input type="text" class="input" name="fullname" value="<?php echo $r["fullname"]?>"></td>
    69       </tr>
    69       </tr>
    70       <tr>
    70       <tr>
    71        <td class="n"><? echo _('Password'); ?>:</td>
    71        <td class="n"><?php echo _('Password'); ?>:</td>
    72        <td class="n"><input type="password" class="input" name="password" value=""></td>
    72        <td class="n"><input type="password" class="input" name="password" value=""></td>
    73       </tr>
    73       </tr>
    74       <tr>
    74       <tr>
    75        <td class="n"><? echo _('E-mail'); ?>:</td>
    75        <td class="n"><?php echo _('E-mail'); ?>:</td>
    76        <td class="n"><input type="text" class="input" name="email" value="<? echo $r["email"]?>"></td>
    76        <td class="n"><input type="text" class="input" name="email" value="<?php echo $r["email"]?>"></td>
    77       </tr>
    77       </tr>
    78       <tr>
    78       <tr>
    79        <td class="n"><? echo _('User level'); ?>:</td>
    79        <td class="n"><?php echo _('User level'); ?>:</td>
    80        <td class="n">
    80        <td class="n">
    81         <select name="level">
    81         <select name="level">
    82 	 <option value="1" <? if($r["level"] == 1) { echo "selectED"; } ?>>1 (<? echo _('Normal user'); ?>)</option>
    82 	 <option value="1" <?php if($r["level"] == 1) { echo "selectED"; } ?>>1 (<?php echo _('Normal user'); ?>)</option>
    83 	 <option value="5" <? if($r["level"] == 5) { echo "selectED"; } ?>>5 (<? echo _('Administrator'); ?>)</option>
    83 	 <option value="5" <?php if($r["level"] == 5) { echo "selectED"; } ?>>5 (<?php echo _('Administrator'); ?>)</option>
    84 	 <option value="10" <? if($r["level"] == 10) { echo "selectED"; } ?>>10 (<? echo _('Administrator w/ user admin rights'); ?>)</option>
    84 	 <option value="10" <?php if($r["level"] == 10) { echo "selectED"; } ?>>10 (<?php echo _('Administrator w/ user admin rights'); ?>)</option>
    85 	</select>
    85 	</select>
    86        </td>
    86        </td>
    87       </tr>
    87       </tr>
    88       <tr>
    88       <tr>
    89        <td class="n"><? echo _('Description'); ?>:</td>
    89        <td class="n"><?php echo _('Description'); ?>:</td>
    90        <td class="n">
    90        <td class="n">
    91         <textarea rows="6" cols="30" class="inputarea" name="description"><? echo $r["description"]?></textarea>
    91         <textarea rows="6" cols="30" class="inputarea" name="description"><?php echo $r["description"]?></textarea>
    92        </td>
    92        </td>
    93       </tr>
    93       </tr>
    94       <tr>
    94       <tr>
    95        <td class="n"><? echo _('Active'); ?>:</td>
    95        <td class="n"><?php echo _('Active'); ?>:</td>
    96        <td class="n"><input type="checkbox" name="active" value="1" <? if($r["active"]) { ?>CHECKED<? } ?>></td>
    96        <td class="n"><input type="checkbox" name="active" value="1" <?php if($r["active"]) { ?>CHECKED<?php } ?>></td>
    97       </tr>
    97       </tr>
    98       <tr>
    98       <tr>
    99        <td class="n">&nbsp;</td>
    99        <td class="n">&nbsp;</td>
   100        <td class="n"><input type="submit" class="button" name="commit" value="<? echo _('Commit changes'); ?>"></td>
   100        <td class="n"><input type="submit" class="button" name="commit" value="<?php echo _('Commit changes'); ?>"></td>
   101       </tr>
   101       </tr>
   102      </table>
   102      </table>
   103     </form>
   103     </form>
   104 <?
   104 <?php
   105 
   105 
   106 include_once("inc/footer.inc.php");
   106 include_once("inc/footer.inc.php");
   107 
   107 
   108 ?>
   108 ?>