Initial commit
[pics.git] / index.php
CommitLineData
cd757b9e
JC
1<html>
2<a href='upload.php'>Upload</a>
3<?php
4
5require_once __DIR__ . '/db.php';
6
7$db = get_db();
8$pics = $db->query('SELECT * from pics');
9while ($pic = $pics->fetchArray()) {
10 $mime_type = $pic['MIME_TYPE'];
11 $file_b64 = $pic['PIC_B64'];
12 $name = $pic['ID'];
13
14 echo "<img src='data:{$mime_type};base64,{$file_b64}' alt='$name'/>";
15}
16echo '<p>done with pics</p>';
17?>
18<div>footer</div>
19</html>