<?php
define('BASE_URL', 'https://online.oceanbankcooperation.com/');


// Email configuration
define('SMTP_HOST', 'mail.oceanbankcooperation.com');  // Your SMTP server
define('SMTP_USERNAME', 'no-reply@oceanbankcooperation.com');  // Your email address
define('SMTP_PASSWORD', 'Messent2020@');  // Your email password
define('SMTP_SECURE', 'tls');  // Connection encryption ('tls' or 'ssl')
define('SMTP_PORT', 587);  // SMTP port (usually 587 for TLS, 465 for SSL)
define('MAIL_FROM_ADDRESS', 'no-reply@oceanbankcooperation.com');  // Sender email address
define('MAIL_FROM_NAME', 'Ocean Bank Cooperation');  // Sender name




// Bank information
define('BANK_NAME', 'Ocean Bank Cooperation');
define('BANK_LOGO', 'https://online.oceanbankcooperation.com/logo.png');
define('BANK_ADDRESS', '1738 Morgan Street, Tallahassee, FL 32303');

// Social media links
define('FACEBOOK_URL', '#');
define('FACEBOOK_ICON', 'https://online.oceanbankcooperation.com/assets/img/facebook-icon.png');
define('TWITTER_URL', '#');
define('TWITTER_ICON', 'https://online.oceanbankcooperation.com/assets/img/twitter-icon.png');
define('INSTAGRAM_URL', '#');
define('INSTAGRAM_ICON', 'https://online.oceanbankcooperation.com/assets/img/instagram-icon.png');




class Database {
    private $host = "localhost";
    private $db_name = "hakadosh_newbank23"; // Removed @ symbol - verify correct name
    private $username = "hakadosh_banks9s9";
    private $password = 'pnHJCwNz7Vwc'; // Using single quotes for special characters
    public $conn;

    public function getConnection() {
        $this->conn = null;
        try {
            $this->conn = new PDO(
                "mysql:host=" . $this->host . ";dbname=" . $this->db_name,
                $this->username,
                $this->password
            );
            $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        } catch(PDOException $e) {
            // Log error instead of displaying it
            error_log("Database Connection Error: " . $e->getMessage());
            // For debugging only - remove in production
            // echo "Connection Error: " . $e->getMessage();
            throw new Exception("Database connection failed. Please try again later.");
        }
        return $this->conn;
    }
}
?>
