config.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. // Email settings
  30. define('ADMIN_EMAIL', 'inbox@medowar.de'); // Change to your admin email
  31. define('FROM_EMAIL', 'shop@medowar.de'); // Change to your sender email
  32. define('FROM_NAME', SITE_NAME);
  33. // Data file paths
  34. define('DATA_DIR', __DIR__ . '/data/');
  35. define('PRODUCTS_FILE', DATA_DIR . 'products.json');
  36. define('RESERVATIONS_FILE', DATA_DIR . 'reservations.json');
  37. // Session settings
  38. if (session_status() === PHP_SESSION_NONE) {
  39. session_start();
  40. }