<?php include('../config/setup.php');?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title><?php 
            
            $leename=mysqli_query($config,"select Name,Name_status from lee_master");
            while($lee=mysqli_fetch_array($leename))
            {
                 $namestatus=$lee[1];
if($namestatus == 1)
{
    echo  $lee[0];
}else{
    echo "Need Name";

}

            }
            
            ?>  </title>
	<meta content='width=device-width, initial-scale=1.0, shrink-to-fit=no' name='viewport' />
	<link rel="icon" href="<?php 
            
            $inro_logo=mysqli_query($config,"select Logo_Path,logo_status from lee_master");
            while($logo=mysqli_fetch_array($inro_logo))
            {
                 $logstatus=$logo[1];
if($logstatus == 1)
{
	
	 $ms=substr($logo[0],3);
	 echo "../../photos/logo/favicon.ico";
	
     
}else{
    echo "../../photos/logo/no_logo.png";

}

            }
            
            ?>" type="image/x-icon"/>
	
	<!-- Fonts and icons -->
	<script src="../assets/js/plugin/webfont/webfont.min.js"></script>
	<script>
		WebFont.load({
			google: {"families":["Lato:300,400,700,900"]},
			custom: {"families":["Flaticon", "Font Awesome 5 Solid", "Font Awesome 5 Regular", "Font Awesome 5 Brands", "simple-line-icons"], urls: ['../assets/css/fonts.min.css']},
			active: function() {
				sessionStorage.fonts = true;
			}
		});
	</script>

	<!-- CSS Files -->
	<link rel="stylesheet" href="../assets/css/bootstrap.min.css">
	<link rel="stylesheet" href="../assets/css/atlantis.min.css">
	<!-- CSS Just for demo purpose, don't include it in your project -->
	<link rel="stylesheet" href="../assets/css/demo.css">
		<script src="../assets/angular/angular.min.js"></script> 
		
		
		
		
<style>

.tab {
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: #f1f1f1;
}

/* Style the buttons inside the tab */
.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
  font-size: 17px;
}

/* Change background color of buttons on hover */
.tab button:hover {
  background-color: #ddd;
}

/* Create an active/current tablink class */
.tab button.active {
  background-color: #ccc;
}

/* Style the tab content */
.tabcontent {
  
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;
}
</style>		
		
</head>
<body>
	<div class="wrapper">
		<div class="main-header">
			<!-- Logo Header -->
			 <?php include('logo.php');?>
			<!-- End Logo Header -->

			<!-- Navbar Header -->
			<?php include('topbar.php');?>
			 <!-- End Navbar -->
		</div>
		<!-- Sidebar -->
		<?php include('sidebar.php');?>
		
		
		<div class="main-panel" style="    padding-top: 79px;">
			
 <div class="tab">
<!-- <button class="tablinks" onclick="openCity(event,'London')">Add Product</button>
  <button class="tablinks" onclick="openCity(event, 'Paris')">Add Product  Price</button>
  <button class="tablinks" onclick="openCity(event, 'Tokyo')">Add Product Gallery</button>-->
</div>
			

      <div class="modal-body">
	   <div ng-app="myproduct" ng-controller="productcontroller" ng-init="loadid()">
   <div id="London" class="tabcontent ">
  <h3>Product</h3>
 <form action="Function/Add_offer_product.php" method="post" enctype="multipart/form-data">
       
 
   <div ng-app="myproduct" ng-controller="productcontroller" ng-init="loadid()">
        <form action="Function/Add_product.php " method="post" enctype="multipart/form-data">
         	
			 <div class="form-group">
                <label for="inputStatus"> Category </label>
                <select class="form-control" ng-model="ctid" name="product_cate" ng-change="loadsub()"  required>
              <option>Select Product Category</option>
               <option ng-repeat="ca in cateid" value="{{ca.Main_Category_id}}">{{ca.Main_Category_Name}}</option>
                </select>
              </div> 
			  
			  
				 <div class="form-group">
                <label for="inputStatus"> Sub Category </label>
                <select class="form-control"  name="product_sub_cate"  required>
                <option>Select Product Sub Category</option>
               <option ng-repeat="su in subna" value="{{su.Sub_Category_id}}">{{su.Sub_Category_Name}}</option>
                </select>
              </div> 
			
