<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title><?echo $settings->config['htmltitle'];?></title>
<link rel="stylesheet" type="text/css" rev="stylesheet" href="css/includer.php?files=common.css,interface.css,listing.css<?echo ($options['ui_has_tree'])?",tree.css":""?>">
<script type="text/javascript" language="JavaScript1.2">
	window.name = 'AfianMainWindow';
	baseURL = '<?echo $sys['baseURL'];?>';
	jUploadURL = '<?echo getBaseURLnoSecure();?>jup.php?uid=<?echo $auth->currentUserInfo['id'];?>&juchunksize=20000000';
	var jlabels = [];
	jlabels[0] = '<?$lang->display("Drag your files here");?>';
	jlabels[1] = '<?$lang->display("Uploading...");?>';
	jlabels[2] = '<?$lang->display("of");?>';
	jlabels[3] = '<?$lang->display("files");?>';
</script>
<script src="js/language.js.php" type="text/javascript" language="JavaScript1.2"></script>
<script src="js/compiled/all.js" type="text/javascript" language="JavaScript1.2"></script>
</head>

<body onmousemove="javascript:currentX=getX(event);currentY=getY(event);" id="AfianHTMLBody">

<div id="dragcontainer"><table cellpadding="0" cellspacing="0" border="0"><tr><td id="draglist"></td></tr></table></div>
<div id="iframesContainer" align="center"></div>
<div id="HTMLComponentContainer" style="visibility:hidden;width:0px;height:0px"></div>
<form name="hiddenForm" action="" target="" method="post">
<input type="hidden" name="itemlist" value="">
</form>

<table align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
	<td colspan="2" align="right" style="padding-bottom:15" comment="logo">
<?
$customLogo = gluePath($sys['root'],"/customizable/public/logo.gif");
$customHeader = gluePath($sys['root'], "customizable/private/custom_header.html");

if (file_exists($customHeader)) {
	$customHTML = file_get_contents($customHeader);
	echo $customHTML;
} else if (file_exists($customLogo)) {
	$logoImageSize = @getImageSize($customLogo);
	?><img src="customizable/public/logo.gif" <?echo $logoImageSize[3];?> border="0" alt=""><?
}
?>
</td>
</tr>
<tr>
<?if ($options['ui_has_tree']) {?>
	<td valign="top" comment="left column (tree container)">
<table border="0" cellspacing="0" cellpadding="0" style="margin-right:10px;" width="210" id="treeContainer">
<tr>
	<td width="8" height="27"><img src="images/interface/treetop-left.gif" width="8" height="27" border="0" alt=""></td>
	<td background="images/interface/treetop-bg.gif" class="loginName" width="199">
<div style="margin-bottom:4px;">
<span style="font-weight:bold;"><?echo $auth->currentUserInfo['username'];?></span>
</div>
	</td>
	<td width="3" height="27"><img src="images/interface/treetop-right.gif" width="3" height="27" border="0" alt=""></td>
</tr>
<tr>

<?
require_once($sys['root']."/system/includes/tree.inc");
?>

</tr>


<tr>
	<td colspan="3" style="padding-top:8px;">
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td>
		<table border="0" cellspacing="0" cellpadding="0"><tr><td><a href="?logout=1"><img src="images/interface/logoff.gif" width="14" height="14" alt="" border="0"></a></td><td style="padding-left:4px;"><a href="?logout=1"><?$lang->display("Logout")?></a></td></tr></table>
		</td>
		<td align="right"><?
	$tpl->btn(
	$lang->get("New tab")." &raquo;", 
	"if (AfianHandler.activeTab.section=='myfiles'){cd(AfianHandler.activeTab.basepath, true, AfianHandler.activeTab.title);}", 
	"", 
	false, 
	"onfocus=\"blur()\" id=\"newtabbtn\" title=\"".$lang->get("Open the current folder in a new tab")."\""
	);
	?></td>
	</tr>
	</table>
	</td>
</tr>
</table>

	</td>
<?}?>
	
	<td class="rightColumn" valign="top" comment="right column (icon's viewport)">




<table border="0" cellspacing="0" cellpadding="0">
<tr>
	<td comment="title bar">
