Changed admin path's and page paths to absolute.

This commit is contained in:
Tristan Ancelet 2023-05-27 19:40:40 -05:00
parent b871daf30e
commit a715d95da7
4 changed files with 13 additions and 10 deletions

View File

@ -1,3 +1,3 @@
<?php <?php
echo $_SERVER['DOCUMENT_ROOT']; phpinfo();
?> ?>

View File

@ -8,8 +8,8 @@ $db = new SQLite3("../webcron.db");
<html> <html>
<head> <head>
<!-- <script src="https://cdn.tailwindcss.com"></script> --> <!-- <script src="https://cdn.tailwindcss.com"></script> -->
<link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="/css/main.css">
<script src="main.js"> </script> <script src="/js/main.js"> </script>
<title><?php <title><?php
$filename = ucfirst(explode('.',basename($_SERVER['SCRIPT_FILENAME']))[0]); $filename = ucfirst(explode('.',basename($_SERVER['SCRIPT_FILENAME']))[0]);
echo $filename; echo $filename;
@ -17,7 +17,7 @@ $db = new SQLite3("../webcron.db");
</head> </head>
<body> <body>
<nav> <nav>
<a class='nav-button' href='index.php'>Log Management</a> <a class='nav-button' href='/index.php'>Log Management</a>
<?php <?php
$items = scandir($root); $items = scandir($root);
foreach ($items as $item){ foreach ($items as $item){
@ -27,6 +27,7 @@ $db = new SQLite3("../webcron.db");
} }
} }
?> ?>
<a class='nav-button' href='/admin/index.php'>Administration</a>
</nav> </nav>
<div class="content_area bordered rounded_border"> <div class="content_area bordered rounded_border">

View File

@ -11,8 +11,8 @@ $db = new SQLite3("../webcron.db");
<html> <html>
<head> <head>
<!-- <script src="https://cdn.tailwindcss.com"></script> --> <!-- <script src="https://cdn.tailwindcss.com"></script> -->
<link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="/css/main.css">
<script src="main.js"> </script> <script src="/js/main.js"> </script>
<title><?php <title><?php
$filename = ucfirst(explode('.',basename($_SERVER['SCRIPT_FILENAME']))[0]); $filename = ucfirst(explode('.',basename($_SERVER['SCRIPT_FILENAME']))[0]);
echo $filename; echo $filename;
@ -20,7 +20,7 @@ $db = new SQLite3("../webcron.db");
</head> </head>
<body> <body>
<nav> <nav>
<a class='nav-button' href='index.php'>Log Management</a> <a class='nav-button' href='/index.php'>Log Management</a>
<?php <?php
$items = scandir("."); $items = scandir(".");
foreach ($items as $item){ foreach ($items as $item){
@ -30,6 +30,7 @@ $db = new SQLite3("../webcron.db");
} }
} }
?> ?>
<a class='nav-button' href='/admin/index.php'>Administration</a>
</nav> </nav>
<div class="content_area bordered rounded_border"> <div class="content_area bordered rounded_border">

View File

@ -10,13 +10,13 @@ $db = new SQLite3("../webcron.db");
--> -->
<html> <html>
<head> <head>
<link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="/css/main.css">
<script src="main.js"> </script> <script src="/js/main.js"> </script>
<title>Overview</title> <title>Overview</title>
</head> </head>
<body> <body>
<nav> <nav>
<a class='nav-button' href='index.php'>Log Management</a> <a class='nav-button' href='/index.php'>Log Management</a>
<?php <?php
$items = scandir("."); $items = scandir(".");
foreach ($items as $item){ foreach ($items as $item){
@ -26,6 +26,7 @@ $db = new SQLite3("../webcron.db");
} }
} }
?> ?>
<a class='nav-button' href='admin/index.php'>Administration</a>
</nav> </nav>
<div class="content_area bordered rounded_border"> <div class="content_area bordered rounded_border">