
<table id="dt-basic-example" class="table table-hover table-striped w-100">
    <thead class="bg-primary-500">
        <tr>
            <th></th>
            <th>CODE</th>
            <th>PROJECT</th>
            <th>PERIOD</th>
            <th>PHYSICAL PROGRESS</th>
        </tr>
    </thead>
    
    <tbody>
        <?php 
            $n=0;
            $sth = $db->prepare('SELECT *FROM tbl_projects p
            INNER JOIN tbl_clients c ON c.ct_id=p.clnt ORDER BY projid DESC');
            $sth->execute();
            while($getp = $sth->fetch()){
            $projid = $getp['projid'];
            $wrkp = $getp['wps'];
            $n++;
        ?>
            <tr class="beam-dir" href="bm?b=boxp&pID=<?php echo $projid;?>" style="cursor: pointer;">
                <td><i class="fa fa-share" aria-hidden="true"></i></td>
                <td><?php echo $getp['codeproj'];?></td>
                <td><?php echo $getp['projname'];?></td>
                <td>
                    <?php echo date('d/m/Y', strtotime($getp['signdate']));?> <i class="fa fa-arrow-right" aria-hidden="true"></i>
                    <?php echo date('d/m/Y', strtotime($getp['startDue']));?><br>
                    <i style="color: #"><?php echo $getp['durat']." Month(s)";?></i>           
                </td>
                <td> 
                <div class="demo js-progress-animated">
                    <div class="progress progress-lg">
                        <div class="progress-bar progress-bar-striped bg-primary-500" role="progressbar" style="width: <?php echo $wrkp;?>%" aria-valuenow="<?php echo $wrkp;?>" aria-valuemin="0" aria-valuemax="100"><?php echo $wrkp;?>%</div>
                    </div>
                </div>
                </td>
            </tr>
        <?php }?>
    </tfoot>
</table>

<script>
    $(document).ready(function(){
    $('.beam-dir').click(function(){
        window.location = $(this).attr('href');
        return false;
        });
    });
</script>




