<?php
if ($action == 'add'){
	if (isset($_POST['submit']) && $_POST['submit'] != 'reload'){
		if (isset($_GET['level_module'])) $level_module = addslashes(trim(strip_tags(stripslashes($_GET['level_module']))));
	}
}

print "
<div class='form-row'>
	<label for='level_module' class='form-label'>".LABEL_LEVEL_MODULE."</label>
	<div class='form-cols'>
		<div class='form-col form-medium'>
			<div class='form-controls'>
				<select class='select' name='level_module' id='level_module'>";
$sql_tmp = "SELECT * FROM backend_modules WHERE c_active = '1' AND title NOT IN ('settings', 'frontend') AND language = :language ";
if ($title) $sql_tmp.= "AND title NOT LIKE :title ";
$sql_tmp.= "GROUP BY title ORDER BY title";
$result_tmp = $conn->prepare($sql_tmp);
if ($title) $result_tmp->bindValue(':title', $title, PDO::PARAM_STR);
$result_tmp->bindValue(':language', $_SESSION['backend']['language'], PDO::PARAM_STR);

$result_tmp->execute();
print "<option value=''>...</option>";
while($arr_tmp = $result_tmp->fetch()){
  if($level_module == $arr_tmp['title']){
  	print "<option value='".$arr_tmp['title']."' selected='selected'>".$arr_tmp['text']."</option>";
  } else print "<option value='".$arr_tmp['title']."'>".$arr_tmp['text']."</option>";
}
print "
				</select>
			</div><!-- /.form-controls -->
		</div><!-- /.form-col -->
	</div><!-- /.form-cols -->
</div><!-- /.form-row -->

<hr />";