| 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/domains/aibenproperties.com/public_html/app/ |
Upload File : |
<?php
require_once 'includes/db.php';
try {
// Leases / Rentals Table
$pdo->exec("CREATE TABLE IF NOT EXISTS leases (
id INT AUTO_INCREMENT PRIMARY KEY,
property_id INT NOT NULL,
tenant_id INT NOT NULL,
agent_id INT,
start_date DATE NOT NULL,
end_date DATE NOT NULL,
rent_amount DECIMAL(15, 2) NOT NULL,
deposit_amount DECIMAL(15, 2) DEFAULT 0.00,
payment_frequency ENUM('monthly', 'quarterly', 'annually') DEFAULT 'monthly',
status ENUM('pending', 'active', 'expiring', 'expired', 'terminated') DEFAULT 'pending',
agreement_doc VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (property_id) REFERENCES properties(id),
FOREIGN KEY (tenant_id) REFERENCES users(id),
FOREIGN KEY (agent_id) REFERENCES users(id)
)");
echo "Leases table created successfully.<br>";
} catch (PDOException $e) {
die("DB Error: " . $e->getMessage());
}
?>