+
+
+
+
+
+
+
diff --git a/db/migrations/001_create_jobs_table.sql b/db/migrations/001_create_jobs_table.sql
new file mode 100644
index 0000000..932b1ca
--- /dev/null
+++ b/db/migrations/001_create_jobs_table.sql
@@ -0,0 +1,15 @@
+-- 001_create_jobs_table.sql
+-- This script creates the main 'jobs' table for the SkillRunner platform.
+
+CREATE TABLE IF NOT EXISTS `jobs` (
+ `id` INT AUTO_INCREMENT PRIMARY KEY,
+ `title` VARCHAR(255) NOT NULL,
+ `description` TEXT NOT NULL,
+ `category` VARCHAR(100) NOT NULL,
+ `skills` VARCHAR(255) NOT NULL COMMENT 'Comma-separated list of skills',
+ `budget` DECIMAL(10, 2) NOT NULL,
+ `deadline` DATE NOT NULL,
+ `status` VARCHAR(50) NOT NULL DEFAULT 'open' COMMENT 'e.g., open, reserved, in_progress, completed',
+ `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `client_id` INT COMMENT 'Foreign key to users table, can be added later'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
diff --git a/db/migrations/002_create_workers_table.sql b/db/migrations/002_create_workers_table.sql
new file mode 100644
index 0000000..ea7d123
--- /dev/null
+++ b/db/migrations/002_create_workers_table.sql
@@ -0,0 +1,10 @@
+-- db/migrations/002_create_workers_table.sql
+CREATE TABLE IF NOT EXISTS workers (
+ id INT(11) NOT NULL AUTO_INCREMENT,
+ name VARCHAR(255) NOT NULL,
+ email VARCHAR(255) NOT NULL,
+ password_hash VARCHAR(255) NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (id),
+ UNIQUE KEY (email)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
diff --git a/db/migrations/003_create_job_applications_table.sql b/db/migrations/003_create_job_applications_table.sql
new file mode 100644
index 0000000..6a89a4c
--- /dev/null
+++ b/db/migrations/003_create_job_applications_table.sql
@@ -0,0 +1,11 @@
+-- db/migrations/003_create_job_applications_table.sql
+CREATE TABLE IF NOT EXISTS job_applications (
+ id INT(11) NOT NULL AUTO_INCREMENT,
+ job_id INT(11) NOT NULL,
+ worker_id INT(11) NOT NULL,
+ application_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ status ENUM('pending', 'viewed', 'accepted', 'rejected') DEFAULT 'pending',
+ PRIMARY KEY (id),
+ FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE,
+ FOREIGN KEY (worker_id) REFERENCES workers(id) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
diff --git a/db/migrations/005_add_password_to_workers.sql b/db/migrations/005_add_password_to_workers.sql
new file mode 100644
index 0000000..6281ee2
--- /dev/null
+++ b/db/migrations/005_add_password_to_workers.sql
@@ -0,0 +1,2 @@
+
+ALTER TABLE `workers` ADD `password` VARCHAR(255) NOT NULL;
diff --git a/db/migrations/006_create_clients_table.sql b/db/migrations/006_create_clients_table.sql
new file mode 100644
index 0000000..00f4960
--- /dev/null
+++ b/db/migrations/006_create_clients_table.sql
@@ -0,0 +1,7 @@
+CREATE TABLE IF NOT EXISTS clients (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ name VARCHAR(255) NOT NULL,
+ email VARCHAR(255) NOT NULL UNIQUE,
+ password VARCHAR(255) NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+);
diff --git a/db/migrations/007_add_client_id_to_jobs.sql b/db/migrations/007_add_client_id_to_jobs.sql
new file mode 100644
index 0000000..d39dcbe
--- /dev/null
+++ b/db/migrations/007_add_client_id_to_jobs.sql
@@ -0,0 +1 @@
+ALTER TABLE jobs ADD COLUMN client_id INT NOT NULL AFTER id;
\ No newline at end of file
diff --git a/index.php b/index.php
index 7205f3d..4d75585 100644
--- a/index.php
+++ b/index.php
@@ -1,150 +1,105 @@
-
- New Style
+ SkillRunner - Find & Hire Verified Experts
-
-
-
-
+
+
-
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
Analyzing your requirements and generating your website…
-
- Loading…
-
-
= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-
This page will update automatically as the plan is implemented.
-
Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
-
-
-
+
+
+
+
+
+
+
Get any job done, securely.
+
Post a task, fund the escrow with confidence, and release payment only when you're satisfied. Powered by a community of verified, skilled professionals.
Our workers undergo a verification process, so you hire with peace of mind.
+
+
+
+
+
Secure Escrow
+
+
Your funds are held safely in escrow and are only released upon your approval.
+
+
+
+
+
Dispute Resolution
+
+
Admins are available to mediate and resolve any disputes that may arise.
+
+
+
+
+
+
+
+
+
+
diff --git a/job-detail.php b/job-detail.php
new file mode 100644
index 0000000..247010c
--- /dev/null
+++ b/job-detail.php
@@ -0,0 +1,153 @@
+prepare("SELECT * FROM jobs WHERE id = :id");
+ $stmt->bindParam(':id', $job_id, PDO::PARAM_INT);
+ $stmt->execute();
+ $job = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!$job) {
+ // Or show a "Job not found" message
+ header("Location: jobs.php");
+ exit();
+ }
+} catch (PDOException $e) {
+ // In a real app, log this error instead of displaying it
+ die("Database error: " . $e->getMessage());
+}
+
+?>
+
+
+
+
+
+ - SkillRunner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Your application has been submitted successfully!
+
+ There was an error submitting your application. You may have already applied for this job.
+
+
+
+
+
+
+
+
+
+
diff --git a/jobs.php b/jobs.php
new file mode 100644
index 0000000..4777e01
--- /dev/null
+++ b/jobs.php
@@ -0,0 +1,124 @@
+query('SELECT title, category, budget, description, skills FROM jobs ORDER BY created_at DESC');
+ $jobs = $stmt->fetchAll(PDO::FETCH_ASSOC);
+} catch (PDOException $e) {
+ // In a real application, you would log this error and show a user-friendly message.
+ die("Could not connect to the database and fetch jobs: " . $e->getMessage());
+}
+?>
+
+
+
+
+
+ Browse Jobs - SkillRunner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Open Opportunities
+
Find your next project and start earning.
+
+
+
+
+
+
+
+
+
No Jobs Posted Yet
+
Check back soon for new opportunities or be the first to post a job!