<?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="navId" id="navId" value=""/>
	<input type="hidden" name="dataSet" id="dataSet" value=""/>
	<input type="hidden" name="request" id="request" value="updateData"/>

	<input type="hidden" name="imgExtension" id="imgExtension" value=""/>
	<input type="hidden" name="imgOrigname" id="imgOrigname" value=""/>
	<input type="hidden" name="previewHeight" id="previewHeight" value=""/>
	<input type="hidden" name="previewLeft" id="previewLeft" value=""/>
	<input type="hidden" name="previewTop" id="previewTop" value=""/>
	<input type="hidden" name="previewWidth" id="previewWidth" value=""/>

	<input type="hidden" name="uploadFile" id="uploadFile" value="" disabled="disabled"/>

	<input type="hidden" name="sliderContent" id="sliderContent" value=""/>
	<input type="hidden" name="formAction" id="formAction" value=""/>

	<div class="editor_slider">
		<div class="inner">
			<div id="newSort_box" class="box">
				<ul id="imgThumbs"></ul>
			</div>
			<div class="rightBox editFields box">
				<h1><?php echo $lang['image']['editHeadline']; ?></h1>
				<p><?php echo $lang['image']['editHint']; ?></p>
				<input id="sortButton" type="button" class="submitButton" value="<?php echo $lang['image']['sort']; ?>"/>
				<br class="fix"/>&nbsp;<br/>
			</div>
			<div class="rightBox deleteFields box">
				<h1><?php echo $lang['image']['deleteHeadLine']; ?></h1>
				<p><?php echo $lang['image']['deleteHint']; ?></p>
				<input type="button" class="submitButton" value="<?php echo $lang['button']['save']; ?>">
				<input type="button" id="deleteCancel" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>">
				<br class="fix"/>&nbsp;<br/>
			</div>
			<div class="rightBox sortFields box">
				<h1><?php echo $lang['image']['sortHeadLine']; ?></h1>
				<p><?php echo $lang['image']['sortHint']; ?></p>
				<input type="hidden" name="hasSlider" value="Y"/>
				<div>
					<input type="button" id="sortSave" class="submitButton formSubmit" value="<?php echo $lang['button']['save']; ?>">
					<input type="button" id="sortCancel" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>">
				</div>
				<br class="fix"/>&nbsp;<br/>
			</div>
			<div class="rightBox uploadFields box">
				<h1><?php echo $lang['image']['uploadHeadLine']; ?></h1>
				<p><?php echo $lang['image']['uploadHint']; ?></p><br/>
				<label for="newUploadFile"><?php echo $lang['image']['newUpload']; ?></label><input type="file" name="newUploadFile" id="newUploadFile" class="uploadFile"/><br/>
				<input type="button" class="submitButton hidden" value="<?php echo $lang['button']['save']; ?>">
				<input type="button" id="uploadCancel" class="submitButton" value="<?php echo $lang['button']['cancel']; ?>">
				<br class="fix"/>&nbsp;<br/>
			</div>
		</div>
		<div class="inner">
			<div id="imagePlaceholder">
				<div id="imageCover">
					<div id="coverTop"></div>
					<div id="coverRight"></div>
					<div id="coverBottom"></div>
					<div id="coverLeft"></div>
				</div>
				<div id="imagePreview"></div>
			</div>
			<div class="editFields">
				<label for="imgName"><?php echo $lang['image']['imageName']; ?></label><input type="text" name="imgName" id="imgName" value=""/><br/>
				<label for="imgTitle"><?php echo $lang['image']['imageTitle']; ?></label><input type="text" name="imgTitle" id="imgTitle" value=""/><br/>
				<div id="imageSlider">
					<label><?php echo $lang['image']['imageType']; ?></label>
					<input type="radio" name="hasSlider" id="hasSlider_N" value="N"/><label for="hasSlider_N"><?php echo $lang['image']['imageSingle']; ?></label>
					<input type="radio" name="hasSlider" id="hasSlider_Y" value="Y"/><label for="hasSlider_Y"><?php echo $lang['image']['imageSlider']; ?></label><br/>
				</div>
			</div>
			<label for="changeUploadFile"><?php echo $lang['image']['newUpload']; ?></label><input type="file" name="changeUploadFile" id="changeUploadFile" class="uploadFile"/><br/>
			<div class="bottom">
				<input type="button" class="submitButton formSubmit" value="<?php echo $lang['button']['save']; ?>">
				<input type="button" class="submitButton formPrev" value="<?php echo $lang['button']['prev']; ?>">
			</div>
		</div>
	</div>
</form>