<?php
/**
 * Created by CS medien- & kommunikationssysteme.
 * @author Christian Steinle
 * @date 09.09.2016
 *
 * @copyright CS medien- & kommunikationssysteme (http://www.steinle-computer.de)
 */
header('Access-Control-Allow-Origin: *');

$includeFile = dirname(__DIR__) . '/lang/lang-' . $_POST['lang'] . '.php';
if (file_exists(dirname(__DIR__) . '/lang/lang-' . $_POST['lang'] . '.php'))
{
	$includeFile = dirname(__DIR__) . '/lang/lang-' . $_POST['lang'] . '.php';
}

include_once($includeFile);

?>
<form id="editor_form" action="" method="post">
	<input type="hidden" name="userId" id="userId" value=""/>
	<input type="hidden" name="prefix" id="prefix" value=""/>
	<input type="hidden" name="siteId" id="siteId" value=""/>
	<input type="hidden" name="dataSet" id="dataSet" value=""/>
	<input type="hidden" name="navStart" id="navStart" value=""/>
	<input type="hidden" name="navId" id="navId" value=""/>
	<div id="struktur"></div>
	<div id="navPoint" class="box">
		<p class="headline"><b><?php echo $lang['struktur']['editing']; ?></b></p>
		<p id="breadCrumb"></p>
		<div id="showAction">
		</div>
	</div>
</form>
<div id="actionTemplates" class="hidden">
	<div class="actionChooser">
		<span data-show="Rename" class="submitButton" title="<?php echo $lang['struktur']['renameHelper']; ?>"><?php echo $lang['struktur']['rename']; ?></span><br class="fix"/>
		<span data-show="Activate" class="submitButton" title="<?php echo $lang['struktur']['activateHelper']; ?>"><?php echo $lang['struktur']['activate']; ?></span><br class="fix"/>
		<span data-show="Deactivate" class="submitButton" title="<?php echo $lang['struktur']['deactivateHelper']; ?>"><?php echo $lang['struktur']['deactivate']; ?></span><br class="fix"/>
		<span data-show="Sort" class="submitButton checkSort" title="<?php echo $lang['struktur']['sortHelper']; ?>"><?php echo $lang['struktur']['sort']; ?></span><br class="fix"/>
		<span data-show="Move" class="submitButton" title="<?php echo $lang['struktur']['moveHelper']; ?>"><?php echo $lang['struktur']['move']; ?></span><br class="fix"/>
		<span data-show="Submenu" class="submitButton" title="<?php echo $lang['struktur']['submenuHelper']; ?>"><?php echo $lang['struktur']['submenu']; ?></span><br class="fix"/>
		<span data-show="Menu" class="submitButton" title="<?php echo $lang['struktur']['menuHelper']; ?>"><?php echo $lang['struktur']['menu']; ?></span><br class="fix"/>
	</div>
	<div class="actionRename">
		<input type="hidden" name="formAction" value="renameNavPoint"/>
		<input type="hidden" name="request" value="updateData"/>
		<label for="navName"><?php echo $lang['struktur']['navNameRename']; ?></label><input type="text" name="navName" id="navName" value=""/>
		<div id="bottom">
			<input type="button" class="submitButton formSubmit" value="<?php echo $lang['button']['save']; ?>">
			<input data-show="Chooser" type="button" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>"/>
		</div>
	</div>
	<div class="actionActivate">
		<input type="hidden" name="formAction" value="updateActive"/>
		<input type="hidden" name="request" value="updateData"/>
		<input type="hidden" name="navActive" value="Y"/>
		<p><?php echo $lang['struktur']['navNameEnable']; ?></p>
		<input type="text" name="navName" id="navName" value="" disabled="disabled"/>
		<div id="bottom">
			<input type="button" class="submitButton formSubmit" value="<?php echo $lang['button']['save']; ?>">
			<input data-show="Chooser" type="button" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>"/>
		</div>
	</div>
	<div class="actionDeactivate">
		<input type="hidden" name="formAction" value="updateActive"/>
		<input type="hidden" name="request" value="updateData"/>
		<input type="hidden" name="navActive" value="N"/>
		<p><?php echo $lang['struktur']['navNameDisable']; ?></p>
		<input type="text" name="navName" id="navName" value="" disabled="disabled"/>
		<div id="bottom">
			<input type="button" class="submitButton formSubmit" value="<?php echo $lang['button']['save']; ?>">
			<input data-show="Chooser" type="button" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>"/>
		</div>
	</div>
	<div class="actionSort">
		<input type="hidden" name="formAction" value="sortNavPoint"/>
		<input type="hidden" name="request" value="updateData"/>
		<input type="hidden" name="newSort" class="newSort" value=""/>
		<p><?php echo $lang['struktur']['newSort']; ?></p>
		<div>
			<ul class="navSort box"></ul>
		</div>
		<div id="bottom">
			<input type="button" class="submitButton formSubmit hidden" value="<?php echo $lang['button']['save']; ?>"/>
			<input data-show="Chooser" type="button" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>"/>
		</div>
	</div>
	<div class="actionMove">
		<input type="hidden" name="formAction" value="moveNavPoint"/>
		<input type="hidden" name="request" value="updateData"/>
		<p><?php echo $lang['struktur']['navNameMove'][0]; ?></p>
		<input type="text" name="navName" id="navName" value="" disabled="disabled"/><br class="fix"/>
		<p><?php echo $lang['struktur']['navNameMove'][1]; ?></p>
		<input type="text" name="parentNavName" id="parentNavName" value="" disabled="disabled"/><br class="fix"/>
		<div id="otherMain_box">
		</div>
		<div id="bottom">
			<input type="button" class="submitButton formSubmit" value="<?php echo $lang['button']['save']; ?>">
			<input data-show="Chooser" type="button" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>"/>
		</div>
	</div>
	<div class="actionSubmenu">
		<input type="hidden" name="formAction" value="addSubNav"/>
		<input type="hidden" name="request" value="insertData"/>
		<p><?php echo $lang['struktur']['newSubMenu']; ?></p>
		<input type="text" name="navName" id="navName" value="" disabled="disabled"/><br class="fix"/>
		<label for="new_subnavName"><?php echo $lang['struktur']['newNavName']; ?></label><input type="text" name="new_subnavName" id="new_subnavName" value=""/><br class="fix"/>
		<label for="new_subnavType"><?php echo $lang['struktur']['newNavType']; ?></label><select name="new_subnavType" id="new_subnavType" class="navigationType"></select><br class="fix"/>
		<div id="bottom">
			<input type="button" class="submitButton formSubmit" value="<?php echo $lang['button']['save']; ?>">
			<input data-show="Chooser" type="button" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>"/>
		</div>
	</div>
	<div class="actionMenu">
		<input type="hidden" name="formAction" value="addNavPoint"/>
		<input type="hidden" name="request" value="insertData"/>
		<p><?php echo $lang['struktur']['newMenu']; ?></p>
		<input type="text" name="navName" id="navName" value="" disabled="disabled"/><br class="fix"/>
		<label for="new_navName"><?php echo $lang['struktur']['newNavName']; ?></label><input type="text" name="new_navName" id="new_navName" value=""/><br class="fix"/>
		<label for="new_navType"><?php echo $lang['struktur']['newNavType']; ?></label><select name="new_navType" id="new_navType" class="navigationType"></select><br class="fix"/>
		<div id="bottom">
			<input type="button" class="submitButton formSubmit" value="<?php echo $lang['button']['save']; ?>">
			<input data-show="Chooser" type="button" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>"/>
		</div>
	</div>
</div>