 <?php 
include("homepage.php"); 
include('connection.php'); 
  ?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo constant("title"); ?></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/animate.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/li-scroller.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/slick.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/theme.css">
<link rel="stylesheet" type="text/css" href="../pages/assets/css/style.css">
<script type="text/javascript" src="../pages/assets/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../pages/assets/js/jquery-ui.js"></script>    
<script type="text/javascript" src="../pages/assets/js/modernizr.js"></script>
<script type="text/javascript" src="../pages/assets/js/responsee.js"></script> 
<!--[if lt IE 9]>
<script src="../assets/js/html5shiv.min.js"></script>
<script src="../assets/js/respond.min.js"></script>
<![endif]-->

<script>

var sub_dept_code;
var dept_code;


function mydisplay(sub_dept_code, dept_code) 
{
 // alert('hiii'); 
//var vname=document.getElementById('vname').value;

//var srno=document.getElementById('srno').value;		
//var dept_code=document.getElementById('dept_name').value;		
//var sub_dept_name=document.getElementById('sub_dept_name').value;		

//alert (dept_name);

	if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4)
		 {

				var msg=xmlhttp.responseText;
				//alert(msg);
					
				document.getElementById('display').innerHTML=msg;

					}
}

			var res ="?dept_code="+dept_code+"&sub_dept_code="+sub_dept_code; 
//alert(res);
		xmlhttp.open("POST", "dept_display.php" + res, true); 
		xmlhttp.send(null); 
		//document.getElementById('submit').disabled=true;
					 
			// curr();	
}


	
</script>




<style>
#nv_menu a:hover{

background:rgb(221,97,47);
color:white;
} 

hr{
background-color:black; height: 1px; border: 0;}


#parentMenu {
  display: block;
  top: 0;
}
/* Helps position submenu */
.dropdown-submenu {
  position: relative;
}
/* Menus under the submenu should show up on the right of the parent */
.dropdown-submenu>.dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
  margin-left: -1px;
  -webkit-border-radius: 0 6px 6px 6px;
  -moz-border-radius: 0 6px 6px 6px;
  border-radius: 0 6px 6px 6px;
}
/* Make submenu visible when hovering on link */
.dropdown-submenu:hover>.dropdown-menu {
  display: block;
}
/* Add carot to submenu links */
.dropdown-submenu>a:after {
  display: block;
  float:right;
  /*simple */
  content: "?";
  color: #cccccc;
  /* looks a little better */
  content: " ";
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 5px 0 5px 5px;
  border-left-color: #cccccc;
  margin-top: 5px;
  margin-right: -10px;
}
/* Change carot color on hover */
.dropdown-submenu:hover>a:after {
  border-left-color: #ffffff;
}




.dropdown-submenu {
    position: relative;
}

.dropdown-submenu>.dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
    -webkit-border-radius: 0 6px 6px 6px;
    -moz-border-radius: 0 6px 6px;
    border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover>.dropdown-menu {
    display: block;
}

.dropdown-submenu>a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
}

.dropdown-submenu:hover>a:after {
    border-left-color: #fff;
}

.dropdown-submenu.pull-left {
    float: none;
}

.dropdown-submenu.pull-left>.dropdown-menu {
    left: -100%;
    margin-left: 10px;
    -webkit-border-radius: 6px 0 6px 6px;
    -moz-border-radius: 6px 0 6px 6px;
    border-radius: 6px 0 6px 6px;
}
.nav > li:hover > ul {
  left: auto;
 
}
  .nav > li:last-child >{border-radius: 0 4px 0 0; }
  
   /* submenu positioning*/
.nav ul {
  position: absolute;
 

 
  left: -99999em;
}
.nav > li:hover > ul {
  left: auto;
 
}
.panel-heading {
    padding: 6px 7px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    
}
.panel-default > .panel-heading {
    color: #333;
    background-color:white;
}
.panel-default {
    border-color:white;
}
.panel-group .panel-heading + .panel-collapse > .panel-body, .panel-group .panel-heading + .panel-collapse > .list-group {
    border-top: 0px solid white;
}
#third
{
padding-left:14%;	
	}
	.singleleft_inner {
    background-color: #FFFFFF;
    display: inline;
    float: left;
    padding: 15px;
    width: 70%;
}

</style>
<script>

$('#english').click(function(){  
        //alert(window.location.href);  
          var english=document.getElementById('english').text;
          
                  //  document.getElementById('para').style.visibility = "hidden";      
            $.ajax({
              url: "homepage.php",
           type     : 'GET',
             data: ({english: english}),
                  cache: false,
                  dataType: "text",
                  success: onSuccess
                });
    $("#resultLog").ajaxError(function(event, request, settings, exception) {
          $("#resultLog").html("Error Calling: " + settings.url + "<br />HTTP Code: " + request.status);
        });
function onSuccess(data)
        {
       // alert(data);
      $("#resultLog").html("Result: " + data);
      var english1=document.getElementById('english').text;      
      if (typeof(Storage) != "undefined") 
    {
    localStorage.setItem("type", english1);

     }	
     // window.location.href='index.php?english='+english1;
      window.location.href='dept_list1.php?english='+localStorage.getItem("type");
        }
        });
         
    
    $('#marathi').click(function(){    
          var marathi=document.getElementById('marathi').text;   
        //  document.getElementById('para').style.visibility = "hidden";
            $.ajax({
              url: "homepage.php",
           type     : 'GET',
             data: ({marathi: marathi}),
                  cache: false,
                  dataType: "text",
                  success: onSuccess
                });
    $("#resultLog").ajaxError(function(event, request, settings, exception) {
          $("#resultLog").html("Error Calling: " + settings.url + "<br />HTTP Code: " + request.status);
        });
function onSuccess(data)
        {
       // alert(data);
      $("#resultLog").html("Result: " + data);
      var marathi1=document.getElementById('marathi').text;  
      if (typeof(Storage) != "undefined") 
    {
    localStorage.setItem("type", marathi1);

     }	    
      window.location.href='dept_list1.php?marathi='+localStorage.getItem("type");
        }
        });
        

