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

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

    $colname = -1;
    if(isset($_POST['uid'])){
		$colname = $_POST['uid'];
		$parentdept = $_POST['deptname'];
		$childdept = $_POST['unit'];

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

?>

<!-- <div class="col-md-9 data-area"> -->

	<div class="data-area-wrap">
		
		<div class="form-wrapper">
			<span><?php echo $parentdept; ?></span> -> <span><?php echo $childdept; ?></span>
			<form id="new-sub-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-sub-officer-image">Add Officers Images</a>
					  
							  <div class="officerimageblock">		  			
							  </div><!-- End .theimageblock -->
					  
						</div><!-- End image-upload -->
					  
					</div><!-- End .form-row-->
				</fieldset>
				<hr>
			  <button type="submit" id="sub-officers-images" class="btn btn-success">Submit</button>
			  <input type="hidden" name="subsubdeptID" value="<?php echo $colname; ?>" />
			  <!-- <input type="hidden" name="awayteamID" value="<?php //echo $row_rsFixtureInfo['awayTeamID']; ?>" /> -->
			  <input type="hidden" name="MM_insert" value="add-new-sub-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-sub-officer-image',function(e){
                e.preventDefault();
                //alert("form");

                var theurl = '_/components/php/manage-departments/sub-units/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>


