Compare commits

...

3 Commits

Author SHA1 Message Date
Flatlogic Bot
e9e4d72aef colored kanban 2025-11-19 15:33:48 +00:00
Flatlogic Bot
a15f3f4df0 drag and drop for columns 2025-11-19 15:29:24 +00:00
Flatlogic Bot
4716cdad69 basic kanban board v1 2025-11-19 15:19:42 +00:00
16 changed files with 1118 additions and 146 deletions

31
add_task.php Normal file
View File

@ -0,0 +1,31 @@
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit;
}
require_once 'db/config.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$title = $_POST['title'] ?? '';
$description = $_POST['description'] ?? '';
$user_id = $_SESSION['user_id'];
if (!empty($title)) {
try {
$pdo = db();
$stmt = $pdo->prepare("INSERT INTO tasks (title, description, user_id) VALUES (?, ?, ?)");
$stmt->execute([$title, $description, $user_id]);
} catch (PDOException $e) {
header("Location: index.php?error=" . urlencode("Database error: " . $e->getMessage()));
exit;
}
}
header("Location: index.php?success=1");
exit;
} else {
header("Location: index.php");
exit;
}

64
assets/css/custom.css Normal file
View File

@ -0,0 +1,64 @@
body {
background-color: #f8f9fa;
font-family: 'Inter', sans-serif;
}
.kanban-board {
display: flex;
gap: 1rem;
overflow-x: auto;
padding-bottom: 1rem;
}
.kanban-column {
border-radius: 0.5rem;
padding: 1rem;
width: 320px;
flex-shrink: 0;
transition: background-color 0.3s ease;
}
.kanban-column h3 {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 1rem;
}
.task-card {
border: 1px solid #dee2e6;
border-radius: 0.25rem;
padding: 1rem;
margin-bottom: 1rem;
cursor: grab;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
transition: background-color 0.3s ease, color 0.3s ease;
}
.task-card:active {
cursor: grabbing;
}
/* Column and Task Colors */
#kanban-column-to-do {
background-color: #e9ecef; /* Light Grey */
}
#kanban-column-to-do .task-card {
background-color: #ffffff; /* White */
color: #212529; /* Dark Grey */
}
#kanban-column-in-progress {
background-color: #dbeafe; /* Light Blue */
}
#kanban-column-in-progress .task-card {
background-color: #3b82f6; /* Blue */
color: #ffffff; /* White */
}
#kanban-column-done {
background-color: #d1fae5; /* Light Green */
}
#kanban-column-done .task-card {
background-color: #10b981; /* Green */
color: #ffffff; /* White */
}

40
assets/js/main.js Normal file
View File

@ -0,0 +1,40 @@
document.addEventListener('DOMContentLoaded', function () {
const columns = document.querySelectorAll('.kanban-column');
columns.forEach(column => {
new Sortable(column, {
group: 'kanban',
animation: 150,
onEnd: function (evt) {
const item = evt.item;
const newStatus = evt.to.dataset.status;
const taskId = item.dataset.id;
if (newStatus && taskId) {
fetch('update_task_status.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
task_id: taskId,
new_status: newStatus
}),
})
.then(response => response.json())
.then(data => {
if (!data.success) {
console.error('Failed to update task status:', data.message);
// Optionally, move the item back to its original column
evt.from.appendChild(item);
}
})
.catch(error => {
console.error('Error:', error);
evt.from.appendChild(item);
});
}
}
});
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,16 @@
CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS tasks (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
description TEXT,
status VARCHAR(50) NOT NULL DEFAULT 'To Do',
user_id INT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id)
);

View File

@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View File

@ -0,0 +1,7 @@
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'app_35849' AND TABLE_NAME = 'tasks' AND COLUMN_NAME = 'user_id') THEN
ALTER TABLE `tasks` ADD `user_id` INT(11) NULL AFTER `id`;
END IF;
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_SCHEMA = 'app_35849' AND TABLE_NAME = 'tasks' AND CONSTRAINT_NAME = 'fk_tasks_user_id') THEN
ALTER TABLE `tasks` ADD CONSTRAINT `fk_tasks_user_id` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
END IF;

606
debug.log Normal file
View File

