<?php
// Zona horaria de Merida, Yucatan
date_default_timezone_set('America/Merida');

class Database {
    /*
    private $host = "rocasamexico.com";
    private $db_name = "rocasamexico_intranet";
    private $username = "rocasamexico_admin";
    private $password = "Rocas@Mexico.2025**";
*/
    
    private $host = "rocasamexico.com";
    private $db_name = "rocasamexico_pruebas";
    private $username = "rocasamexico_admin";
    private $password = "Rocas@Mexico.2025**";


    public $conn;
    public function connect() {
        try {
            $this->conn = new PDO( 
                "mysql:host=" . $this->host . ";dbname=" . $this->db_name . ";charset=utf8mb4",
                $this->username,
                $this->password
            );
            $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            return $this->conn;
        } catch(PDOException $e) {
            throw new Exception("Error de conexión: " . $e->getMessage());
        }
    }
}
?>