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

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

	//define('MAX_FILE_SIZE',10121200);
	if(isset($_POST['d'])){
		$deptID = $_POST['d'];
	}

 ?>

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

	<div class="data-area-wrap">
		<div class="form-wrapper">
			<form id="new-sub-department-detail">
			  	<fieldset>
			  		<legend>Add Department Details <?php //print_r($_SESSION); ?></legend>
			  		<div class="form-group">
					    <label for="name">Sub Department (Optional)</label>
					    <input type="text" name="subdeptname" class="form-control" id="name">
				  	</div>

				  	<!-- <div class="form-group">
					    <label for="gist">Gist</label>
					    <input type="text" name="gist" class="form-control" id="gist" placeholder="Gist">
				  	</div> -->

				  	<div class="form-group">
					    <label for="deptfunctions">Department Functions</label>
					  <textarea name="deptfunctions" class="tinymce" cols="" rows="" id="deptfunctions"></textarea>
				  	</div>

				</fieldset>

				<fieldset>
				<legend>Contact Details</legend>
					<div class="form-group">
						<label for="location">Location</label>
					  	<textarea name="location" class="form-control"  cols="" rows="" id="location"></textarea>
				  	</div>

					<div class="form-group">
					    <label for="digitaladdress">Ghana Post GPS Address</label>
					    <input type="text" name="digitaladdress" class="form-control" id="digitaladdress" >
				  	</div>

					<div class="form-group">
					    <label for="address">Postal Address</label>
					    <input type="text" name="address" class="form-control" id="address" >
				  	</div>

					<div class="form-group">
					    <label for="phone">Telephone</label>
					    <input type="text" name="phone" class="form-control" id="phone" >
				  	</div>

					<div class="form-group">
					    <label for="email">E-Mail</label>
					    <input type="text" name="email" class="form-control" id="email" >
				  	</div>

			  	</fieldset>

				<hr>
			  <button type="submit" id="add-sub-department-detail" class="btn btn-success">Submit</button>
			  <input type="hidden" name="MM_insert" value="add-new-sub-department-detail" />
			  <input type="hidden" name="deptID" value="<?php echo $deptID; ?>" />
			  <div class="error_msg"></div>
			</form>
		</div><!-- End .form-wrapper-->
	</div><!-- End .data-area-wrap-->
<!--</div>-->	<!-- End .data-area -->

<script type="text/javascript" src="_/js/tinymce/jquery.tinymce.min.js"></script>
<script type="text/javascript" src="_/js/tinymce/tinymce.min.js"></script>

<!-- TinyMCE -->


	<script type="text/javascript">
		$(function(){
			tinymce.init({
			selector: 'textarea#deptfunctions',
			height: 500,
			content_css: [
			'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
			'//www.tiny.cloud/css/codepen.min.css'
			]
		});
		});
	</script>
<!-- /TinyMCE -->
