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


// Email configuration
define('SMTP_HOST', 'mail.firstnationalbankinc.com');  // Your SMTP server
define('SMTP_USERNAME', 'no-reply@firstnationalbankinc.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@firstnationalbankinc.com');  // Sender email address
define('MAIL_FROM_NAME', 'First National Bank Incorporated');  // Sender name




// Bank information
define('BANK_NAME', 'First National Bank Incorporated');
define('BANK_LOGO', 'https://online.firstnationalbankinc.com/logo.png');
define('BANK_ADDRESS', '1738 Morgan Street, Tallahassee, FL 32303');

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




class Database {
    private $host = "localhost";
    private $db_name = "bsicukne_ocean002kk"; // Removed @ symbol - verify correct name
    private $username = "bsicukne_ocea68hhj";
    private $password = 'ixm@sw=a)Lh8'; // 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;
    }
}
?>
