-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlog_useremail.php
More file actions
49 lines (41 loc) · 1.68 KB
/
log_useremail.php
File metadata and controls
49 lines (41 loc) · 1.68 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
require "include/bittorrent.php";
require_once("include/secrets.php");
global $mysql_host, $mysql_user, $mysql_pass, $mysql_db;
$con_link = mysqli_connect($mysql_host, $mysql_user, $mysql_pass, $mysql_db);
dbconn(false);
loggedinorreturn();
function puke($text)
{
new_error_message("Foutmelding", $text);
}
if (get_user_class() < UC_ADMINISTRATOR)
puke("Alleen toegang voor administrator of hoger... Wegwezen dus...");
$secs = 60 * 24 * 60 * 60;
site_header("Logboek e-mailadressen");
//site_menu(false);
print "<br>";
mysqli_query($con_link, "DELETE FROM siteloguseremail WHERE " . gmtime() . " - UNIX_TIMESTAMP(added) > $secs") or sqlerr(__FILE__, __LINE__);
$res = mysqli_query($con_link, "SELECT added, txt FROM siteloguseremail ORDER BY added DESC") or sqlerr(__FILE__, __LINE__);
if (mysqli_num_rows($res) == 0)
print("<b>Logboek is leeg</b>\n");
else
{
print("<table class=bottom width=80% border=0 cellspacing=0 cellpadding=0><tr><td class=embedded><center>");
tabel_top("E-mailadressen wijzigingen logboek");
tabel_start();
print("<table width=100% border=1 cellspacing=0 cellpadding=5>\n");
print("<tr><td class=colheadsite align=left>Datum</td><td class=colheadsite align=left>Tijd</td><td class=colheadsite align=left>Gebeurtenis</td></tr>\n");
while ($arr = mysqli_fetch_assoc($res))
{
$date = convertdatum($arr['added'],"no");
$time = substr($arr['added'], strpos($arr['added'], " ") + 1);
print("<tr><td bgcolor=white>$date</td><td bgcolor=white>$time</td><td align=left bgcolor=white>$arr[txt]</td></tr>\n");
}
print("</table>");
tabel_einde();
print("</td></tr></table><br>");
}
page_einde();
new_footer(false);
?>