<?
//acting ...
if ($sys['act'] && !$tmp['cancelAction']) {
	require_once($sys['root']."/system/includes/admin/edituser/actions/".$sys['act'].".inc");
}
$sys['uid'] = $str->fromHTML($_GET['uid']);
$userInfo = $auth->getUserInfoById($sys['uid']);
$groupInfo = $auth->getGroupInfo($userInfo['gid']);
$title = "Edit user ".$userInfo['username'];
require_once($sys['root']."/system/templates/popup/header.inc");
?>
<form method="post" action="?admin=1&sub=edituser&act=adm_edit_user&uid=<?echo $str->forURL($userInfo['id']);?>" name="editUserForm">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;background-color:#F2F2F2">
<tr>
    <td background="images/popup/top-bg.gif" height="26">&nbsp;</td>
</tr>

<tr>
    <td style="padding:10px;">
<!-- Popup Contents -->


<?$tpl->startFormBlock()?>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
    <td colspan="2">
	<table class="boxTitle" cellspacing="0" cellpadding="0" border="0"><tr><td><?$lang->display("Authentication");?></td></tr></table>
	 </td>
</tr>
<tr>
    <td rowspan="2" valign="top" width="45" align="center" style="padding:5px;"><img src="images/icons/other/passwords.gif" width="32" height="32" border="0" alt=""></td>
    <td>
<?$lang->display("Type a password or leave the field blank.");?>
<br>
	 </td>
</tr>
<tr>
    <td align="right" style="padding:5px;">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>

<table cellpadding="0" cellspacing="3" border="0">
<tr><td style="text-align:right"><?$lang->display("Password:");?></td><td style="text-align:left"> <input type="text" name="password" value="<?echo $userInfo['password']?>" size="15"></td></tr>
<tr><td style="text-align:right"><?$lang->display("Confirm password:");?></td><td style="text-align:left"> <input type="text" name="repassword" value="<?echo $userInfo['password']?>" size="15"></td></tr>
</table>
<br>
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
<br>
<select name="suspended">
<option value="" <?if ($userInfo['suspended']==""){echo "selected";}?>><?$lang->display("Inherit 'suspend' settings");?>
<option value="1" <?if ($userInfo['suspended']=="1"){echo "selected";}?>><?$lang->display("Suspend user");?>
<option value="0" <?if ($userInfo['suspended']=="0"){echo "selected";}?>><?$lang->display("Unsuspend user");?>
</select>

	 </td>
</tr>
</table>
<?$tpl->endFormBlock()?>




<?$tpl->startFormBlock()?>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
    <td colspan="2">
	<table class="boxTitle" cellspacing="0" cellpadding="0" border="0"><tr><td><?$lang->display("Contact Info");?></td></tr></table>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" rowspan="2" valign="top" width="45" align="center"><img src="images/icons/other/email.gif" width="28" height="26" border="0" alt=""></td>
    <td>
<?$lang->display("Modify contact information.");?>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" align="right">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
<table>
<tr>
	<td align="right"><?$lang->display("First Name:");?></td>
	<td><input type="text" name="firstname" value="<?echo $userInfo['firstname']?>"></td>
</tr>
<tr>
	<td align="right"><?$lang->display("Last Name:");?></td>
	<td><input type="text" name="lastname" value="<?echo $userInfo['lastname']?>"></td>
</tr>
<tr>
	<td align="right"><?$lang->display("Company:");?></td>
	<td><input type="text" name="company" value="<?echo $userInfo['company']?>" size="17"></td>
</tr>
<tr>
	<td align="right"><?$lang->display("E-mail address:");?></td>
	<td><input type="text" name="email" value="<?echo $userInfo['email']?>"></td>
</tr>
</table>
	 </td>
</tr>
</table>
<?$tpl->endFormBlock()?>


<?$tpl->startFormBlock("611", "140")?>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
    <td colspan="2">
	 <table class="boxTitle" cellspacing="0" cellpadding="0" border="0"><tr><td><?$lang->display("Note");?></td></tr></table>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" rowspan="2" valign="top" width="45" align="center"><img src="images/icons/other/notifications.gif" width="32" height="32" border="0" alt=""></td>
    <td>
