Remove: Delete duplicate validate_login.php from src/processors - keep only root endpoint

This commit is contained in:
twotalesanimation
2025-12-04 15:24:39 +02:00
parent ac460ef97f
commit 902291d8d1
12 changed files with 92 additions and 249 deletions

View File

@@ -0,0 +1,15 @@
<?php
$headerStyle = 'light';
$rootPath = dirname(dirname(dirname(__DIR__)));
include_once($rootPath . '/header.php');
?>
<!-- <?php
$pageTitle = 'About';
$breadcrumbs = [['Home' => 'index.php']];
require_once($rootPath . '/components/banner.php');
?> -->
<!-- Benefit Area start -->
<!-- <?php include_once(dirname(dirname(dirname(__DIR__))) . '/components/insta_footer.php'); ?> -->

View File

@@ -0,0 +1,48 @@
<?php
// DIAGNOSTIC TEST FILE - Shows path resolution in different contexts
echo "<!DOCTYPE html><html><head><title>Path Diagnostic</title></head><body>";
echo "<h1>Path Resolution Diagnostic</h1>";
echo "<hr>";
echo "<h2>Current Directory Information</h2>";
echo "<strong>__FILE__:</strong> " . __FILE__ . "<br>";
echo "<strong>__DIR__:</strong> " . __DIR__ . "<br>";
echo "<hr>";
echo "<h2>Directory Navigation Tests</h2>";
echo "<strong>dirname(__DIR__):</strong> " . dirname(__DIR__) . "<br>";
echo "<strong>dirname(dirname(__DIR__)):</strong> " . dirname(dirname(__DIR__)) . "<br>";
echo "<strong>dirname(dirname(dirname(__DIR__))):</strong> " . dirname(dirname(dirname(__DIR__))) . "<br>";
echo "<hr>";
echo "<h2>\$_SERVER Variables</h2>";
echo "<strong>DOCUMENT_ROOT:</strong> " . ($_SERVER['DOCUMENT_ROOT'] ?? 'NOT SET') . "<br>";
echo "<strong>SCRIPT_FILENAME:</strong> " . ($_SERVER['SCRIPT_FILENAME'] ?? 'NOT SET') . "<br>";
echo "<strong>REQUEST_URI:</strong> " . ($_SERVER['REQUEST_URI'] ?? 'NOT SET') . "<br>";
echo "<strong>SCRIPT_NAME:</strong> " . ($_SERVER['SCRIPT_NAME'] ?? 'NOT SET') . "<br>";
echo "<hr>";
echo "<h2>Path Construction Tests</h2>";
$rootPath = dirname(dirname(dirname(__DIR__)));
echo "<strong>\$rootPath (dirname × 3):</strong> " . $rootPath . "<br>";
echo "<strong>\$rootPath . '/header.php':</strong> " . $rootPath . '/header.php' . "<br>";
echo "<strong>File exists?</strong> " . (file_exists($rootPath . '/header.php') ? 'YES ✓' : 'NO ✗') . "<br>";
echo "<hr>";
echo "<h2>Alternative Path Tests</h2>";
if (isset($_SERVER['DOCUMENT_ROOT']) && is_string($_SERVER['DOCUMENT_ROOT'])) {
$altPath = $_SERVER['DOCUMENT_ROOT'];
echo "<strong>\$_SERVER['DOCUMENT_ROOT']:</strong> " . $altPath . "<br>";
echo "<strong>\$altPath . '/header.php':</strong> " . $altPath . '/header.php' . "<br>";
echo "<strong>File exists?</strong> " . (file_exists($altPath . '/header.php') ? 'YES ✓' : 'NO ✗') . "<br>";
} else {
echo "<strong>DOCUMENT_ROOT not available or not a string</strong><br>";
}
echo "<hr>";
echo "<h2>Component Path Tests</h2>";
echo "<strong>\$rootPath . '/components/insta_footer.php':</strong> " . $rootPath . '/components/insta_footer.php' . "<br>";
echo "<strong>File exists?</strong> " . (file_exists($rootPath . '/components/insta_footer.php') ? 'YES ✓' : 'NO ✗') . "<br>";
echo "</body></html>";
?>

View File

@@ -0,0 +1,21 @@
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
echo "Step 1: Starting script<br>";
$rootPath = dirname(dirname(dirname(__DIR__)));
echo "Step 2: Root path = " . $rootPath . "<br>";
echo "Step 3: Header path = " . $rootPath . '/header.php' . "<br>";
echo "Step 4: File exists? " . (file_exists($rootPath . '/header.php') ? 'YES' : 'NO') . "<br>";
$headerStyle = 'light';
echo "Step 5: About to include header<br>";
include_once($rootPath . '/header.php');
echo "Step 6: Header included successfully<br>";
?>
<h1>Test Page Content</h1>
<?php
echo "Step 7: About to include footer<br>";
include_once($rootPath . '/components/insta_footer.php');
echo "Step 8: Footer included successfully<br>";
?>