<?php 
	require_once('Connections/conn_ama.php');

	if(!isset($_SESSION)){
        session_start();
    } 

    $colname = -1;
    if(isset($_POST['categoryID'])){
    	$colname = $_POST['categoryID'];

    	//echo $colname;
    }
	//Retrieve Category from all categories	
	$query_rsCategory = "SELECT categoryID, category  FROM doccategories WHERE categoryID =".$colname;
	$rsCategory = mysqli_query($conn_ama, $query_rsCategory ) or die(mysqli_error($conn_ama));
	$row_rsCategory = mysqli_fetch_assoc($rsCategory);
	$totalRows_rsCategory = mysqli_num_rows($rsCategory);/**/
   
	define('MAX_FILE_SIZE', 99910121200); 

?>

<!-- <div class="col-md-9 data-area"> -->
	<div class="data-area-wrap">
		<div class="form-wrapper">
			<h3><?php echo $row_rsCategory['category']; ?></h3>
			<form id="new-add-document">
				<fieldset>
					<legend>Add Document</legend>
					<div class="form-group">
						<label for="doctitle">Document Title</label>
						<input type="text" name="doctitle" class="form-control" id="doctitle" placeholder=" ">
					</div>

					<div class="form-group">
						<label for="document">Upload Document</label>
						<input type="file" name="document[]" class="form-control" id="document" placeholder="">
					</div>

					<div class="form-group">
						<label for="extension">File Extension</label>
						<select name="extension" class="form-control" id="extension" >
							<option value="">-Select-</option>
							<option value="pdf">PDF</option>
						</select>
					</div>

					<div class="form-group">
						<label for="dcomment">Comments</label>
						<textarea name="dcomment" class="form-control" cols="" rows="" id="dcomment"></textarea>
					</div>
					
				</fieldset>
				<hr>
			  <button type="submit" id="add-document" class="btn btn-success">Submit</button>
			  <input type="hidden" name="categoryID" value="<?php echo $colname; ?>" />
			  <input type="hidden" name="MM_insert" value="save-add-document" />
			
            </form>
			<div class="error_msg"></div>
		</div><!-- End .form-wrapper-->
	</div><!-- End .data-area-wrap-->	
<!--</div>--><!-- End .data-area -->

<?php //include("lineup-scripts.inc.php");  ?>