<?$lang->display("The fields below are optional. ");?>
<br>
<?$lang->display("This user inherits the settings and permissions of its parent group,");?> "<a href="#" onclick="popup(fireFoxURL()+'?admin=1&sub=editgroup&gid=<?echo $str->forURL($groupInfo['id']);?>', 'edit_group', '500', '680', 'yes');"><?echo $groupInfo['name'];?></a>".
<?$lang->display("You can override group permissions and settings for this user, by choosing <em>custom</em> instead of <em>inherit</em> below.");?> 

<br><br>
<?$lang->display("This user belongs to group \"%1\". To transfer it to another group go back to the user list and use the context menu.", array($str->safeHTML( $groupInfo['name'])));?>
	 </td>
</tr>
</table>
<?$tpl->endFormBlock()?>


<?$tpl->startFormBlock("300", "205")?>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
    <td colspan="2">
	<table class="boxTitle" cellspacing="0" cellpadding="0" border="0"><tr><td><?$lang->display("Home folder");?></td></tr></table>
	 </td>
</tr>
<tr>
    <td rowspan="2" valign="top" width="45" align="center" style="padding:5px;"><img src="images/icons/other/home.gif" width="32" height="32" border="0" alt=""></td>
    <td style="padding:5px;">
<?$lang->display("Type the path to a folder on your server. This is the user's personal working space.");?>
<br>
<br>
<table cellspacing="0" cellpadding="1" border="0" style="font-size:10px;color:dimgray">
<tr>
	<td valign="top"><?$lang->display("Examples:");?></td>
	<td>
<?$lang->display("c:/users/group_name<br>/home/users/group_name");?>
	</td>
</tr>

</table>


	 </td>
</tr>
<tr>
    <td style="padding:5px;">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
