-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
99 lines (95 loc) · 4.08 KB
/
index.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
99
<?php
// include 'wp_comments.php';
$results = file_get_contents('text.txt');
$configs = include('configs.php');
// echo $results;
?>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
<link rel="alternate" type="application/rss+xml" title="<?= $configs->siteTitle ?> RSS" href="/rss.php">
<link rel="alternate" type="application/json" title="<?= $configs->siteTitle ?> JSON Feed" href="/jsonfeed.php">
<script type="text/javascript">
function toTw(comment_ID){
var text = document.getElementById(comment_ID).innerHTML;
window.open('http://twitter.com/?status='+text+'%20-%20@<?= $configs->twitterName ?> - http://<?= $configs->siteUrl ?>%23'+comment_ID);
}
</script>
<style type="text/css">
.table {
word-wrap: break-word;
}
.post .content {
float: left;
}
.syndic {
float: right;
}
.icon {
display: inline-block;
width: 1em;
height: 1em;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
}
.icon-rss {
stroke: #ff6600;
fill: #ff6600;
}
</style>
</head>
<body>
<div class="container-fluid h-100" id="root">
<div class="row h-100">
<div class="col-md-1 fixed py-1"></div>
<div class="col fluid py-1">
<h1><?= $configs->siteTitle ?></h1>
<h2><?= $configs->siteDescription ?><span class=\"syndic\">
<a href="/rss.php"><svg class="icon icon-rss2"><use xlink:href="symbol-defs.svg#icon-rss2"></use></svg></a><a href="/jsonfeed.php"><svg class="icon icon-jsonfeed"><use xlink:href="symbol-defs.svg#icon-jsonfeed"></use></svg></a></span></h2>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<?php
$wp_comments = eval("return " . $results . ";");
foreach ($wp_comments as $livepost) {
$known = '';
if (!empty($livepost['known'])) {
$known = "<a href='" . $livepost['known'] . "'><svg class=\"icon icon-known\"><use xlink:href=\"symbol-defs.svg#icon-known\"></use></svg></a> ";
}
$pnost = '';
if (!empty($livepost['pnost'])) {
$pnost = "<a href='" . $livepost['pnost'] . "'><svg class=\"icon icon-bullhorn\"><use xlink:href=\"symbol-defs.svg#icon-bullhorn\"></use></svg></a> ";
}
$blurb = '';
if (!empty($livepost['blurb'])) {
$blurb = "<a href='" . $livepost['blurb'] . "'><svg class=\"icon icon-mug\"><use xlink:href=\"symbol-defs.svg#icon-mug\"></use></svg></a> ";
}
$toot = '';
if (!empty($livepost['toot'])) {
$toot = "<a href='" . $livepost['toot'] . "'><svg class=\"icon icon-masto\"><use xlink:href=\"symbol-defs.svg#icon-masto\"></use></svg></a> ";
}
$tweet ='';
if (!empty($livepost['tweet'])) {
$tweet = "<a href='" . $livepost['tweet'] . "'><svg class=\"icon icon-twitter\"><use xlink:href=\"symbol-defs.svg#icon-twitter\"></use></svg></a>";
}
echo "<tr>
<td class=\"post\" id='".$livepost['comment_ID']."'><span class=\"content\">".$livepost['comment_content']."</span>
<span class=\"syndic\">" . $known . $pnost . $blurb . $toot . $tweet . "</span>
</td>
<td class=\"float-right\"><a href='$configs->siteUrl#".$livepost['comment_ID']."'>".$livepost['comment_date']."</a>
</td>
</tr>";
}
?>
</tbody>
</table>
</div>
</div>
<div class="col-md-1 fixed py-1"></div>
<script defer src="svgxuse.js"></script>
</body>
</html>