<?php include ('header1f.php');?>
<?php 
ob_start();   
session_start();
include ('connection.php') ;

  if (!isset($_SESSION['is_logged_in'])) {
    header("Location:login.php");
    die();
    }
	date_default_timezone_set('Asia/Calcutta');
$today = date("d/m/Y");
$today3 = date("Y-m-d");
$today1 = date("d/m");


$queryls1 = "select * from  appointment_details  where appointment_id='".$_REQUEST['appointment']."'";
$resultls1  = mysqli_query($conn,$queryls1);	
while($row=mysqli_fetch_array($resultls1))
{
$registration_id = $row['registration_id'];
$call_follow_up_id = $row['call_follow_up_id'];
}
?> 
<div class="content-page">
    <div class="content">
      <div class="container">
	  	  
        
        <div class="row">
          <div class="col-md-12">
            <div class="panel panel-primary">
              <div class="panel-heading">
                <h3 class="panel-title">Add Prescription</h3>
              </div>	
		
			
              <div class="panel-body">
                                    <div class="row"> 

               <form name="frm_add_category"  id="frm_add_category" method="post"action="insert_product.php" >	
			

                        <div class="box-body">
						
							<div class="row">
							
							
							
							
							<div class="col-sm-3 col-xs-12">
                                            <div class="m-t-20">
							   <div class="form-group">
                                <label for="middle_name" class="control-label">Therapist Name</label>
                				<input class="form-control" type="text" name="therapist_name" placeholder="Name" required/>
                            </div>
</div></div>
 <div class="col-sm-3 col-xs-12">
                                            <div class="m-t-20">       <div class="form-group">

                               <label for="last_name" class="control-label">Address </label>
                	<textarea name="address" class="form-control" placeholder="Address" required="required"></textarea>

                            </div></div></div>
							
							
							 <div class="col-sm-3 col-xs-12">
                                            <div class="m-t-20">       <div class="form-group">

                               <label for="last_name" class="control-label">Address </label>
                	<input class="form-control" type="text" name="mobile_no" placeholder="Mobile" required />

                            </div></div></div>
							
							 <div class="col-sm-3 col-xs-12">
                                            <div class="m-t-20">       <div class="form-group">

                               <label for="last_name" class="control-label">Email </label>
                	<input class="form-control" type="text" name="email" placeholder="Email" required />

                            </div></div></div>
							<div class="clearfix"></div>
							

<div class="col-sm-3 col-xs-12">
                                            <div class="m-t-20">
							   <div class="form-group">
                                <label for="middle_name" class="control-label">Therapy</label>
                					<select  class="form-control select2" name="therapy_name[]"  required multiple="multiple">

<?php 
$querynp = "select * from therapy_master where status='1'";
$resultmp = mysqli_query($conn,$querynp);
while($row=mysqli_fetch_array($resultmp))
{
$therapy_name = $row['therapy_name'];
?>
<option value="<?php echo $therapy_name ?>"><?php echo $therapy_name ?> </option>
<?php 	}?>
</select>
                    
                            </div>
</div></div>
                     
					
							
							
						
							
						
							
							</div>
							
							<div class="row">

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

                            <div class="panel panel-primary">

                                <div class="panel-heading">

                                    <h3 class="panel-title">
									
									<a class="btn btn-success add-more" onClick="callAddContact2();" >+ ADD INGREDIENTS</a>&nbsp;&nbsp &nbsp;&nbsp;<a class="btn btn-success add-more" style="cursor:pointer; margin-left:20px" onClick="delRow();" title="Click to remove">
								  <span class="glyphicon glyphicon-remove"></span>&nbsp;Del							</a>
								</h3></div>

 <div class="panel-body">

                                    <div class="row">
													
<table class="table table-striped table-bordered table-hover" id="cntTable2">
							<thead>
								<tr>
									<td width="100px" height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Sr.No.</strong></div></td>
									<td  height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Ingredients</strong></div></td>
									<td  height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Unit</strong></div></td>

									<td  height="28"valign="middle" nowrap="nowrap" ><div align="left" style="padding-left:5px;"><strong>Quantity</strong></div></td>
									
							</tr></thead>
							<tbody>
							</tbody>
						</table> 
						

					  	<input id="allcontypes" name="allcontypes" value="Decision Maker~^~Influencer~^~Recommender~^~User~^~Purchase Officer" type="hidden">
						<input name="cntlnos" id="cntlnos" value="" type="hidden">
						<input name="cntcount2" id="cntcount2" value="" type="hidden">
						<input name="cntdelids" id="cntdelids" value="" type="hidden">


                                    </div>

                                </div>

                            </div>

                        </div>

                    </div>
							
							
							
							
                          
                            <div class="col-sm-12 col-xs-12">
                                           
                                            <div class="m-t-20">
                                                    <div class="form-group">
                                                        <div>
                                                            <button type="submit" class="btn btn-primary waves-effect waves-light" style="float:right"> Submit </button>
							
															
                                                           
                                                        </div>
                                                    </div>
                                               
                                            </div>
                                        </div>

</div>

                    </form></div></div>
									
                                        
												
													
