test with faces
This commit is contained in:
parent
ef2dd8b746
commit
1bc8b11ee1
1 changed files with 33 additions and 0 deletions
33
www/faces.php
Normal file
33
www/faces.php
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require __DIR__ . '/../bootstrap.php';
|
||||||
|
|
||||||
|
$em = \EmotionHero\Application::getInstance()->getEm();
|
||||||
|
$hitRepo = $em->getRepository(\EmotionHero\Models\Hit::class);
|
||||||
|
$hits = $hitRepo->findBy([], ['sadness'=>'ASC']);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Emotion Hero</title>
|
||||||
|
</head>
|
||||||
|
<style type="text/css">
|
||||||
|
body{
|
||||||
|
background:yellow;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
/* @var $hit EmotionHero\Models\Hit */
|
||||||
|
foreach($hits as $hit) {
|
||||||
|
$filename = __DIR__ . '/../files/hits/brows/'. $hit->getId() . '.jpg';
|
||||||
|
if(!file_exists($filename))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$img = file_get_contents($filename);
|
||||||
|
$data = base64_encode($img);
|
||||||
|
echo "<img src=\"data:image/x-icon;base64,$data\">";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue