reversed the order of the title and added a fallback php self to pagename var

This commit is contained in:
ui0ppk 2023-02-05 00:51:19 +02:00
parent 259a20bc4b
commit b94b5266bb
9 changed files with 9 additions and 9 deletions

View File

@ -14,7 +14,7 @@ $user = new User($con, $_SESSION['user']);
$getitstarted = new PartyStarter;
$getitstarted->header();
?> </head>
<title><?php echo $sitename; ?> | <?php echo $pagename; ?></title>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body>
<main class="container" style="width: 100%;">
<br>

View File

@ -11,7 +11,7 @@ if($devmode) {
error_reporting(E_ALL);
}
$pagename = ucfirst(str_replace(".php", NULL, str_replace("/", NULL, $_SERVER['DOCUMENT_URI'])));
$pagename = ucfirst(str_replace(".php", NULL, str_replace("/", NULL, $_SERVER['DOCUMENT_URI'] ?? $_SERVER['PHP_SELF'] )));
$maintainers = array("Mario1", "qzip", "nolanwhy");

View File

@ -36,7 +36,7 @@ $getitstarted = new PartyStarter;
$getitstarted->header();
?>
</head>
<title><?php echo $sitename; ?> | <?php echo $pagename; ?></title>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body>
<main class="container mx-auto position-absolute top-50 start-50 translate-middle text-center" style="width: 100%;">
<?php echo $errorImage; ?>

View File

@ -17,7 +17,7 @@ $getitstarted = new PartyStarter;
$getitstarted->header();
?>
</head>
<title><?php echo $sitename; ?> | <?php echo $pagename; ?></title>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body>
<main class="container" style="width: 100%; float: left; margin-left: 20px">
<br>

View File

@ -35,7 +35,7 @@ $getitstarted = new PartyStarter;
$getitstarted->header();
?>
</head>
<title><?php echo $sitename; ?> | <?php echo $pagename; ?></title>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body>
<main class="container text-white" style="width: 100%;">
<br><br>

View File

@ -25,7 +25,7 @@ body {
width: 50%;
}
</style>
<title><?php echo $sitename; ?></title>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body data-bs-theme="dark">
<div class="position-absolute top-50 start-50 translate-middle col d-flex justify-content-center align-middle">
<div class="card shadow-sm bg-dark text-white text-center">

View File

@ -39,7 +39,7 @@ $result = file_get_contents("https://useless-facts.sameerkumar.website/api");
$thefunfact = json_decode($result);
?>
</head>
<title><?php echo $sitename; ?> | <?php echo $pagename; ?></title>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body>
<div class="container position-absolute top-50 start-50 translate-middle">
<div class="row align-items-center">

View File

@ -64,7 +64,7 @@ $result = file_get_contents("https://useless-facts.sameerkumar.website/api");
$thefunfact = json_decode($result);
?>
</head>
<title><?php echo $sitename; ?> | <?php echo $pagename; ?></title>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body>
<div class="container position-absolute top-50 start-50 translate-middle">
<div class="row align-items-center">

View File

@ -30,7 +30,7 @@ $getitstarted = new PartyStarter;
$getitstarted->header();
?>
</head>
<title><?php echo $sitename; ?> | <?php echo htmlspecialchars($requestUser["username"]); ?></title>
<title><?php echo htmlspecialchars($requestUser["username"]); ?> | <?php echo $sitename; ?></title>
<body>
<main class="container" style="width: 100%;">