<?

	/*==================================================================*\
	######################################################################
	#                                                                    #
	# Copyright 2005 Arca Solutions, Inc. All Rights Reserved.           #
	#                                                                    #
	# This file may not be redistributed in whole or part.               #
	# eDirectory is licensed on a per-domain basis.                      #
	#                                                                    #
	# ---------------- eDirectory IS NOT FREE SOFTWARE ----------------- #
	#                                                                    #
	# http://www.edirectory.com | http://www.edirectory.com/license.html #
	######################################################################
	\*==================================================================*/

	# ----------------------------------------------------------------------------------------------------
	# * FILE: /includes/tables/table_location_submenu.php
	# ----------------------------------------------------------------------------------------------------


$openPMhome = string_strpos($_SERVER["PHP_SELF"], "index");
$openPMadd = string_strpos($_SERVER["REQUEST_URI"], "operation=add") || $_POST["operation"] == "insert";
$openPMedit = (isset($id)&& $id!="");
?>

<div class="submenu">
	<ul>
		<li id="privateMenu_home"><a href="<?=DEFAULT_URL?>/<?=SITEMGR_ALIAS?>/locations/location_<?=$_location_level?>/index.php<?=($_location_node_params?"?".$_location_node_params:"")?>"><?=system_showText(LANG_SITEMGR_MANAGE)?></a></li>
		<li id="privateMenu_add"><a href="<?=DEFAULT_URL?>/<?=SITEMGR_ALIAS?>/locations/location_<?=$_location_level?>/location_<?=$_location_level?>.php?<?=($_location_node_params?$_location_node_params."&":"")?>operation=add"><?=system_showText(LANG_SITEMGR_MENU_ADD)?></a></li>
		<?
		$pos = string_strpos($_SERVER["REQUEST_URI"], "/".SITEMGR_ALIAS."");
		$aux = $_SERVER["REQUEST_URI"];
		$aux2 = string_substr($aux,$pos);
		?>						
		<li id="privateMenu_edit" <?if ($openPMedit) echo "style=\"display: \"\"\""; else echo "style=\"display: none\""; ?> ><a href="<?=DEFAULT_URL.$aux2?>"><?=system_showText(LANG_SITEMGR_EDIT)?></a></li>
	</ul>
</div>
<br clear="all">	

<? if ($openPMhome) { ?> <script type="text/javascript"> addClass('home') </script><? } ?>
<? if ($openPMadd) { ?> <script type="text/javascript"> addClass('add') </script><? } ?>
<? if ($openPMedit) { ?> <script type="text/javascript"> addClass('edit') </script><? } ?>