-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstalker.php
98 lines (88 loc) · 2.47 KB
/
stalker.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
header('content-type: text/html; charset=utf-8');
require_once "config.php";
$db = DB::get();
if (!empty($_GET['detail']))
{
$stmnt = $db->prepare('SELECT message FROM `history` WHERE requestkey = ?');
$stmnt->execute(array($_GET['detail']));
$res = $stmnt->fetchAll(PDO::FETCH_ASSOC);
die(nl2br(htmlspecialchars($res[0]['message'], ENT_COMPAT, "UTF-8")));
}
$stmnt = $db->prepare('SELECT * FROM `history` ORDER BY `time` DESC');
$stmnt->execute();
?>
<style>
table {
border-collapse: collapse;
}
td {
vertical-align: top;
padding: 5px;
border: 2px solid #AAA;
border-spacing: 0;
}
.toolong {
display: none;
}
a {
color: blue;
cursor: pointer;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(document).ready(function()
{
$("a.showtext").click(function()
{
var id = $(this).attr("id"),
textelem = $('#longtext' + id),
link = $(this);
if (textelem.is(":visible"))
{
textelem.html("").hide();
link.text("Inhalt anzeigen");
}
else
{
link.text("Inhalt lädt....");
$.get('stalker.php?detail=' + id, function(data) {
textelem.show().html(data);
link.text("Inhalt ausblenden");
});
}
});
});
</script>
<h1>Stalkerpanel</h1>
<table>
<tr>
<th>from</th>
<th>userid</th>
<th>action</th>
<th>koords</th>
<th>time</th>
<th>successfull</th>
<th>message</th>
</tr>
<?php
while ($row = $stmnt->fetch(PDO::FETCH_ASSOC))
{
?>
<tr>
<td><?php echo $row['time']; ?></td>
<td><?php echo $row['userid']; ?></td>
<td><?php echo $row['action']; ?></td>
<td><?php echo '<a href="http://maps.google.com/maps?q=@(' . $row['lat'] . ',' . $row['long'] . ')">' . $row['lat'] . " / " . $row['long']; ?></a></td>
<td><?php echo $row['totaltime']; ?></td>
<td><?php echo $row['successfull']; ?></td>
<td>
<a id="<?php echo $row['requestkey']; ?>" class="showtext">Inhalt anzeigen</a>
<div style="display:none" id="longtext<?php echo $row['requestkey']; ?>"></div>
</td>
</tr>
<?php
}
?>
</table>