<?php
// config.php - Database Configuration & Constants
// File location: /bidwheels.net/config.php

// Error Reporting (enable for development)
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Database Configuration
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'bidwheels_db');

// Site Configuration
define('SITE_NAME', 'BidWheels.net');
define('SITE_URL', 'http://localhost/bidwheels'); // Change for production
define('SITE_LOGO', '/bidwheel_logo.png');
define('SITE_ICON', '/bidwheel_icon.png');

// Email Configuration (PHP mail function)
define('NOREPLY_EMAIL', 'noreply@bidwheels.net');
define('SUPPORT_EMAIL', 'support@bidwheels.net');
define('INFO_EMAIL', 'info@bidwheels.net');

// Dummy Account Settings
define('DUMMY_PASSWORD', 'BidWheels123!'); // Fixed password for all dummy accounts

// Auto-bid Settings
define('MAX_BID_PERCENTAGE_CAP', 30); // 30% above starting price
define('MIN_BID_INCREMENT', 50);
define('MAX_BID_INCREMENT', 500);

// Pagination
define('PRODUCTS_PER_PAGE', 12);
define('BLOG_POSTS_PER_PAGE', 10);

// Timezone
date_default_timezone_set('America/New_York');

// Start Session
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

// Database Connection
$conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);

// Check connection
if (!$conn) {
    die("Database connection failed: " . mysqli_connect_error());
}

// Set charset
mysqli_set_charset($conn, "utf8mb4");
?>