<?php
/* ============================================================================
 *  GREEN SUBMISSIONS — SITE CONFIGURATION (SAMPLE)
 *  ----------------------------------------------------------------------------
 *  The web installer (/install/) creates config.php for you automatically.
 *  To configure by hand instead: copy this file to config.php and fill in
 *  the values below.
 *
 *  Submission Manager by Glenn Lyvers, provided freely through
 *  greensubmissions.com — see LICENSE.txt.
 * ============================================================================ */

// --- Database credentials ---------------------------------------------------
define('DBHOST', 'localhost');
define('DBUSER', 'your_database_user');
define('DBPASS', 'your_database_password');
define('DBNAME', 'your_database_name');

try {
    $pdo = new PDO("mysql:host=" . DBHOST . ";dbname=" . DBNAME . ";charset=utf8mb4", DBUSER, DBPASS);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
    error_log('DB connection failed (config.php): ' . $e->getMessage());
    http_response_code(503);
    die("The site is temporarily unavailable. Please try again shortly.");
}

// --- Site identity -----------------------------------------------------------
// $site_url  : full URL to THIS app's folder, no trailing slash
//              e.g. https://example.com/submit
// $site_name : your journal / press name, shown throughout the app
// $site_home_url : where the masthead links to (your main website)
// $site_tagline  : small line above the masthead title (optional, may be '')
$site_url      = 'https://example.com/submit';
$site_name     = 'Your Journal Name';
$site_home_url = 'https://example.com';
$site_tagline  = 'A Literary Journal';

// --- Cloudflare Turnstile (optional bot protection) --------------------------
// Free at https://dash.cloudflare.com/?to=/:account/turnstile
// Leave both blank to use the built-in image captcha instead.
define('TURNSTILE_SITEKEY', '');
define('TURNSTILE_SECRET', '');
