<?php
// Database configuration
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'storeweb');

// Site configuration
define('SITE_NAME', 'كريستال شوب');

// Determine if the site is running on HTTPS
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'];
$request_uri = dirname($_SERVER['REQUEST_URI']);

// For XAMPP, we need to handle the directory structure correctly
if (strpos($request_uri, '/storeweb') !== false) {
    define('SITE_URL', $protocol . '://' . $host . '/storeweb');
} else {
    define('SITE_URL', $protocol . '://' . $host);
}

// Start session
session_start();

// Set language direction
define('LANG_DIRECTION', 'rtl');
?>