2016-06-09 18:03:23 +01:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-body">
|
|
|
|
<h4>Newest pastes:</h4>
|
|
|
|
<div class="list-group">
|
|
|
|
<?php
|
|
|
|
include "config/config.php";
|
2016-06-12 16:32:25 +01:00
|
|
|
$stmt = $conn->query('SELECT * FROM pastes WHERE exposure=0 ORDER BY id DESC LIMIT 5');
|
2016-06-09 18:03:23 +01:00
|
|
|
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
|
|
|
$title = $row['title'];
|
|
|
|
if(strlen($title)>25)$title = substr($title,0,25)."...";
|
2016-06-11 17:32:49 +01:00
|
|
|
echo "<a href=\"".$row['uid']."\" class=\"list-group-item\">".$title."</a>";
|
2016-06-09 18:03:23 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|