<div style="position:relative">
<table border="0" cellpadding="0" cellspacing="0" height="21" width="100%">
<tr>
	<td width="9" height="21"><img src="images/interface/titlebar-left.gif" width="9" height="21" border="0" alt=""></td>
	<td align="center" style="background-image:url('images/interface/titlebar-bg.gif');padding-top:2px;">
		<div id="titleBar"><?$lang->display("Starting Up..");?></div>
	</td>
	<td width="13" height="21"><img src="images/interface/titlebar-right.gif" width="13" height="21" border="0" alt=""></td>
</tr>
</table>
</div>
	</td>
</tr>
<tr>
	<td comment="base menu">
<div style="position:relative">
<div class="statusBarContainer">
<div id="afian_status_bar"><?$lang->display("Loading..")?></div>
</div>
<div id="bubbleMessage"></div>
</div>
<div id="baseMenuContainer" style="height:54px;background-color:#EEEEEE"></div>
	</td>
</tr>
<tr>
	<td comment="icons list" height="350" style="background-color:#ffffff">
<div class="iconList">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
	<td><div id="afian_file_list" style="margin-top:35px;margin-left:25px;margin-right:25px;" ondblclick="/*tmp=window.open();tmp.document.write(this.innerHTML)*/"></div><div id="afian_inner_browser" style="margin-top:35px;display:none;height:270px;"></div></td>
</tr>
<tr>
	<td height="25">&nbsp;</td>
</tr>
</table>
</div>
	</td>
</tr>
<tr>
	<td comment="task bar">
<table border="0" cellspacing="0" cellpadding="0" style="width:100%;border-bottom:1px solid #838383;border-right: 1px solid #838383;border-left: 1px solid #838383" height="33">
	<tr>
	<td width="9" style="background-image : url('images/interface/gradient-bg.gif');background-repeat:repeat-x;background-color:#FDFDFD"><img src="images/interface/pixel.gif" width="9" height="33" border="0" alt=""></td>
	<td  id="taskBar" style="background-image : url('images/interface/gradient-bg.gif');background-repeat:repeat-x;background-color:#FDFDFD;padding-bottom:3px;">

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

<tr>
	<td comment="quota indicators">
<?
require_once($sys['root']."/system/includes/indicators.inc");
?>
	</td>
</tr>
</table>
	</td>
</tr>
</table>
<?
$customFooter = gluePath($sys['root'], "customizable/private/custom_footer.html");

if (file_exists($customFooter)) {
	$customHTML = file_get_contents($customFooter);
	echo $customHTML;
}
?>
<?
/* load menus */
require_once($sys['root']."/system/includes/myfiles/menus.inc");
?>

<script language="JavaScript1.2" type="text/javascript">
preloadAllImages();

/* Afian initialization */
AfianUserPermissions = new Array;
AfianUserPermissions['upload'] = <?echo $permissions['upload']?"true":"false";?>;
AfianUserPermissions['download'] = <?echo $permissions['download']?"true":"false";?>;
AfianUserPermissions['readonly'] = <?echo $permissions['readonly']?"true":"false";?>;
AfianUserPermissions['share'] = <?echo $permissions['sharing']?"true":"false";?>;
AfianUserPermissions['public'] = <?echo $permissions['public']?"true":"false";?>;
AfianUserPermissions['byemail'] = <?echo $permissions['byemail']?"true":"false";?>;
AfianUserPermissions['ui_has_tree'] = <?echo $options['ui_has_tree']?"true":"false";?>;

Afian_Init();
<?
if (!$_COOKIE['AfianLastFolder']) {
echo "defaultTab = new Afian_Tab('/', '/');";
} else {
echo "defaultTab = new Afian_Tab('".$str->safeJS($fm->basename($str->fromHTML($_COOKIE['AfianLastFolder'])))."', '".$str->safeJS($str->fromHTML($_COOKIE['AfianLastFolder']))."');";
}
?>

loadComponentData('MyFilesBaseMenu');
loadComponentData('MyFilesContextMenus');

defaultTab.baseMenu = 'MyFilesBaseMenu';
defaultTab.onload = MyFilesOnLoad;
defaultTab.section = 'myfiles';
defaultTab.load();
defaultTab.detailHTML = AfianHandler.MyFilesDetailsTemplate;
defaultTab.onselect = MyFilesOnSelect;
defaultTab.MyFiles_Browse();

