MMCT TEAM
Server IP : 2a02:4780:3:1493:0:3736:a38e:7  /  Your IP : 216.73.216.60
Web Server : LiteSpeed
System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u926327694/domains/smsoft.in/public_html/demo/fonts/../../smart/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/demo/fonts/../../smart/school-details.php
<?php
    if(isset($_GET['pwd']) && base64_encode("Admin@123")==$_GET['pwd'])
    {
        include"config.php";
        $servername = "localhost";
        $username = "u926327694_raghuadmin1233";                
        $password = "Raghu@48221";
        $dbname = "u926327694_admin_onlinefe";
        
        $con1=mysqli_connect($servername,$username,$password,$dbname);
        if(!$con1)
        {
            echo"Connection failed"; exit;
        }
    ?>
    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>School List</title>
      <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
      <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap4.min.css">
      <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.5/css/buttons.bootstrap4.min.css">
    </head>
    <body>
      <div style="padding:10px;">
        <a class="btn btn-primary" target="_blank" href="https://smsoft.in/smart-auto-att/cron_log.log">Smart Auto Attendance Log</a>
        <a class="btn btn-primary" target="_blank" href="https://smsoft.in/smart-auto-att/halfday_cron_log.log">Smart Auto Half Day Log</a>
        <a class="btn btn-primary" target="_blank" href="https://smsoft.in/smart-db-bkp/cron_log.log">Smart DB Backup Log</a>
        <a class="btn btn-primary" target="_blank" href="https://smsoft.in/auto-att/cron_log.log">Smsoft Auto Attendance Log</a>
        <a class="btn btn-primary" target="_blank" href="https://smsoft.in/admin/cron_log.log">Smsoft DB Backup Log</a>
        <br/><br/>
        <h2>Smart Campus</h2>
        <div class="table-responsive">
          <table class="table table-striped table-bordered" id="smart_campus" style="width:100%">
            <thead class="bg-primary text-white">
              <tr>
                <th scope="col" class="p-2">#</th>
                <th scope="col" class="p-2">Name</th>
                <th scope="col" class="p-2">Code</th>
                <th scope="col" class="p-2">Today / All Login Count</th>
                <th scope="col" class="p-2">Last Login</th>
                <th scope="col" class="p-2">Machine ID</th>
                <th scope="col" class="p-2">Is Active</th>
                <th scope="col" class="p-2">Expiry Date</th>
              </tr>
            </thead>
            <tbody>
                <?php 
                    $index = 1;
                    $today_date = Date('Y-m-d');
                    $sel_School = mysqli_query($con,"select * from schools order by bio_machine_id desc");
                    while($row_school = mysqli_fetch_array($sel_School)) {
                        $school_code = $row_school['school_code'];
                ?>
              <tr>
                <th scope="row" class="p-2"><?php echo $index; ?></th>
                <td class="p-2"><a href="https://smart.smsoft.in/daily_report.php?code=<?php echo $row_school['school_code']; ?>&session_year=2025-26" target="_blank"><?php echo $row_school['school_name']; ?></a></td>
                <td class="p-2"><?php echo $school_code; ?></td>
                <?php
                    // Total count
                    $all_count_q = mysqli_query($con, "SELECT * FROM login_log WHERE school_code='$school_code'");
                    $all_count = mysqli_num_rows($all_count_q);
                    
                    // Today's count
                    $today_count_q = mysqli_query($con, "SELECT * FROM login_log WHERE school_code='$school_code' AND DATE(login_date)='$today_date'");
                    $today_count = mysqli_num_rows($today_count_q);
                    
                    $lastlogin_query = mysqli_query($con, "SELECT * FROM login_log WHERE school_code='$school_code' AND DATE(login_date)='$today_date' order by login_date desc LIMIT 1");
                    $lastlogin = '';
                    while($res_lastlogin = mysqli_fetch_array($lastlogin_query)) {
                        $lastlogin = date("d-m-Y h:i:s A", strtotime($res_lastlogin['login_date']));
                    }
                ?>
                <td class="p-2"><?php echo $today_count." / ".$all_count; ?></td>
                <td class="p-2"><?php echo $lastlogin; ?></td>
                <td class="p-2"><?php echo $row_school['bio_machine_id']; ?></td>
                <td class="p-2"><?php echo ($row_school['is_active'] == '1') ? 'Yes' : 'No'; ?></td>
                <td class="p-2"><?php echo Date("d-m-Y",strtotime($row_school['expiry_date'])); ?></td>
                <?php
                    $index = $index + 1;
                    }
                ?>
              </tr>
            </tbody>
          </table>
        </div>
        <br/>
        <h2 style="mt-5">Smsoft Campus</h2>
        <div class="table-responsive">
          <table class="table table-striped table-bordered" id="smsoft_campus" style="width:100%">
            <thead class="thead-dark">
              <tr>
                <th scope="col" class="p-2">#</th>
                <th scope="col" class="p-2">Name</th>
                <th scope="col" class="p-2">Code</th>
                <th scope="col" class="p-2">Machine ID</th>
                <th scope="col" class="p-2">Is Active</th>
                <th scope="col" class="p-2">Expiry Date</th>
              </tr>
            </thead>
            <tbody>
                <?php 
                    $index = 1;
                    $sel_School = mysqli_query($con1,"select * from schools order by bio_machine_id desc");
                    while($row_school = mysqli_fetch_array($sel_School)) {
                ?>
              <tr>
                <th scope="row" class="p-2"><?php echo $index; ?></th>
                <td class="p-2"><a href="https://smsoft.in/demo/student_management_system/pages/daily_report.php?code=<?php echo $row_school['schoolCode']; ?>" target="_blank"><?php echo $row_school['schoolname']; ?></a></td>
                <td class="p-2"><?php echo $row_school['schoolCode']; ?></td>
                <td class="p-2"><?php echo $row_school['bio_machine_id']; ?></td>
                <td class="p-2"><?php echo ($row_school['IsActive'] == '1') ? 'Yes' : 'No'; ?></td>
                <td class="p-2"><?php echo Date("d-m-Y",strtotime($row_school['endingDate'])); ?></td>
                <?php
                    $index = $index + 1;
                    }
                ?>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      
      <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
      <script src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script>
      <script src="https://cdn.datatables.net/1.10.21/js/dataTables.bootstrap4.min.js"></script>
      <script src="https://cdn.datatables.net/buttons/1.6.5/js/dataTables.buttons.min.js"></script>
      <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.bootstrap4.min.js"></script>
      <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.html5.min.js"></script>
      <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.print.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
    
      <script>
        $(document).ready(function() {
          $('#smart_campus').DataTable({
            dom: 'Blfrtip',
            buttons: [
              'copy', 'csv', 'excel', 'pdf', 'print'
            ],
            paging: true,
            searching: true,
            ordering: true,
            lengthChange: true,
            pageLength: 25,
          });
          
          $('#smsoft_campus').DataTable({
           dom: 'Blfrtip',
            buttons: [
              'copy', 'csv', 'excel', 'pdf', 'print'
            ],
            paging: true,
            searching: true,
            ordering: true,
            lengthChange: true,
            pageLength: 25,
          });
        });
      </script>
    </body>
    </html>
<?php } ?>

MMCT - 2023