function typeeng()
{
//alert('hello');
	 var type1=localStorage.getItem("type");  
 window.location.href="dept_list1.php?english="+type1;
	
	}    
  
   function typemarathi()
{
//alert('hello');
	 var type1=localStorage.getItem("type");  
 window.location.href="dept_list1.php?marathi="+type1;
	
	}     

</script>
</head>
<body>

 <div id="preloader">
  <div id="status">&nbsp;</div> 
      
</div> 
<a class="scrollToTop" href="#" style="background-color:rgb(221,97,47);"><i class="fa fa-angle-up"></i></a>
<div class="container">
  <div class="box_wrapper">
    
     <header id="header" style="border-color:rgb(221,97,47);">
     <?php include("header.php") ?> 
     
     </header>

      <!-- <div class="header_top" style="border-color:rgb(221,97,47);">
      
      
      </div>

      <img src="../images/mainbannernew.png"  style="margin-left:0%;" alt="" class="img-responsive"  />
         -->
    
    <section id="contentbody">
      <div class="row">
       <!-- <div class="col-lg-2 col-md-2 col-sm-4 col-xs-12"> -->
        <div class="col-lg-3 col-sm-3">
          <div class="row">
            <div class="left_bar">
              <div class="single_leftbar">
                <h2><span style="background-color:rgb(221,97,47);">Department and Planning</span></h2>
                <div class="singleleft_inner">
                  
                  <ul class="recentpost_nav wow fadeInDown" id="depts">
                 
					<?php 
	
			     $dept="SELECT * FROM `dept_sub_category` ";//where dept_code='$depart_id'";
    					$res = mysqli_query($GLOBALS["___mysqli_ston"], "SET NAMES utf8");	                                      
							$res=mysqli_query($GLOBALS["___mysqli_ston"], $dept) or die('Query Failed: 4' . mysqli_error($GLOBALS["___mysqli_ston"]));
							while($rw = mysqli_fetch_assoc($res))
								{
									//$sno=$rw['srno'];
									$deptt_nm=$rw['dept_name'];
									$deptt_code=$rw['dept_id'];
									//echo $deptt_nm;
									//echo	$deptt_code;
									echo '<li class="dropdown-submenu"> <a class="recent_title" tabindex="-1" href="#" style="color:rgb(221,97,47);">'.$deptt_nm.'</a>';
								
									echo '<ul class="dropdown-menu" id="secul" style="margin-left:-14px;">';
								
									$dept1="SELECT * FROM `main_sub_dept_cat1` WHERE sub_dept_id = $deptt_code";
    								$res1 = mysqli_query($GLOBALS["___mysqli_ston"], "SET NAMES utf8");	                                      
									$res1=mysqli_query($GLOBALS["___mysqli_ston"], $dept1) or die('Query Failed: 4' . mysqli_error($GLOBALS["___mysqli_ston"]));
									while($rw1 = mysqli_fetch_assoc($res1))
										{
											//$sno=$rw['srno'];
											$deptt_sub=$rw1['dept_sub_category'];
											$deptt_sub_code=$rw1['sub_dept_code'];
											//echo $deptt_nm;
											echo	$deptt_sub_code;
											echo '<a  href="#" align="center" style="color:rgb(221,97,47);" onclick="mydisplay('.$deptt_sub_code.','.$deptt_code.');"> &nbsp '.$deptt_sub.'  </a>';
							
										}
										echo '</ul>';
								
								}
					  ?>
					 
					  </li> 
											 
		             
                 </ul>
                  
                </div>
              </div>
              
              
            </div>
          </div>
        </div>
        <div class="col-lg-7 col-md-7 col-sm-8 col-xs-12" style="margin-left: 15%;"> 
		       
        <div class="col-lg-8 col-sm-8">
          <div class="row">
         
          <div id="display" style="margin-top:3%">
          
     
        
          </div>
          </div>
      
          </div>
        </div>
        
   
        <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
          <div class="row">
            <div class="right_bar">
              <div class="single_leftbar wow fadeInDown">
              </div>
            </div>
          </div>
        </div>
      </div>
    
<div style="height:210px;">    </div>    
          </section>
  
     </div>

    <div>
   
<?php include("footer.php");?> 
 
  </div>
  
</div>
<script src="../pages/assets/js/jquery.min.js"></script>
<script src="../pages/assets/js/wow.min.js"></script>
<script src="../pages/assets/js/bootstrap.min.js"></script>
<script src="../pages/assets/js/slick.min.js"></script>
<script src="../pages/assets/js/jquery.li-scroller.1.0.js"></script>
<script src="../pages/assets/js/custom.js"></script>
</body>
</html>