properly print the title
[spamdforum.git] / profiles.php
blobded800127f63f739a68f8fca56d9ddda77ec0ad6
1 <?php
2 /* See file COPYING for permissions and conditions to use the file. */
3 ?>
4 <?php
5 require_once("{$_SERVER['DOCUMENT_ROOT']}/extra/config.php");
6 ?>
7 <?php
8 include("{$_SERVER['DOCUMENT_ROOT']}/html/header.html");
9 ?>
10 <?php
11 if (!empty($_GET['email'])) {
12 require_once("{$_SERVER['DOCUMENT_ROOT']}/../dbconnect.php");
13 $email = escape_data($_GET['email']);
14 $query = "SELECT user_id, name, powerlevel,
15 reg_date, last_visit FROM forum_user WHERE email=?";
16 $result = mysqli_execute_query($dbc, $query, [$email]);
17 if (mysqli_num_rows($result) < 1) {
18 echo "<h3>{$profilesphp['err_not_found']}</h3>";
19 goto stop;
21 $uinfo = mysqli_fetch_row($result);
22 foreach ($uinfo as $key => $value) {
23 $uinfo[$key] = export_data($value);
25 if ($uinfo[2] >= 0) {
26 echo "<h2><a href=\"$protocol://$server/profiles.php" .
27 "?email=$email\">$uinfo[1]</a> ($uinfo[2]) " .
28 "&lt;<a href=\"mailto:$email\">$email</a>&gt;</h2>";
29 } else {
30 echo "<h2><del><a href=\"$protocol://$server/" .
31 "profiles.php?email=$email\">$uinfo[1]</a>" .
32 "</del> ($uinfo[2]) &lt;<a href=\"mailto:$email\">" .
33 "$email</a>&gt;</h2>";
35 echo "<h3>{$profilesphp['reg_date']}: {$uinfo[3]}</h3>";
36 echo "<p>{$profilesphp['last_visit']}: {$uinfo[4]}</p>";
39 <?php
40 stop:
41 include("{$_SERVER['DOCUMENT_ROOT']}/html/footer.html");