/usr/share/horde/ansel/templates/tile/face.inc is in php-horde-ansel 3.0.5+debian0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | <div class="face-tile">
<?php
$face_url = Ansel_Faces::getLink($face);
$facename = htmlspecialchars($face['face_name']);
echo '<a href="' . $face_url . '" title="' . $facename . '">'
. '<img src="' . $faces->getFaceUrl($face['image_id'], $face['face_id'])
. '" style="padding: 5px; width: 50px; height: 50px;" alt="' . $facename . '" /></a><br />';
if (isset($face['similarity'])) {
echo '<span class="similarity-';
// the values if similarity are fliped
if ($face['similarity'] >= PUZZLE_CVEC_SIMILARITY_HIGH_THRESHOLD) {
echo 'lower';
} elseif ($face['similarity'] >= PUZZLE_CVEC_SIMILARITY_THRESHOLD) {
echo 'low';
} elseif ($face['similarity'] >= PUZZLE_CVEC_SIMILARITY_LOW_THRESHOLD) {
echo 'medium';
} else {
echo 'high';
}
echo '">' . number_format((1 - $face['similarity']) * 100) . '%</span><br />';
}
if ($face['face_name']) {
echo '<a href="' . $face_url . '" title="' . _("Find other photos this face appears in") . '">' . _("Others") . '</a><br />';
} elseif ($GLOBALS['conf']['report_content']['driver']) {
echo Horde::url('faces/claim.php')->add('face', $face['face_id'])->link(array('title' => _("Tell us who is in this photo")))
. _("Claim") . '</a><br />';
echo Horde::url('faces/report.php')->add('face', $face['face_id'])->link(array('title' => _("Report abuse or submit a removal request")))
. _("Report") . '</a><br />';
}
if ($conf['faces']['search'] && Horde_Util::loadExtension('libpuzzle') !== false) {
echo Horde::url('faces/search/image_search.php')->add('face_id', $face['face_id'])->link(array('title' => _("Find similar"))) . _("Similar faces") . '</a>';
}
?>
</div>
|