    <style type="text/css">
@font-face {
  font-family: 'Bangla';
  src: url('dist/fonts/SutonnyOMJ.ttf');
  font-weight: normal;
  font-style: normal;
}
@font-face{
  font-family: bangla;
  text-align: center;
  src: url(dist/fonts/SutonnyMJ.ttf);
}
.Bangla{font-family: Bangla;}
.Bangla{font-family: Bangla;}
.btn{font-family: Bangla;} 
#font{font-family: Bangla; font-size: 18px; text-align: center;}
#center{text-align: center;}

</style>

<div class="box box-default color-palette-box">
  <div class="box-header with-border">
    <h3 class="box-title"><i class="fa fa-fw fa-sort-numeric-asc"></i> স্টাফ লেভেল</h3>
  <a target="_blank" href="admission_permission_fee_print.php" class="btn btn-success pull-right"><i class="fa fa-fw fa-print"></i> <?php echo _print ?></a>
        </div>
  
<?php 
//update
if(isset($_POST['submit'])){

$teacher_id            = $_POST['teacher_id'];

$number= count($_POST["teacher_id"]);
if($number>0){
  for($i=0; $i<$number; $i++)
  {
    if($_POST["teacher_id"][$i] !=''){
      if ($_POST["teacher_id"][$i] !='' || $_POST["teacher_id"][$i] > 0) {
        
        $sql_selete = $con->query("SELECT teacher_id FROM teacher WHERE teacher.teacher_id='".mysqli_real_escape_string($con, $_POST["teacher_id"][$i])."'");
    
        if ($sql_selete->num_rows > 0) {
          $second_sql=$con->query("UPDATE teacher SET teacher_sr='".mysqli_real_escape_string($con, $_POST["teacher_sr"][$i])."'

           WHERE teacher.teacher_id='".mysqli_real_escape_string($con, $_POST["teacher_id"][$i])."'");
        }else{
 
    
 }}}} }
if (mysqli_query($con,$second_sql)===TRUE){

  echo '<div class="alert alert-danger" role="alert">সংরক্ষণ হয় নাই</div>';
}else {
    echo '<div class="alert alert-success" role="alert"><center>সফলভাবে সম্পাদন হয়েছে!</center></div>';
}
if($second_sql==true){  
echo '<meta http-equiv="refresh" content="2">';     
      }}
    

//selete
$sl=1;
$sql= mysqli_query($con, "SELECT teacher_sr, name, title FROM teacher WHERE status=1 AND gender=1");
$count= mysqli_num_rows($sql);




  echo '
  <table class="table table-hover">
   <tr>
     <th id="center">ক্রমিক</th>
     <th id="center">আইডি</th>
     <th id="center">নাম</th>
     <th id="center">পদবী</th>
     <th id="center">বেতন</th>
     <th id="center">লেভেল</th>
   </tr>';
?>

<form action="" method="post">
<?php 

$sql=mysqli_query($con,"SELECT  staff_division_id, staff_division_name, count(staff_division) as count  FROM `staff_division` 

INNER JOIN teacher ON teacher.staff_division=staff_division.staff_division_id
 WHERE staff_division.status=1   group by staff_division_name ORDER BY sl2 ASC"); 
    
   while($row_division = mysqli_fetch_assoc($sql)){           
   echo "<tr style='background-color:#bdc3bf75; text-align: center; height: 32px; font-size: 20px; font-family: bangla; '><td colspan='6' id='class'>$row_division[staff_division_name]= $row_division[count]</td></tr>";
$s=0;
$s=$s+1;

$result=mysqli_query($con,"SELECT teacher_sr, name, title, salary, teacher_id FROM teacher

 WHERE  staff_division='$row_division[staff_division_id]'   ORDER BY teacher_sr ASC");
while($row = mysqli_fetch_assoc($result)){



echo '
<tr>
    <td id="font">'.$sl++.'</td>
    <td id="font">'.$row['teacher_id'].'</td>
    <td id="font">'.$row['name'].'</td> 
    <input type="hidden" class="form-control" name="teacher_id[]" id="focusedInput" value="'.$row['teacher_id'].'">
    <td id="font">'.$row['title'].'</td>
    <td id="font">'.$row['salary'].'</td>
    <td><input id="font" type="text" class="form-control" name="teacher_sr[]" id="teacher_sr" value="'.$row['teacher_sr'].'" tabindex="4"></td>
</tr>';

}} 

echo '
<td></td>
<td></td>
  <td colspan="4"> <button type="submit" name="submit" class="btn btn-md btn btn-info btn-block text-uppercase"></i> '._save.'</button> </td>
';

    ?>
<td></td>
</table></form>
            <!-- /.col -->
          </div>
          <!-- /.row -->
        </div>
        <!-- /.box-body -->
      </div>
            <script>  
            function isInputNumber(evt){               
                var ch = String.fromCharCode(evt.which);         
                if(!(/[0-9]/.test(ch))){
                    evt.preventDefault();
                }             
            }
            function isInputResult(evt){          
                var ch = String.fromCharCode(evt.which); 
                if(!(/[0-9 ]/.test(ch))){
                    evt.preventDefault();
                }                
            }
        </script>