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

$default;
    
    if($_GET["month"]!=NULL ){
      $default= $_GET["month"];
    }
    else{
      $default= date("m");
    }

 
    $date=date('m-d');

    $branch=$_SESSION['branch'];
  $date2=date('Y');
  $session=$_SESSION['current_session'];

  $sql="SELECT * FROM edu_student_details WHERE branch_id='$branch' and status=0 and entrance_date like '$date2-%'";
//print_r($sql);
  $currentSession_admission=$m->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <title> Admission & Widthdrawal Stats | 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">

<style>

@media only screen and (max-width: 768px) {

    /* For mobile phones: */

     .quiklink{
      width: 48%;
      float: left;
    }

}

@media (min-width:801px)  { /* tablet, landscape iPad, lo-res laptops ands desktops */

  .quiklink{
      width: 12%;
      float: left;
      margin-bottom: 10px;
    }

  }

ul.widget_tally .month {
    width: 70%;
    float: left;
    text-align: left;
}
#myChart {
  height:100%;
  width:100%;
  min-height:400px;
}

.zc-ref {
  display: none;
}
zing-grid[loading]{height:450px;}


.tile-stats .icon i{
  font-size: 35px; 
}

.vl {
  border-left: 1px solid lightgray;
  height: 40px;
  position: absolute;
  left: 50%;
  margin-left: -3px;
  margin-top: 24px;
}

</style>


  <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="">

     <a href="<?php echo $_SESSION['dashboard'];?>">Dashboard </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 
       
     Admissions & Widhdraw Stats

      <br><br>


            <div class="row top_tiles">

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

  <!-- <a href="more_statistics.php" class="btn btn-round btn-primary quiklink"style="font-size:12px;">Adm & Attendance Stats</a> -->
  <a href="students_reports.php" class="btn btn-round btn-info quiklink">Students Report</a>
  <a href="mark_attend.php" class="btn btn-round btn-primary quiklink">Mark Attendance</a>
  <a href="new_sms.php" class="btn btn-round btn-success quiklink">New SMS</a>
  <a href="sent_message.php" class="btn btn-round btn-primary quiklink">View Sent SMS</a>
  <a href="view_challan.php" class="btn btn-round btn-info quiklink">View Challan</a>
  <a href="families.php" class="btn btn-round btn-warning quiklink">Families</a>
  <a href="monthly_attendance.php" class="btn btn-round btn-danger quiklink">Emp Attendance</a>
  <a href="cv_bank.php" class="btn btn-round btn-primary quiklink">CV Bank</a>
  <a href="print_daily_income_exp_report.php" class="btn btn-round btn-warning quiklink" >
  Daily Closing</a>
  <a href="add_expenses.php" class="btn btn-round btn-info quiklink">Expenses</a>
  <a href="print_profitloss_report.php" class="btn btn-round btn-dark quiklink">Monthly Closing</a>
  <a href="user_audit_report.php" class="btn btn-round btn-danger quiklink">Users Activities</a>  
  <a href="fee_reporting.php" class="btn btn-round btn-info quiklink">Fee Reports</a>
  <a href="user_access.php" class="btn btn-round btn-success quiklink">User Access</a>  
  <a href="parents_id.php" class="btn btn-round btn-info quiklink">View Parents IDs</a>
  <a href="old_student_profile.php" class="btn btn-round btn-dark quiklink">Old Students</a>
  
