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

<?php



 $sql = "SELECT * FROM `edu_user_config` WHERE status='0' and user_password!='NULL'" ;
 // print_r($sql);
 $WorkAssignListings = $m->query($sql); 




/*
function sendSMSFuction($number,$message,$from)

{

  



  if(substr($number,0,1)=="3"){

  $to = "92".$number;

  }else if(substr($number,0,1)=="0"){

  $to =  "92".substr($number,1);

  }

  else if(substr($number,0,2)=="92"){

  $sendmsg1 =  $number;

  }

  else{

   $to = "Invalid Number";

  }



  $username = SMSAPI_USER;

  $password = SMSAPI_PASS;

  

  if($from!="" || $from!=NULL ){

    $from = $from;   

  }else {      

    $from=$_SESSION['brand'];  

  }



$url = "http://lifetimesms.com/json";



$parameters = array("username" =>$username ,

                  "password" => $password,

                  "to" => $to,

                  "from" => $from,

                  "message" => $message

                );





  $ch = curl_init();

  $timeout  =  30;

  curl_setopt($ch, CURLOPT_URL, $url);

  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

  curl_setopt($ch, CURLOPT_HEADER, 0);

  curl_setopt($ch, CURLOPT_POST, 1);

  curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters);

  curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);

  $response = curl_exec($ch);

  curl_close($ch);



   return $response;

}*/



 ?>

<!DOCTYPE html>
<html lang="en">
  <head>
   
    <title> View Students | EduPortal </title>
     <?php include('RootMe/css_links.php');?> 
  </head>
  


  <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="row" style="background-color: white;">
  

<section class="add_sub_agent" id="table_sub_agent">
  <div class="container">



<table id="listofstudents" class="table table-striped table-bordered" style="width:100%">
  <input onClick="return confirm('Are you sure you want to struck of all students course completed?');" class="btn btn-primary pull-right" type="submit" name="Delete" value=" Struck of as Course Completed">
  
   
        <thead>
            <tr>

              
                <th width="5%">S.No</th>
                <th width="20%">Student Name</th>
                <th width="10%">Father Name</th>
                <th width="10%">Registration</th>
                <th width="10%"> rollNo </th>
                <th width="15%"> CellNo </th>
                <th width="10%"> DOA </th>
                <th width="10%"> DOB</th>
                <th width="10%"> Address</th>
                <th width="8%">class_id </th>
                <th width="8%">section </th>
                <th width="3%"> gender</th>
                <th width="3%"> monthlyFee</th>

               
                
            </tr>
        </thead>
        <tbody>


   
     
     <?php 
     //echo $_SESSION['branch'];
$count=1;
      foreach($WorkAssignListings as $WorkAssignListVal)
      { 

      
    




      $name=$WorkAssignListVal['user_fname'];

      $number=$WorkAssignListVal['cell_no'];

      $user_email=$WorkAssignListVal['user_email'];

      $user_password=$WorkAssignListVal['user_password']; 

      $NAMENAME='COMPUTECH'; 

      $msg ="Dear " .$name.",

      It is to inform you that your password for the EduPortal has been changed to keep your account more secure.

      Your Email:".$user_email." 

      Your Password:".$user_password;

  //  echo "<pre>"; print_r($msg); echo "</pre>";
  

  //$result=sendSMSFuction($number,$msg,$NAMENAME);

        
      } ?>

        

    
 
        </tbody>
        
    </table>

  </div>

    </form>

    <br><br>


  </div>
  <div class="clearfix"></div>
</section>

        </div> 
        </div>


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


     
        <!-- /page content -->


 <!-- jQuery -->
    <script src="js/ajax_functions.js"></script>
  <?php include('RootMe/js_linksscript.php');?> 
  <!-- Links for Datatable-->

<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
 <script>
        
  $(document).ready(function() {
    $('#listofstudents').DataTable({
      "pageLength": 100
    });
    } 
  );

  $("#checkAll").change(function () {

      $("input:checkbox").prop('checked', $(this).prop("checked"));
  });


</script>
  
  </body>
</html>
