File "menuHead.php"

Full Path: /home/analogde/www/JAVA/system/menuHead.php
File size: 4.44 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/***************************************************************
*  Copyright notice
*
*  (c) 2003-2004 Tobias Bender (tobias@phpXplorer.org)
*  All rights reserved
*
*  This script is part of the phpXplorer project. The phpXplorer project is
*  free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*  A copy is found in the textfile GPL.txt distributed with these scripts.
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

require(dirname(__FILE__) . "/config.php");
require(dirname(__FILE__) . "/checkSharePermission.php");

?>
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
	parent.document.title = 'pXp:<?php echo $PXP_user ?>@<?php echo $HTTP_SERVER_VARS["HTTP_HOST"] ?>'
	
	function init(){
		window.setInterval("resize()", 222)
	}

	function resize(){
	  var height = document.all ? document.body.offsetHeight : window.innerHeight
		var width = document.all ? document.body.offsetWidth : window.innerWidth
		
		width -= document.getElementById("shareSelection").offsetWidth
		width -= document.getElementById("addressLabel").offsetWidth
		width -= 50
		
		if(width < 0)
			width = 0
		
		document.frm1.address.style.width = width + "px"
	}
	
	var changeShareCounter = 1
	
	function changeShare(sel, shareId){
		

		if(!shareId)
			var shareId = sel.options[sel.selectedIndex].value

		parent.frames["basefrm"].location.href = "<?php echo $PXP_startpage ?>?shareId=" + shareId
		parent.frames["phpXplorerTree"].location.href = "tree_<?php echo $PXP_tree ?>.php?shareId=" + shareId

		changeShareCounter++
	}
	
	function exit(){
		window.history.go(- 2 * changeShareCounter)
	}
//-->
</script>
<style type="text/css">
<!--
	body{
	  margin:0px;
		padding:5px;
		font-family:Verdana;
		font-size:12px
	}
-->
</style>
</head>
<body onLoad="init()">
<form name="frm1" action="./address.php" method="post">

<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
	<td>
		<a href="http://www.phpxplorer.org" target="phpxplorer.org" style="text-decoration:none">
			<span style="color:Navy;font-size:14px;font-weight:bold">php</span>
			<span style="color:#666666;font-size:14px;font-weight:bold">X</span>
			<span style="color:Navy;font-size:14px;font-weight:bold">plorer</span>
			<span style="font-size:12px;font-weight:normal;color:Navy"><sup><?php echo $PXP_version	 ?></sup></span>
		</a>
		<?php
		if($PXP_user != ""){
			echo '<span style="font-size:10px;color:#666666">' . $PXP_languages[$PXP_language]["loggedInAs"] . " " . $PXP_user . "</span>";
			echo '<span style="font-size:10px;color:#999999">' . " [" . implode(", ", $PXP_user_roles) . "]" . '</span>';
		}
		?>
	</td>
</tr>
<tr>
	<td>
		<img src="<?php echo $PXP_url ?>/styles/<?php echo $PXP_style ?>/home.png" alt="" align="left" onClick="changeShare(null,'<?php echo $PXP_default_share ?>')" style="cursor:pointer">
		<select id="shareSelection" style="font-family:Verdana;font-size:11px;float:left;background-color:#EEEEEE;color:#444444" onChange="changeShare(this)">
		<?php

		$d = dir($PXP_dir . "/shares.pxsf");
		while($file = $d->read())
		  if($file != "." AND $file != "..")
				if(is_dir($PXP_dir . "/shares.pxsf/" . $file)){
					require($PXP_dir . "/shares.pxsf/" . $file . "/config." . $file . ".pxs.php");
					if(checkSharePermission())
						echo '<option value="' . $file . '"' . ($shareId == $file ? ' selected = "selected"' : '') . '>' . $file . '</option>';
				}
		?>
		</select>
		<input type="text" id="addressLabel" name="addressLabel" disabled="disabled" style="float:left;font-size:12px;height:19px;font-family:Courier New,Courier,Verdana;width:65px;border:0px;background-color:#EEEEEE" value="&nbsp;<?php echo $PXP_languages[$PXP_language]["address"] ?>">
		<input type="text" name="address" style="float:left;font-size:12px;height:19px;color:#666666;font-family:Courier New,Courier,Verdana;width:50%;border:0px;background-color:#EEEEEE">
	</td>
</tr>
</table>

</form>
</body>
</html>