🎉 Hello world

This commit is contained in:
2020-01-08 12:16:42 +01:00
commit 5b6426306f
43 changed files with 2878 additions and 0 deletions

20
choix.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
if (empty($_GET['element']) || empty($_GET['hash'])) {
die('non');
}
$element_type = $_GET['element'];
$hash = strtolower($_GET['hash']);
$file = hexdec($hash[0]);
$color = substr($hash, 1);
$element = sprintf('elements/%s/%s.svg', $element_type, $file);
while (!file_exists($element)) {
$file--;
$element = sprintf('elements/%s/%s.svg', $element_type, $file);
}
$svg = file_get_contents($element);
$svg = str_replace('class="colored"', 'fill="#'.$color.'"', $svg);
echo $svg;