@ -0,0 +1,606 @@
2025-11-19 15:22:34 - update_task_status.php accessed.
2025-11-19 15:22:34 - Request method not allowed: HEAD
2025-11-19 15:22:38 - update_task_status.php accessed.
2025-11-19 15:22:38 - Request method not allowed: HEAD
2025-11-19 15:22:39 - update_task_status.php accessed.
2025-11-19 15:22:39 - Request method not allowed: HEAD
2025-11-19 15:22:39 - update_task_status.php accessed.
2025-11-19 15:22:39 - Request method not allowed: HEAD
2025-11-19 15:22:43 - update_task_status.php accessed.
2025-11-19 15:22:43 - Request method not allowed: HEAD
2025-11-19 15:22:44 - update_task_status.php accessed.
2025-11-19 15:22:44 - Request method not allowed: HEAD
2025-11-19 15:22:44 - update_task_status.php accessed.
2025-11-19 15:22:44 - Request method not allowed: HEAD
2025-11-19 15:22:45 - update_task_status.php accessed.
2025-11-19 15:22:45 - Request method not allowed: HEAD
2025-11-19 15:22:47 - update_task_status.php accessed.
2025-11-19 15:22:47 - Request method not allowed: HEAD
2025-11-19 15:22:48 - update_task_status.php accessed.
2025-11-19 15:22:48 - Request method not allowed: HEAD
2025-11-19 15:22:49 - update_task_status.php accessed.
2025-11-19 15:22:49 - Request method not allowed: HEAD
2025-11-19 15:22:49 - update_task_status.php accessed.
2025-11-19 15:22:49 - Request method not allowed: HEAD
2025-11-19 15:22:50 - update_task_status.php accessed.
2025-11-19 15:22:50 - Request method not allowed: HEAD
2025-11-19 15:22:52 - update_task_status.php accessed.
2025-11-19 15:22:52 - Request method not allowed: HEAD
2025-11-19 15:22:53 - update_task_status.php accessed.
2025-11-19 15:22:53 - Request method not allowed: HEAD
2025-11-19 15:22:54 - update_task_status.php accessed.
2025-11-19 15:22:54 - Request method not allowed: HEAD
2025-11-19 15:22:54 - update_task_status.php accessed.
2025-11-19 15:22:54 - Request method not allowed: HEAD
2025-11-19 15:22:55 - update_task_status.php accessed.
2025-11-19 15:22:55 - Request method not allowed: HEAD
2025-11-19 15:22:57 - update_task_status.php accessed.
2025-11-19 15:22:57 - Request method not allowed: HEAD
2025-11-19 15:22:58 - update_task_status.php accessed.
2025-11-19 15:22:58 - Request method not allowed: HEAD
2025-11-19 15:22:59 - update_task_status.php accessed.
2025-11-19 15:22:59 - Request method not allowed: HEAD
2025-11-19 15:22:59 - update_task_status.php accessed.
2025-11-19 15:22:59 - Request method not allowed: HEAD
2025-11-19 15:22:59 - update_task_status.php accessed.
2025-11-19 15:22:59 - Request method is POST.
2025-11-19 15:22:59 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:22:59 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:22:59 - Task ID and New Status are present. Updating database...
2025-11-19 15:22:59 - Database update successful. Rows affected: 1
2025-11-19 15:23:00 - update_task_status.php accessed.
2025-11-19 15:23:00 - Request method not allowed: HEAD
2025-11-19 15:23:02 - update_task_status.php accessed.
2025-11-19 15:23:02 - Request method not allowed: HEAD
2025-11-19 15:23:04 - update_task_status.php accessed.
2025-11-19 15:23:04 - Request method not allowed: HEAD
2025-11-19 15:23:04 - update_task_status.php accessed.
2025-11-19 15:23:04 - Request method is POST.
2025-11-19 15:23:04 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:23:04 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:23:04 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:04 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:23:04 - update_task_status.php accessed.
2025-11-19 15:23:04 - Request method not allowed: HEAD
2025-11-19 15:23:04 - update_task_status.php accessed.
2025-11-19 15:23:04 - Request method is POST.
2025-11-19 15:23:04 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:23:04 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:23:04 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:04 - Database update successful. Rows affected: 1
2025-11-19 15:23:05 - update_task_status.php accessed.
2025-11-19 15:23:05 - Request method not allowed: HEAD
2025-11-19 15:23:07 - update_task_status.php accessed.
2025-11-19 15:23:07 - Request method not allowed: HEAD
2025-11-19 15:23:08 - update_task_status.php accessed.
2025-11-19 15:23:08 - Request method not allowed: HEAD
2025-11-19 15:23:10 - update_task_status.php accessed.
2025-11-19 15:23:10 - Request method not allowed: HEAD
2025-11-19 15:23:10 - update_task_status.php accessed.
2025-11-19 15:23:10 - Request method is POST.
2025-11-19 15:23:10 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:23:10 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:23:10 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:10 - Database update successful. Rows affected: 1
2025-11-19 15:23:13 - update_task_status.php accessed.
2025-11-19 15:23:13 - Request method not allowed: HEAD
2025-11-19 15:23:13 - update_task_status.php accessed.
2025-11-19 15:23:13 - Request method is POST.
2025-11-19 15:23:13 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:23:13 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:23:13 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:13 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:23:13 - update_task_status.php accessed.
2025-11-19 15:23:13 - Request method not allowed: HEAD
2025-11-19 15:23:18 - update_task_status.php accessed.
2025-11-19 15:23:18 - Request method not allowed: HEAD
2025-11-19 15:23:23 - update_task_status.php accessed.
2025-11-19 15:23:23 - Request method not allowed: HEAD
2025-11-19 15:23:29 - update_task_status.php accessed.
2025-11-19 15:23:29 - Request method not allowed: HEAD
2025-11-19 15:23:34 - update_task_status.php accessed.
2025-11-19 15:23:34 - Request method not allowed: HEAD
2025-11-19 15:23:34 - update_task_status.php accessed.
2025-11-19 15:23:34 - Request method is POST.
2025-11-19 15:23:34 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:23:34 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:23:34 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:34 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:24:07 - update_task_status.php accessed.
2025-11-19 15:24:07 - Request method not allowed: HEAD
2025-11-19 15:24:09 - update_task_status.php accessed.
2025-11-19 15:24:09 - Request method not allowed: HEAD
2025-11-19 15:24:12 - update_task_status.php accessed.
2025-11-19 15:24:12 - Request method not allowed: HEAD
2025-11-19 15:24:14 - update_task_status.php accessed.
2025-11-19 15:24:14 - Request method not allowed: HEAD
2025-11-19 15:24:17 - update_task_status.php accessed.
2025-11-19 15:24:17 - Request method not allowed: HEAD
2025-11-19 15:24:18 - update_task_status.php accessed.
2025-11-19 15:24:18 - Request method not allowed: HEAD
2025-11-19 15:24:20 - update_task_status.php accessed.
2025-11-19 15:24:20 - Request method not allowed: HEAD
2025-11-19 15:24:22 - update_task_status.php accessed.
2025-11-19 15:24:22 - Request method not allowed: HEAD
2025-11-19 15:24:23 - update_task_status.php accessed.
2025-11-19 15:24:23 - Request method not allowed: HEAD
2025-11-19 15:24:25 - update_task_status.php accessed.
2025-11-19 15:24:25 - Request method not allowed: HEAD
2025-11-19 15:24:27 - update_task_status.php accessed.
2025-11-19 15:24:27 - Request method not allowed: HEAD
2025-11-19 15:24:28 - update_task_status.php accessed.
2025-11-19 15:24:28 - Request method not allowed: HEAD
2025-11-19 15:24:30 - update_task_status.php accessed.
2025-11-19 15:24:30 - Request method not allowed: HEAD
2025-11-19 15:24:33 - update_task_status.php accessed.
2025-11-19 15:24:33 - Request method not allowed: HEAD
2025-11-19 15:24:33 - update_task_status.php accessed.
2025-11-19 15:24:33 - Request method is POST.
2025-11-19 15:24:33 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:24:33 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:24:33 - Task ID and New Status are present. Updating database...
2025-11-19 15:24:33 - Database update successful. Rows affected: 1
2025-11-19 15:24:33 - update_task_status.php accessed.
2025-11-19 15:24:33 - Request method not allowed: HEAD
2025-11-19 15:24:35 - update_task_status.php accessed.
2025-11-19 15:24:35 - Request method not allowed: HEAD
2025-11-19 15:24:35 - update_task_status.php accessed.
2025-11-19 15:24:35 - Request method is POST.
2025-11-19 15:24:35 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:24:35 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:24:35 - Task ID and New Status are present. Updating database...
2025-11-19 15:24:35 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:24:38 - update_task_status.php accessed.
2025-11-19 15:24:38 - Request method not allowed: HEAD
2025-11-19 15:24:43 - update_task_status.php accessed.
2025-11-19 15:24:43 - Request method not allowed: HEAD
2025-11-19 15:24:43 - update_task_status.php accessed.
2025-11-19 15:24:43 - Request method is POST.
2025-11-19 15:24:43 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:24:43 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:24:43 - Task ID and New Status are present. Updating database...
2025-11-19 15:24:43 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:24:46 - update_task_status.php accessed.
2025-11-19 15:24:46 - Request method not allowed: HEAD
2025-11-19 15:24:48 - update_task_status.php accessed.
2025-11-19 15:24:48 - Request method not allowed: HEAD
2025-11-19 15:24:52 - update_task_status.php accessed.
2025-11-19 15:24:52 - Request method not allowed: HEAD
2025-11-19 15:24:54 - update_task_status.php accessed.
2025-11-19 15:24:54 - Request method not allowed: HEAD
2025-11-19 15:24:57 - update_task_status.php accessed.
2025-11-19 15:24:57 - Request method not allowed: HEAD
2025-11-19 15:24:59 - update_task_status.php accessed.
2025-11-19 15:24:59 - Request method not allowed: HEAD
2025-11-19 15:25:02 - update_task_status.php accessed.
2025-11-19 15:25:02 - Request method not allowed: HEAD
2025-11-19 15:25:04 - update_task_status.php accessed.
2025-11-19 15:25:04 - Request method not allowed: HEAD
2025-11-19 15:25:07 - update_task_status.php accessed.
2025-11-19 15:25:07 - Request method not allowed: HEAD
2025-11-19 15:25:09 - update_task_status.php accessed.
2025-11-19 15:25:09 - Request method not allowed: HEAD
2025-11-19 15:25:09 - update_task_status.php accessed.
2025-11-19 15:25:09 - Request method not allowed: HEAD
2025-11-19 15:25:10 - update_task_status.php accessed.
2025-11-19 15:25:10 - Request method not allowed: HEAD
2025-11-19 15:25:12 - update_task_status.php accessed.
2025-11-19 15:25:12 - Request method not allowed: HEAD
2025-11-19 15:25:12 - update_task_status.php accessed.
2025-11-19 15:25:12 - Request method is POST.
2025-11-19 15:25:12 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:25:12 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:25:12 - Task ID and New Status are present. Updating database...
2025-11-19 15:25:12 - Database update successful. Rows affected: 1
2025-11-19 15:25:14 - update_task_status.php accessed.
2025-11-19 15:25:14 - Request method not allowed: HEAD
2025-11-19 15:25:14 - update_task_status.php accessed.
2025-11-19 15:25:14 - Request method not allowed: HEAD
2025-11-19 15:25:14 - update_task_status.php accessed.
2025-11-19 15:25:14 - Request method is POST.
2025-11-19 15:25:14 - Raw input: {"task_id":"1","new_status":"Done"}
2025-11-19 15:25:14 - Parsed input: Task ID = 1, New Status = Done
2025-11-19 15:25:14 - Task ID and New Status are present. Updating database...
2025-11-19 15:25:14 - Database update successful. Rows affected: 1
2025-11-19 15:25:15 - update_task_status.php accessed.
2025-11-19 15:25:15 - Request method not allowed: HEAD
2025-11-19 15:25:19 - update_task_status.php accessed.
2025-11-19 15:25:19 - Request method not allowed: HEAD
2025-11-19 15:25:21 - update_task_status.php accessed.
2025-11-19 15:25:21 - Request method not allowed: HEAD
2025-11-19 15:25:24 - update_task_status.php accessed.
2025-11-19 15:25:24 - Request method not allowed: HEAD
2025-11-19 15:25:26 - update_task_status.php accessed.
2025-11-19 15:25:26 - Request method not allowed: HEAD
2025-11-19 15:25:29 - update_task_status.php accessed.
2025-11-19 15:25:29 - Request method not allowed: HEAD
2025-11-19 15:25:31 - update_task_status.php accessed.
2025-11-19 15:25:31 - Request method not allowed: HEAD
2025-11-19 15:25:33 - update_task_status.php accessed.
2025-11-19 15:25:33 - Request method not allowed: HEAD
2025-11-19 15:25:34 - update_task_status.php accessed.
2025-11-19 15:25:34 - Request method not allowed: HEAD
2025-11-19 15:25:34 - update_task_status.php accessed.
2025-11-19 15:25:34 - Request method is POST.
2025-11-19 15:25:34 - Raw input: {"task_id":"2","new_status":"Done"}
2025-11-19 15:25:34 - Parsed input: Task ID = 2, New Status = Done
2025-11-19 15:25:34 - Task ID and New Status are present. Updating database...
2025-11-19 15:25:34 - Database update successful. Rows affected: 1
2025-11-19 15:25:36 - update_task_status.php accessed.
2025-11-19 15:25:36 - Request method not allowed: HEAD
2025-11-19 15:25:36 - update_task_status.php accessed.
2025-11-19 15:25:36 - Request method is POST.
2025-11-19 15:25:36 - Raw input: {"task_id":"2","new_status":"To Do"}
2025-11-19 15:25:36 - Parsed input: Task ID = 2, New Status = To Do
2025-11-19 15:25:36 - Task ID and New Status are present. Updating database...
2025-11-19 15:25:36 - Database update successful. Rows affected: 1
2025-11-19 15:25:39 - update_task_status.php accessed.
2025-11-19 15:25:39 - Request method not allowed: HEAD
2025-11-19 15:25:44 - update_task_status.php accessed.
2025-11-19 15:25:44 - Request method not allowed: HEAD
2025-11-19 15:25:49 - update_task_status.php accessed.
2025-11-19 15:25:49 - Request method not allowed: HEAD
2025-11-19 15:25:52 - update_task_status.php accessed.
2025-11-19 15:25:52 - Request method not allowed: HEAD
2025-11-19 15:25:54 - update_task_status.php accessed.
2025-11-19 15:25:54 - Request method not allowed: HEAD
2025-11-19 15:25:56 - update_task_status.php accessed.
2025-11-19 15:25:56 - Request method not allowed: HEAD
2025-11-19 15:25:59 - update_task_status.php accessed.
2025-11-19 15:25:59 - Request method not allowed: HEAD
2025-11-19 15:26:00 - update_task_status.php accessed.
2025-11-19 15:26:00 - Request method not allowed: HEAD
2025-11-19 15:26:03 - update_task_status.php accessed.
2025-11-19 15:26:03 - Request method not allowed: HEAD
2025-11-19 15:26:05 - update_task_status.php accessed.
2025-11-19 15:26:05 - Request method not allowed: HEAD
2025-11-19 15:26:09 - update_task_status.php accessed.
2025-11-19 15:26:09 - Request method not allowed: HEAD
2025-11-19 15:26:10 - update_task_status.php accessed.
2025-11-19 15:26:10 - Request method not allowed: HEAD
2025-11-19 15:26:12 - update_task_status.php accessed.
2025-11-19 15:26:12 - Request method not allowed: HEAD
2025-11-19 15:26:13 - update_task_status.php accessed.
2025-11-19 15:26:13 - Request method not allowed: HEAD
2025-11-19 15:26:14 - update_task_status.php accessed.
2025-11-19 15:26:14 - Request method not allowed: HEAD
2025-11-19 15:26:16 - update_task_status.php accessed.
2025-11-19 15:26:16 - Request method not allowed: HEAD
2025-11-19 15:26:17 - update_task_status.php accessed.
2025-11-19 15:26:17 - Request method not allowed: HEAD
2025-11-19 15:26:19 - update_task_status.php accessed.
2025-11-19 15:26:19 - Request method not allowed: HEAD
2025-11-19 15:26:21 - update_task_status.php accessed.
2025-11-19 15:26:21 - Request method not allowed: HEAD
2025-11-19 15:26:21 - update_task_status.php accessed.
2025-11-19 15:26:21 - Request method not allowed: HEAD
2025-11-19 15:26:24 - update_task_status.php accessed.
2025-11-19 15:26:24 - Request method not allowed: HEAD
2025-11-19 15:26:26 - update_task_status.php accessed.
2025-11-19 15:26:26 - Request method not allowed: HEAD
2025-11-19 15:26:26 - update_task_status.php accessed.
2025-11-19 15:26:26 - Request method is POST.
2025-11-19 15:26:26 - Raw input: {"task_id":"2","new_status":"In Progress"}
2025-11-19 15:26:26 - Parsed input: Task ID = 2, New Status = In Progress
2025-11-19 15:26:26 - Task ID and New Status are present. Updating database...
2025-11-19 15:26:26 - Database update successful. Rows affected: 1
2025-11-19 15:26:29 - update_task_status.php accessed.
2025-11-19 15:26:29 - Request method not allowed: HEAD
2025-11-19 15:26:29 - update_task_status.php accessed.
2025-11-19 15:26:29 - Request method is POST.
2025-11-19 15:26:29 - Raw input: {"task_id":"3","new_status":"In Progress"}
2025-11-19 15:26:29 - Parsed input: Task ID = 3, New Status = In Progress
2025-11-19 15:26:29 - Task ID and New Status are present. Updating database...
2025-11-19 15:26:29 - Database update successful. Rows affected: 1
2025-11-19 15:26:36 - update_task_status.php accessed.
2025-11-19 15:26:36 - Request method not allowed: HEAD
2025-11-19 15:26:41 - update_task_status.php accessed.
2025-11-19 15:26:41 - Request method not allowed: HEAD
2025-11-19 15:26:43 - update_task_status.php accessed.
2025-11-19 15:26:43 - Request method not allowed: HEAD
2025-11-19 15:26:47 - update_task_status.php accessed.
2025-11-19 15:26:47 - Request method not allowed: HEAD
2025-11-19 15:26:48 - update_task_status.php accessed.
2025-11-19 15:26:48 - Request method not allowed: HEAD
2025-11-19 15:26:52 - update_task_status.php accessed.
2025-11-19 15:26:52 - Request method not allowed: HEAD
2025-11-19 15:26:54 - update_task_status.php accessed.
2025-11-19 15:26:54 - Request method not allowed: HEAD
2025-11-19 15:26:57 - update_task_status.php accessed.
2025-11-19 15:26:57 - Request method not allowed: HEAD
2025-11-19 15:26:59 - update_task_status.php accessed.
2025-11-19 15:26:59 - Request method not allowed: HEAD
2025-11-19 15:27:02 - update_task_status.php accessed.
2025-11-19 15:27:02 - Request method not allowed: HEAD
2025-11-19 15:27:02 - update_task_status.php accessed.
2025-11-19 15:27:02 - Request method is POST.
2025-11-19 15:27:02 - Raw input: {"task_id":"2","new_status":"To Do"}
2025-11-19 15:27:02 - Parsed input: Task ID = 2, New Status = To Do
2025-11-19 15:27:02 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:02 - Database update successful. Rows affected: 1
2025-11-19 15:27:04 - update_task_status.php accessed.
2025-11-19 15:27:04 - Request method not allowed: HEAD
2025-11-19 15:27:09 - update_task_status.php accessed.
2025-11-19 15:27:09 - Request method not allowed: HEAD
2025-11-19 15:27:10 - update_task_status.php accessed.
2025-11-19 15:27:10 - Request method is POST.
2025-11-19 15:27:10 - Raw input: {"task_id":"3","new_status":"To Do"}
2025-11-19 15:27:10 - Parsed input: Task ID = 3, New Status = To Do
2025-11-19 15:27:10 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:10 - Database update successful. Rows affected: 1
2025-11-19 15:27:11 - update_task_status.php accessed.
2025-11-19 15:27:11 - Request method not allowed: HEAD
2025-11-19 15:27:13 - update_task_status.php accessed.
2025-11-19 15:27:13 - Request method not allowed: HEAD
2025-11-19 15:27:18 - update_task_status.php accessed.
2025-11-19 15:27:18 - Request method not allowed: HEAD
2025-11-19 15:27:19 - update_task_status.php accessed.
2025-11-19 15:27:19 - Request method not allowed: HEAD
2025-11-19 15:27:22 - update_task_status.php accessed.
2025-11-19 15:27:22 - Request method not allowed: HEAD
2025-11-19 15:27:23 - update_task_status.php accessed.
2025-11-19 15:27:23 - Request method not allowed: HEAD
2025-11-19 15:27:23 - update_task_status.php accessed.
2025-11-19 15:27:23 - Request method not allowed: HEAD
2025-11-19 15:27:24 - update_task_status.php accessed.
2025-11-19 15:27:24 - Request method not allowed: HEAD
2025-11-19 15:27:27 - update_task_status.php accessed.
2025-11-19 15:27:27 - Request method not allowed: HEAD
2025-11-19 15:27:28 - update_task_status.php accessed.
2025-11-19 15:27:28 - Request method not allowed: HEAD
2025-11-19 15:27:28 - update_task_status.php accessed.
2025-11-19 15:27:28 - Request method not allowed: HEAD
2025-11-19 15:27:28 - update_task_status.php accessed.
2025-11-19 15:27:28 - Request method not allowed: HEAD
2025-11-19 15:27:29 - update_task_status.php accessed.
2025-11-19 15:27:29 - Request method not allowed: HEAD
2025-11-19 15:27:32 - update_task_status.php accessed.
2025-11-19 15:27:32 - Request method not allowed: HEAD
2025-11-19 15:27:33 - update_task_status.php accessed.
2025-11-19 15:27:33 - Request method not allowed: HEAD
2025-11-19 15:27:34 - update_task_status.php accessed.
2025-11-19 15:27:34 - Request method not allowed: HEAD
2025-11-19 15:27:35 - update_task_status.php accessed.
2025-11-19 15:27:35 - Request method not allowed: HEAD
2025-11-19 15:27:37 - update_task_status.php accessed.
2025-11-19 15:27:37 - Request method not allowed: HEAD
2025-11-19 15:27:38 - update_task_status.php accessed.
2025-11-19 15:27:38 - Request method not allowed: HEAD
2025-11-19 15:27:39 - update_task_status.php accessed.
2025-11-19 15:27:39 - Request method not allowed: HEAD
2025-11-19 15:27:39 - update_task_status.php accessed.
2025-11-19 15:27:39 - Request method is POST.
2025-11-19 15:27:39 - Raw input: {"task_id":"3","new_status":"In Progress"}
2025-11-19 15:27:39 - Parsed input: Task ID = 3, New Status = In Progress
2025-11-19 15:27:39 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:39 - Database update successful. Rows affected: 1
2025-11-19 15:27:39 - update_task_status.php accessed.
2025-11-19 15:27:39 - Request method not allowed: HEAD
2025-11-19 15:27:40 - update_task_status.php accessed.
2025-11-19 15:27:40 - Request method not allowed: HEAD
2025-11-19 15:27:40 - update_task_status.php accessed.
2025-11-19 15:27:40 - Request method not allowed: HEAD
2025-11-19 15:27:41 - update_task_status.php accessed.
2025-11-19 15:27:41 - Request method not allowed: HEAD
2025-11-19 15:27:41 - update_task_status.php accessed.
2025-11-19 15:27:41 - Request method not allowed: HEAD
2025-11-19 15:27:42 - update_task_status.php accessed.
2025-11-19 15:27:42 - Request method not allowed: HEAD
2025-11-19 15:27:43 - update_task_status.php accessed.
2025-11-19 15:27:43 - Request method not allowed: HEAD
2025-11-19 15:27:44 - update_task_status.php accessed.
2025-11-19 15:27:44 - Request method not allowed: HEAD
2025-11-19 15:27:45 - update_task_status.php accessed.
2025-11-19 15:27:45 - Request method not allowed: HEAD
2025-11-19 15:27:45 - update_task_status.php accessed.
2025-11-19 15:27:45 - Request method is POST.
2025-11-19 15:27:45 - Raw input: {"task_id":"3","new_status":"In Progress"}
2025-11-19 15:27:45 - Parsed input: Task ID = 3, New Status = In Progress
2025-11-19 15:27:45 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:45 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:27:45 - update_task_status.php accessed.
2025-11-19 15:27:45 - Request method not allowed: HEAD
2025-11-19 15:27:46 - update_task_status.php accessed.
2025-11-19 15:27:46 - Request method not allowed: HEAD
2025-11-19 15:27:47 - update_task_status.php accessed.
2025-11-19 15:27:47 - Request method not allowed: HEAD
2025-11-19 15:27:48 - update_task_status.php accessed.
2025-11-19 15:27:48 - Request method is POST.
2025-11-19 15:27:48 - Raw input: {"task_id":"2","new_status":"In Progress"}
2025-11-19 15:27:48 - Parsed input: Task ID = 2, New Status = In Progress
2025-11-19 15:27:48 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:48 - Database update successful. Rows affected: 1
2025-11-19 15:27:49 - update_task_status.php accessed.
2025-11-19 15:27:49 - Request method not allowed: HEAD
2025-11-19 15:27:49 - update_task_status.php accessed.
2025-11-19 15:27:49 - Request method is POST.
2025-11-19 15:27:49 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:27:49 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:27:49 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:49 - Database update successful. Rows affected: 1
2025-11-19 15:27:49 - update_task_status.php accessed.
2025-11-19 15:27:49 - Request method not allowed: HEAD
2025-11-19 15:27:50 - update_task_status.php accessed.
2025-11-19 15:27:50 - Request method not allowed: HEAD
2025-11-19 15:27:51 - update_task_status.php accessed.
2025-11-19 15:27:51 - Request method not allowed: HEAD
2025-11-19 15:27:54 - update_task_status.php accessed.
2025-11-19 15:27:54 - Request method not allowed: HEAD
2025-11-19 15:27:55 - update_task_status.php accessed.
2025-11-19 15:27:55 - Request method not allowed: HEAD
2025-11-19 15:27:57 - update_task_status.php accessed.
2025-11-19 15:27:57 - Request method not allowed: HEAD
2025-11-19 15:27:58 - update_task_status.php accessed.
2025-11-19 15:27:58 - Request method not allowed: HEAD
2025-11-19 15:28:00 - update_task_status.php accessed.
2025-11-19 15:28:00 - Request method not allowed: HEAD
2025-11-19 15:28:01 - update_task_status.php accessed.
2025-11-19 15:28:01 - Request method not allowed: HEAD
2025-11-19 15:28:02 - update_task_status.php accessed.
2025-11-19 15:28:02 - Request method not allowed: HEAD
2025-11-19 15:28:05 - update_task_status.php accessed.
2025-11-19 15:28:05 - Request method not allowed: HEAD
2025-11-19 15:28:05 - update_task_status.php accessed.
2025-11-19 15:28:05 - Request method is POST.
2025-11-19 15:28:05 - Raw input: {"task_id":"3","new_status":"In Progress"}
2025-11-19 15:28:05 - Parsed input: Task ID = 3, New Status = In Progress
2025-11-19 15:28:05 - Task ID and New Status are present. Updating database...
2025-11-19 15:28:05 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:28:06 - update_task_status.php accessed.
2025-11-19 15:28:06 - Request method not allowed: HEAD
2025-11-19 15:28:06 - update_task_status.php accessed.
2025-11-19 15:28:06 - Request method is POST.
2025-11-19 15:28:06 - Raw input: {"task_id":"2","new_status":"In Progress"}
2025-11-19 15:28:06 - Parsed input: Task ID = 2, New Status = In Progress
2025-11-19 15:28:06 - Task ID and New Status are present. Updating database...
2025-11-19 15:28:06 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:28:07 - update_task_status.php accessed.
2025-11-19 15:28:07 - Request method not allowed: HEAD
2025-11-19 15:28:07 - update_task_status.php accessed.
2025-11-19 15:28:07 - Request method is POST.
2025-11-19 15:28:07 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:28:07 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:28:07 - Task ID and New Status are present. Updating database...
2025-11-19 15:28:07 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:28:10 - update_task_status.php accessed.
2025-11-19 15:28:10 - Request method not allowed: HEAD
2025-11-19 15:28:17 - update_task_status.php accessed.
2025-11-19 15:28:17 - Request method not allowed: HEAD
2025-11-19 15:28:27 - update_task_status.php accessed.
2025-11-19 15:28:27 - Request method not allowed: HEAD
2025-11-19 15:28:32 - update_task_status.php accessed.
2025-11-19 15:28:32 - Request method not allowed: HEAD
2025-11-19 15:28:37 - update_task_status.php accessed.
2025-11-19 15:28:37 - Request method not allowed: HEAD
2025-11-19 15:28:42 - update_task_status.php accessed.
2025-11-19 15:28:42 - Request method not allowed: HEAD
2025-11-19 15:28:42 - update_task_status.php accessed.
2025-11-19 15:28:42 - Request method not allowed: HEAD
2025-11-19 15:28:46 - update_task_status.php accessed.
2025-11-19 15:28:46 - Request method not allowed: HEAD
2025-11-19 15:28:47 - update_task_status.php accessed.
2025-11-19 15:28:47 - Request method not allowed: HEAD
2025-11-19 15:28:48 - update_task_status.php accessed.
2025-11-19 15:28:48 - Request method not allowed: HEAD
2025-11-19 15:28:49 - update_task_status.php accessed.
2025-11-19 15:28:49 - Request method not allowed: HEAD
2025-11-19 15:28:53 - update_task_status.php accessed.
2025-11-19 15:28:53 - Request method not allowed: HEAD
2025-11-19 15:28:53 - update_task_status.php accessed.
2025-11-19 15:28:53 - Request method is POST.
2025-11-19 15:28:53 - Raw input: {"task_id":"3","new_status":"Done"}
2025-11-19 15:28:53 - Parsed input: Task ID = 3, New Status = Done
2025-11-19 15:28:53 - Task ID and New Status are present. Updating database...
2025-11-19 15:28:53 - Database update successful. Rows affected: 1
2025-11-19 15:29:44 - update_task_status.php accessed.
2025-11-19 15:29:44 - Request method not allowed: HEAD
2025-11-19 15:29:50 - update_task_status.php accessed.
2025-11-19 15:29:50 - Request method not allowed: HEAD
2025-11-19 15:30:59 - update_task_status.php accessed.
2025-11-19 15:30:59 - Request method not allowed: HEAD
2025-11-19 15:31:00 - update_task_status.php accessed.
2025-11-19 15:31:00 - Request method not allowed: HEAD
2025-11-19 15:31:01 - update_task_status.php accessed.
2025-11-19 15:31:01 - Request method not allowed: HEAD
2025-11-19 15:31:04 - update_task_status.php accessed.
2025-11-19 15:31:04 - Request method not allowed: HEAD
2025-11-19 15:31:05 - update_task_status.php accessed.
2025-11-19 15:31:05 - Request method not allowed: HEAD
2025-11-19 15:31:05 - update_task_status.php accessed.
2025-11-19 15:31:05 - Request method not allowed: HEAD
2025-11-19 15:31:07 - update_task_status.php accessed.
2025-11-19 15:31:07 - Request method not allowed: HEAD
2025-11-19 15:31:08 - update_task_status.php accessed.
2025-11-19 15:31:08 - Request method not allowed: HEAD
2025-11-19 15:31:10 - update_task_status.php accessed.
2025-11-19 15:31:10 - Request method not allowed: HEAD
2025-11-19 15:31:10 - update_task_status.php accessed.
2025-11-19 15:31:10 - Request method not allowed: HEAD
2025-11-19 15:31:10 - update_task_status.php accessed.
2025-11-19 15:31:10 - Request method not allowed: HEAD
2025-11-19 15:31:12 - update_task_status.php accessed.
2025-11-19 15:31:12 - Request method not allowed: HEAD
2025-11-19 15:31:13 - update_task_status.php accessed.
2025-11-19 15:31:13 - Request method not allowed: HEAD
2025-11-19 15:31:15 - update_task_status.php accessed.
2025-11-19 15:31:15 - Request method not allowed: HEAD
2025-11-19 15:31:16 - update_task_status.php accessed.
2025-11-19 15:31:16 - Request method not allowed: HEAD
2025-11-19 15:31:16 - update_task_status.php accessed.
2025-11-19 15:31:16 - Request method not allowed: HEAD
2025-11-19 15:31:17 - update_task_status.php accessed.
2025-11-19 15:31:17 - Request method not allowed: HEAD
2025-11-19 15:31:18 - update_task_status.php accessed.
2025-11-19 15:31:18 - Request method not allowed: HEAD
2025-11-19 15:31:20 - update_task_status.php accessed.
2025-11-19 15:31:20 - Request method not allowed: HEAD
2025-11-19 15:31:21 - update_task_status.php accessed.
2025-11-19 15:31:21 - Request method not allowed: HEAD
2025-11-19 15:31:21 - update_task_status.php accessed.
2025-11-19 15:31:21 - Request method not allowed: HEAD
2025-11-19 15:31:22 - update_task_status.php accessed.
2025-11-19 15:31:22 - Request method not allowed: HEAD
2025-11-19 15:31:23 - update_task_status.php accessed.
2025-11-19 15:31:23 - Request method not allowed: HEAD
2025-11-19 15:31:25 - update_task_status.php accessed.
2025-11-19 15:31:25 - Request method not allowed: HEAD
2025-11-19 15:31:25 - update_task_status.php accessed.
2025-11-19 15:31:25 - Request method is POST.
2025-11-19 15:31:25 - Raw input: {"task_id":"1","new_status":"Done"}
2025-11-19 15:31:25 - Parsed input: Task ID = 1, New Status = Done
2025-11-19 15:31:25 - Task ID and New Status are present. Updating database...
2025-11-19 15:31:25 - Database update successful. Rows affected: 1
2025-11-19 15:31:26 - update_task_status.php accessed.
2025-11-19 15:31:26 - Request method not allowed: HEAD
2025-11-19 15:31:26 - update_task_status.php accessed.
2025-11-19 15:31:26 - Request method not allowed: HEAD
2025-11-19 15:31:26 - update_task_status.php accessed.
2025-11-19 15:31:26 - Request method is POST.
2025-11-19 15:31:26 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:31:26 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:31:26 - Task ID and New Status are present. Updating database...
2025-11-19 15:31:26 - Database update successful. Rows affected: 1
2025-11-19 15:31:27 - update_task_status.php accessed.
2025-11-19 15:31:27 - Request method not allowed: HEAD
2025-11-19 15:31:27 - update_task_status.php accessed.
2025-11-19 15:31:27 - Request method is POST.
2025-11-19 15:31:27 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:31:27 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:31:27 - Task ID and New Status are present. Updating database...
2025-11-19 15:31:27 - Database update successful. Rows affected: 1
2025-11-19 15:31:28 - update_task_status.php accessed.
2025-11-19 15:31:28 - Request method not allowed: HEAD
2025-11-19 15:31:31 - update_task_status.php accessed.
2025-11-19 15:31:31 - Request method not allowed: HEAD
2025-11-19 15:31:31 - update_task_status.php accessed.
2025-11-19 15:31:31 - Request method is POST.
2025-11-19 15:31:31 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:31:31 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:31:31 - Task ID and New Status are present. Updating database...
2025-11-19 15:31:31 - Database update successful. Rows affected: 1
2025-11-19 15:31:33 - update_task_status.php accessed.
2025-11-19 15:31:33 - Request method not allowed: HEAD
2025-11-19 15:31:33 - update_task_status.php accessed.
2025-11-19 15:31:33 - Request method is POST.
2025-11-19 15:31:33 - Raw input: {"task_id":"1","new_status":"Done"}
2025-11-19 15:31:33 - Parsed input: Task ID = 1, New Status = Done
2025-11-19 15:31:33 - Task ID and New Status are present. Updating database...
2025-11-19 15:31:33 - Database update successful. Rows affected: 1
2025-11-19 15:31:37 - update_task_status.php accessed.
2025-11-19 15:31:37 - Request method not allowed: HEAD
2025-11-19 15:31:43 - update_task_status.php accessed.
2025-11-19 15:31:43 - Request method not allowed: HEAD
2025-11-19 15:31:48 - update_task_status.php accessed.
2025-11-19 15:31:48 - Request method not allowed: HEAD
2025-11-19 15:31:53 - update_task_status.php accessed.
2025-11-19 15:31:53 - Request method not allowed: HEAD
2025-11-19 15:31:58 - update_task_status.php accessed.
2025-11-19 15:31:58 - Request method not allowed: HEAD
2025-11-19 15:32:03 - update_task_status.php accessed.
2025-11-19 15:32:03 - Request method not allowed: HEAD
2025-11-19 15:32:03 - update_task_status.php accessed.
2025-11-19 15:32:03 - Request method is POST.
2025-11-19 15:32:03 - Raw input: {"task_id":"2","new_status":"In Progress"}
2025-11-19 15:32:03 - Parsed input: Task ID = 2, New Status = In Progress
2025-11-19 15:32:03 - Task ID and New Status are present. Updating database...
2025-11-19 15:32:03 - Database update failed or status unchanged. Rows affected: 0

