0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.133.122.95


Current Path : /var/www/html/oums/src/
Upload File :
Current File : /var/www/html/oums/src/popup_empl_events.php

<div class="list-group" style="text-align:left; cursor:pointer;">
    <?php
    include("sys_connect.php");
    include("sys_session.php");

    $mysql = "select * from (
    select e.femplcode,e.femplname,e.fempldesn,e.fdeptcode,fdeptname,'Birthday' as fevntremk,
    (case when femplstat='T' then 'Active' else 'Not Active' end) as femplstat,
    concat(date_format(fbrthdate,'%d %b'),' ',year(current_date)) as fevntdate
    from masempl e 
    left join masdept d on e.fdeptcode=d.fdeptcode 
    where date_format(fbrthdate,'%d-%m') = date_format(current_date,'%d-%m') 
    and femplstat='T' and fempltype='P' and e.fdeptcode not in ('DEP','IHF')) xtmp
    order by fevntdate,femplname";
    $myres = mysqli_query($mycon, $mysql);
    if (mysqli_num_rows($myres) > 0) {
        echo "<table class='table table-default'>";
        echo "<tr>";
        echo "<th class='text-left' colspan='3'>Birthday's</th>";
        echo "</tr>";

        echo "<tr>";
        echo "<th class='text-right'>#</th>";
        echo "<th class='text-left col-sm-5'>Empl Name</th>";
        echo "<th class='text-left col-sm-5'>Client</th>";
        echo "<th class='text-left col-sm-2'>Remarks</th>";
        echo "</tr>";
        $i = 1;
        while ($myrow = mysqli_fetch_assoc($myres)) {
            echo "<tr>";
            echo "<td class='text-right'> $i.</td>";
            echo "<td class='text-left'> [$myrow[femplcode]] $myrow[femplname]</td>";
            echo "<td class='text-left'> [$myrow[fdeptcode]] $myrow[fdeptname]</td>";
            echo "<td class='text-left'></td>";
            echo "</tr>";
            $i++;
        }
        echo "</table>";
    } else {
        echo "<div class='alert alert-info'>No Birthday Events!</div>";
    }


    $mysql = "select * from (
    select e.femplcode,e.femplname,e.fempldesn,e.fdeptcode,fdeptname,'Work Anniversary' as fevntremk,
    (case when femplstat='T' then 'Active' else 'Not Active' end) as femplstat,
    concat(date_format(fjoindate,'%d %b'),' ',year(current_date)) as fevntdate,
    year(current_date)-year(fjoindate) as ftotlyear
    from masempl e 
    left join masdept d on e.fdeptcode=d.fdeptcode 
    where date_format(fjoindate,'%d-%m') = date_format(current_date,'%d-%m') and date_format(fjoindate,'%Y') <> date_format(current_date,'%Y')
    and femplstat='T' and fempltype='P' and e.fdeptcode not in ('DEP','IHF')) xtmp
    order by fevntdate,femplname";
    $myres = mysqli_query($mycon, $mysql);
    if (mysqli_num_rows($myres) > 0) {
        echo "<table class='table table-default'>";
        echo "<tr>";
        echo "<th class='text-left' colspan='3'>Work Anniversary's</th>";
        echo "</tr>";

        echo "<tr>";
        echo "<th class='text-right'>#</th>";
        echo "<th class='text-left col-sm-5'>Empl Name</th>";
        echo "<th class='text-left col-sm-5'>Client</th>";
        echo "<th class='text-left col-sm-2'>Remarks</th>";
        echo "</tr>";
        $i = 1;
        while ($myrow = mysqli_fetch_assoc($myres)) {
            echo "<tr>";
            echo "<td class='text-right'> $i.</td>";
            echo "<td class='text-left'> [$myrow[femplcode]] $myrow[femplname]</td>";
            echo "<td class='text-left'> [$myrow[fdeptcode]] $myrow[fdeptname]</td>";
            echo "<td class='text-left'> $myrow[ftotlyear] year's</td>";
            echo "</tr>";
            $i++;
        }
        echo "</table>";
    } else {
        echo "<div class='alert alert-info'>No Work Anniversary Events!</div>";
    }
    ?>
</div>