From 1c7e1e6f2597cf2aec7ecc9c935aedb4c8b40d39 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 5 Oct 2025 21:53:53 +0000 Subject: [PATCH] Auto commit: 2025-10-05T21:53:53.351Z --- admin.php | 130 +++++++++++++++++++++++++++ apply.php | 55 ++++++++++++ assets/css/custom.css | 185 ++++++++++++++++++++++++++++++++++++++ assets/js/main.js | 1 + dashboard.php | 43 +++++++++ db/migrate.php | 46 ++++++++++ footer.php | 7 ++ header.php | 31 +++++++ index.php | 200 +++++++++++------------------------------- influencers.php | 34 +++++++ login.php | 70 +++++++++++++++ logout.php | 6 ++ register.php | 87 ++++++++++++++++++ request_form.php | 75 ++++++++++++++++ status.php | 56 ++++++++++++ 15 files changed, 878 insertions(+), 148 deletions(-) create mode 100644 admin.php create mode 100644 apply.php create mode 100644 assets/css/custom.css create mode 100644 assets/js/main.js create mode 100644 dashboard.php create mode 100644 db/migrate.php create mode 100644 footer.php create mode 100644 header.php create mode 100644 influencers.php create mode 100644 login.php create mode 100644 logout.php create mode 100644 register.php create mode 100644 request_form.php create mode 100644 status.php diff --git a/admin.php b/admin.php new file mode 100644 index 0000000..8eb93f5 --- /dev/null +++ b/admin.php @@ -0,0 +1,130 @@ +query('SELECT id, name, surname, email, role, created_at FROM users ORDER BY created_at DESC'); + $users = $stmt_users->fetchAll(PDO::FETCH_ASSOC); + + // 3. Veritabanından tüm influencer isteklerini çek + $stmt_requests = $pdo->query(' + SELECT + ir.id, ir.client_name, ir.client_surname, ir.client_phone, ir.message, ir.status, ir.created_at, + u.name as influencer_name, u.surname as influencer_surname + FROM influencer_requests ir + JOIN users u ON ir.influencer_user_id = u.id + ORDER BY ir.created_at DESC + '); + $requests = $stmt_requests->fetchAll(PDO::FETCH_ASSOC); + +} catch (PDOException $e) { + // Geliştirme aşamasında hatayı görmek faydalı olabilir + $error_message = "Veritabanı hatası: " . $e->getMessage(); +} + +?> + +
+ + +
+

+
+ + +
+

Influencer Talepleri

+

İşletmelerden gelen en son talepler.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDTalep EdenTelefonInfluencerDurumTarihMesaj
Henüz hiç talep gelmemiş.
+
+
+ +
+

Kullanıcı Yönetimi

+

Sisteme kayıtlı tüm kullanıcıların listesi.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDAdSoyadE-postaRolKayıt Tarihi
Sistemde hiç kullanıcı bulunamadı.
+
+
+
+ + diff --git a/apply.php b/apply.php new file mode 100644 index 0000000..fedeccc --- /dev/null +++ b/apply.php @@ -0,0 +1,55 @@ +prepare("UPDATE users SET bio = ?, category = ?, profile_status = 'pending' WHERE id = ?"); + $stmt->execute([$bio, $category, $user_id]); + $message = '
Profiliniz başarıyla güncellendi. Başvurunuz incelenmek üzere gönderildi.
'; + } catch (PDOException $e) { + $message = '
Profil güncellenirken bir hata oluştu: ' . $e->getMessage() . '
'; + } +} + +// Fetch current user data +$stmt = $pdo->prepare("SELECT bio, category FROM users WHERE id = ?"); +$stmt->execute([$user_id]); +$user = $stmt->fetch(PDO::FETCH_ASSOC); + +?> + +
+

Başvuru Yap / Profili Düzenle

+

Influencer profilinizi tamamlamak veya güncellemek için aşağıdaki formu doldurun.