<script type="text/Javascript">
	function callAddContact2()
	{
	
   var tbl = document.getElementById('cntTable2');
	 var lastRow = tbl.rows.length;
	 // if there's no header row in the table, then iteration = lastRow + 1
	 var iteration = lastRow;
	 var row = tbl.insertRow(lastRow);
	 var node1;
	 var lineno = lastRow;
	 // cell 0
	 var cellLeft = row.insertCell(0);
	 cellLeft.className = "center";
		var node = document.createElement('span');
		node.className = "glyphicon glyphicon-remove";
		node.title="Delete line";
		var link = document.createElement("a");
		link.className = "btn bg-btn-delete";
		link.style.padding = "0px 2px";
		link.href="javascript:callRemoveContact("+lineno+");";
		link.appendChild(node);
		//cellLeft.appendChild(link);
	 
	 node = document.createElement("input");
	 node.type = 'hidden';
	 node.name = 'cid'+lineno;
	 node.value = '';
	 node.id = 'cid'+lineno;
	 cellLeft.appendChild(node);
	 node = document.createElement("input");
	 node.type = 'text';
	 node.style.width = "50px";
	
	 node.name = 'clinenum'+lineno;
	 node.value = lineno;
	 node.id = 'clinenum'+lineno;
	 cellLeft.appendChild(node);
	 
	 
	 

	 
	  var cell1 = row.insertCell(1); 
    var nodegend = document.createElement('select');
    nodegend.className = 'form-control';
	 nodegend.name = 'ingid'+lineno;
 var opt = nodegend.options;
 opt[opt.length] = new Option('Select','');
 <?php $query21 = "select * from ingredients_master ";
      // echo $query21;
       $result21 = mysqli_query($conn,$query21);
       $total = mysqli_num_rows($result21);
        while($row=mysqli_fetch_array($result21))
           {
$ingredients = $row['ingredients'];
$ingid = $row['ingid'];
 ?>
opt[opt.length] = new Option('<? echo $ingredients ?>','<? echo $ingid ?>');
<? } ?>
cell1.appendChild(nodegend);


	 
 var cell2 = row.insertCell(2); 
    var nodegend = document.createElement('select');
    nodegend.className = 'form-control';
	 nodegend.name = 'unit'+lineno;
 var opt = nodegend.options;
 opt[opt.length] = new Option('Select','');
 <?php $query = "select * from unit_master where status='1'";
       $result = mysqli_query($conn,$query);
        while($row=mysqli_fetch_array($result))
           {
$unit = $row['unit'];
 ?>
opt[opt.length] = new Option('<? echo $unit ?>','<? echo $unit ?>');
<? } ?>
cell2.appendChild(nodegend);
	 
	 
	 	 
	  var cell3 = row.insertCell(3); 
    var node = document.createElement('input');
    node.className = 'form-control';
	 node.name = 'quantity'+lineno;
	 node.placeholder='';
	 node.value = "";
	 node.id = '';
	 cell3.appendChild(node);
	

	
	 
	
	
		
	document.getElementById('cntcount2').value = lineno;
	document.getElementById('sigthseeing').style.visibility='visible';
	
}function delRow()
{

    var tableName = document.getElementById('cntTable2');

    var prev = tableName.rows.length;

    if(prev > 1)

{
    

/////////////////////////////////////////////////////////////////////////////////////
   
	 // if there's no header row in the table, then iteration = lastRow + 1
	
	 var row = document.getElementById('cntTable2').deleteRow(prev-1);
	 
	 }
	 var node1;
	  var iteration = lastRow;
	 var lastRow = tableName.rows.length;
	 var lineno = lastRow;
document.getElementById('cntcount2').value = lineno-1;




}
</script>

													
                                                    
                                        
                              </div>
            </div>
          </div>
      </div>
    </div>
   </div>
    <footer class="footer">  &copy; <?php echo $company_namecnp ?></footer>
  </div>
</div>
   <script src="vendors/bower_components/jquery/dist/jquery.min.js"></script>
        <script src="vendors/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="vendors/bower_components/moment/min/moment-with-locales.min.js"></script>
        <script src="vendors/bower_components/mjolnic-bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js"></script>
        <script src="vendors/bower_components/switchery/dist/switchery.min.js"></script>
        <script src="vendors/bower_components/select2/dist/js/select2.full.min.js"></script>
        <script src="vendors/bower_components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
        
        <!-- Bootstrap Tagsinput JavaScript -->
        <script src="vendors/bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
        
        <!-- Bootstrap Touchspin JavaScript -->
        <script src="vendors/bower_components/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.js"></script>
        
        <!-- Multiselect JavaScript -->
        <script src="vendors/bower_components/multiselect/js/jquery.multi-select.js"></script>
        
         
        <!-- Bootstrap Switch JavaScript -->
        <script src="vendors/bower_components/bootstrap-switch/dist/js/bootstrap-switch.min.js"></script>
        
        <!-- Bootstrap Datetimepicker JavaScript -->
        <script type="text/javascript" src="vendors/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>

        
        <!-- Form Advance Init JavaScript -->
        <script src="dist/js/form-advance-data.js"></script>
        
        <!-- Slimscroll JavaScript -->
        <script src="dist/js/jquery.slimscroll.js"></script>
    
        <!-- Fancy Dropdown JS -->
        <script src="dist/js/dropdown-bootstrap-extended.js"></script>
        
        <!-- Owl JavaScript -->
        <script src="vendors/bower_components/owl.carousel/dist/owl.carousel.min.js"></script>
    
        <!-- Init JavaScript -->
        <script src="dist/js/init.js"></script>   <script src="assets/js/bootstrap.min.js"></script>
	<!-- Select2 JavaScript -->
		<script src="vendors/bower_components/select2/dist/js/select2.full.min.js"></script>
		
		<!-- Bootstrap Select JavaScript -->
		<script src="vendors/bower_components/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/modernizr.min.js"></script>
<script src="assets/js/detect.js"></script>
<script src="assets/js/fastclick.js"></script>
<script src="assets/js/jquery.slimscroll.js"></script>
<script src="assets/js/jquery.blockUI.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/jquery.nicescroll.js"></script>
<script src="assets/js/jquery.scrollTo.min.js"></script>
<script src="assets/js/app.js"></script>
</body>
<!-- Mirrored from themesdesign.in/xadmino/form-elements.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 03 Feb 2021 12:05:08 GMT -->
</html>