32
footer.php Normal file
View File

@ -0,0 +1,32 @@
</main>
<!-- Add Task Modal -->
<div class="modal fade" id="addTaskModal" tabindex="-1" aria-labelledby="addTaskModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="addTaskModalLabel">Add New Task</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="addTaskForm" action="add_task.php" method="POST">
<div class="mb-3">
<label for="taskTitle" class="form-label">Title</label>
<input type="text" class="form-control" id="taskTitle" name="title" required>
</div>
<div class="mb-3">
<label for="taskDescription" class="form-label">Description</label>
<textarea class="form-control" id="taskDescription" name="description" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary">Save Task</button>
</form>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>

39
header.php Normal file
View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>webinar 1 crm task management app</title>
<meta name="description" content="Built with Flatlogic Generator">
<meta name="keywords" content="task management, crm, kanban, project management, webinar, flatlogic, php, lamp">
<meta property="og:title" content="webinar 1 crm task management app">
<meta property="og:description" content="Built with Flatlogic Generator">
<meta property="og:image" content="">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
<div class="container-fluid">
<a class="navbar-brand fw-bold" href="#">🚀 Task Manager</a>
<span class="navbar-text">
Welcome, <?php echo htmlspecialchars($_SESSION['username']); ?>!
</span>
<div>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addTaskModal">
<i class="bi bi-plus-lg"></i> Add Task
</button>
<a href="logout.php" class="btn btn-outline-secondary">Logout</a>
</div>
</div>
</nav>
<main class="container-fluid my-4">

