config.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // Configuration file for the webshop
  3. // Site settings
  4. define('SITE_NAME', 'Feuerwehr Freising Test Shop');
  5. define('SITE_URL', ''); // Leave empty for relative URLs
  6. // Admin settings
  7. // Default password: admin123
  8. // Change these hashes after first login!
  9. //
  10. // To generate a new password hash in bash (using Python bcrypt):
  11. // python3 -c "import bcrypt; print(bcrypt.hashpw(b'your_new_password', bcrypt.gensalt(rounds=10, prefix=b'2y')).decode())"
  12. //
  13. // Alternative using htpasswd (if Apache tools are installed):
  14. // htpasswd -bnBC 10 "" your_new_password | sed 's/^://' | sed 's/\$2y\$/\$2y\$/'
  15. //
  16. // To add a new admin user:
  17. // 1) Create a new hash for the password (see commands above).
  18. // 2) Add a new entry to ADMIN_USERS: 'username' => 'hash'
  19. //
  20. // Example:
  21. // 'max' => '$2y$10$your_hash_here'
  22. //
  23. define('ADMIN_USERS', [
  24. 'admin' => '$2y$10$gArNDW.HhPmDcwYJ/xWRiOPkNop3695UIYzkV.G8WHQRUtLJVPLhy',
  25. 'manager' => '$2y$10$gArNDW.HhPmDcwYJ/xWRiOPkNop3695UIYzkV.G8WHQRUtLJVPLhy'
  26. ]);
  27. // Reservation settings
  28. define('RESERVATION_EXPIRY_DAYS', 60);
  29. define('ORDER_PREFIX', 'FWFS'); // Prefix for order number pattern: PREFIX-YEAR-SEQ
  30. // Email settings
  31. define('ADMIN_EMAIL', 'inbox@medowar.de'); // Change to your admin email
  32. define('FROM_EMAIL', 'shop@med0.de'); // Change to your sender email
  33. define('FROM_NAME', SITE_NAME);
  34. // Data file paths
  35. define('DATA_DIR', __DIR__ . '/data/');
  36. define('PRODUCTS_FILE', DATA_DIR . 'products.json');
  37. define('RESERVATIONS_FILE', DATA_DIR . 'reservations.json');
  38. // Session settings
  39. if (session_status() === PHP_SESSION_NONE) {
  40. session_start();
  41. }