<?
//acting ...
if ($sys['act'] && !$tmp['cancelAction']) {
	require_once($sys['root']."/system/includes/admin/editgroup/actions/".$sys['act'].".inc");
}
$groupInfo = $auth->getGroupInfo($str->fromHTML($_GET['gid']));
require_once($sys['root']."/system/templates/popup/header.inc");
?>
<form method="post" action="?admin=1&sub=editgroup&act=adm_edit_group&gid=<?echo $str->forURL($_GET['gid']);?>" name="editGroupForm">
<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("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("This is the default home folder for all the users you create in this group.");?>
<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>

<table cellspacing="0" cellpadding="0" border="0">
<tr>
	<td><input type="text" name="grouppath" value="<?
if ($settings->config['demomode']){
echo $settings->config['demorestrictedfolder'];
} else {
echo $groupInfo['path'];
}
?>" style="margin-left:4px;width:100%;" <?echo ($settings->config['demomode'])?"disabled":""?>></td>
	<td style="padding-left:5px;"><?
$tpl->btn(
"Browse..", 
"centeredMenu('treeContainerOverflowDiv')"
);
?></td>
</tr>
</table>



<?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>
<?}?>
	 </td>
</tr>
</table>

<script type="text/javascript" language="JavaScript1.2">
AfianMessages = new Array;
AM = new Array;
AM['Loading...'] = '<?$lang->display("Loading...");?>';
AM['Reloading...'] = '<?$lang->display("Reloading...");?>';
AfianMessages = AM;
function folderBrowserSelected(path) {
	document.editGroupForm.grouppath.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()?>
<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 the users in this group.");?>
	 </td>
</tr>
<tr>
    <td style="padding:5px;">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
<?$lang->display("Space:");?> 
<select name="spaceQuota" onchange="javascript:
menu = document.getElementById('limitedSpace');
if(this.value=='limited'){menu.style.visibility='visible';}else{menu.style.visibility='hidden';}">
<option value="limited" <?if (strlen($groupInfo['spacequota']) > 0){echo "selected";}?>><?$lang->display("limited");?>
<option value="unlimited" <?if (strlen($groupInfo['spacequota']) == 0){echo "selected";}?>><?$lang->display("unlimited");?>
</select>
<span style="visibility:<?if (strlen($groupInfo['spacequota']) == 0){echo "hidden";}else{echo "visible";}?>" id="limitedSpace">
<input type="text" name="spaceQuotaSize" size="8" value="<?echo ($groupInfo['spacequota']/1024)/1024?>">
MB
</span>
<br>
<?$lang->display("Traffic: ");?>
<select name="trafficQuota" onchange="javascript:
menu = document.getElementById('limitedTraffic');
if(this.value=='limited'){menu.style.visibility='visible';}else{menu.style.visibility='hidden';}">
<option value="limited" <?if (strlen($groupInfo['trafficquota']) > 0){echo "selected";}?>><?$lang->display("limited");?>
<option value="unlimited" <?if (strlen($groupInfo['trafficquota']) == 0){echo "selected";}?>><?$lang->display("unlimited");?>
</select>
<span style="visibility:<?if (strlen($groupInfo['trafficquota']) == 0){echo "hidden";}else{echo "visible";}?>" id="limitedTraffic">
<input type="text" name="trafficQuotaSize" size="8" value="<?echo ($groupInfo['trafficquota']/1024)/1024?>">
<?$lang->display("MB/month");?>
</span>
	 </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("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:2px;">
<input type="checkbox" name="upload" value="1" <?if ($groupInfo['upload']){echo "checked";}?>> 
<?$lang->display("Users may upload");?>
<br>
<input type="checkbox" name="download" value="1" <?if ($groupInfo['download']){echo "checked";}?>> 
<?$lang->display("Users may download");?>
<br>
<input type="checkbox" name="notReadOnly" value="1" <?if (!$groupInfo['readonly']){echo "checked";}?>> 
<?$lang->display("Users may change files/folders (rename, delete, cut, ...)");?>
<br>
<input type="checkbox" name="sendbyemail" value="1" <?if ($groupInfo['sendbyemail']){echo "checked";}?>> 
<?$lang->display("Users may send files by e-mail");?>
<br>
<input type="checkbox" name="sharing" value="1" <?if ($groupInfo['sharing']){echo "checked";}?>> <?$lang->display("Users may share folders");?>
<br>
<input type="checkbox" name="shareaccess" value="1" <?if ($groupInfo['shareaccess']){echo "checked";}?>> <?$lang->display("Users may access shared folders");?>

	 </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("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 the users in this group.");?>
	 </td>
</tr>
<tr>
    <td style="padding:2px;" valign="top">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
<input type="checkbox" name="uploadNotice" value="1" <?if ($groupInfo['uploadnotice']){echo "checked";}?>> 
<?$lang->display("Notify 'admin' when this user uploads.");?>
<br>
<input type="checkbox" name="downloadNotice" value="1" <?if ($groupInfo['downloadnotice']){echo "checked";}?>> <?$lang->display("Notify 'admin' when this user downloads.");?>
	 </td>
</tr>
</table>
<?$tpl->endFormBlock()?>





<?$tpl->startFormBlock("611", "160")?>
<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>
<table>
<tr>
	<td align="right"><?$lang->display("Users can view other users:");?> </td>
	<td>
<select name="view_others" onchange="el=document.getElementById('gn');if(this.value=='specific'){el.style.visibility='visible';}else{el.style.visibility='hidden';}">
<option value="-" <?if ($groupInfo['view_others'] == "-"){echo "selected";}?>><?$lang->display("No");?></option>
<option value="+" <?if ($groupInfo['view_others'] == "+"){echo "selected";}?>><?$lang->display("Yes, all");?></option>
<option value="specific" <?if ($groupInfo['view_others'] != "-" && $groupInfo['view_others'] != "+"){echo "selected";}?>><?$lang->display("Only from a specific group:");?></option>
</select>
<span style="visibility:<?if ($groupInfo['view_others'] != "-" && $groupInfo['view_others'] != "+"){echo "visible";}else{echo "hidden";}?>" id="gn"><input type="text" name="view_others_specific" value="<?if ($groupInfo['view_others'] != "-" && $groupInfo['view_others'] != "+"){echo $groupInfo['view_others'];}?>"></span>
	</td>
</tr>
<tr>
	<td align="right"><?$lang->display("Interface:");?></td>
	<td>
<select name="ui_type">
<option value="AFIAN_STANDARD" <?if ($groupInfo['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 ($groupInfo['ui_type'] == $tplname){echo "selected";}?>><?$lang->display("Custom interface:");?> <?echo $tplname;?></option>
<?
}
?>
</select>

	</td>
</tr>
</table>
	 </td>
</tr>
<tr>
	<td colspan="2"><br><hr style="color:silver" size="1" noshade><span class="comment"><?$lang->display("Note: The above options does not apply to user \"admin\".");?></span></td>
</tr>
</table>
<?$tpl->endFormBlock()?>




<?
if ($_GET['msg'] == "1") {
?>

<?$tpl->startMenu($id="afian_notice_setpath", $title="Setup", $width="400", $height="120")?>
<form  action="javascript:hideMenu('afian_notice_setpath');input = document.editGroupForm.grouppath;input.focus();input.select();return false" name="afian_notice_setpath_Form" onsubmit="hideMenu('afian_notice_setpath');return false">
<table cellspacing="0" cellpadding="3" border="0" height="100%" width="100%">
<tr>
    <td rowspan="2" valign="top" width="45" align="center"><img src="images/icons/setup.gif" width="32" height="32" border="0" alt=""></td>
    <td>
<?$lang->display("In order to use %1 you must set the \"home folder\" for user \"admin\".<br>Currently it inherits the path settings from group \"default\". Please set a \"home folder\" for this group.", array(($sys['license']['unbranded']?$sys['license']['unbranded']:"Afian")));?>
	 </td>
</tr>
<tr>
    <td align="right">
<div class="separator"><img src="images/interface/hr.gif" width="100%" height="2" border="0" alt=""></div>
<?
$tpl->btn(
$name="submit", 
$value= $lang->get("   Ok   "), 
$type="submit", 
$class="button", 
$extra="", 
$highlight=1
)
?>
	 </td>
</tr>
</table>
</form>
<?$tpl->endMenu()?>
<script language="JavaScript1.2" type="text/javascript">
titleDrag('afian_notice_setpath');
popupMenu('afian_notice_setpath');
document.afian_notice_setpath_Form.submit.focus();
</script>
<?
}
?>


	</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 group"), 
"document.editGroupForm.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");
?>