+ + + +
+
+ + +
+
+ + +
+ + Panele Dön +
+
+ + diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..55b080f --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,185 @@ +/* Beni de Unlu Yap - Custom CSS */ + +:root { + --primary-color: #5A67D8; /* Indigo */ + --accent-color: #38B2AC; /* Teal */ + --bg-light: #F7FAFC; + --surface-white: #FFFFFF; + --text-dark: #2D3748; + --text-medium: #4A5568; + --border-color: #E2E8F0; +} + +body { + font-family: 'Inter', sans-serif; + color: var(--text-medium); + background-color: var(--bg-light); + margin: 0; + line-height: 1.6; +} + +h1, h2, h3 { + font-family: 'Georgia', serif; + color: var(--text-dark); + font-weight: 700; +} + +.container { + max-width: 960px; + margin: 2rem auto; + padding: 0 1.5rem; +} + +/* Header */ +header { + background-color: var(--surface-white); + box-shadow: 0 2px 4px rgba(0,0,0,0.05); + padding: 1rem 1.5rem; +} + +nav { + display: flex; + justify-content: space-between; + align-items: center; + max-width: 1200px; + margin: 0 auto; +} + +nav .logo { + font-family: 'Georgia', serif; + font-size: 1.5rem; + font-weight: 700; + color: var(--primary-color); + text-decoration: none; +} + +nav ul { + list-style: none; + margin: 0; + padding: 0; + display: flex; + gap: 1.5rem; +} + +nav a { + text-decoration: none; + color: var(--text-dark); + font-weight: 500; + transition: color 0.3s ease; +} + +nav a:hover { + color: var(--primary-color); +} + +/* Hero Section */ +.hero { + background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); + color: var(--surface-white); + text-align: center; + padding: 5rem 1.5rem; +} + +.hero h1 { + font-size: 3rem; + color: var(--surface-white); + margin-bottom: 1rem; +} + +.hero p { + font-size: 1.2rem; + margin-bottom: 2rem; +} + +/* Buttons */ +.btn { + display: inline-block; + background-color: var(--primary-color); + color: var(--surface-white); + padding: 0.8rem 1.5rem; + border-radius: 0.5rem; + text-decoration: none; + font-weight: 700; + border: none; + cursor: pointer; + transition: background-color 0.3s ease; +} + +.btn:hover { + background-color: #434190; +} + +/* Forms */ +.form-group { + margin-bottom: 1.5rem; +} + +.form-group label { + display: block; + font-weight: 700; + margin-bottom: 0.5rem; + color: var(--text-dark); +} + +.form-group input, +.form-group textarea { + width: 100%; + padding: 0.8rem; + border: 1px solid var(--border-color); + border-radius: 0.5rem; + font-size: 1rem; +} + +.form-group input:focus, +.form-group textarea:focus { + outline: none; + border-color: var(--primary-color); + box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.3); +} + +/* Sections */ +section { + padding: 3rem 0; + border-bottom: 1px solid var(--border-color); +} + +.features-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); + gap: 2rem; + margin-top: 2rem; +} + +.feature-item { + background: var(--surface-white); + padding: 2rem; + border-radius: 0.5rem; + box-shadow: 0 4px 12px rgba(0,0,0,0.05); +} + +/* Footer */ +footer { + text-align: center; + padding: 2rem 0; + color: var(--text-medium); +} + +/* Alerts */ +.errors, .success { + padding: 1rem; + margin-bottom: 1rem; + border-radius: 0.5rem; + border: 1px solid; +} + +.errors { + background-color: #FED7D7; + color: #9B2C2C; + border-color: #F56565; +} + +.success { + background-color: #C6F6D5; + color: #2F855A; + border-color: #68D391; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..fa40783 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1 @@ +// Beni de Unlu Yap - Main JS file \ No newline at end of file diff --git a/dashboard.php b/dashboard.php new file mode 100644 index 0000000..a699f80 --- /dev/null +++ b/dashboard.php @@ -0,0 +1,43 @@ + + +
+

Panelim

+

Hoş geldin, !

+

Burası sizin kişisel paneliniz. Projeyle ilgili işlemlerinizi buradan yönetebilirsiniz.

+ +
+ + + + +

Ajans paneli özellikleri yakında burada olacak.

+ +

Yönetim işlemleri için Admin Paneli'ni kullanabilirsiniz.

+ + +
+ + diff --git a/db/migrate.php b/db/migrate.php new file mode 100644 index 0000000..399392d --- /dev/null +++ b/db/migrate.php @@ -0,0 +1,46 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $pdo_server->exec("CREATE DATABASE IF NOT EXISTS `" . DB_NAME . "` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"); + echo "Database '" . DB_NAME . "' checked/created.\n"; + + // Connect to the specific database + $pdo = db(); + echo "Database connected successfully.\n"; + + // Ensure users table exists with a minimal schema + $pdo->exec("\n CREATE TABLE IF NOT EXISTS `users` (\n `id` INT AUTO_INCREMENT PRIMARY KEY,\n `email` VARCHAR(100) NOT NULL UNIQUE,\n `password` VARCHAR(255) NOT NULL,\n `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n "); + echo "Base 'users' table checked/created.\n"; + + // --- Add columns if they don't exist --- + + $columns = [ + 'name' => "ADD COLUMN `name` VARCHAR(50) NOT NULL AFTER `id`", + 'surname' => "ADD COLUMN `surname` VARCHAR(50) NOT NULL AFTER `name`", + 'role' => "ADD COLUMN `role` ENUM('talent', 'agency', 'admin') NOT NULL DEFAULT 'talent' AFTER `password`", + 'bio' => "ADD COLUMN `bio` TEXT AFTER `role`", + 'category' => "ADD COLUMN `category` VARCHAR(100) AFTER `bio`", + 'profile_status' => "ADD COLUMN `profile_status` VARCHAR(50) NOT NULL DEFAULT 'new' AFTER `category`" + ]; + + foreach ($columns as $column_name => $add_sql) { + $stmt = $pdo->query("SHOW COLUMNS FROM `users` LIKE '$column_name'"); + if ($stmt->fetch(PDO::FETCH_ASSOC)) { + echo "Column '$column_name' already exists.\n"; + } else { + $pdo->exec("ALTER TABLE `users` $add_sql;"); + echo "Column '$column_name' added successfully.\n"; + } + } + + // Create 'influencer_requests' table if not exists + $pdo->exec("\n CREATE TABLE IF NOT EXISTS `influencer_requests` (\n `id` INT AUTO_INCREMENT PRIMARY KEY,\n `influencer_user_id` INT NOT NULL,\n `client_name` VARCHAR(255) NOT NULL,\n `client_surname` VARCHAR(255) NOT NULL,\n `client_phone` VARCHAR(50) NOT NULL,\n `message` TEXT,\n `status` VARCHAR(50) NOT NULL DEFAULT 'new',\n `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (`influencer_user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n "); + echo "Table 'influencer_requests' checked/created.\n"; + +} catch (PDOException $e) { + die("Error: " . $e->getMessage()); +} diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..7a04f6b --- /dev/null +++ b/footer.php @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/header.php b/header.php new file mode 100644 index 0000000..1e4dd79 --- /dev/null +++ b/header.php @@ -0,0 +1,31 @@ + + + + + + + Beni de Ünlü Yap + + + + +
+ +
+
\ No newline at end of file diff --git a/index.php b/index.php index 7205f3d..9ade626 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,54 @@ - -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); -?> - - - - - - New Style - - - - - - - - - - - - - - - - - - - - - -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

