<?php
$category_data = array('audio', 'code', 'file', 'pdf', 'text', 'video');
if ($action == 'add'){
	if ((isset($_POST['submit']) && $_POST['submit'] != 'reload') OR !isset($_POST['submit'])){
		if (isset($_GET['category'])) $category = addslashes(trim(strip_tags(stripslashes($_GET['category']))));
	}
}
if (!isset($category)) $category = NULL;
print "
<div class='form-row'>
	<label for='category' class='form-label'>".LABEL_CATEGORY." *</label>
	<div class='form-cols'>
		<div class='form-col form-medium'>
			<div class='form-controls'>
				<select class='select' name='category' id='category'>
					<option value=''>...</option>";
foreach ($category_data AS $value){
	if ($category == $value){
  	print "<option value='".$value."' selected='selected'>".$value."</option>";
	} else {
  	print "<option value='".$value."'>".$value."</option>";
	}
}
print "
				</select>
			</div><!-- /.form-controls -->
		</div><!-- /.form-col -->
	</div><!-- /.form-cols -->
</div><!-- /.form-row -->

<hr/>";