<?php 
include ('../ro_head.php'); 
isauth_have("Update doc position");
?>

<link rel="shortcut icon" href="favicon.ico"/>
</head>
<script>

$(document).ready(function() {

	 $('form').submit(function(event) {  	
    	
		var msg = $('#updateids').val();
		msg = msg.replace(/\n/g, " ");
		var docpos = $('#docpos_id').val();
		var idtype = $('#idtype').val();
	    $.ajax({

		   url:'docposstatusall.php',

		   data: { updateids: msg, docpos_id: docpos, idtype: idtype},

		   type:'POST',
		   success: function(data){

		           $("#numberbox").html(data);
		           $("form")[0].reset();
		   
		   }
		});
		 event.preventDefault();

    });
});
</script>
<!-- END HEAD -->
<div class="page-container">
<?php include_once("../ro_sidebar.php"); ?>

	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div class="page-content">

			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->

			<!-- BEGIN PAGE CONTENT-->

			<div class="row">

				<div class="col-md-12">	

				<form name="addproduct" class="form-horizontal form-row-seperated" action="docposstatusall.php" method="post">

						<div class="portlet">

							<div class="portlet-body">

								<div class="tabbable">

									<ul class="nav nav-tabs">

										<li class="active">

											<a href="#tab_general" data-toggle="tab">

											Update Document Status </a>

										</li>

									</ul>

									<div class="tab-content no-space">

										<div class="tab-pane active" id="tab_general">

											<div class="form-body">

												<div class="form-group">
															
							                            <div class="form-group">


															<label class="col-md-3 control-label">
																Update Document Position to : 
															</label>



															<div class="col-md-4">
																<select name="docpos_id" id='docpos_id' class="form-control" required="yes">

                                                                    <?php    
                                                                    $rs2 = mysqli_query($con,"select * from doc_position_table where docp_status=1 order by docp_id ASC");
                                                                    while($row2=mysqli_fetch_array($rs2)){ 
                                                                    
                                                                    
                                                                    echo "<option value='".$row2["docp_id"]."'>".$row2["docp_name"]."</option>";
                                                                    
                                                                    } ?>
                                                                    </select>
															</div>

														</div>


							                    </div>

                        
						                        <div class="form-group">

													<div class="form-group">

														<label class="col-md-3 control-label">
															IDs: <span class="required">* </span>
														</label>

														<div class="col-md-4">
															<select name="idtype" id="idtype" class="form-control" required>
						                                  		<option value="">- select -</option>
						                                  		<option value="1"> Reference No </option>
						                                  		<option value="2"> Passport No </option>
						                                    </select>
														</div>

													</div>
													
												</div>

												<div class="form-group">

													<div class="form-group">

														<label class="col-md-3 control-label">
															Separated by new lines: <span class="required">* </span>
														</label>

														<div class="col-md-4">
															<textarea class="form-control" name="updateids" id="updateids" rows="8" required></textarea>
														</div>

													</div>
													
												</div>
												 	
												
								                <div class="form-group">

								                	<label class="col-md-3 control-label" ></label>

								                	<input type='hidden' name='actionid' value='docstsupdate'>

								                  <div class="col-md-4"><button class="btn green"><i class="fa fa-check"></i> Update</button></div>

								                </div>	

										</div>

									</div>

									</div>

								</div>

							</div>

						</div>

					</form>
						<div id="numberbox" style="padding: 25px;"></div>

				</div>

			</div>

			<!-- END PAGE CONTENT-->

		</div>

	</div>

	<!-- END CONTENT -->

	</div>

<!-- END CONTAINER -->

<!-- BEGIN FOOTER -->

<?php include_once("../ro_footer.php"); ?>

<!-- END FOOTER -->

<?php include_once("../ro_js.php"); ?>

<!-- END PAGE LEVEL SCRIPTS -->

<script>

jQuery(document).ready(function() {    
Metronic.init(); // init metronic core components
Layout.init(); // init current layout
QuickSidebar.init(); // init quick sidebar
Demo.init(); // init demo features
});

</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>