<?/*?>
popMenuTemplate = '<?echo str_replace("\t","",str_replace("\n","",str_replace("\r","", '
<table cellspacing="0" cellpadding="0" border="0">
<tr id="POPM_ID">
    <td width="9" height="21"><img src="images/interface/popmenu/sp-titlebar-top-left.gif" width="9" height="21" alt="" border="0"></td>
    <td background="images/interface/popmenu/sp-titlebar-top-bg.gif" style="background-repeat:repeat-x;font-weight:bold;background-color:silver" align="center">POPM_TOP</td>
    <td width="11" height="21"><img src="images/interface/popmenu/sp-titlebar-top-right.gif" width="11" height="21" alt="" border="0"></td>
</tr>
<tr>
    <td width="9" height="5"><img src="images/interface/popmenu/sp-titlebar2-top-left.gif" width="9" height="5" alt="" border="0"></td>
    <td height="5" background="images/interface/popmenu/sp-titlebar2-top-bg.gif" style="background-repeat:repeat-x"><img src="images/interface/pixel.gif" width="1" height="5" border="0" alt=""></td>
    <td width="11" height="5"><img src="images/interface/popmenu/sp-titlebar2-top-right.gif" width="11" height="5" alt="" border="0"></td>
</tr>
<tr>
    <td width="9" background="images/interface/popmenu/sp-left.gif" style="background-repeat:repeat-y"><img src="images/interface/pixel.gif" width="9" height="1" border="0" alt=""></td>
    <td style="background-color:#E4E4E4;padding-left:20px;padding-right:20px;padding-top:10px" align="center">POPM_MIDDLE</td>
    <td width="11" background="images/interface/popmenu/sp-right.gif" style="background-repeat:repeat-y"><img src="images/interface/pixel.gif" width="9" height="1" border="0" alt=""></td>
</tr>
<tr>
    <td width="9" height="44"><img src="images/interface/popmenu/sp-bottom-left.gif" width="9" height="44" alt="" border="0"></td>
    <td height="44" background="images/interface/popmenu/sp-bottom-bg.gif" style="background-repeat:repeat-x;background-color:whitesmoke" align="center">POPM_BOTTOM</td>
    <td width="11" height="44"><img src="images/interface/popmenu/sp-bottom-right.gif" width="11" height="44" alt="" border="0"></td>
</tr>
</table>

')));?>';
<?*/?>

makePopMenu('alert');
titleDrag('alert');

makePopMenu('prompt');
titleDrag('prompt');

makePopMenu('afian_upload');
titleDrag('afian_upload');

makePopMenu('afian_mkdir');
titleDrag('afian_mkdir');

makePopMenu('afian_rename');
titleDrag('afian_rename');

makePopMenu('afian_zip');
titleDrag('afian_zip');

makePopMenu('afian_unzip');
titleDrag('afian_unzip');

makePopMenu('quickselect');
titleDrag('quickselect');

cookieUploadType = getCookie('upload_type');
if (cookieUploadType) {
	switchUploadType(cookieUploadType);
}

buttonize();
</script>

<?
/* if admin insert the view activity log ...*/

if ($auth->currentUserInfo['username'] == "admin") {?>
<div style="position:absolute;top:0;left:0;visibility:hidden" id="popmenu-activity_logs">
</div>
<div id="popmenu-top-activity_logs" style="display:none"><?$lang->display("View activity logs");?></div>
<div id="popmenu-middle-activity_logs" style="display:none">
<form method="post">
<?$lang->display("Filter by user");?>: 
<select onchange="AdminLoadCalendar(this.value)" nohide="1">
<option value=""><?$lang->display("view all");?></option>
<?
$rs = $db->query("select * from ".$settings->config['interauth_tablename']."");
while (!$rs->EOF) {
?>
<option value="<?echo $rs->fields['id'];?>"><?echo $rs->fields['username'];?></option>
<?
	$rs->MoveNext();
}
?>
</select>
</form>
<br><br>
<iframe frameborder="0" marginheight="0" marginwidth="0" style="width:180px;height:180px;" src="images/interface/locationbarbg.gif" id="califrame" scrolling="No"></iframe>
</div>
<div id="popmenu-bottom-activity_logs" style="display:none">
<?
$tpl->btn(
$lang->get("Close"),
"hideMenu('popmenu-activity_logs')"
);
?>
</div>
</div>
<script>
makePopMenu('activity_logs');
titleDrag('activity_logs');
</script>
<?}?>
<div style="color:silver;font-size:10px;margin-top:10px;">Powered by <a href="http://www.afian.fm" target="_blank" style="color:silver">Afian File Manager</a></div>

</body>
</html>