From 25e06f9ece7676e9af0a202cc8afded1a1b83f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=B2sweg?= Date: Sat, 29 Aug 2020 18:40:42 +0200 Subject: [PATCH] Add missing fucntions file and adopt new redirect system Ooops, it seems like i forgot to git add that file and i figure that out just now. Oopsies. Well, I've converted all the crucial stuff to the new system and it works wonders --- include/functions.php | 31 +++++++++++++++++++++++++++++++ user.php | 32 ++++++++++---------------------- 2 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 include/functions.php diff --git a/include/functions.php b/include/functions.php new file mode 100644 index 0000000..c14e21d --- /dev/null +++ b/include/functions.php @@ -0,0 +1,31 @@ + $value){ + if($i == 0) $result .= "?"; + else $result .= "&"; + + $result .= $key . "=" . $value; + $i++; + } + } + + return($result); +} + +?> diff --git a/user.php b/user.php index 34ae4f3..25499c9 100644 --- a/user.php +++ b/user.php @@ -73,13 +73,8 @@ if(isset($_GET["p"])){ echo($h_user["name"]); } else{ - echo("" . $h_user["name"] ."\n"); + $new_get["q"] = $h_user["name"]; + echo("" . $h_user["name"] ."\n"); } echo(" asked:

"); @@ -152,6 +147,7 @@ if(isset($_GET["p"])){ $time = new DateTime("@0"); + $tmp_get = $_GET; while($current = $qs->fetchArray(SQLITE3_ASSOC)){ // Execute prepared statement @@ -168,13 +164,8 @@ if(isset($_GET["p"])){ echo($q_user["name"]); } else{ - echo("" . $q_user["name"] .""); + $new_get["q"] = $q_user["name"]; + echo("" . $q_user["name"] .""); } echo("

\n"); @@ -200,8 +191,8 @@ if(isset($_GET["p"])){ // Time $time->settimestamp($current["q_date"]); echo("\t\t\t\t\t"); - $_GET["p"] = $current["id"]; - echo(''); + $tmp_get["p"] = $current["id"]; + echo(''); echo("

" . $time->format("Y-m-d h:i:s") . "

"); echo("
\n"); @@ -250,12 +241,9 @@ if(isset($_GET["p"])){ $ps_item = ""; if($link){ - $link_init = ""; + $tmp_get = $_GET; + $tmp_get["page"] = $link; + $link_init = ""; $label = $link_init . $label . ""; }