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

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

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

    	//echo $colname;
    }
   
	//define('MAX_FILE_SIZE', 9910121200); 

?>

<!-- <div class="col-md-9 data-area"> -->
	
	<div class="data-area-wrap">
		<div class="form-wrapper">
			<h3><?php echo $deptname; ?></h3>
			<form id="new-officers-images" enctype="multipart/form-data">
				<fieldset>
					<div class="form-row">
						<div class="col-md-12 image-upload">
							<a href="#" class="btn btn-warning" id="add-officer-image">Add Officers </a>
							<hr>
					
							<div class="officerimageblock">		  			
							</div><!-- End .theimageblock -->
					
						</div><!-- End image-upload -->
					
					</div><!-- End .form-row-->
				</fieldset>
				<hr>
				<button type="submit" id="officers-images" class="btn btn-success">Submit</button>
				<input type="hidden" name="deptdetailsID" value="<?php echo $colname; ?>" />
				<input type="hidden" name="MM_insert" value="add-new-dept-officers" />
				
            </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");  ?>
<script type="text/javascript">
	

	 $(document).on('click','#add-officer-image',function(e){
                e.preventDefault();
                //alert("form");

                var theurl = '_/components/php/manage-departments/php-ajax-calls/select-officers-images.inc.php';

                $.ajax({
                	url: theurl,
                	type: 'post',
                	success: function(result){
                		$(".officerimageblock").append(result);
                	}
                });
      });

	
	/* $(document).ready(function(){
		$(".homecautioned").chosen();
		$(".awaycautioned").chosen();
	});*/
</script>


