1<!DOCTYPE html>
2<html lang="en" dir="ltr">
3<head>
4    <title>Smileys</title>
5
6    <style>
7        body {
8            background-color: #ccc;
9            font-family: Arial;
10        }
11
12        .box {
13            width: 200px;
14            float: left;
15            padding: 0.5em;
16            margin: 0;
17        }
18
19        .white {
20            background-color: #fff;
21        }
22
23        .black {
24            background-color: #000;
25        }
26    </style>
27
28</head>
29<body>
30
31<?php
32$smi_list = '';
33foreach (glob('*.svg') as $img) {
34    $smi_list .= '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> ';
35}
36if(is_dir('local')) {
37    $smi_list .= '<hr />';
38    foreach (glob('local/*.svg') as $img) {
39        $smi_list .= '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> ';
40    }
41}
42
43echo '<div class="white box">
44'.$smi_list.'
45</div>
46
47<div class="black box">
48'.$smi_list;
49?>
50</div>
51
52</body>
53</html>
54