<?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[c_active]' ";
if (isset($change['c_active'])) print "value='".$change['c_active']."' ";
else print "value='0' ";
print "/>
		<input type='hidden' name='change[c_thumbnails]' ";
if (isset($change['c_thumbnails'])) print "value='".$change['c_thumbnails']."' ";
else print "value='0' ";
print "/>";

if (isset($c_templates) && $c_templates) {
	print "<input type='hidden' name='change[id_template]' ";
	if (isset($change['id_template'])) print "value='".$change['id_template']."' ";
	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 && (!isset($c_levels_multi) OR !$c_levels_multi)) {
	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('form/template.php');
include('includes/form/language.php');

if (isset($c_levels) && $c_levels && (!isset($c_levels_multi) OR !$c_levels_multi)) {
	include('includes/form/level.php');
}
include('form/c_thumbnails.php');


include('includes/form/error.php');
include('includes/form/c_active.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 -->";