+
+
+

Şöhretin Kapısını Arala

+

Tek bir başvuru ile Türkiye'nin en iyi ajanslarına ulaş.

+ Hemen Başvur
-
-
- Page updated: (UTC) -
- - + + +
+

Hakkımızda

+

Beni de Ünlü Yap, oyuncu, model ve influencer adaylarını doğru ajanslarla buluşturan bir platformdur. Profilini oluştur, başvurunu yap ve hayallerine bir adım daha yaklaş.

+
+ +
+

Nasıl Çalışır?

+
+
+

1. Profilini Oluştur

+

Kişisel bilgilerini, yeteneklerini ve fotoğraflarını ekleyerek dikkat çekici bir profil oluştur.

+
+
+

2. Tek Tıkla Başvur

+

Hazırladığın profil ile sistemdeki tüm ajanslara aynı anda, tek bir tıkla başvurunu gönder.

+
+
+

3. Süreci Takip Et

+

Başvurunun hangi aşamada olduğunu (inceleniyor, onaylandı, reddedildi) panelinden anlık olarak takip et.

+
+
+
+ +
+

İletişim

+

Soru ve önerileriniz için bize ulaşın.

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + \ No newline at end of file diff --git a/influencers.php b/influencers.php new file mode 100644 index 0000000..0c29594 --- /dev/null +++ b/influencers.php @@ -0,0 +1,34 @@ +prepare("SELECT id, name, surname, email FROM users WHERE role = ?"); +$stmt->execute(['talent']); +$influencers = $stmt->fetchAll(PDO::FETCH_ASSOC); +?> + +
+

Influencerlar

+
+ +
+

Henüz sisteme kayıtlı bir influencer bulunmuyor.

+
+ + +
+
+
+
+