<div class="form-group">
	<label for="email2">Product Name</label>
<input type="text" class="form-control" id="email2" name="Add_pro_name" placeholder="Enter Product Name" required >

			</div> 
			

	<div class="form-group">
			<label for="email2">  Avalible Stocks</label>
			<input type="number" class="form-control" id="email2" name="Add_pro_stocks" placeholder="Product Avalible Stocks"required  >
			</div>
			
	<div class="form-group">
			<label for="email2">Product tax</label>
			
			<select class="form-control" name="Add_pro_tax" required>
			<?php
			
			$pro_name_=mysqli_query($config,"select * from tax_master where Tax_status=1");
											while($add_pro=mysqli_fetch_object($pro_name_))
											{
			
			
			?>
			
			<option value="<?php echo $add_pro->Tax;?>"><?php echo $add_pro->Tax;?>%</option>
			
			
			
			
											<?php } ?>
			
			</select>	
			
			
			
			
			</div>
			
			
			
			
			
			
			
       
			<div class="form-group">
			<label for="email2">Product Description ( Avoid this symbol(') )</label>
		
<textarea class="form-control" rows="3" cols="30" name="Add_pro_desc" required></textarea>


		</div>
       
	   
	   
	   	<div class="form-group">
			<label for="email2">Product Have Any Offer</label>
 			<select class="form-control" id="exampleFormControlSelect1" name="Add_pro_offer" required>
		<option value="1">Yes</option>
		<option value="0">No</option>
		
		</select>
			
			
			
			</div>
       
	   
		 <div class="form-group">
		<label for="exampleFormControlSelect1">Product Active Status</label>
		<select class="form-control" id="exampleFormControlSelect1" name="Add_pro_status" required>
		<option value="1">Active</option>
		<option value="0">In-Active</option>
		
		</select>
											</div>			
		
		    	</div>
<div class="form-group">
									<button class="btn btn-success" type="submit" name="offer_product_add">Next</button>
 								</div>
			
			
			</form>
</div>

<div id="Paris" class="tabcontent" >
  <h3>Product Price</h3>

   <form action="Function/Add_product_price.php" method="post" enctype="multipart/form-data">
       
<div class="form-group">
	<label for="email2">Product Name</label>
<select class="form-control" name="Add_pro_name">
			<?php
			
			$pro_name_=mysqli_query($config,"select * from product_master where Product_Active_Status=1");
											while($add_pro=mysqli_fetch_object($pro_name_))
											{
			
			
			?>
			
			<option value="<?php echo $add_pro->Product_id;?>"><?php echo $add_pro->Product_Name;?></option>
			
			
			
			
											<?php } ?>
			
			</select>
			</div> 



	   <div class="form-group">
			<label for="email2">Product Type</label>
<select class="form-control" name="Add_pro_type">
			<?php
			
			$pro_type_=mysqli_query($config,"select * from product_type where Product_type_status=1");
											while($ptype=mysqli_fetch_object($pro_type_))
											{
			
			
			?>
			
			<option value="<?php echo $ptype->Product_type;?>"><?php echo $ptype->Product_type;?></option>
			
			
			
			
											<?php } ?>
			
			</select>			</div>  
			 
		
	   <div class="form-group">
			<label for="email2">Product Type Quantity (like 500,1,....)</label>
			<input type="number" class="form-control" id="email2" name="Add_pro_type_quant" placeholder="Product Type Quantity (like 500,1,....)"  >
			</div>   <div class="form-group">
			<label for="email2">Product Price</label>
			<input type="number" class="form-control" id="email2" name="Add_pro_price" placeholder="Product Price"  >
			</div>   
			<div class="form-group">
			<label for="email2">Shelling Price</label>
			<input type="number" class="form-control" id="email2" name="Add_pro_shelling_price" placeholder="Product Shelling Price"  >
			</div>  




		<div class="form-group">
		<label for="exampleFormControlSelect1">Product Price Status</label>
		<select class="form-control" id="exampleFormControlSelect1" name="Add_product_price_status">
		<option value="1">Active</option>
		<option value="0">In-Active</option>
		
		</select>
											</div>			
		
		     <div class="form-group">
									<button class="btn btn-success" type="submit" name="product_price_add">Add New</button>
 								</div>
			
			
			</form>
	 
  
</div>

<div id="Tokyo" class="tabcontent" >
  <h3>Product Gallery</h3>


 <form action="Function/product_multiple_image_Add.php " method="post" enctype="multipart/form-data" name="upload_form" id="upload_form"   >
         
<div class="form-group">
	<label for="email2">Product Name</label>
<select class="form-control" name="Add_pro_img_id[]">
			<?php
			
			$pro_name_=mysqli_query($config,"select * from product_master where Product_Active_Status=1");
											while($add_pro=mysqli_fetch_object($pro_name_))
											{
			
			
			?>
			
			<option value="<?php echo $add_pro->Product_id;?>"><?php echo $add_pro->Product_Name;?></option>
			
			
			
			
											<?php } ?>
			
			</select>
			</div> 
			 

	<div class="form-group">
			<label for="email2">Product Image (size 380px X 257px)</label>
			<input type="file" name="upload_images[]" id="image_file"  class="form-control"  multiple>
			  
			</div>
	 		
		
		     <div class="form-group">
									<button class="btn btn-success" type="submit" name="product_image_add">Add New</button>
 								</div>	 
			
			
			</form>
	


















</div>
   


	 
	
      </div>
      </div>
  
			
			
			
			
			
			
			
			
			
			
			
			
			 <?php include('footer.php');?>
		</div>
		
		 <script>
function openCity(evt, London) {
  var i, tabcontent, tablinks;
  tabcontent = document.getElementsByClassName("tabcontent");
  for (i = 1; i < tabcontent.length; i++) {
    tabcontent[i].style.display = "none";
  }
  tablinks = document.getElementsByClassName("tablinks");
  for (i = 1; i < tablinks.length; i++) {
    tablinks[i].className = tablinks[i].className.replace("active", "");
  }
  document.getElementById(London).style.display = "block";
  evt.currentTarget.className += " active";
}
</script>
		<!-- End Custom template -->
	</div>
	<!--   Core JS Files   -->
	<script src="../assets/js/core/jquery.3.2.1.min.js"></script>
	<script src="../assets/js/core/popper.min.js"></script>
	<script src="../assets/js/core/bootstrap.min.js"></script>
	<!-- jQuery UI -->
	<script src="../assets/js/plugin/jquery-ui-1.12.1.custom/jquery-ui.min.js"></script>
	<script src="../assets/js/plugin/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js"></script>
	
	<!-- jQuery Scrollbar -->
	<script src="../assets/js/plugin/jquery-scrollbar/jquery.scrollbar.min.js"></script>
	<!-- Datatables -->
	<script src="../assets/js/plugin/datatables/datatables.min.js"></script>
	<!-- Atlantis JS -->
	<script src="../assets/js/atlantis.min.js"></script>
	<!-- Atlantis DEMO methods, don't include it in your project! -->
	<script src="../assets/js/setting-demo2.js"></script>


		<script>
var app = angular.module("myproduct",[]);  


 app.controller("productcontroller", function($scope, $http){  
$scope.loadid = function()
{
  $http.get("Function/Product_catergory.php")  
           .success(function(data){  
                $scope.cateid = data;  
           }); 
 
 }  

 $scope.loadsub = function(){  
           $http.post("Function/Product_sub_category.php", {'cate_id':$scope.ctid})  
           .success(function(data){  
                $scope.subna = data;  
           });   
		   
     




	 }  
	   
    


 });  </script>
	
	
</body>
</html>