45 lines
2.1 KiB
PHP
45 lines
2.1 KiB
PHP
<div class="card" onclick="window.location='task_master.php'">
|
|
<div class="card-header border-transparent">
|
|
<h4 class="card-title"><a href="task_master.php" style="cursor: pointer !important;">Task List</a></h4>
|
|
</div>
|
|
<!-- /.card-header -->
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table m-0" >
|
|
<thead>
|
|
<tr style="color:black;">
|
|
<th style="background-color:white"><strong>Sr.</strong></th>
|
|
<th style="background-color:white"><strong>Task Name</strong></th>
|
|
<th style="width: 12%;background-color:white"><strong>Date</strong></th>
|
|
<th style="background-color:white"><strong>Frequency</strong></th>
|
|
<th style="background-color:white"><strong>Status</strong></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php
|
|
|
|
date_default_timezone_set('Asia/Kolkata');
|
|
$current_date= date('Y-m-d', strtotime('today'));
|
|
$next_date = date('Y-m-d', strtotime('+30 days'));
|
|
$sql="SELECT A.*, B.TASK_ID, B.TASK_DATE, B.status FROM task_master A LEFT JOIN task_master_status B ON A.TASK_ID = B.TASK_ID WHERE B.TASK_DATE BETWEEN '".$current_date."' and '".$next_date."' ORDER BY B.TASK_DATE ASC";
|
|
// error_log("query: ".$sql);
|
|
$result = @mysqli_query($conn,$sql);
|
|
?><?php
|
|
$i=1;
|
|
//echo $sql;
|
|
|
|
while($row=@mysqli_fetch_array($result)){
|
|
?><tr><td><?php echo $i++;?></td><td><?php echo mb_strimwidth($row['task_name'], 0, 70, '...'); ?></td><td><?php echo date("d-m-Y", strtotime($row['TASK_DATE']))?></td><td><?php echo $row['frequency']?></td><td><?php if($row['status'] == "on"){ ?><span style="width: 85%; padding: 5px 0px 5px 0px;" class="badge badge-info fa fa-check"> </span><?php } else { ?> <span class="badge badge-gray" style="padding-top:4px">Pending</span> <?php } ?></td></tr><?php
|
|
if($i>8){
|
|
break;
|
|
}
|
|
}
|
|
?>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- /.table-responsive -->
|
|
</div>
|
|
</div>
|