soil-analysis-full-report.php 753 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * soil-analysis-full-report.php
  4. *
  5. * Combined report view: redirects to the analysis page which links to the soil report.
  6. * The individual pages (soil-analysis.php and soil-report.php) replaced the original
  7. * combined getResources approach.
  8. */
  9. if (session_status() === PHP_SESSION_NONE) {
  10. session_start();
  11. }
  12. require_once __DIR__ . '/../../../config/database.php';
  13. require_once __DIR__ . '/../../../lib/auth.php';
  14. requireLogin();
  15. $rid = (int) ($_GET['rid'] ?? 0);
  16. $rand = (float) ($_GET['rand'] ?? 0);
  17. if ($rid > 0) {
  18. header("Location: /dashboard/crop-analysis/soil-test-data/soil-analysis.php?rid={$rid}&rand={$rand}");
  19. } else {
  20. header("Location: /dashboard/crop-analysis/soil-test-data/soil-test-data.php");
  21. }
  22. exit;