setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); if (!isset($_GET['page'])) $page = 1; else $page = intval($_GET['page']); $gps = (isset($_SESSION['query']['gps'])) ? $_SESSION['query']['gps'] : "off"; $dir = (new AdvancedFilesystemIterator('photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP$/'); $request = array( 'lens' => 'SELECT DISTINCT lens FROM photos WHERE lens <> "" ORDER BY lens', 'model' => 'SELECT DISTINCT model FROM photos WHERE model <> "" ORDER BY model', 'iso' => 'SELECT DISTINCT iso FROM photos WHERE iso <> "" ORDER BY iso', 'speed' => 'SELECT DISTINCT speed FROM photos WHERE speed <> "" ORDER BY speed', 'keywords' => 'SELECT DISTINCT keywords FROM photos WHERE keywords <> ""', 'strftime("%Y", dateoriginal)' => 'SELECT DISTINCT strftime("%Y", dateoriginal) FROM photos WHERE dateoriginal <> "" ORDER BY dateoriginal DESC' ); $select = array(); $i = 0; foreach ($request as $key => $val){ $query = $conn->query($val); $select[$i] = $query->fetchAll(PDO::FETCH_ASSOC); $select[$i] = array_column($select[$i],$key); if ($i == 4){ $mc = array(); foreach($select[$i] as $row){ $x = explode(",", $row); foreach ($x as $y){ if ((! str_starts_with($y, "_")) && (! str_ends_with($y, "_"))) { $mc [] = $y; } } } $motcles = array_unique($mc); usort($motcles, 'strcasecmp'); // 'strcasecmp' $select[$i] = $motcles; } $i++; } ?>
' . $query2 . '';
}
elseif ((isset($_POST['suppress'])) && ($_POST["suppress"] == "suppress")) {
echo $msg;
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
echo '' . $request_delete . '';
}
}
else {
$found = sprintf(ngettext("%d image found with the following query:","%d images found with the following query:", $count), $count);
echo '' . $query2 . '';
}
$up_or_down = str_replace(array('ASC','DESC'), array('up','down'), $sort_order);
$asc_or_desc = $sort_order == 'ASC' ? 'desc' : 'asc';
$add_class = ' class="highlight"';
?>
';
echo '';
echo '';
echo '';
}
catch(PDOException $e) {
echo $e->getMessage();
}
?>
prepare($query4);
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC);
$numRows = $result['count'];
//$stmt = $conn->reset();
$conn = null;
}
catch(PDOException $e) {
echo $e->getMessage();
}
// calcul du nombre de pages (arrondi a l'entier supérieur)
$nbpages = ceil($numRows / $perpage);
$prec = $page - 1;
$suiv = $page + 1;
if ($numRows > 0) {
echo '';
}
?>
' . gettext("Log out") . '' : ''; ?>
© 2013- sur-le-sentier.fr