-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspitter.php
More file actions
30 lines (26 loc) · 868 Bytes
/
spitter.php
File metadata and controls
30 lines (26 loc) · 868 Bytes
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
<?php
include("gmongo.php");
$collection = $db->posts;
$cursor = $collection->find();
$cursor->sort(array('_id' => -1));
$true = false;
$count = 0;
foreach($cursor as $doc)
{
if($true)
{
echo "<hr style='border: none;height: 1px; color: 008B8B; background: black;'/>";
}
echo "<h5>".$doc['name'].": "." ".$doc['post']."</h5>";
echo "<a href = 'view.php?id=".$doc['_id']."'>View this thread</a><br>";
$true = true;
$count++;
if($count > 10)
{
break;
}
}
echo "<br>".
"<h4><a href = 'viewall.php'>Didn't Save your link and want to view all posts? Click here.
</a></h4>";
?>