Add links to names in questions
This commit is contained in:
parent
68aebffd6c
commit
a7073899a7
|
@ -18,7 +18,7 @@ $db->exec("CREATE TABLE IF NOT EXISTS questions(
|
||||||
by INTEGER,
|
by INTEGER,
|
||||||
question TEXT,
|
question TEXT,
|
||||||
date INTEGER,
|
date INTEGER,
|
||||||
answered INTEGER
|
status INTEGER
|
||||||
);");
|
);");
|
||||||
|
|
||||||
if(!$db->querySingle("SELECT EXISTS(SELECT * FROM users where id = 0);")){
|
if(!$db->querySingle("SELECT EXISTS(SELECT * FROM users where id = 0);")){
|
||||||
|
|
4
user.php
4
user.php
|
@ -52,7 +52,9 @@ if(isset($_SESSION["uid"])){
|
||||||
$u_prep->bindValue(":id", $current["by"], SQLITE3_INTEGER);
|
$u_prep->bindValue(":id", $current["by"], SQLITE3_INTEGER);
|
||||||
$q_user = $u_prep->execute()->fetchArray(SQLITE3_ASSOC);
|
$q_user = $u_prep->execute()->fetchArray(SQLITE3_ASSOC);
|
||||||
|
|
||||||
echo("<h3>" . $q_user["name"] ."</h3>\n");
|
if($q_user["id"] == 0) echo("<h3>" . $q_user["name"] ."</h3>");
|
||||||
|
else if($fancy_urls) echo("<a href='/user/" . $q_user["name"] . "'><h3>" . $q_user["name"] ."</h3></a>\n");
|
||||||
|
else echo("<a href='/user.php?q=" . $q_user["name"] . "'><h3>" . $q_user["name"] ."</h3></a>\n");
|
||||||
echo("\t<p>". $current["question"] ."<p>\n");
|
echo("\t<p>". $current["question"] ."<p>\n");
|
||||||
|
|
||||||
if($is_current_user){
|
if($is_current_user){
|
||||||
|
|
Loading…
Reference in New Issue