From 6500ec0543a316f9fa5f16a5c47e7103ec9bbe9e Mon Sep 17 00:00:00 2001 From: Cflip <36554078+cflip@users.noreply.github.com> Date: Sun, 24 Jan 2021 13:46:28 -0700 Subject: Add more links to user page --- category.php | 6 ++++-- index.php | 6 +++--- styles/style.css | 19 ++++++++++--------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/category.php b/category.php index f5cf9cb..b26856a 100644 --- a/category.php +++ b/category.php @@ -27,7 +27,7 @@ mysqli_free_result($result); echo ''; -$sql = "SELECT thread_id, thread_subject, thread_date, user_name FROM threads JOIN users ON thread_author = user_id WHERE thread_cat = " . mysqli_real_escape_string($dbc, $_GET['id']) . " ORDER BY thread_id DESC"; +$sql = "SELECT thread_id, thread_subject, thread_date, user_id, user_name FROM threads JOIN users ON thread_author = user_id WHERE thread_cat = " . mysqli_real_escape_string($dbc, $_GET['id']) . " ORDER BY thread_id DESC"; $result = mysqli_query($dbc, $sql); if (!$result) { @@ -52,7 +52,9 @@ while ($row = mysqli_fetch_assoc($result)) { echo ''; echo '

' . $row['thread_subject'] . '

'; - echo 'by ' . $row['user_name'] . ' on ' . date('M d, Y', strtotime($row['thread_date'])) . 'by ' . $thread['user_name'] . '
' . date('m/d/Y g:ia', strtotime($thread['post_date'])) . ''; + echo 'by ' . $row['user_name'] . ' on ' . date('M d, Y', strtotime($row['thread_date'])) . ''; + echo 'by ' . $thread['user_name'] . '
'; + echo '' . date('m/d/Y g:ia', strtotime($thread['post_date'])) . ''; } mysqli_stmt_close($stmt); diff --git a/index.php b/index.php index 2a1c633..fabec83 100644 --- a/index.php +++ b/index.php @@ -43,7 +43,7 @@ include_once 'header.php'; echo $row['cat_description']; if ($thread) { echo '' . $thread['thread_subject'] . '
'; - echo 'by ' . $thread['user_name'] . ''; + echo 'by ' . $thread['user_name'] . ''; } else { $no_threads_msg = 'There are no threads in this category yet.'; echo ''. $no_threads_msg .''; @@ -62,7 +62,7 @@ include_once 'header.php'; '; echo '

' . $row['thread_subject'] . '

'; - echo 'by ' . $row['user_name'] . ' on ' . date('M d, Y', strtotime($row['thread_date'])) . 'Posted in ' . $row['cat_name'] .''; + echo 'by ' . $row['user_name'] . ' on ' . date('M d, Y', strtotime($row['thread_date'])) . 'Posted in ' . $row['cat_name'] .''; } mysqli_free_result($result); diff --git a/styles/style.css b/styles/style.css index e0b7358..fe7c56c 100644 --- a/styles/style.css +++ b/styles/style.css @@ -46,6 +46,15 @@ form { display: inline-block; } +a { + color: #000; +} + +a:hover { + color:#373737; + text-decoration: none; +} + #title { color: #eee; margin: 20px; @@ -76,6 +85,7 @@ nav a { } nav a:hover { + color: #FFF; background-color: #009FC1; } @@ -87,15 +97,6 @@ nav a:hover { width: 30%; } -table a { - color: #000; -} - -table a:hover { - color:#373737; - text-decoration: none; -} - h1, h4 { margin-top: 2px; margin-bottom: 10px; -- cgit v1.2.3