<div class="row">
    <div class="col-lg-12" style="margin-top:-41px;margin-bottom:-13px;">
        <h1 class="page-header" style="font-size:19px; color:#09F;"><i class="fa fa-user fa-fw"></i>&nbsp;Product</h1>
    </div>
    <!-- /.col-lg-12 -->
</div>
<!-- Row -->

<?php

if($_SESSION["type"] != 1){
	echo "No permission to access"; die();
	}

?>

<script>
$(document).ready(function() {
    $("#select_type").change(function() {
	  if(this.value === '2'){
	  	window.location.href="?page=addnewphone&cat_id=2";
	  }else if(this.value === '3'){
	  	window.location.href="?page=addnewsparephone&cat_id=3";
	  }else if(this.value === '4'){
	  	window.location.href="?page=addnewaccessory&cat_id=4";
	  }
	  else if(this.value === '5'){
	  	window.location.href="?page=addnewcamera&cat_id=5";
	  }else{
	  	window.location.href="?page=addnewproduct";
	  }
	});
});
</script>
<!-- Row -->
<div class="row">
	<div class="col-lg-12">
        <div class="panel panel-default" style="width:100%;">
            <div class="panel-body">
                <div class="row">
    				<div class="col-lg-6">
                    	<form method="POST" enctype="multipart/form-data">
        				<div class="form-group">
                                <label style="color:#3a3a3a;">Choose Post Type</label>
                                <select class="form-control" name="main_menu" style=" width:200px; margin-bottom:20px;" id="select_type">
                                	<option>Select Post Type</option>
                                	<?php
										mysqli_query($conn,'SET NAMES utf8');
										$select2=mysqli_query($conn,"SELECT * FROM tbl_category where pr_id = 0 AND cat_id !=0"); 
										while($row_p=mysqli_fetch_array($select2)){
											$p_id = $row_p['cat_id'];
									?>
                                    <option value="<?php echo $row_p['cat_id'];?>"><?php echo $row_p['cat_title'];?></option>
                                    
                                    <?php } ?>
                                </select>
                            </div>
                            </form>
    				</div>
    				<!-- /.col-lg-6 -->
                </div>
                <!-- Row -->
            </div>
        </div>
     </div>
     </div>
<!-- row -->

