-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
36 lines (30 loc) · 880 Bytes
/
home.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php require("verify.php");
#### User has logged in and been verified ####
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Expires: 0");?>
<HTML>
<head>
<TITLE>ThreeD - Home</TITLE>
<LINK REL="StyleSheet" HREF="style.css" TYPE="text/css">
<META HTTP-EQUIV="Expires" CONTENT="Fri, Jun 12 1981 08:20:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
</head>
<BODY>
<?php
if ($user[first]) { $a = $user[first]; } else { $a = $user[username]; }
$a = htmlentities($a);
echo "<p><b>Hello $a</b>";
$mquery = "SELECT * FROM notes WHERE type = 'motd';";
$mresult = pg_query($db, $mquery);
$mnum = pg_num_rows($mresult);
if ($mnum == 1) {
$mr = pg_Fetch_array($mresult, 0, PGSQL_ASSOC);
}
$motd = htmlentities($mr[note]);
$motd = preg_replace("/\n/","<br>",$motd);
echo "<p>$motd";
?>
</BODY>
</HTML>