<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); 

?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <title> Income & Expense Dashboard | EduPortal </title>
    <!-- bootstrap-progressbar -->
    <link href="../vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <?php include('RootMe/css_links.php');?>
    <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    <script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
     <!-- Flaticon CSS -->
    <link rel="stylesheet" href="fonts/flaticon.css">
       
    <link rel="stylesheet" href="stylebox.css">

  </head>
<input type="hidden" name="month" id="month" value="<?php echo $_REQUEST['month'];?>">
<input type="hidden" name="session" id="session" value="<?php echo $_REQUEST['session'];?>">
  <script type="text/javascript">

function getBranchData(str)
{
  //alert(str);



var ajx;  // The variable that makes Ajax possible!

if(window.XMLHttpRequest)
ajx=new XMLHttpRequest();
ajx.onreadystatechange = function()
{

if(ajx.readyState == 4)
{
//alert(ajx.responseText); 
document.getElementById("inActiveStudents").innerHTML= ajx.responseText;
document.getElementById("inActiveStudents").style.display="block";
document.getElementById("msg").style.display="none";
}
}
ajx.open("GET", "get_data_against_branch.php?branch="+str,true);
ajx.send(); 

}

</script>
  
  <body class="nav-md" >
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
        <?php include('RootMe/sidebar.php');?>

        <?php include('RootMe/header.php');?>
     
        <!-- page content -->


        <div class="right_col" role="main">
  
          <div class="">
            <div class="row top_tiles">

<div style="background-color: white; margin-bottom: 10px; padding: 20px;">

 <h3 style="text-align: center;">Multi Branches Dashboard</h3>

</div>

<div class="col-md-12">
<div class="col-md-3 col-xs-12 pull-right" style="padding: 8px; background-color: white;">              

<select name="active_inactive" id="active_inactive" style="background-color:white;" class="form-control" onChange="getBranchData(this.value)" >

<option value="">Select Branch</option>

<?php
// get mutli branches
$multi="SELECT branch_id,Branch_Name  FROM edu_branch_config WHERE multi_branch_code=".$_SESSION['multi_branch_code'];

$multiBranchs = $m->query($multi);
foreach($multiBranchs as $multiBranch)
{ ?>

<option <?php if($expdata[0]['subcategory_id']==$multiBranch['branch_id']){echo "selected";} ?>  value="<?php echo $multiBranch['branch_id']; ?>"><?php echo $multiBranch['Branch_Name']; ?></option>


<?php }    ?>

</select>

</div>
</div>                                   

<br><br>

<div class="alert alert-danger" id="msg">
<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
<strong>Danger!</strong> Please choose branch for view records........
</div>


</div> <!-- end active students box -->

<div class="col-md-12" id="inActiveStudents" style="display: none;">

</div>            





</ul>
</div>

              </div>

              
                
    </div>
    </div>
          
            </div>
          </div>
        </div>
        <!-- /page content -->
  

    <?php include('RootMe/js_linksscript.php');?>


  </body>
</html>