</div>

             <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                <a href="manage_students.php?date=today">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-yellow">
                                        <i class="flaticon-user text-orange"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content">
                                        <div class="item-title">Today Admissions</div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span><?php echo todayAdmissions($m);?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a> 
                    
            </div>

               <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">

                  <a href="manage_students.php?fee=1&class_id=All&session=<?php echo $_SESSION['current_session'];?>&from=<?php echo date("01-m-Y");?>&to=<?php echo date("t-m-Y");?>">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-magenta">
                                        <i class="flaticon-multiple-users-silhouette text-magenta"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content">
                                        <div class="item-title">Admissions (<?php echo date("M");?>) </div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        <?php echo currentMonthAdmissions($m);?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                  </a>  
            </div>

               <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                 <a href="manage_students.php?sessionAdmission=session">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-blue">
                                        <i class="flaticon-multiple-users-silhouette text-blue"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content">
                                        <div class="item-title">Admissions (Yearly)</div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        <?php echo count($currentSession_admission);?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                      </a>
                    
            </div>

               <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                <a href="list_of_old_students.php?fee=1&class_id=All&session=<?php echo $_SESSION['current_session'];?>&from=<?php echo date('Y-m-d');?>&to=<?php echo date('Y-m-d');?>&date=today">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-red">
                                        <i class="flaticon-user text-red"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content">
                                        <div class="item-title">Today Struck Off</div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        <?php echo todayStuckOff($m);?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                     
                    </a>
            </div>

            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                 <a href="list_of_old_students.php?fee=1&class_id=All&session=<?php echo $_SESSION['current_session'];?>&from=<?php echo date("01-m-Y");?>&to=<?php echo date("t-m-Y");?>">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-blue">
                                        <i class="flaticon-user text-blue"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content">
                                        <div class="item-title">Struck Off (<?php echo date("M");?>)</div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        <?php echo currentMonthStuckOff($m);?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                     
                 </a>  
            </div>

            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                 <a href="contacts.php">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-green">
                                        <i class="flaticon-multiple-users-silhouette text-green"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content">
                                        <div class="item-title">Total Contacts </div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        <?php echo totalContacts($m);?></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                     
                 </a>  
            </div>

             



<!-- 

<div class="col-md-3 col-sm-12 col-xs-12 widget_tally_box">
                        <div class="x_panel ui-ribbon-container fixed_height_490">
                          
                          <div class="x_title">
                            <h4> SMS Usage <span>(<?php echo $current_month; ?>)</h4>
                            <div class="clearfix"></div>
                          </div>
                          <div class="x_content">

                            <div style="text-align: center; margin-bottom: 17px">
                              <span class="chart" data-percent="<?php echo getCurrentMonthUsedSmsPercentage($m);  ?>">
                              <span class="percent"></span>
                              </span>
                            </div>

                            <h4 class="name_title">SMS Limit (<?php echo getCurrentMonthTotalSms($m); ?>)</h4>
                            
                            <div class="divider"></div>

                              <div>
                              <ul class="list-inline widget_tally">
                                <li>
                                  <p>
                              <a href="sent_message.php?<?php echo session_id().session_id().session_id().session_id();?>&session=<?php echo date('Y');?>&month=<?php echo date('m'); ?>&type=fee">
                                    <span class="month">Fee SMS </span>
                                    <span class="count"><?php echo getCurrentMonthFeeSms($m)+0; ?></span>
                              </a>
                                  </p>
                                </li>
                                <li>
                                  <p>
                                <a href="sent_message.php?<?php echo session_id().session_id().session_id().session_id();?>&session=<?php echo date('Y');?>&month=<?php echo date('m'); ?>&type=result">
                                    <span class="month">Result SMS </span>
                                    <span class="count"><?php echo getCurrentMonthResultSms($m)+0; ?></span>
                                </a>
                                  </p>
                                </li>
                                <li>
                                  <p>
                                <a href="sent_message.php?<?php echo session_id().session_id().session_id().session_id();?>&session=<?php echo date('Y');?>&month=<?php echo date('m'); ?>&type=other">
                                    <span class="month">Other SMS </span>
                                    <span class="count"><?php echo getCurrentMonthOtherSms($m)+0; ?></span>
                                </a>
                                  </p>
                                </li>


                                <li>
                                  <p>
                                <a href="sent_message.php?<?php echo session_id().session_id().session_id().session_id();?>&session=<?php echo date('Y');?>&month=<?php echo date('m'); ?>&type=att">
                                    <span class="month">Attendance SMS </span>
                                    <span class="count"><?php echo getCurrentMonthAttendanceSms($m)+0; ?></span>
                                </a>
                                  </p>
                                </li>

                                <li>
                                  <p>
                                <a href="sent_message.php?<?php echo session_id().session_id().session_id().session_id();?>">
                                    <strong><span class="month"> Total SMS Used </span>
                                    <span class="count">
                                      <?php echo number_format(getCurrentMonthFeeSms($m)+getCurrentMonthResultSms($m)+getCurrentMonthOtherSms($m)+getCurrentMonthAttendanceSms($m)+0); ?></span> </strong>
                                </a>
                                  </p>
                                </li>


                              </ul>
                            </div>

                          </div>
                        </div>
                      </div>
                            

                             -->


     

               


              </div>

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

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

  </body>
</html>
