Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lechiluan committed Apr 15, 2023
1 parent f486680 commit d71f37d
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 8 deletions.
17 changes: 9 additions & 8 deletions QAM_Topics.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,16 +453,17 @@ class="far fa-clock"></i><strong> <?php echo $row['ClosureDate'] ?></strong> -
<span class="deadline-time fs-5"><i
class="far fa-clock"></i><strong><?php echo $row['FinalClosureDate'] ?></strong> -
<?php
// Cal Time Left
$date1 = new DateTime($row['FinalClosureDate']);
$date2 = new DateTime(date("Y-m-d H:i:s"));
date_default_timezone_set('Asia/Ho_Chi_Minh');
$currentDate = date("Y-m-d H:i:s");
$date1 = new DateTime($currentDate);
$date2 = new DateTime($row['FinalClosureDate']);
$interval = $date1->diff($date2);
$timeLeft = $interval->format('%a days, %h hours, %i minutes');
// Check Time Left is passed
if ($timeLeft < 0) {
echo '<span class="badge bg-danger">Closed</span>';
$interval->format('%a days %h hours %i minutes');
// Check if the deadline has passed
if ($currentDate < $row['FinalClosureDate']) {
echo '<span class="badge bg-success">' . $interval->format('%a days %h hours %i minutes') . '</span>';
} else {
echo '<span class="badge bg-success">' . $timeLeft . '</span>';
echo '<span class="badge bg-danger">Closed</span>';
}
?>
</span>
Expand Down
3 changes: 3 additions & 0 deletions ideas.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
IdeaID,Title,Content,is_anonymous,PostDate,StaffID,TopicID
1,"Campus Facilities Management System ","A system that manages the maintenance and upkeep of campus buildings and facilities, including work order management, asset tracking, and preventative maintenance planning.",1,"2023-04-15 17:01:14",9,7
17,"Tutoring Management System ","A system that manages the tutor-tutee matching process, schedules tutoring sessions, and provides resources to tutors and tutees.",0,"2023-04-15 17:50:18",32,7
Binary file added uploads/643ac5ae6bc7d.pdf
Binary file not shown.
Binary file added uploads/643ac65a1e6f1.pdf
Binary file not shown.
Binary file added uploads/643ac673916ef.pdf
Binary file not shown.
Binary file added uploads/643ac74d5ae79.pdf
Binary file not shown.
Binary file added uploads/643ac78a33303.pdf
Binary file not shown.
Binary file added uploads/643ac7ba921cf.pdf
Binary file not shown.
Binary file added uploads/643ac7ff3c663.pdf
Binary file not shown.
Binary file added uploads/643ac86ea6665.pdf
Binary file not shown.
Binary file added uploads/documents-14.zip
Binary file not shown.
Binary file added uploads/documents-16.zip
Binary file not shown.
Binary file added uploads/documents-17.zip
Binary file not shown.
Binary file added uploads/documents-19.zip
Binary file not shown.
Binary file added uploads/documents-20.zip
Binary file not shown.
Binary file added uploads/documents-5.zip
Binary file not shown.
Binary file added uploads/documents-8.zip
Binary file not shown.
Binary file added uploads/documents-9.zip
Binary file not shown.

0 comments on commit d71f37d

Please sign in to comment.