Skip to content

Commit 469dfbf

Browse files
committed
update
1 parent b8061c1 commit 469dfbf

File tree

5 files changed

+20
-25
lines changed

5 files changed

+20
-25
lines changed

new-g4o2-chat/css/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
padding-top: 65px;
3+
}

new-g4o2-chat/head.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<meta name="apple-mobile-web-app-status-bar-style" content="default">
1414

1515
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
16-
<!-- <link rel="stylesheet" href="./css/style.css?v=<?php echo time(); ?>"> -->
16+
<link rel="stylesheet" href="./css/style.css?v=<?php echo time(); ?>">
1717
<link rel="stylesheet" href="https://kit.fontawesome.com/b60596f9d0.css" crossorigin="anonymous">
1818

1919
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">

new-g4o2-chat/index.php

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
$stmt = $pdo->prepare("SELECT * FROM user_status_log where user_Id = :usr");
1414
$stmt->execute(array(':usr' => $_SESSION['user_id']));
1515
$user_status_log = $stmt->fetch();
16-
16+
$pfpsrc_default = './assets/images/default-user-square.png';
1717
1818
if ($user[0]['pfp'] != null) {
1919
$userpfp = $user[0]['pfp'];
@@ -47,9 +47,9 @@
4747
</head>
4848

4949
<body>
50-
<nav class="navbar navbar-expand-lg bg-dark" data-bs-theme="dark">
50+
<nav class="navbar fixed-top navbar-expand-lg bg-dark" data-bs-theme="dark">
5151
<div class="container-fluid">
52-
<a class="navbar-brand" href="#">
52+
<a class="navbar-brand" href="./index.php">
5353
<img src="./assets/images/g4o2.jpeg" alt="Logo" width="24" height="24" class="d-inline-block align-text-top">
5454
G4o2 Chat
5555
</a>
@@ -66,37 +66,38 @@
6666
</li>
6767
<li class="nav-item dropdown">
6868
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
69-
Dropdown
69+
Links
7070
</a>
7171
<ul class="dropdown-menu">
72-
<li><a class="dropdown-item" href="#">Action</a></li>
73-
<li><a class="dropdown-item" href="#">Another action</a></li>
72+
<li><a class="dropdown-item" href="#">Chat</a></li>
73+
<li><a class="dropdown-item" href="#">User Profile</a></li>
7474
<li>
7575
<hr class="dropdown-divider">
7676
</li>
77-
<li><a class="dropdown-item" href="#">Something else here</a></li>
77+
<li><a class="dropdown-item" href="#">Account Settings</a></li>
7878
</ul>
7979
</li>
8080
<li class="nav-item">
81-
<a class="nav-link disabled">Account</a>
81+
<a class="nav-link disabled">Private Messaging (coming soon)</a>
8282
</li>
8383
</ul>
84-
<a class="btn btn-outline-success" href="./login.php">Login</a>
84+
<a class="btn btn-outline-success" href="./login.php"><?= isset($_SESSION['user_id']) ? 'Logout' : 'Login' ?></a>
8585
</div>
8686
</div>
8787
</nav>
8888
<main>
8989
<?php
9090
echo '
9191
<table class="table">
92-
<thead>
92+
<thead class="thead-dark">
9393
<tr>
9494
<th scope="col">#</th>
9595
<th scope="col">Name</th>
9696
<th scope="col">Email</th>
9797
<th scope="col">Last active</th>
9898
</tr>
99-
</thead><tbody>';
99+
</thead>
100+
<tbody>';
100101
foreach ($accounts as $account) {
101102
if ($account['pfp'] != null) {
102103
$pfpsrc = $account['pfp'];
@@ -109,12 +110,7 @@
109110
$statement = $pdo->prepare("SELECT * FROM user_status_log where user_Id = :usr");
110111
$statement->execute(array(':usr' => $account['user_id']));
111112
$user_status_log = $statement->fetch();
112-
113-
$userStatus = "Undefined";
114-
if ($user_status_log != null) {
115-
$userStatus = $user_status_log['last_active_date_time'];
116-
}
117-
113+
$userStatus = ($user_status_log != null) ? $user_status_log['last_active_date_time'] : "Undefined";;
118114

119115
if ($userStatus === "Undefined") {
120116
$diff = "<p class='text-danger'>Null</p>";
@@ -149,11 +145,7 @@
149145
echo ("</th><td>");
150146
echo "<a href='./profile.php?user={$account['user_id']}' >" . $account['name'] . "</a>";
151147
echo "<td>";
152-
if ($account['show_email'] === "True") {
153-
echo ($account['email']);
154-
} else {
155-
echo "<p class='text-warning'>Hidden</p>";
156-
}
148+
echo ($account['show_email'] === "True") ? "<p class='text-black'>" . $account['email'] . "</p>" : "<p class='text-warning'>Hidden</p>";
157149
echo ("</td><td>");
158150
echo $diff;
159151
echo ("</td></tr>\n");
@@ -185,7 +177,7 @@
185177
<a href="#" class="me-4 text-reset text-decoration-none" target="_blank">
186178
<i class="fab fa-linkedin"></i>
187179
</a>
188-
<a href="#" class="me-4 text-reset text-decoration-none" target="_blank">
180+
<a href="https://github.com/g4o2" class="me-4 text-reset text-decoration-none" target="_blank">
189181
<i class="fab fa-github"></i>
190182
</a>
191183
</div>
@@ -208,7 +200,7 @@
208200
pages
209201
</h6>
210202
<p>
211-
<a href="#" class="text-reset">Home</a>
203+
<a href="./index.php" class="text-reset">Home</a>
212204
</p>
213205
<p>
214206
<a href="#" class="text-reset">Chat</a>
File renamed without changes.

new-g4o2-chat/logs/track-viewers.log

Whitespace-only changes.

0 commit comments

Comments
 (0)