MMCT TEAM
Server IP : 2a02:4780:3:2287:0:3736:a38e:8  /  Your IP : 216.73.217.17
Web Server : LiteSpeed
System : Linux sg-nme-web2187.main-hosting.eu 5.14.0-611.54.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 6 18:03:03 EDT 2026 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u926327694/domains/smsoft.in/public_html/smart/tmp/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/smart/tmp/../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/>
        <?php
            $today_date = Date('Y-m-d');
            $overall_count = mysqli_query($con, "SELECT id FROM whatsapp_track_master_log");
            $overall_count_result = mysqli_num_rows($overall_count);
            
            $today_overall_count = mysqli_query($con, "SELECT id FROM whatsapp_track_master_log WHERE DATE(created_on)='$today_date'");
            $today_overall_count_result = mysqli_num_rows($today_overall_count);
        ?>
        <div class="row mb-3">
            <div class="col-md-6">
                <div class="card text-center border-primary">
                    <div class="card-body">
                        <h6 class="text-muted">Today's WhatsApp Usage</h6>
                        <h3 class="text-primary mb-0">
                            <?php echo $today_overall_count_result; ?>
                        </h3>
                    </div>
                </div>
            </div>
        
            <div class="col-md-6">
                <div class="card text-center border-success">
                    <div class="card-body">
                        <h6 class="text-muted">Total WhatsApp Usage</h6>
                        <h3 class="text-success mb-0">
                            <?php echo $overall_count_result; ?>
                        </h3>
                    </div>
                </div>
            </div>
        </div>
        <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>
                <th scope="col" class="p-2">Status</th>
                <th scope="col" class="p-2">Principal No.</th>
                <th scope="col" class="p-2">Clerk No.</th>
                <th scope="col" class="p-2">Whatsapp Usage (Today/Total)</th>
              </tr>
            </thead>
            <tbody>
                <?php 
                    $index = 1;
                    $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=2026-27" 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 id 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 id 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>
                <td class="p-2"><?php echo $row_school['Status']; ?></td>
                
                <td class="p-2"><?php echo $row_school['principal_number']; ?></td>
                <td class="p-2"><?php echo $row_school['clerk_number']; ?></td>
                <?php
                    // Total count
                    $all_count_q1 = mysqli_query($con, "SELECT id FROM whatsapp_track_master_log WHERE school_code='$school_code'");
                    $all_count1 = mysqli_num_rows($all_count_q1);
                    
                    // Today's count
                    $today_count_q1 = mysqli_query($con, "SELECT id FROM whatsapp_track_master_log WHERE school_code='$school_code' AND DATE(created_on)='$today_date'");
                    $today_count1 = mysqli_num_rows($today_count_q1);
                ?>
                <td class="p-2 text-center">
                    <div class="mb-2">
                        <span class="badge bg-primary">
                            Today: <?php echo $today_count1; ?>
                        </span>
                        <span class="badge bg-success">
                            Total: <?php echo $all_count1; ?>
                        </span>
                    </div>
                
                    <a href="https://smart.smsoft.in/whatsapp-message-track-log.php?school_code=<?php echo $school_code; ?>&pwd=QWRtaW5AMTIz"
                       class="btn btn-sm btn-outline-primary" style="font-size: 12px;padding: 2px 8px;"
                       target="_blank">
                        <i class="fa fa-eye"></i> View Log
                    </a>
                </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