<?php
print "
<div class='container popup'>";
include('includes/form/alert.php');
print "
	<form action='".$_SERVER['SCRIPT_NAME']."?".$_SERVER['QUERY_STRING']."' method='post' enctype='multipart/form-data' class='multi_form'>
		<input type='hidden' name='csrf_token' value='".htmlspecialchars(csrf_token())."'>
		<input type='hidden' name='update' value='1' />
		<input type='hidden' name='change[datetime]' ";
if (isset($change['datetime'])) print "value='".$change['datetime']."' ";
else print "value='0' ";
print "/>
		<input type='hidden' name='change[text]' ";
if (isset($change['text'])) print "value='".$change['text']."' ";
else print "value='0' ";
print "/>";

if (isset($c_languages) && $c_languages) {
	print "<input type='hidden' name='change[language]' ";
	if (isset($change['language'])) print "value='".$change['language']."' ";
	else print "value='0' ";
	print "/>";
}
if (isset($c_levels) && $c_levels) {
	print "<input type='hidden' name='change[levels]' ";
	if (isset($change['levels'])) print "value='".$change['levels']."' ";
	else print "value='0' ";
	print "/>";
}

if (isset($update_parent) && $update_parent === true) print "<input type='hidden' id='update_parent' name='update_parent' value='1' />";

print "
		<ul class='tabs toggle'>
			<li class='current'>
				<a href='#' title='".LABEL_DATA."' data-id='data'><i class='material-icons md-24'>edit</i>".LABEL_DATA."</a>
			</li>
		</ul>
		
		<div class='quick-action'>";
if (isset($ids) && $ids) print "<span class='id'>#".$ids."</span>";
print "
		</div><!-- /.quick-action -->
		
		<div class='form' data-id='data'>
			<div class='form-content'>";
			
$old_module = $module;
$module = $multi_module;

include('includes/form/datetime.php');

include('includes/form/language.php');

include('includes/form/level.php');

include('form/text.php');


include('includes/form/error.php');

$module = $old_module;

print "
				<div class='form-action'>
					<button type='submit' class='btn save' name='submit' title='".LABEL_SAVE."'><i class='material-icons md-24'>save_alt</i>".LABEL_SAVE."</button>
				</div><!-- /.form-action -->
				
			</div><!-- /.form-content -->
		</div><!-- /.form -->
	</form>
	
</div><!-- /.container -->";