| Server IP : 72.60.21.38 / Your IP : 216.73.216.25 Web Server : LiteSpeed System : Linux uk-fast-web1372.main-hosting.eu 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64 User : u390967363 ( 390967363) PHP Version : 8.2.30 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u390967363/public_html/crm/ |
Upload File : |
PK L��Z�@V�� �
config.php<?php
$host = "localhost";
$user = "root";
$password = "";
$db = "aiben_crm";
$conn = new mysqli($host, $user, $password, $db);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>PK L��Z����K K
login.html<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Aiben CRM Admin Login</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-100 to-blue-300">
<div class="bg-white shadow-lg rounded-xl p-8 w-full max-w-md">
<div class="text-center mb-6">
<img src="aiben-logo.png" alt="Aiben Logo" class="h-16 mx-auto">
<h2 class="text-2xl font-bold text-blue-800 mt-2">Admin Login</h2>
</div>
<form action="auth.php" method="POST" class="space-y-4">
<div>
<label class="block text-gray-700 font-semibold">Email</label>
<input type="email" name="email" class="w-full p-3 border rounded-md" required>
</div>
<div>
<label class="block text-gray-700 font-semibold">Password</label>
<input type="password" name="password" class="w-full p-3 border rounded-md" required>
</div>
<div class="flex items-center justify-between">
<label class="flex items-center">
<input type="checkbox" class="form-checkbox text-blue-600" />
<span class="ml-2 text-sm text-gray-600">Remember me</span>
</label>
<a href="#" class="text-sm text-blue-700 hover:underline">Forgot password?</a>
</div>
<button type="submit" class="w-full bg-blue-700 text-white font-semibold py-3 rounded-md hover:bg-blue-800">Login</button>
</form>
</div>
</body>
</html>PK L��ZC�W� auth.php<?php
session_start();
require 'config.php';
$email = $_POST['email'];
$password = $_POST['password'];
$stmt = $conn->prepare("SELECT * FROM admins WHERE email = ?");
$stmt->bind_param("s", $email);
$stmt->execute();
$result = $stmt->get_result();
$user = $result->fetch_assoc();
if ($user && password_verify($password, $user['password'])) {
$_SESSION['admin'] = $user['email'];
header("Location: dashboard.php");
exit();
} else {
echo "<script>alert('Invalid login details.'); window.location.href='login.html';</script>";
}
?>PK L��Z a�ڌ �
dashboard.php<?php
session_start();
if (!isset($_SESSION['admin'])) {
header("Location: login.html");
exit();
}
require 'config.php';
$result = $conn->query("SELECT * FROM crm_entries ORDER BY submitted_at DESC");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Aiben CRM Dashboard</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-gray-100">
<div class="flex justify-between items-center bg-white shadow p-4">
<h1 class="text-2xl font-bold">CRM Dashboard</h1>
<a href="logout.php" class="bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600">Logout</a>
</div>
<div class="p-6 overflow-auto">
<table class="min-w-full bg-white shadow rounded-lg text-sm">
<thead class="bg-blue-600 text-white">
<tr>
<th class="p-3 text-left">Caller</th>
<th class="p-3 text-left">Email</th>
<th class="p-3 text-left">Phone</th>
<th class="p-3 text-left">Purpose</th>
<th class="p-3 text-left">Status</th>
<th class="p-3 text-left">Follow-Up</th>
<th class="p-3 text-left">Submitted</th>
</tr>
</thead>
<tbody class="divide-y">
<?php while ($row = $result->fetch_assoc()): ?>
<tr class="hover:bg-gray-100">
<td class="p-3 font-medium"><?php echo $row['caller_name']; ?></td>
<td class="p-3"><?php echo $row['caller_email']; ?></td>
<td class="p-3"><?php echo $row['caller_phone']; ?></td>
<td class="p-3"><?php echo $row['call_purpose']; ?></td>
<td class="p-3"><?php echo $row['lead_status']; ?></td>
<td class="p-3"><?php echo $row['follow_up_date']; ?></td>
<td class="p-3 text-xs text-gray-500"><?php echo $row['submitted_at']; ?></td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</body>
</html>PK L��Z=�ĘT T
logout.php<?php
session_start();
session_destroy();
header("Location: login.html");
exit();
?>PK L��Z�H�y y
submit.php<?php
require 'config.php';
$callerName = $_POST['callerName'];
$callerEmail = $_POST['callerEmail'];
$callerPhone = $_POST['callerPhone'];
$callerLocation = $_POST['callerLocation'];
$callPurpose = $_POST['callPurpose'];
$callerResponse = $_POST['callerResponse'];
$source = $_POST['source'];
$additionalInfo = $_POST['additionalInfo'];
$followUpDate = $_POST['followUpDate'];
$assignedStaff = $_POST['assignedStaff'];
$leadStatus = $_POST['leadStatus'];
$attachmentName = '';
if (isset($_FILES['attachments']) && $_FILES['attachments']['error'] === UPLOAD_ERR_OK) {
$attachmentName = basename($_FILES['attachments']['name']);
move_uploaded_file($_FILES['attachments']['tmp_name'], "uploads/" . $attachmentName);
}
$stmt = $conn->prepare("INSERT INTO crm_entries (
caller_name, caller_email, caller_phone, caller_location, call_purpose,
caller_response, source, additional_info, follow_up_date,
assigned_staff, lead_status, attachment_name
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("ssssssssssss",
$callerName, $callerEmail, $callerPhone, $callerLocation, $callPurpose,
$callerResponse, $source, $additionalInfo, $followUpDate,
$assignedStaff, $leadStatus, $attachmentName
);
if ($stmt->execute()) {
echo "<script>alert('CRM entry submitted successfully!'); window.location.href='login.html';</script>";
} else {
echo "Error: " . $stmt->error;
}
?>PK L��Z�@V�� �
�� config.phpPK L��Z����K K
��� login.htmlPK L��ZC�W� ��r auth.phpPK L��Z a�ڌ �
��� dashboard.phpPK L��Z=�ĘT T
��j logout.phpPK L��Z�H�y y
��� submit.phpPK Q �