+ İstek Gönder +
+
+
+ + +
+
+ + diff --git a/login.php b/login.php new file mode 100644 index 0000000..1032164 --- /dev/null +++ b/login.php @@ -0,0 +1,70 @@ +prepare("SELECT * FROM users WHERE email = ?"); + $stmt->execute([$email]); + $user = $stmt->fetch(); + + if ($user && password_verify($password, $user['password'])) { + $_SESSION['loggedin'] = true; + $_SESSION['user_id'] = $user['id']; + $_SESSION['user_name'] = $user['name']; + $_SESSION['role'] = $user['role']; + header('Location: /dashboard.php'); + exit; + } else { + $errors[] = 'Geçersiz e-posta veya şifre.'; + } + } catch (PDOException $e) { + $errors[] = "Veritabanı hatası: " . $e->getMessage(); + } + } +} +?> + +
+

Giriş Yap

+ + +
+ +

+ +
+ + +
+
+ + +
+
+ + +
+ +
+
+ + \ No newline at end of file diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..5b911a6 --- /dev/null +++ b/logout.php @@ -0,0 +1,6 @@ +prepare("SELECT id FROM users WHERE email = ?"); + $stmt->execute([$email]); + if ($stmt->fetch()) { + $errors[] = 'Bu e-posta adresi zaten kayıtlı.'; + } else { + $hashed_password = password_hash($password, PASSWORD_DEFAULT); + $stmt = $pdo->prepare("INSERT INTO users (name, email, password) VALUES (?, ?, ?)"); + $stmt->execute([$name, $email, $hashed_password]); + $success = 'Başarıyla kayıt oldunuz! Giriş yapabilirsiniz.'; + } + } catch (PDOException $e) { + $errors[] = "Veritabanı hatası: " . $e->getMessage(); + } + } +} +?> + +
+

Kayıt Ol

+ + +
+ +

+ +
+ + + +
+

+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ + \ No newline at end of file diff --git a/request_form.php b/request_form.php new file mode 100644 index 0000000..e11d41e --- /dev/null +++ b/request_form.php @@ -0,0 +1,75 @@ +prepare("SELECT name, surname FROM users WHERE id = ? AND role = 'talent'"); +$stmt->execute([$influencer_id]); +$influencer = $stmt->fetch(PDO::FETCH_ASSOC); + +if (!$influencer) { + die("Belirtilen influencer bulunamadı veya bir yetenek değil."); +} + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $client_name = $_POST['client_name'] ?? ''; + $client_surname = $_POST['client_surname'] ?? ''; + $client_phone = $_POST['client_phone'] ?? ''; + $request_message = $_POST['message'] ?? ''; + + if ($client_name && $client_surname && $client_phone) { + try { + $insert_stmt = $pdo->prepare(" + INSERT INTO influencer_requests + (influencer_user_id, client_name, client_surname, client_phone, message) + VALUES (?, ?, ?, ?, ?) + "); + $insert_stmt->execute([$influencer_id, $client_name, $client_surname, $client_phone, $request_message]); + $message = '
Talebiniz başarıyla gönderildi.
'; + } catch (PDOException $e) { + $message = '
Talebiniz gönderilirken bir hata oluştu: ' . $e->getMessage() . '
'; + } + } else { + $message = '
Lütfen tüm zorunlu alanları doldurun.
'; + } +} +?> + +
+

Influencer için Talep Oluştur

+

Influencer:

+ + + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + Geri Dön +
+
+ + diff --git a/status.php b/status.php new file mode 100644 index 0000000..61768a5 --- /dev/null +++ b/status.php @@ -0,0 +1,56 @@ +prepare("SELECT profile_status FROM users WHERE id = ?"); +$stmt->execute([$user_id]); +$status = $stmt->fetchColumn(); + +$status_message = ''; +$status_class = 'alert-secondary'; + +switch ($status) { + case 'new': + $status_message = 'Henüz bir başvuru yapmadınız. Lütfen profil bilgilerinizi doldurun.'; + $status_class = 'alert-warning'; + break; + case 'pending': + $status_message = 'Başvurunuz alınmıştır ve şu anda incelenmektedir.'; + $status_class = 'alert-info'; + break; + case 'approved': + $status_message = 'Tebrikler! Başvurunuz onaylanmıştır.'; + $status_class = 'alert-success'; + break; + case 'rejected': + $status_message = 'Başvurunuz maalesef reddedilmiştir.'; + $status_class = 'alert-danger'; + break; + default: + $status_message = 'Durumunuz belirlenemedi.'; +} + +?> + +
+

Başvuru Durumu

+

Profilinizin ve başvurunuzun güncel durumu aşağıdadır.

+ + + + Panele Dön +
+ +