From a7073899a761aaac7e2844f3a3c829a1c5e85a61 Mon Sep 17 00:00:00 2001 From: posweg Date: Thu, 21 May 2020 22:32:30 +0000 Subject: [PATCH] Add links to names in questions --- include/header.php | 2 +- user.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/header.php b/include/header.php index 1f47a35..af725fd 100644 --- a/include/header.php +++ b/include/header.php @@ -18,7 +18,7 @@ $db->exec("CREATE TABLE IF NOT EXISTS questions( by INTEGER, question TEXT, date INTEGER, - answered INTEGER + status INTEGER );"); if(!$db->querySingle("SELECT EXISTS(SELECT * FROM users where id = 0);")){ diff --git a/user.php b/user.php index 276956d..992b8e2 100644 --- a/user.php +++ b/user.php @@ -52,7 +52,9 @@ if(isset($_SESSION["uid"])){ $u_prep->bindValue(":id", $current["by"], SQLITE3_INTEGER); $q_user = $u_prep->execute()->fetchArray(SQLITE3_ASSOC); - echo("

" . $q_user["name"] ."

\n"); + if($q_user["id"] == 0) echo("

" . $q_user["name"] ."

"); + else if($fancy_urls) echo("

" . $q_user["name"] ."

\n"); + else echo("

" . $q_user["name"] ."

\n"); echo("\t

". $current["question"] ."

\n"); if($is_current_user){