Location: PHPKode > scripts > phpSecurityAdmin > phpsecurityadmin/include/user_edit_connections.php
<?php // 6/7/02 9:30AM
	if(isset($_POST['submit'])){
		$id=$_POST['id'];
		// the user's password will be changed alaong with other info changes.
		if($sec_sys->isValidPassword($_POST['pass1']) &&
				$_POST['pass1']==$_POST['pass2']){
			$sec_sys->editUser($_POST);
			echo '<span style="color: #0000cc;">'.$sec_sys->PHPSECURITYADMIN_USER_UPDATED.'</span><br>'."\n";
		}else{
			echo '<span style="color: #cc0000;">'.$sec_sys->PHPSECURITYADMIN_PASSWD_ERROR.'</span><br><br>'."\n";
		}
	}
	$users=$sec_sys->getUsers();
	$user=$users[$id];
?>
<h3><?php echo $sec_sys->PHPSECURITYADMIN_EDIT_CONNECTIONS ?></h3>
<a href="<?php echo $_SERVER['PHP_SELF'] ?>?language=<?php echo $sec_sys->LANGUAGE?>&a=user_edit&id=<?php echo $id ?>">
 <?php echo $sec_sys->PHPSECURITYADMIN_BACK ?></a><br><br>
 <form method=post action="<?php echo $_SERVER['PHP_SELF'] ?>?language=<?php echo $sec_sys->LANGUAGE?>&a=user_edit_connections">
  <input type=hidden name="id" value="<?php echo $user['id'] ?>">
  <table cellpadding=4 cellspacing=0 border=0>
   <tr>
	<td><b><?php echo $sec_sys->PHPSECURITYADMIN_USERNAME ?>:</b></td>
	<td valign=top><?php echo $id ?></td>
   </tr>
   <tr>
   <tr>
	<td><b><?php echo $sec_sys->PHPSECURITYADMIN_NEW_PASSWD ?>:</b></td>
	<td valign=top><input type=password size=30 name=pass1></td>
   </tr>
   <tr>
   <tr>
	<td><b><?php echo $sec_sys->PHPSECURITYADMIN_VERIFY ?>:</b></td>
	<td valign=top><input type=password size=30 name=pass2></td>
   </tr>
<?php
    if($sec_sys->isAdmin($_SESSION['psaun'])){
?>
   <tr>
	<td valign=top><b><?php echo $sec_sys->PHPSECURITYADMIN_ALLOWED_CONNECTION ?><br>
	 <?php echo $sec_sys->PHPSECURITYADMIN_ADDRESSES ?>:</b><br>
	 <span style="color: #cc0000; font-size: 80%"><?php echo $sec_sys->PHPSECURITYADMIN_BLANK_IS_ANY ?></span></td>
	<td valign=top>
	 <textarea name=connection rows=3 cols=25 wrap=virtual><?php echo $user['connection'] ?></textarea></td>
   </tr>
   <tr>
	<td colspan=2>
	 <input type=checkbox<?php if($user['active']) echo ' checked'; ?> name=active value=1>
	  <b><?php echo $sec_sys->PHPSECURITYADMIN_ACCOUNT_ACTIVE ?></b>
	</td>
   </tr>
<?php
    }
?>
   <tr>
	<td colspan=2><input type=submit name=submit value="<?php echo $sec_sys->PHPSECURITYADMIN_UPDATE_USER ?>"></td>
   </tr>
  </table>
 </form>
<?php
    if($sec_sys->isAdmin($_SESSION['psaun'])){
?>
<span style="color: #cc0000;">*</span> : <?php echo $sec_sys->PHPSECURITYADMIN_CONNECTION_MESG ?>
<?php
    }
?>
Return current item: phpSecurityAdmin