<select name="permstyle[path]" onchange="if(this.selectedIndex==0){this.form.userpath.value='<?echo ($settings->config['demomode'])?$settings->config['demorestrictedfolder']:$groupInfo['path'];?>';this.form.userpath.disabled=true;}else{this.form.userpath.disabled=<?echo ($settings->config['demomode'])?"true":"false"?>;this.form.userpath.value='<?echo ($settings->config['demomode'])?$settings->config['demorestrictedfolder']:$userInfo['path'];?>'}">
<option value="inherit" <?if ($userInfo['path']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['path']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>
<br><br>


<table cellspacing="0" cellpadding="0" border="0">
<tr>
	<td>
<input type="text" name="userpath" value="<?
if ($settings->config['demomode']){
echo $settings->config['demorestrictedfolder'];
} else {
if ($userInfo['path']==""){echo $groupInfo['path'];}else{echo  $userInfo['path'];}
}
?>" style="width:100%"<?

if ($settings->config['demomode']){
echo "disabled";
} else {
if ($userInfo['path']==""){echo "disabled";}
}

?>></td><td style="padding-left:5px;">
<?
$tpl->btn(
$lang->get("Browse.."), 
"centeredMenu('treeContainerOverflowDiv')"
);
?></td></tr></table>
<br>
<?if ($settings->config['demomode']){?>
<span style="color:#b22222;"><?$lang->display("%1 is limited to a specific folder in this demonstrative version.", array(($sys['license']['unbranded']?$sys['license']['unbranded']:"Afian")));?></span>
<?}?>
<br>
	 </td>
</tr>
</table>
<script type="text/javascript" language="JavaScript1.2">
AM = new Array;
AM['Loading...'] = '<?$lang->display("Loading...");?>';
AM['Reloading...'] = '<?$lang->display("Reloading...");?>';
AfianMessages = AM;
function folderBrowserSelected(path) {
	document.editUserForm.userpath.value=path;
}
</script>
<script src="js/compiled/for_tree_browser.js" type="text/javascript" language="JavaScript1.2"></script>
<link rel="stylesheet" type="text/css" rev="stylesheet" href="css/includer.php?files=tree.css">
<?include($sys['root']."/system/includes/folder_browser.inc");?>


<?$tpl->endFormBlock()?>



<?$tpl->startFormBlock("300","205")?>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
    <td colspan="2">
	 <table class="boxTitle" cellspacing="0" cellpadding="0" border="0"><tr><td><?$lang->display("Quotas");?></td></tr></table>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" rowspan="2" valign="top" width="45" align="center"><img src="images/icons/other/quotas.gif" width="32" height="32" border="0" alt=""></td>
    <td style="padding:5px;">
<?$lang->display("Choose how much space and/or traffic is available to this user.");?>
	 </td>
</tr>
<tr>
    <td style="padding:5px;">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>

<table cellpadding="0" cellspacing="2" border="0">

<tr><td style="text-align:right">
<?$lang->display("Space: ");?>
</td><td style="text-align:left;height:25px;">

<select name="spaceQuota" onchange="javascript:menuspan = document.getElementById('limitedSpace');inheritspan = document.getElementById('inheritSpace');if(this.value=='limited'){inheritspan.style.display='none';menuspan.style.display='inline';}else if(this.value=='inherit'){inheritspan.style.display='inline';menuspan.style.display='none';}else{menuspan.style.display='none';inheritspan.style.display='none';}">
<option value="inherit" <?if ($userInfo['spacequota']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="limited" <?if ($userInfo['spacequota']!="-" && $userInfo['spacequota']!=""){echo "selected";}?>><?$lang->display("limited");?>
<option value="unlimited" <?if ($userInfo['spacequota']=="-"){echo "selected";}?>><?$lang->display("unlimited");?>
</select>
<span style="display:<?if ($userInfo['spacequota']==""){echo "inline";}else{echo "none";}?>" id="inheritSpace">
<?if ($groupInfo['spacequota']==""){echo $lang->get("unlimited");}else{echo round($groupInfo['spacequota']/1024/1024)." MB";}?>
</span>

<span style="display:<?if ($userInfo['spacequota']!="-" && $userInfo['spacequota']!=""){echo "inline";}else{echo "none";}?>" id="limitedSpace">
<input type="text" name="spaceQuotaSize" size="4" value="<?echo round($userInfo['spacequota']/1024/1024);?>">
MB
</span>
</td><tr>

<tr><td style="text-align:right">
<?$lang->display("Traffic:");?>
</td><td style="text-align:left;height:25px;">

<select name="trafficQuota" onchange="javascript:menuspan = document.getElementById('limitedTraffic');inheritspan = document.getElementById('inheritTraffic');if(this.value=='limited'){inheritspan.style.display='none';menuspan.style.display='inline';}else if(this.value=='inherit'){inheritspan.style.display='inline';menuspan.style.display='none';}else{menuspan.style.display='none';inheritspan.style.display='none';}">
<option value="inherit" <?if ($userInfo['trafficquota']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="limited" <?if ($userInfo['trafficquota']!="-" && $userInfo['trafficquota']!=""){echo "selected";}?>><?$lang->display("limited");?>
<option value="unlimited" <?if ($userInfo['trafficquota']=="-"){echo "selected";}?>><?$lang->display("unlimited");?>
</select>
<span style="display:<?if ($userInfo['trafficquota']==""){echo "inline";}else{echo "none";}?>" id="inheritTraffic">
<?if ($groupInfo['trafficquota']==""){echo $lang->get("unlimited");}else{echo round($groupInfo['trafficquota']/1024/1024)." MB/month";}?>
</span>
<span style="display:<?if ($userInfo['trafficquota']!="-" && $userInfo['trafficquota']!=""){echo "inline";}else{echo "none";}?>" id="limitedTraffic">
<input type="text" name="trafficQuotaSize" size="4" value="<?echo round($userInfo['trafficquota']/1024/1024);?>">
<?$lang->display("MB/month");?>
</select>
</span>

</td></tr></table>

	 </td>
</tr>
</table>
<?$tpl->endFormBlock()?>




<?$tpl->startFormBlock("611","200")?>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
    <td colspan="2">
	 <table class="boxTitle" cellspacing="0" cellpadding="0" border="0"><tr><td><?$lang->display("Permissions");?></td></tr></table>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" rowspan="2" valign="top" width="45" align="center"><img src="images/icons/other/permissions.gif" width="32" height="32" border="0" alt=""></td>
    <td style="padding:5px;">

<table cellspacing="2" cellpadding="2" border="0">
<tr>
    <td>
	 <select name="permstyle[upload]" onchange="if(this.selectedIndex==0){this.form.upload.disabled=true;this.form.upload.checked=<?if ($groupInfo['upload']){echo "true";}else{echo "false";}?>;}else{this.form.upload.disabled=false;this.form.upload.checked=<?if ($userInfo['upload']=="1"){echo "true";}else{echo "false";}?>;}">
<option <?if ($userInfo['upload']==""){echo "selected";}?> value="inherit"><?$lang->display("inherit");?>
<option <?if ($userInfo['upload']!=""){echo "selected";}?>  value="custom"><?$lang->display("custom");?>
</select>
	 </td>
	 <td><input type="checkbox" name="upload" value="1" <?
if ($userInfo['upload']==""){
	if ($groupInfo['upload'] == "1") {
		echo "checked";
	}
	echo " disabled";
} elseif ($userInfo['upload']=="1"){
	echo "checked";
}
?>> 
<?$lang->display("User may upload");?></td>
</tr>

<tr>
    <td>
	 <select name="permstyle[download]" onchange="if(this.selectedIndex==0){this.form.download.disabled=true;this.form.download.checked=<?if ($groupInfo['download']){echo "true";}else{echo "false";}?>;}else{this.form.download.disabled=false;this.form.download.checked=<?if ($userInfo['download']=="1"){echo "true";}else{echo "false";}?>;}">
<option <?if ($userInfo['download']==""){echo "selected";}?> value="inherit"><?$lang->display("inherit");?>
<option <?if ($userInfo['download']!=""){echo "selected";}?>  value="custom"><?$lang->display("custom");?>
</select>
	 </td>
	 <td><input type="checkbox" name="download" value="1" <?
if ($userInfo['download']==""){
	if ($groupInfo['download'] == "1") {
		echo "checked";
	}
	echo " disabled";
} elseif ($userInfo['download']=="1"){
	echo "checked";
}
?>> 
<?$lang->display("User may download");?></td>
</tr>

<tr>
    <td>
<select name="permstyle[notReadOnly]" onchange="if(this.selectedIndex==0){this.form.notReadOnly.disabled=true;this.form.notReadOnly.checked=<?if (!$groupInfo['readonly']){echo "true";}else{echo "false";}?>;}else{this.form.notReadOnly.disabled=false;this.form.notReadOnly.checked=<?if ($userInfo['readonly']=="1"){echo "true";}else{echo "false";}?>;}">
<option value="inherit" <?if ($userInfo['readonly']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['readonly']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>
	 </td>
<td><input type="checkbox" name="notReadOnly" value="1" <?
if ($userInfo['readonly']==""){
	if ($groupInfo['readonly'] != "1") {
		echo "checked";
	}
	echo " disabled";
} elseif ($userInfo['readonly'] != "1"){
	echo "checked";
}
?>> 
<?$lang->display("User may change files/folders (rename, delete, cut, ...)");?></td></tr>

<tr>
    <td>
<select name="permstyle[sendbyemail]" onchange="if(this.selectedIndex==0){this.form.sendbyemail.disabled=true;this.form.sendbyemail.checked=<?if ($groupInfo['sendbyemail']){echo "true";}else{echo "false";}?>;}else{this.form.sendbyemail.disabled=false;this.form.sendbyemail.checked=<?if ($userInfo['sendbyemail']=="1"){echo "true";}else{echo "false";}?>;}">
<option value="inherit"  <?if ($userInfo['sendbyemail']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['sendbyemail']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>
	 </td>
<td>
<input type="checkbox" name="sendbyemail" value="1" <?
if ($userInfo['sendbyemail']==""){
	if ($groupInfo['sendbyemail'] == "1") {
		echo "checked";
	}
	echo " disabled";
} elseif ($userInfo['sendbyemail']=="1"){
	echo "checked";
}
?>> 
<?$lang->display("User may send files by e-mail");?></td></tr>


<tr>
    <td>
<select name="permstyle[sharing]" onchange="if(this.selectedIndex==0){this.form.sharing.disabled=true;this.form.sharing.checked=<?if ($groupInfo['sendbyemail']){echo "true";}else{echo "false";}?>;}else{this.form.sharing.disabled=false;this.form.sharing.checked=<?if ($userInfo['sharing']=="1"){echo "true";}else{echo "false";}?>;}">
<option value="inherit" <?if ($userInfo['sharing']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['sharing']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>
	 </td>
<td><input type="checkbox" name="sharing" value="1" <?
if ($userInfo['sharing']==""){
	if ($groupInfo['sharing'] == "1") {
		echo "checked";
	}
	echo " disabled";
} elseif ($userInfo['sharing']=="1"){
	echo "checked";
}
?>> <?$lang->display("User may share folders");?>
</td></tr>


<tr>
    <td>
<select name="permstyle[shareaccess]" onchange="if(this.selectedIndex==0){this.form.shareaccess.disabled=true;this.form.shareaccess.checked=<?if ($groupInfo['shareaccess']){echo "true";}else{echo "false";}?>;}else{this.form.shareaccess.disabled=false;this.form.shareaccess.checked=<?if ($userInfo['shareaccess']=="1"){echo "true";}else{echo "false";}?>;}">
<option value="inherit" <?if ($userInfo['shareaccess']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['shareaccess']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>
	 </td>
<td><input type="checkbox" name="shareaccess" value="1" <?
if ($userInfo['shareaccess']==""){
	if ($groupInfo['shareaccess'] == "1") {
		echo "checked";
	}
	echo " disabled";
} elseif ($userInfo['shareaccess']=="1"){
	echo "checked";
}
?>> <?$lang->display("User may access shared folders");?></td></tr>



<!-- VIEW OTHERS -->
<tr>
    <td>
<select name="permstyle[view_others]" onchange="if(this.selectedIndex==0){this.form.view_others_type.disabled=true;this.form.view_others_type.options[<?if ($groupInfo['view_others']=="+"){echo "0";}else if ($groupInfo['view_others']=="-"){echo "1";} else {echo "2";}?>].selected=true;}else{this.form.view_others_type.disabled=false;this.form.view_others_type.options[<?if ($userInfo['view_others']=="+"){echo "0";}else if ($userInfo['view_others']=="-"){echo "1";} else {echo "2";}?>].selected=true;}if(this.form.view_others_type.value=='specific'){getById('view_others_specific').style.display='inline';} else {getById('view_others_specific').style.display='none';}">
<option value="inherit" <?if ($userInfo['view_others']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['view_others']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>
	 </td>
	 <td>
<?$lang->display("This user may view:");?> 

<select name="view_others_type" onchange="if(this.value=='specific'){getById('view_others_specific').style.display='inline';} else {getById('view_others_specific').style.display='none';}" <?
if ($userInfo['view_others']==""){
	echo "disabled";
}
?>>
<option value="+" <?
if ($userInfo['view_others']=="+" || $groupInfo['view_others'] == "+"){
	echo "selected";
}
?>><?$lang->display("all other users");?></option>
<option value="-" <?
if ($userInfo['view_others']=="-" || $groupInfo['view_others'] == "-"){
	echo "selected";
}
?>><?$lang->display("nobody");?></option>
<option value="specific" <?
if ($userInfo['view_others']=="") {
	if ($groupInfo['view_others'] != "+" && $groupInfo['view_others'] != "-") {
		echo "selected";
	}
} else {
	if (($userInfo['view_others']!="+" && $userInfo['view_others']!="-" && $userInfo['view_others']!="")){
		echo "selected";
	}
}
?>><?$lang->display("a specific group:");?></option>
</select>
<input type="text" name="view_others_specific" id="view_others_specific" value="<?
if ($userInfo['view_others']==""){
	if ($groupInfo['view_others'] != "-" && $groupInfo['view_others'] != "+") {
		echo $groupInfo['view_others'];
	}
	echo "";
} elseif ($userInfo['view_others'] != "-" && $userInfo['view_others'] != "+"){
	echo $userInfo['view_others'];
}
?>" style="display:<?
if ($userInfo['view_others']==""){
	if ($groupInfo['view_others'] != "-" && $groupInfo['view_others'] != "+") {
		echo "inline";
	} else {
		echo "none";
	}
} elseif ($userInfo['view_others'] != "-" && $userInfo['view_others'] != "+"){
	echo "inline";
} else {
	echo "none";
}
?>;">
</td>
</tr>

</table>


	 </td>
</tr>
</table>
<?$tpl->endFormBlock()?>


<?$tpl->startFormBlock("611", "140")?>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
    <td colspan="2">
	 <table class="boxTitle" cellspacing="0" cellpadding="0" border="0"><tr><td><?$lang->display("Other Options");?></td></tr></table>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" rowspan="2" valign="top" width="45" align="center"><img src="images/icons/other/tweak.gif" width="32" height="32" border="0" alt=""></td>
    <td style="padding:5px;" height="30" valign="top">
<?$lang->display("You can choose to display a customized interface for this user.");?>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" valign="top">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>

<table cellspacing="2" cellpadding="2" border="0">
<tr>
    <td valign="top" style="padding-top:3px;">
<select name="permstyle[simpleInterface]" onchange="if(this.selectedIndex==0){this.form.ui_type.disabled=true;}else{this.form.ui_type.disabled=false;}">
<option value="inherit" <?if ($userInfo['ui_type']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['ui_type']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>

</td>
<td>
Interface:
<select name="ui_type">
<option value="AFIAN_STANDARD" <?if ($userInfo['ui_type'] == "AFIAN_STANDARD"){echo "selected";}?>><?$lang->display("%1 standard interface", array(($sys['license']['unbranded']?$sys['license']['unbranded']:"Afian")));?></option>
<?
$templates = $fm->getDirList(gluePath($sys['root'], "/customizable/private/templates/"), array());
for ($i = 0 ; $i < sizeof($templates) ; $i++) {
	$tplname = $fm->stripExtension($fm->basename($templates[$i]));
?>
		<option value="<?echo $tplname;?>" <?if ($userInfo['ui_type'] == $tplname){echo "selected";}?>><?$lang->display("Custom interface:");?> <?echo $tplname;?></option>
<?
}
?>
</select>
</td></tr>
</table>

</td>
</tr>
</table>
<?$tpl->endFormBlock()?>


<?$tpl->startFormBlock("611", "150")?>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
    <td colspan="2">
	 <table class="boxTitle" cellspacing="0" cellpadding="0" border="0"><tr><td><?$lang->display("Notifications");?></td></tr></table>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" rowspan="2" valign="top" width="45" align="center"><img src="images/icons/other/sendmail.gif" width="32" height="32" border="0" alt=""></td>
    <td style="padding:5px;" height="30" valign="top">
<?$lang->display("The administrator can be automatically notified on e-mail of key operations performed by this user.");?>
	 </td>
</tr>
<tr>
    <td style="padding:5px;" valign="top">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>

<table cellspacing="2" cellpadding="2" border="0">
<tr>
    <td>
<select name="permstyle[uploadNotice]" onchange="if(this.selectedIndex==0){this.form.uploadNotice.disabled=true;this.form.uploadNotice.checked=<?if ($groupInfo['uploadnotice']){echo "true";}else{echo "false";}?>;}else{this.form.uploadNotice.disabled=false;this.form.uploadNotice.checked=<?if ($userInfo['uploadnotice']=="1"){echo "true";}else{echo "false";}?>;}">
<option value="inherit" <?if ($userInfo['uploadnotice']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['uploadnotice']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>

</td>
<td>

<input type="checkbox" name="uploadNotice" value="1"  <?
if ($userInfo['uploadnotice']==""){
	if ($groupInfo['uploadnotice'] == "1") {
		echo "checked";
	}
	echo " disabled";
} elseif ($userInfo['uploadnotice']=="1"){
	echo "checked";
}
?>> 
<?$lang->display("Notify 'admin' when this user uploads.");?>

</td></tr>
<tr><td>

<select name="permstyle[downloadNotice]" onchange="if(this.selectedIndex==0){this.form.downloadNotice.disabled=true;this.form.downloadNotice.checked=<?if ($groupInfo['downloadnotice']){echo "true";}else{echo "false";}?>;}else{this.form.downloadNotice.disabled=false;this.form.downloadNotice.checked=<?if ($userInfo['downloadnotice']=="1"){echo "true";}else{echo "false";}?>;}">
<option value="inherit" <?if ($userInfo['downloadnotice']==""){echo "selected";}?>><?$lang->display("inherit");?>
<option value="custom" <?if ($userInfo['downloadnotice']!=""){echo "selected";}?>><?$lang->display("custom");?>
</select>

</td>
<td>

<input type="checkbox" name="downloadNotice" value="1"  <?
if ($userInfo['downloadnotice']==""){
	if ($groupInfo['downloadnotice'] == "1") {
		echo "checked";
	}
	echo " disabled";
} elseif ($userInfo['downloadnotice']=="1"){
	echo "checked";
}
?>> <?$lang->display("Notify 'admin' when this user downloads.");?>
</td></tr></table>

</td>
</tr>
</table>
<?$tpl->endFormBlock()?>



	</td>
</tr>



<tr>
    <td align="center" height="20">
<table border="0" cellspacing="0" cellpadding="1" style="position:relative;top:16px;z-index:1" width="170">
<tr>
	<td>
<?
$tpl->btn(
$lang->get("Update user"), 
"document.editUserForm.submit()"
);
?>
	</td>
	<td>
<?
$tpl->btn(
$lang->get("Close"), 
"self.close();window.close()"
)
?></td>
</tr>
</table>
	</td>
</tr>
<tr>
    <td background="images/popup/bottom-bg.gif" height="46" align="center">&nbsp;</td>
</tr>
</table>


</form>


<?
require_once($sys['root']."/system/templates/popup/footer.inc");
?>