236
index.php
View File

@ -1,150 +1,94 @@
<?php <?php
declare(strict_types=1); session_start();
@ini_set('display_errors', '1');
@error_reporting(E_ALL); if (!isset($_SESSION['user_id'])) {
@date_default_timezone_set('UTC'); header('Location: login.php');
exit;
}
require_once 'db/config.php';
require_once 'header.php';
// Function to run migrations
function run_migrations() {
try {
$pdo = db();
$migration_dir = 'db/migrations';
$files = glob($migration_dir . '/*.sql');
foreach ($files as $file) {
try {
$sql = file_get_contents($file);
$pdo->exec($sql);
} catch (PDOException $e) {
// Ignore errors, like column already exists
}
}
} catch (PDOException $e) {
// In a real app, you'd log this error.
// For now, we'll just output a generic error.
die("Database migration failed: " . $e->getMessage());
}
}
// Run migrations
run_migrations();
// Fetch tasks
$tasks = [];
try {
$pdo = db();
$stmt = $pdo->prepare("SELECT * FROM tasks WHERE user_id = ? ORDER BY created_at DESC");
$stmt->execute([$_SESSION['user_id']]);
$tasks = $stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
echo '<div class="alert alert-danger">Database error: Could not fetch tasks.</div>';
}
$tasks_by_status = [
'To Do' => [],
'In Progress' => [],
'Done' => []
];
foreach ($tasks as $task) {
if (isset($tasks_by_status[$task['status']])) {
$tasks_by_status[$task['status']][] = $task;
}
}
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
?> ?>
<!doctype html>
<html lang="en"> <?php if (isset($_GET['success'])) : ?>
<head> <div class="alert alert-success alert-dismissible fade show" role="alert">
<meta charset="utf-8" /> Task added successfully!
<meta name="viewport" content="width=device-width, initial-scale=1" /> <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<title>New Style</title>
<?php
// Read project preview data from environment
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
?>
<?php if ($projectDescription): ?>
<!-- Meta description -->
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
<!-- Open Graph meta tags -->
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<!-- Twitter meta tags -->
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<?php endif; ?>
<?php if ($projectImageUrl): ?>
<!-- Open Graph image -->
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<!-- Twitter image -->
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<?php endif; ?>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
<style>
:root {
--bg-color-start: #6a11cb;
--bg-color-end: #2575fc;
--text-color: #ffffff;
--card-bg-color: rgba(255, 255, 255, 0.01);
--card-border-color: rgba(255, 255, 255, 0.1);
}
body {
margin: 0;
font-family: 'Inter', sans-serif;
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
color: var(--text-color);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
text-align: center;
overflow: hidden;
position: relative;
}
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
animation: bg-pan 20s linear infinite;
z-index: -1;
}
@keyframes bg-pan {
0% { background-position: 0% 0%; }
100% { background-position: 100% 100%; }
}
main {
padding: 2rem;
}
.card {
background: var(--card-bg-color);
border: 1px solid var(--card-border-color);
border-radius: 16px;
padding: 2rem;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
.loader {
margin: 1.25rem auto 1.25rem;
width: 48px;
height: 48px;
border: 3px solid rgba(255, 255, 255, 0.25);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.hint {
opacity: 0.9;
}
.sr-only {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap; border: 0;
}
h1 {
font-size: 3rem;
font-weight: 700;
margin: 0 0 1rem;
letter-spacing: -1px;
}
p {
margin: 0.5rem 0;
font-size: 1.1rem;
}
code {
background: rgba(0,0,0,0.2);
padding: 2px 6px;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
footer {
position: absolute;
bottom: 1rem;
font-size: 0.8rem;
opacity: 0.7;
}
</style>
</head>
<body>
<main>
<div class="card">
<h1>Analyzing your requirements and generating your website…</h1>
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
<span class="sr-only">Loading…</span>
</div>
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
<p class="hint">This page will update automatically as the plan is implemented.</p>
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
</div> </div>
</main> <?php endif; ?>
<footer> <?php if (isset($_GET['error'])) : ?>
Page updated: <?= htmlspecialchars($now) ?> (UTC) <div class="alert alert-danger alert-dismissible fade show" role="alert">
</footer> <strong>Error:</strong> <?php echo htmlspecialchars($_GET['error']); ?>
</body> <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</html> </div>
<?php endif; ?>
<div class="kanban-board">
<?php foreach ($tasks_by_status as $status => $tasks_in_status): ?>
<div id="kanban-column-<?php echo str_replace(' ', '-', strtolower($status)); ?>" class="kanban-column" data-status="<?php echo htmlspecialchars($status); ?>">
<h3><?php echo htmlspecialchars($status); ?></h3>
<?php foreach ($tasks_in_status as $task): ?>
<div class="task-card" data-id="<?php echo $task['id']; ?>">
<h5><?php echo htmlspecialchars($task['title']); ?></h5>
<p><?php echo htmlspecialchars($task['description']); ?></p>
</div>
<?php endforeach; ?>
<?php if (empty($tasks_in_status)): ?>
<div class="text-center text-muted">No tasks yet.</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<?php
require_once 'footer.php';
?>

56
login.php Normal file
View File

@ -0,0 +1,56 @@
<?php
session_start();
require_once 'db/config.php';
$error = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = $_POST['username'];
$password = $_POST['password'];
if (empty($username) || empty($password)) {
$error = 'Please fill in all fields.';
} else {
$stmt = db()->prepare("SELECT * FROM users WHERE username = ?");
$stmt->execute([$username]);
$user = $stmt->fetch();
if ($user && password_verify($password, $user['password'])) {
$_SESSION['user_id'] = $user['id'];
$_SESSION['username'] = $user['username'];
header('Location: index.php');
exit;
} else {
$error = 'Invalid username or password.';
}
}
}
include 'header.php';
?>
<div class="container">
<h1 class="mt-5">Login</h1>
<?php if ($error): ?>
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
<?php endif; ?>
<form method="POST">
<div class="form-group">
<label for="username">Username</label>
<input type="text" class="form-control" id="username" name="username" required>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<button type="submit" class="btn btn-primary">Login</button>
</form>
<p class="mt-3">Don't have an account? <a href="register.php">Register here</a>.</p>
</div>
<?php include 'footer.php'; ?>

5
logout.php Normal file
View File

@ -0,0 +1,5 @@
<?php
session_start();
session_destroy();
header('Location: login.php');
exit;

73
register.php Normal file
View File

@ -0,0 +1,73 @@
<?php
session_start();
require_once 'db/config.php';
$error = '';
$success = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = $_POST['username'];
$password = $_POST['password'];
$password_confirm = $_POST['password_confirm'];
if (empty($username) || empty($password) || empty($password_confirm)) {
$error = 'Please fill in all fields.';
} elseif ($password !== $password_confirm) {
$error = 'Passwords do not match.';
} else {
$stmt = db()->prepare("SELECT * FROM users WHERE username = ?");
$stmt->execute([$username]);
$user = $stmt->fetch();
if ($user) {
$error = 'Username already exists.';
} else {
$password_hash = password_hash($password, PASSWORD_DEFAULT);
$stmt = db()->prepare("INSERT INTO users (username, password) VALUES (?, ?)");
if ($stmt->execute([$username, $password_hash])) {
$success = 'Registration successful. You can now <a href="login.php">login</a>.';
} else {
$error = 'An error occurred. Please try again.';
}
}
}
}
include 'header.php';
?>
<div class="container">
<h1 class="mt-5">Register</h1>
<?php if ($error): ?>
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
<?php endif; ?>
<?php if ($success): ?>
<div class="alert alert-success" role="alert">
<?php echo $success; ?>
</div>
<?php endif; ?>
<form method="POST">
<div class="form-group">
<label for="username">Username</label>
<input type="text" class="form-control" id="username" name="username" required>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<div class="form-group">
<label for="password_confirm">Confirm Password</label>
<input type="password" class="form-control" id="password_confirm" name="password_confirm" required>
</div>
<button type="submit" class="btn btn-primary">Register</button>
</form>
<p class="mt-3">Already have an account? <a href="login.php">Login here</a>.</p>
</div>
<?php include 'footer.php'; ?>

51
update_task_status.php Normal file
View File

@ -0,0 +1,51 @@
<?php
require_once 'db/config.php';
// Simple logger
function log_message($message) {
file_put_contents('debug.log', date('Y-m-d H:i:s') . ' - ' . $message . PHP_EOL, FILE_APPEND);
}
log_message('update_task_status.php accessed.');
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
log_message('Request method is POST.');
$input_raw = file_get_contents('php://input');
log_message('Raw input: ' . $input_raw);
$input = json_decode($input_raw, true);
$taskId = $input['task_id'] ?? null;
$newStatus = $input['new_status'] ?? null;
log_message("Parsed input: Task ID = $taskId, New Status = $newStatus");
if ($taskId && $newStatus) {
log_message('Task ID and New Status are present. Updating database...');
try {
$pdo = db();
$stmt = $pdo->prepare("UPDATE tasks SET status = :status WHERE id = :id");
$result = $stmt->execute(['status' => $newStatus, 'id' => $taskId]);
if ($result && $stmt->rowCount() > 0) {
log_message('Database update successful. Rows affected: ' . $stmt->rowCount());
echo json_encode(['success' => true, 'message' => 'Task status updated.']);
} else {
log_message('Database update failed or status unchanged. Rows affected: ' . $stmt->rowCount());
echo json_encode(['success' => false, 'message' => 'Task not found or status unchanged.']);
}
} catch (PDOException $e) {
log_message('Database error: ' . $e->getMessage());
http_response_code(500);
echo json_encode(['success' => false, 'message' => 'Database error: ' . $e->getMessage()]);
}
} else {
log_message('Invalid input. Task ID or New Status is missing.');
http_response_code(400);
echo json_encode(['success' => false, 'message' => 'Invalid input.']);
}
} else {
log_message('Request method not allowed: ' . $_SERVER['REQUEST_METHOD']);
http_response_code(405);
echo json_encode(['success' => false, 'message' => 'Method not allowed.']);
}
?>