Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
🎨 Use absolute links for php-require
Browse files Browse the repository at this point in the history
  • Loading branch information
CuzImBisonratte committed Sep 24, 2023
1 parent 6718c70 commit e051ebe
Show file tree
Hide file tree
Showing 29 changed files with 87 additions and 87 deletions.
6 changes: 3 additions & 3 deletions classes/add/add.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions classes/add/index.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions classes/edit/delete.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions classes/edit/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
if (!preg_match("/^[a-z0-9]*$/", $class_id)) header("Location: /classes");

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions classes/edit/modify.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions classes/grades/add/add.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions classes/grades/add/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
if (!preg_match("/^[a-z0-9]*$/", $class_id)) header("Location: /classes");

// Check login state
require("../../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions classes/grades/edit/delete.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions classes/grades/edit/edit.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// Get point system transformer
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/point-system.php");
Expand Down
6 changes: 3 additions & 3 deletions classes/grades/edit/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
if (!preg_match("/^[a-z0-9]*$/", $grade_id)) header("Location: /grades");

// Check login state
require("../../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// Get point system transformer
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/point-system.php");
Expand Down
6 changes: 3 additions & 3 deletions classes/grades/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
if (!preg_match("/^[a-z0-9]*$/", $class_id)) header("Location: /classes");

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// Get point system transformer
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/point-system.php");
Expand Down
6 changes: 3 additions & 3 deletions classes/index.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// Get point system transformer
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/point-system.php");
Expand Down
6 changes: 3 additions & 3 deletions homework/add/add.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions homework/add/index.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions homework/edit/delete.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions homework/edit/edit.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions homework/edit/index.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Check if task id is set
Expand All @@ -14,7 +14,7 @@


// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions homework/edit/state.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions homework/index.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions homework/state.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("./res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("./res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("./config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// Get point system transformer
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/point-system.php");
Expand Down
6 changes: 3 additions & 3 deletions settings/change_pw.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

require("../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
6 changes: 3 additions & 3 deletions settings/delete_grades.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

// Check login state
require("../res/php/session.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/session.php");
start_session();
require("../res/php/checkLogin.php");
require($_SERVER["DOCUMENT_ROOT"] . "/res/php/checkLogin.php");
if (!checkLogin()) header("Location: https://account.noten-app.de");

// Get config
require("../config.php");
require($_SERVER["DOCUMENT_ROOT"] . "/config.php");

// DB Connection
$con = mysqli_connect(
Expand Down
Loading

0 comments on commit e051ebe

Please sign in to comment.