Mise-à-jour sur-le-sentier.fr
version 2
439
clean_bdd.php
@@ -1,3 +1,9 @@
|
|||||||
|
<?php require ("3-protect.php");
|
||||||
|
include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
@@ -5,23 +11,12 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php gettext('Clean photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('Clean photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/sls.css" />
|
<link rel="stylesheet" href="css/sls.css" />
|
||||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
<link rel='stylesheet' href='css/minimal.css' />
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
|
|
||||||
<?php include 'functions.php';
|
|
||||||
session_start();
|
|
||||||
if($_SESSION['Active'] == false){ /* Redirects user to login.php if not logged in */
|
|
||||||
header("location:admin/login.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
@@ -29,7 +24,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1><?php echo gettext('Clean / repare database'); ?></h1>
|
<h1><?php echo gettext('Clean / repare database'); ?></h1><br />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -43,14 +38,19 @@ $img_path = "photos/img/";
|
|||||||
$thumb_path = "photos/thumb/";
|
$thumb_path = "photos/thumb/";
|
||||||
|
|
||||||
|
|
||||||
echo '<h2>' . gettext('Clean folder img...') . '</h2>';
|
echo '<h3>' . gettext('Clean folder img...') . '</h3>';
|
||||||
|
|
||||||
$originals = array_map('basename', glob('photos/img/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE));
|
$originals = array_map('basename', glob('photos/img/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE));
|
||||||
$thumbs = array_map('basename', glob('photos/thumb/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE));
|
$thumbs = array_map('basename', glob('photos/thumb/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE));
|
||||||
|
|
||||||
|
// On recherche les vignettes manquantes
|
||||||
|
|
||||||
$missing_thumbs = array_diff($originals, $thumbs);
|
$missing_thumbs = array_diff($originals, $thumbs);
|
||||||
$a = count($missing_thumbs);
|
$a = count($missing_thumbs);
|
||||||
echo '<h3>' . gettext('Missing thumbs: ') . $a . '</h3>';
|
echo '<h4>' . gettext('Missing thumbs: ') . $a . '</h4>';
|
||||||
|
|
||||||
|
|
||||||
|
// On crée les vignettes manquantes
|
||||||
|
|
||||||
if ($a > 0) {
|
if ($a > 0) {
|
||||||
echo '<h4>' . gettext('Create missing thumbs...') . '</h4>';
|
echo '<h4>' . gettext('Create missing thumbs...') . '</h4>';
|
||||||
@@ -64,10 +64,15 @@ if ($a > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// On recherche les vignettes en trop
|
||||||
|
|
||||||
$extra_thumbs = array_diff($thumbs, $originals);
|
$extra_thumbs = array_diff($thumbs, $originals);
|
||||||
$b = count($extra_thumbs);
|
$b = count($extra_thumbs);
|
||||||
echo '<h3>' . gettext('Extra thumbs: ') . $b . '</h3>';
|
echo '<h4>' . gettext('Extra thumbs: ') . $b . '</h4>';
|
||||||
//_pr($extra_thumbs);
|
|
||||||
|
|
||||||
|
// On efface les vignettes en trop
|
||||||
|
|
||||||
if ($b > 0) {
|
if ($b > 0) {
|
||||||
echo '<h4>' . gettext('Delete extra thumbs...') . '</h4>';
|
echo '<h4>' . gettext('Delete extra thumbs...') . '</h4>';
|
||||||
|
|
||||||
@@ -82,7 +87,9 @@ if ($b > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo '<h2>' . gettext('Compare folder img and database...') . '</h2>';
|
// On compare le dossier 'img' et la base
|
||||||
|
|
||||||
|
echo '<h3>' . gettext('Compare folder img and database...') . '</h3>';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||||
@@ -108,15 +115,17 @@ foreach($result as $file) {
|
|||||||
$bdd[] = $file->filename;
|
$bdd[] = $file->filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$base = array_map('basename', $bdd);
|
$base = array_map('basename', $bdd);
|
||||||
echo count($base) . " entries in database". "<br />";
|
echo '<h4>' . count($base) . " entries in database". "</h4>";
|
||||||
echo count($originals) . " files on disk" . "<br />";
|
echo '<h4>' . count($originals) . " files on disk" . "</h4>";
|
||||||
|
|
||||||
$extra_in_bdd= array_diff($base, $originals);
|
$extra_in_bdd= array_diff($base, $originals);
|
||||||
$c = count($extra_in_bdd);
|
$c = count($extra_in_bdd);
|
||||||
|
|
||||||
echo '<h3>' . gettext('Extra images in database: ') . $c . '</h3>';
|
echo '<h4>' . gettext('Extra images in database: ') . $c . '</h4>';
|
||||||
|
|
||||||
|
|
||||||
|
// On supprime les images en trop dans la base
|
||||||
|
|
||||||
if ($c > 0) {
|
if ($c > 0) {
|
||||||
echo '<h4>' . gettext('Delete extra images in database...') . '</h4>';
|
echo '<h4>' . gettext('Delete extra images in database...') . '</h4>';
|
||||||
@@ -137,10 +146,13 @@ if ($c > 0) {
|
|||||||
$missing_in_bdd = array_diff($originals, $base);
|
$missing_in_bdd = array_diff($originals, $base);
|
||||||
$d = count($missing_in_bdd);
|
$d = count($missing_in_bdd);
|
||||||
|
|
||||||
echo '<h3>' . gettext('Missing images in database: ') . $d . '</h3>';
|
echo '<h4>' . gettext('Missing images in database: ') . $d . '</h4>';
|
||||||
|
|
||||||
|
|
||||||
|
// On ajoute les images manquantes dans la base
|
||||||
|
|
||||||
if ($d > 0) {
|
if ($d > 0) {
|
||||||
echo '<h4>' . gettext('Adding missing images in database...') . '</h4>';
|
echo '<h3>' . gettext('Adding missing images in database...') . '</h3>';
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$photos = array();
|
$photos = array();
|
||||||
@@ -151,15 +163,33 @@ if ($d > 0) {
|
|||||||
|
|
||||||
if ($exif = @exif_read_data($file, 0, true )) {
|
if ($exif = @exif_read_data($file, 0, true )) {
|
||||||
|
|
||||||
$mod = isset($exif['IFD0']['Model']) ? $exif['IFD0']['Model'] : '';
|
//_pr($exif);
|
||||||
|
|
||||||
|
unset($fla);
|
||||||
|
unset($flash);
|
||||||
|
|
||||||
|
// filename
|
||||||
|
//echo "File: " . $file . "<br>";
|
||||||
|
|
||||||
|
// filesize
|
||||||
|
$fs = isset($exif['FILE']['FileSize']) ? $exif['FILE']['FileSize'] : '';
|
||||||
|
$fsize = formatBytes($fs, $precision = 0);
|
||||||
|
|
||||||
|
// dateoriginal
|
||||||
# YYYY-MM-DD HH:MM:SS.SSS - 2019:10:01 14:03:12
|
# YYYY-MM-DD HH:MM:SS.SSS - 2019:10:01 14:03:12
|
||||||
$da = isset($exif['EXIF']['DateTimeOriginal']) ? $exif['EXIF']['DateTimeOriginal'] : '';
|
$da = isset($exif['EXIF']['DateTimeOriginal']) ? $exif['EXIF']['DateTimeOriginal'] : '';
|
||||||
|
if (isset($exif['EXIF']['DateTimeOriginal'])) {
|
||||||
|
$d = explode(' ', $exif['EXIF']['DateTimeOriginal']);
|
||||||
|
$da = str_replace(':', '-', $d[0]) . " " . $d[1] . ".000";
|
||||||
|
} else {
|
||||||
|
$d = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// lens
|
||||||
if (isset($exif['EXIF']['UndefinedTag:0xA434'])) {
|
if (isset($exif['EXIF']['UndefinedTag:0xA434'])) {
|
||||||
$w = $exif['EXIF']['UndefinedTag:0xA434'];
|
$w = trim($exif['EXIF']['UndefinedTag:0xA434']);
|
||||||
|
|
||||||
$arr = array("100.0 mm" => "EF100mm f/2.8 Macro USM", "100.0-400.0 mm" => "EF100-400mm f/4.5-5.6L IS USM", "140.0-560.0 mm" => "EF100-400mm f/4.5-5.6L IS USM +1.4x II", "17.0-40.0 mm" => "EF17-40mm f/4L USM", "24-70mm" => "SIGMA 24-70mm F2.8 EX DG", "70.0-200.0 mm" => "EF70-200mm f/4L USM", "10.0-22.0 mm" => "EF-S10-22mm f/3.5-4.5 USM", "500.0 mm" => "Sigma 500mm f/4.5 EX HSM ", "500mm" => "Sigma 500mm f/4.5 EX HSM ");
|
$arr = array("600" => "EF600mm f/4L IS III USM", "100.0 mm" => "EF100mm f/2.8 Macro USM", "100.0-400.0 mm" => "EF100-400mm f/4.5-5.6L IS USM", "140.0-560.0 mm" => "EF100-400mm f/4.5-5.6L IS USM +1.4x II", "17.0-40.0 mm" => "EF17-40mm f/4L USM", "24-70mm" => "SIGMA 24-70mm F2.8 EX DG", "70.0-200.0 mm" => "EF70-200mm f/4L USM", "10.0-22.0 mm" => "EF-S10-22mm f/3.5-4.5 USM", "500.0 mm" => "SIGMA 500mm f/4.5 EX HSM", "500mm" => "SIGMA 500mm f/4.5 EX HSM");
|
||||||
|
|
||||||
if (array_key_exists($w, $arr)) $obj= $arr[$w];
|
if (array_key_exists($w, $arr)) $obj= $arr[$w];
|
||||||
else $obj = $w;
|
else $obj = $w;
|
||||||
@@ -168,6 +198,7 @@ if ($d > 0) {
|
|||||||
$obj = '';
|
$obj = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// speed
|
||||||
if (isset($exif['EXIF']['ExposureTime'])) {
|
if (isset($exif['EXIF']['ExposureTime'])) {
|
||||||
$q = explode('/', $exif['EXIF']['ExposureTime']);
|
$q = explode('/', $exif['EXIF']['ExposureTime']);
|
||||||
$sp = ($q[0] > 1) ? ($q[0] / $q[1]) . "s" : $exif['EXIF']['ExposureTime'];
|
$sp = ($q[0] > 1) ? ($q[0] / $q[1]) . "s" : $exif['EXIF']['ExposureTime'];
|
||||||
@@ -175,8 +206,39 @@ if ($d > 0) {
|
|||||||
$sp = '';
|
$sp = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// aperture
|
||||||
|
$ap = isset($exif['COMPUTED']['ApertureFNumber']) ? $exif['COMPUTED']['ApertureFNumber'] : '';
|
||||||
|
|
||||||
|
// correctexpo
|
||||||
|
//$ev = isset($exif['EXIF']['ExposureBiasValue']) ? $exif['EXIF']['ExposureBiasValue'] : '';
|
||||||
|
|
||||||
|
if (isset($exif['EXIF']['ExposureBiasValue'])) {
|
||||||
|
$ev = $exif['EXIF']['ExposureBiasValue'];
|
||||||
|
$div = explode( "/", $ev);
|
||||||
|
$dividende = $div[0];
|
||||||
|
$diviseur = $div[1];
|
||||||
|
|
||||||
|
if (str_starts_with($ev, '0')) {
|
||||||
|
$ev = '0';
|
||||||
|
}
|
||||||
|
elseif ($dividende === $diviseur) {
|
||||||
|
$ev = '0';
|
||||||
|
}
|
||||||
|
if ((! str_starts_with($ev, '0')) && (! str_starts_with($ev, '-'))) {
|
||||||
|
$ev = "+" . $ev;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$ev = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// iso
|
||||||
$iso = isset($exif['EXIF']['ISOSpeedRatings']) ? $exif['EXIF']['ISOSpeedRatings'] : '';
|
$iso = isset($exif['EXIF']['ISOSpeedRatings']) ? $exif['EXIF']['ISOSpeedRatings'] : '';
|
||||||
|
|
||||||
|
// model
|
||||||
|
$mod = isset($exif['IFD0']['Model']) ? $exif['IFD0']['Model'] : '';
|
||||||
|
|
||||||
|
// metering
|
||||||
if (isset($exif['EXIF']['MeteringMode'])) {
|
if (isset($exif['EXIF']['MeteringMode'])) {
|
||||||
$mm = $exif['EXIF']['MeteringMode'];
|
$mm = $exif['EXIF']['MeteringMode'];
|
||||||
|
|
||||||
@@ -207,33 +269,70 @@ if ($d > 0) {
|
|||||||
$mm = '';
|
$mm = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// flash
|
||||||
|
// https://stackoverflow.com/questions/7076958/read-exif-and-determine-if-the-flash-has-fired
|
||||||
|
|
||||||
if (isset($exif['EXIF']['Flash'])) {
|
if (isset($exif['EXIF']['Flash'])) {
|
||||||
$fla = $exif['EXIF']['Flash'];
|
$fla = $exif['EXIF']['Flash'];
|
||||||
|
|
||||||
|
$flash = $fla;
|
||||||
|
//$flashfired = ($fla & 1) != 0;
|
||||||
|
//echo "flashfired: " . $flashfired . "<br>";
|
||||||
|
|
||||||
|
// 12_2018.jpg No Flash 0
|
||||||
|
// 5_2013.jpg Off, Did not fire 16
|
||||||
|
// folder flash 9
|
||||||
|
|
||||||
switch ($fla) {
|
switch ($fla) {
|
||||||
case 0: $fla = gettext("Off");
|
case 0: $fla = gettext("No Flash");
|
||||||
break;
|
break;
|
||||||
case 1: $fla = gettext("Auto");
|
case 9: $fla = gettext("On, Fired");
|
||||||
break;
|
break;
|
||||||
case 2: $fla = gettext("On");
|
case 16: $fla = gettext("Off, Did not fire");
|
||||||
break;
|
|
||||||
case 3: $fla = gettext("Red Eye Reduction");
|
|
||||||
break;
|
|
||||||
case 4: $fla = gettext("Slow Synchro");
|
|
||||||
break;
|
|
||||||
case 5: $fla = gettext("Auto + Red Eye Reduction");
|
|
||||||
break;
|
|
||||||
case 6: $fla = gettext("On + Red Eye Reduction");
|
|
||||||
break;
|
|
||||||
case 16: $fla = gettext("External Flash");
|
|
||||||
break;
|
break;
|
||||||
default: $fla = gettext("Unknown");
|
default: $fla = gettext("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Exiftool:
|
||||||
|
[Flash] => On, Fired
|
||||||
|
[Flash Compensation] => -1
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
0x0 = No Flash
|
||||||
|
0x1 = Fired
|
||||||
|
0x5 = Fired, Return not detected
|
||||||
|
0x7 = Fired, Return detected
|
||||||
|
0x8 = On, Did not fire
|
||||||
|
0x9 = On, Fired
|
||||||
|
0xd = On, Return not detected
|
||||||
|
0xf = On, Return detected
|
||||||
|
0x10 = Off, Did not fire
|
||||||
|
0x14 = Off, Did not fire, Return not detected
|
||||||
|
0x18 = Auto, Did not fire
|
||||||
|
0x19 = Auto, Fired
|
||||||
|
0x1d = Auto, Fired, Return not detected
|
||||||
|
0x1f = Auto, Fired, Return detected
|
||||||
|
0x20 = No flash function
|
||||||
|
0x30 = Off, No flash function
|
||||||
|
0x41 = Fired, Red-eye reduction
|
||||||
|
0x45 = Fired, Red-eye reduction, Return not detected
|
||||||
|
0x47 = Fired, Red-eye reduction, Return detected
|
||||||
|
0x49 = On, Red-eye reduction
|
||||||
|
0x4d = On, Red-eye reduction, Return not detected
|
||||||
|
0x4f = On, Red-eye reduction, Return detected
|
||||||
|
0x50 = Off, Red-eye reduction
|
||||||
|
0x58 = Auto, Did not fire, Red-eye reduction
|
||||||
|
0x59 = Auto, Fired, Red-eye reduction
|
||||||
|
0x5d = Auto, Fired, Red-eye reduction, Return not detected
|
||||||
|
0x5f = Auto, Fired, Red-eye reduction, Return detected
|
||||||
|
*/
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$fla = '';
|
$fla = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// focal
|
||||||
if (isset($exif['EXIF']['FocalLength'])) {
|
if (isset($exif['EXIF']['FocalLength'])) {
|
||||||
$k = explode('/', $exif['EXIF']['FocalLength']);
|
$k = explode('/', $exif['EXIF']['FocalLength']);
|
||||||
$fl = $k[0] . " mm";
|
$fl = $k[0] . " mm";
|
||||||
@@ -241,7 +340,48 @@ if ($d > 0) {
|
|||||||
$fl = '';
|
$fl = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// program
|
||||||
|
if (isset($exif['EXIF']['ExposureMode'])) {
|
||||||
|
$em = $exif['EXIF']['ExposureMode'];
|
||||||
|
//$em = hexdec(intel2Moto($exif['EXIF']['ExposureMode']));
|
||||||
|
//echo $em;
|
||||||
|
|
||||||
|
switch ($em) {
|
||||||
|
case 0: $em = gettext("OFF");
|
||||||
|
break;
|
||||||
|
case 1: $em = gettext("ON");
|
||||||
|
break;
|
||||||
|
default: $em = gettext("Unknown");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
switch ($ep) {
|
||||||
|
case 1: $ep = gettext('Manual');
|
||||||
|
break;
|
||||||
|
case 2: $ep = gettext('Program');
|
||||||
|
break;
|
||||||
|
case 3: $ep = gettext('Aperture Priority');
|
||||||
|
break;
|
||||||
|
case 4: $ep = gettext('Shutter Priority');
|
||||||
|
break;
|
||||||
|
case 5: $ep = gettext('Program Creative');
|
||||||
|
break;
|
||||||
|
case 6: $ep = gettext('Program Action');
|
||||||
|
break;
|
||||||
|
case 7: $ep = gettext('Portrait');
|
||||||
|
break;
|
||||||
|
case 8: $ep = gettext('Landscape');
|
||||||
|
break;
|
||||||
|
default: $ep = gettext('Unknown') . ': ' . $ep;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$em = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// wb
|
||||||
if (isset($exif['EXIF']['WhiteBalance'])) {
|
if (isset($exif['EXIF']['WhiteBalance'])) {
|
||||||
$wb = $exif['EXIF']['WhiteBalance'];
|
$wb = $exif['EXIF']['WhiteBalance'];
|
||||||
|
|
||||||
@@ -273,6 +413,7 @@ if ($d > 0) {
|
|||||||
$wb = '';
|
$wb = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mode
|
||||||
if (isset($exif['EXIF']['ExposureProgram'])) {
|
if (isset($exif['EXIF']['ExposureProgram'])) {
|
||||||
$ep = $exif['EXIF']['ExposureProgram'];
|
$ep = $exif['EXIF']['ExposureProgram'];
|
||||||
|
|
||||||
@@ -301,50 +442,74 @@ if ($d > 0) {
|
|||||||
$ep = '';
|
$ep = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// width
|
||||||
$wi = isset($exif['COMPUTED']['Width']) ? $exif['COMPUTED']['Width'] : '';
|
$wi = isset($exif['COMPUTED']['Width']) ? $exif['COMPUTED']['Width'] : '';
|
||||||
$he = isset($exif['COMPUTED']['Height']) ? $exif['COMPUTED']['Height'] : '';
|
|
||||||
$ht = isset($exif['COMPUTED']['html']) ? $exif['COMPUTED']['html'] : '';
|
|
||||||
$ap = isset($exif['COMPUTED']['ApertureFNumber']) ? $exif['COMPUTED']['ApertureFNumber'] : '';
|
|
||||||
|
|
||||||
|
// height
|
||||||
|
$he = isset($exif['COMPUTED']['Height']) ? $exif['COMPUTED']['Height'] : '';
|
||||||
|
|
||||||
|
// html
|
||||||
|
$ht = isset($exif['COMPUTED']['html']) ? $exif['COMPUTED']['html'] : '';
|
||||||
|
|
||||||
|
// software
|
||||||
|
$soft = isset($exif['IFD0']['Software']) ? $exif['IFD0']['Software'] : '';
|
||||||
|
|
||||||
|
// lat, long, alt
|
||||||
$gps = get_gps($exif);
|
$gps = get_gps($exif);
|
||||||
|
|
||||||
|
// usercomment
|
||||||
|
$uc = isset($exif['COMPUTED']['UserComment']) ? $exif['COMPUTED']['UserComment'] : '';
|
||||||
|
|
||||||
|
// comment
|
||||||
|
$comment = isset($exif['COMMENT']['0']) ? $exif['COMMENT']['0'] : '';
|
||||||
|
|
||||||
|
|
||||||
$photos[$i] = array(
|
$photos[$i] = array(
|
||||||
'filename' => $file,
|
'filename' => $file,
|
||||||
|
'filesize' => $fsize,
|
||||||
|
'dateoriginal' => $da,
|
||||||
|
|
||||||
'date' => $da,
|
|
||||||
'lens' => $obj,
|
'lens' => $obj,
|
||||||
'speed' => $sp,
|
'speed' => $sp,
|
||||||
|
'aperture' => $ap,
|
||||||
|
'correctexpo' => $ev, ////
|
||||||
'iso' => $iso,
|
'iso' => $iso,
|
||||||
|
|
||||||
|
'model' => $mod,
|
||||||
|
'metering' => $mm,
|
||||||
|
'flash' => $fla,
|
||||||
|
'focal' => $fl,
|
||||||
|
'program' => $em,
|
||||||
|
'wb' => $wb,
|
||||||
|
'mode' => $ep,
|
||||||
|
|
||||||
'width' => $wi,
|
'width' => $wi,
|
||||||
'height' => $he,
|
'height' => $he,
|
||||||
'html' => $ht,
|
'html' => $ht,
|
||||||
'aperture' => $ap,
|
'software' => $soft,
|
||||||
|
|
||||||
'model' => $mod,
|
|
||||||
|
|
||||||
'lat' => $gps['latitude'],
|
'lat' => $gps['latitude'],
|
||||||
'long' => $gps['longitude'],
|
'long' => $gps['longitude'],
|
||||||
'alt' => $gps['altitude'],
|
'alt' => $gps['altitude'],
|
||||||
|
|
||||||
'metering' => $mm,
|
'usercomment' => $uc,
|
||||||
'flash' => $fla,
|
'comment' => $comment,
|
||||||
'focal' => $fl,
|
|
||||||
'wb' => $wb,
|
|
||||||
'program' => $ep
|
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********/
|
||||||
|
/* IPTC */
|
||||||
|
/********/
|
||||||
|
|
||||||
if ($iptc = @getimagesize($file, $info)) {
|
if ($iptc = @getimagesize($file, $info)) {
|
||||||
//_pr($iptc);
|
//_pr($iptc);
|
||||||
|
|
||||||
if (isset($info["APP13"])) {
|
if (isset($info["APP13"])) {
|
||||||
$mots = "";
|
$mots = "";
|
||||||
$iptc = iptcparse ($info["APP13"]);
|
$iptc = iptcparse ($info["APP13"]);
|
||||||
$legende = (isset($iptc["2#120"][0])) ? $iptc["2#120"][0] : '';
|
|
||||||
$copyright = (isset($iptc["2#116"][0])) ? $iptc["2#116"][0] : '';
|
// keywords
|
||||||
$title = (isset($iptc["2#105"][0])) ? $iptc["2#105"][0] : '';
|
|
||||||
$creator = (isset($iptc["2#080"][0])) ? $iptc["2#080"][0] : '';
|
|
||||||
$mots_cles = (isset($iptc["2#025"])) ? $iptc["2#025"] : '';
|
$mots_cles = (isset($iptc["2#025"])) ? $iptc["2#025"] : '';
|
||||||
if (!empty($mots_cles)) {
|
if (!empty($mots_cles)) {
|
||||||
foreach ($mots_cles as $key => $val) {
|
foreach ($mots_cles as $key => $val) {
|
||||||
@@ -353,24 +518,61 @@ if ($d > 0) {
|
|||||||
$mots = substr($mots, 0, -1);
|
$mots = substr($mots, 0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$photos[$i]['legende'] = $legende;
|
// titre
|
||||||
$photos[$i]['copyright'] = $copyright;
|
$title = (isset($iptc["2#105"][0])) ? $iptc["2#105"][0] : '';
|
||||||
|
|
||||||
|
// creator
|
||||||
|
$creator = (isset($iptc["2#080"][0])) ? $iptc["2#080"][0] : '';
|
||||||
|
|
||||||
|
// ville
|
||||||
|
$ville = (isset($iptc["2#090"][0])) ? $iptc["2#090"][0] : '';
|
||||||
|
|
||||||
|
// departement
|
||||||
|
$departement = (isset($iptc["2#095"][0])) ? $iptc["2#095"][0] : '';
|
||||||
|
|
||||||
|
// code
|
||||||
|
$code = (isset($iptc["2#100"][0])) ? $iptc["2#100"][0] : '';
|
||||||
|
|
||||||
|
// pays
|
||||||
|
$pays = (isset($iptc["2#101"][0])) ? $iptc["2#101"][0] : '';
|
||||||
|
|
||||||
|
// copyright
|
||||||
|
$copyright = (isset($iptc["2#116"][0])) ? $iptc["2#116"][0] : '';
|
||||||
|
|
||||||
|
// legende
|
||||||
|
$legende = (isset($iptc["2#120"][0])) ? $iptc["2#120"][0] : '';
|
||||||
|
|
||||||
|
|
||||||
|
$photos[$i]['keywords'] = $mots;
|
||||||
$photos[$i]['title'] = $title;
|
$photos[$i]['title'] = $title;
|
||||||
$photos[$i]['creator'] = $creator;
|
$photos[$i]['creator'] = $creator;
|
||||||
$photos[$i]['mots_cles'] = $mots;
|
|
||||||
|
$photos[$i]['city'] = $ville;
|
||||||
|
$photos[$i]['department'] = $departement;
|
||||||
|
$photos[$i]['code'] = $code;
|
||||||
|
$photos[$i]['country'] = $pays;
|
||||||
|
|
||||||
|
$photos[$i]['copyright'] = $copyright;
|
||||||
|
$photos[$i]['legende'] = $legende;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$photos[$i]['legende'] = '';
|
$photos[$i]['keywords'] = '';
|
||||||
$photos[$i]['copyright'] = '';
|
|
||||||
$photos[$i]['title'] = '';
|
$photos[$i]['title'] = '';
|
||||||
$photos[$i]['creator'] = '';
|
$photos[$i]['creator'] = '';
|
||||||
$photos[$i]['mots_cles'] = '';
|
$photos[$i]['city'] = '';
|
||||||
|
$photos[$i]['department'] = '';
|
||||||
|
$photos[$i]['code'] = '';
|
||||||
|
$photos[$i]['country'] = '';
|
||||||
|
$photos[$i]['copyright'] = '';
|
||||||
|
$photos[$i]['legende'] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//_pr($photos);
|
||||||
|
|
||||||
$query5 = "SELECT MAX(id) FROM photos";
|
$query5 = "SELECT MAX(id) FROM photos";
|
||||||
$stmt = $conn->prepare($query5);
|
$stmt = $conn->prepare($query5);
|
||||||
@@ -382,63 +584,83 @@ if ($d > 0) {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$query2 = "INSERT OR IGNORE INTO photos (filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program) VALUES (:filename, :date, :lens, :speed, :iso, :width, :height, :html, :aperture, :model, :lat, :long, :alt, :legende, :copyright, :title, :creator, :keywords, :metering, :flash, :focal, :wb, :program)";
|
$query2 = "INSERT OR IGNORE INTO photos (filename, filesize, dateoriginal, lens, speed, aperture, correctexpo, iso, model, metering, flash, focal, program, wb, mode, width, height, html, software, lat, long, alt, usercomment, comment, keywords, title, creator, city, department, code, country, copyright, legende) VALUES (:filename, :filesize, :dateoriginal, :lens, :speed, :aperture, :correctexpo, :iso, :model, :metering, :flash, :focal, :program, :wb, :mode, :width, :height, :html, :software, :lat, :long, :alt, :usercomment, :comment, :keywords, :title, :creator, :city, :department, :code, :country, :copyright, :legende)";
|
||||||
|
|
||||||
$stmt = $conn->prepare($query2);
|
$stmt = $conn->prepare($query2);
|
||||||
|
|
||||||
|
/* EXIF */
|
||||||
$stmt->bindParam(':filename', $file);
|
$stmt->bindParam(':filename', $file);
|
||||||
$stmt->bindParam(':date', $da);
|
$stmt->bindParam(':filesize', $fsize);
|
||||||
|
$stmt->bindParam(':dateoriginal', $da);
|
||||||
$stmt->bindParam(':lens', $obj);
|
$stmt->bindParam(':lens', $obj);
|
||||||
$stmt->bindParam(':speed', $sp);
|
$stmt->bindParam(':speed', $sp);
|
||||||
$stmt->bindParam(':iso', $iso);
|
|
||||||
$stmt->bindParam(':width', $wi);
|
|
||||||
$stmt->bindParam(':height', $he);
|
|
||||||
$stmt->bindParam(':html', $ht);
|
|
||||||
$stmt->bindParam(':aperture', $ap);
|
$stmt->bindParam(':aperture', $ap);
|
||||||
|
$stmt->bindParam(':correctexpo', $ev);
|
||||||
|
$stmt->bindParam(':iso', $iso);
|
||||||
$stmt->bindParam(':model', $mod);
|
$stmt->bindParam(':model', $mod);
|
||||||
$stmt->bindParam(':lat', $gps['latitude']);
|
|
||||||
$stmt->bindParam(':long', $gps['longitude']);
|
|
||||||
$stmt->bindParam(':alt', $gps['altitude']);
|
|
||||||
|
|
||||||
$stmt->bindParam(':legende', $leg);
|
|
||||||
$stmt->bindParam(':copyright', $cop);
|
|
||||||
$stmt->bindParam(':title', $tit);
|
|
||||||
$stmt->bindParam(':creator', $crea);
|
|
||||||
$stmt->bindParam(':keywords', $mot);
|
|
||||||
|
|
||||||
$stmt->bindParam(':metering', $mm);
|
$stmt->bindParam(':metering', $mm);
|
||||||
$stmt->bindParam(':flash', $fla);
|
$stmt->bindParam(':flash', $fla);
|
||||||
$stmt->bindParam(':focal', $fl);
|
$stmt->bindParam(':focal', $fl);
|
||||||
|
$stmt->bindParam(':program', $em);
|
||||||
$stmt->bindParam(':wb', $wb);
|
$stmt->bindParam(':wb', $wb);
|
||||||
$stmt->bindParam(':program', $ep);
|
$stmt->bindParam(':mode', $ep);
|
||||||
|
$stmt->bindParam(':width', $wi);
|
||||||
|
$stmt->bindParam(':height', $he);
|
||||||
|
$stmt->bindParam(':html', $ht);
|
||||||
|
$stmt->bindParam(':software', $soft);
|
||||||
|
$stmt->bindParam(':lat', $gps['latitude']);
|
||||||
|
$stmt->bindParam(':long', $gps['longitude']);
|
||||||
|
$stmt->bindParam(':alt', $gps['altitude']);
|
||||||
|
$stmt->bindParam(':usercomment', $uc);
|
||||||
|
$stmt->bindParam(':comment', $com);
|
||||||
|
|
||||||
|
/* IPTC */
|
||||||
|
$stmt->bindParam(':keywords', $mot);
|
||||||
|
$stmt->bindParam(':title', $tit);
|
||||||
|
$stmt->bindParam(':creator', $crea);
|
||||||
|
$stmt->bindParam(':city', $ci);
|
||||||
|
$stmt->bindParam(':department', $dep);
|
||||||
|
$stmt->bindParam(':code', $cp);
|
||||||
|
$stmt->bindParam(':country', $pa);
|
||||||
|
$stmt->bindParam(':copyright', $cop);
|
||||||
|
$stmt->bindParam(':legende', $leg);
|
||||||
|
|
||||||
|
|
||||||
if (isset($photos)) {
|
if (isset($photos)) {
|
||||||
foreach ($photos as $item) {
|
foreach ($photos as $item) {
|
||||||
$file = $item['filename'];
|
$file = $item['filename'];
|
||||||
$da = $item['date'];
|
$fsize = $item['filesize'];
|
||||||
|
$da = $item['dateoriginal'];
|
||||||
$obj = $item['lens'];
|
$obj = $item['lens'];
|
||||||
$sp = $item['speed'];
|
$sp = $item['speed'];
|
||||||
$iso = $item['iso'];
|
|
||||||
$wi = $item['width'];
|
|
||||||
$he = $item['height'];
|
|
||||||
$ht = $item['html'];
|
|
||||||
$ap = $item['aperture'];
|
$ap = $item['aperture'];
|
||||||
|
$ev = $item['correctexpo'];
|
||||||
|
$iso = $item['iso'];
|
||||||
$mod = $item['model'];
|
$mod = $item['model'];
|
||||||
$gps['latitude'] = $item['lat'];
|
|
||||||
$gps['longitude'] = $item['long'];
|
|
||||||
$gps['altitude'] = $item['alt'];
|
|
||||||
|
|
||||||
$leg = $item['legende'];
|
|
||||||
$cop = $item['copyright'];
|
|
||||||
$tit = $item['title'];
|
|
||||||
$crea = $item['creator'];
|
|
||||||
$mot = $item['mots_cles'];
|
|
||||||
|
|
||||||
$mm = $item['metering'];
|
$mm = $item['metering'];
|
||||||
$fla = $item['flash'];
|
$fla = $item['flash'];
|
||||||
$fl = $item['focal'];
|
$fl = $item['focal'];
|
||||||
|
$em = $item['program'];
|
||||||
$wb = $item['wb'];
|
$wb = $item['wb'];
|
||||||
$ep = $item['program'];
|
$ep = $item['mode'];
|
||||||
|
$wi = $item['width'];
|
||||||
|
$he = $item['height'];
|
||||||
|
$ht = $item['html'];
|
||||||
|
$soft = $item['software'];
|
||||||
|
$gps['latitude'] = $item['lat'];
|
||||||
|
$gps['longitude'] = $item['long'];
|
||||||
|
$gps['altitude'] = $item['alt'];
|
||||||
|
$mot = $item['keywords'];
|
||||||
|
$tit = $item['title'];
|
||||||
|
$crea = $item['creator'];
|
||||||
|
$ci = $item['city'];
|
||||||
|
$dep = $item['department'];
|
||||||
|
$cp = $item['code'];
|
||||||
|
$pa = $item['country'];
|
||||||
|
$cop = $item['copyright'];
|
||||||
|
$leg = $item['legende'];
|
||||||
|
$uc = $item['usercomment'];
|
||||||
|
$com = $item['comment'];
|
||||||
|
|
||||||
create_thumb($th_w, $th_h, $file);
|
create_thumb($th_w, $th_h, $file);
|
||||||
|
|
||||||
@@ -451,8 +673,13 @@ if ($d > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************/
|
||||||
|
/* Display new entries */
|
||||||
|
/***********************/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$query4 = "SELECT filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program FROM photos WHERE id > ? ORDER BY date DESC";
|
|
||||||
|
$query4 = "SELECT filename, filesize, dateoriginal, lens, speed, aperture, correctexpo, iso, model, metering, flash, focal, program, wb, mode, width, height, html, software, lat, long, alt, usercomment, comment, keywords, title, creator, city, department, code, country, copyright, legende FROM photos WHERE id > ? ORDER BY dateoriginal DESC";
|
||||||
|
|
||||||
$stmt = $conn->prepare($query4);
|
$stmt = $conn->prepare($query4);
|
||||||
$stmt->bindValue(1, $nb_avant, SQLITE3_INTEGER); // (1,3...) 1=1ere valeur 3=valeur
|
$stmt->bindValue(1, $nb_avant, SQLITE3_INTEGER); // (1,3...) 1=1ere valeur 3=valeur
|
||||||
@@ -462,16 +689,16 @@ if ($d > 0) {
|
|||||||
echo '<div id="add_to_bdd">';
|
echo '<div id="add_to_bdd">';
|
||||||
echo '<table class="styled-table">';
|
echo '<table class="styled-table">';
|
||||||
echo '<thead>';
|
echo '<thead>';
|
||||||
echo '<th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('Date') . '</th><th>' . gettext('Lens') . '</th><th>' . gettext('Speed') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Width') . '</th><th>' . gettext('Height') . '</th><th>' . gettext('Html') . '</th>';
|
echo '<th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('File size') . '</th><th>' . gettext('Date') . '</th><th>' . gettext('Lens') . '</th><th>' . gettext('Speed') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Exposure Corr.') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Model') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Flash') . '</th>';
|
||||||
echo '<th>' . gettext('Aperture') . '</th><th>' . gettext('Model') . '</th><th>' . gettext('Latitude') . '</th><th>' . gettext('Longitude') . '</th><th>' . gettext('Alttitude') . '</th><th>' . gettext('Legende') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Title') . '</th>';
|
echo '<th>' . gettext('Focal') . '</th><th>' . gettext('Program') . '</th><th>' . gettext('White Balance') . '</th><th>' . gettext('Mode') . '</th><th>' . gettext('Software') . '</th><th>' . gettext('Latitude') . '</th><th>' . gettext('Longitude') . '</th><th>' . gettext('Alttitude') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Title') . '</th><th>' . gettext('Creator') . '</th>';
|
||||||
echo '<th>' . gettext('Creator') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Flash') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Wb') . '</th><th>' . gettext('Program') . '</th>';
|
echo '<th>' . gettext('City') . '</th><th>' . gettext('Department') . '</th><th>' . gettext('CP') . '</th><th>' . gettext('Country') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Legende') . '</th>';
|
||||||
echo '</thead>';
|
echo '</thead>';
|
||||||
echo '<tbody>';
|
echo '<tbody>';
|
||||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||||
$full = host() . $row['filename'];
|
$full = host() . $row['filename'];
|
||||||
|
|
||||||
echo '<tr><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td><td>' . $row['filename'] . '</td><td>' . $row['date'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['width'] . '</td><td>' . $row['height'] . '</td><td>' . $row['html'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['model'] . '</td><td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td><td>' . $row['legende'] . '</td><td>' . $row['copyright'] . '</td><td>' . $row['title'] . '</td><td>' . $row['creator'] . '</td><td>' . $row['keywords'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['flash'] . '</td><td>' . $row['focal'] . '</td><td>' . $row['wb'] . '</td><td>' . $row['program'] . '</td></tr>';
|
echo '<tr><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td><td>' . $row['filename'] . '</td><td>' . $row['filesize'] . '</td><td>' . $row['dateoriginal'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['model'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['flash'] . '</td><td>' . $row['focal'] . '</td><td>' . $row['program'] . '</td><td>' . $row['wb'] . '</td><td>' . $row['mode'] . '</td><td>' . $row['software'] . '</td><td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td><td>' . $row['keywords'] . '</td><td>' . $row['title'] . '</td><td>' . $row['creator'] . '</td><td>' . $row['city'] . '</td><td>' . $row['department'] . '</td><td>' . $row['code'] . '</td><td>' . $row['country'] . '</td><td>' . $row['copyright'] . '</td><td>' . $row['legende'] . '</td></tr>';
|
||||||
}
|
}
|
||||||
echo '</tbody></table>';
|
echo '</tbody></table>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
@@ -491,12 +718,12 @@ if ($d > 0) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="admin/index.php" title="<?php echo gettext("Admin"); ?>"><?php echo gettext("Admin"); ?></a></p>
|
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -158,12 +158,18 @@
|
|||||||
.lcl_minimal #lcl_txt * {
|
.lcl_minimal #lcl_txt * {
|
||||||
font-family: Arial, 'sans-serif';
|
font-family: Arial, 'sans-serif';
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
|
color: rgba(255, 255, 255, 0.5); /* add */
|
||||||
|
mix-blend-mode: difference; /* add */
|
||||||
}
|
}
|
||||||
.lcl_minimal #lcl_title {
|
.lcl_minimal #lcl_title {
|
||||||
color: #eee;
|
color: #eee;
|
||||||
|
color: rgba(238, 238, 238, 0.7); /* add */
|
||||||
|
mix-blend-mode: difference; /* add */
|
||||||
}
|
}
|
||||||
.lcl_minimal #lcl_author {
|
.lcl_minimal #lcl_author {
|
||||||
color: #bfbfbf;
|
color: #bfbfbf;
|
||||||
|
color: rgba(191, 191, 191, 0.7); /* add */
|
||||||
|
mix-blend-mode: difference; /* add */
|
||||||
}
|
}
|
||||||
.lcl_minimal .lcl_txt_border {
|
.lcl_minimal .lcl_txt_border {
|
||||||
border-bottom: 1px dotted #666 !important;
|
border-bottom: 1px dotted #666 !important;
|
||||||
|
|||||||
100
css/sls.css
@@ -12,6 +12,16 @@ h1 {
|
|||||||
h2, h3, h4 {
|
h2, h3, h4 {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
h3 {
|
||||||
|
font-weight: 300;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
font-weight: 200;
|
||||||
|
text-align: center;
|
||||||
|
/*margin-bottom: 2em;*/
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -46,6 +56,9 @@ pre {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lcl_minimal #lcl_txt * {
|
||||||
|
color: rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
The grid itself needs only 4 CSS declarations:
|
The grid itself needs only 4 CSS declarations:
|
||||||
*/
|
*/
|
||||||
@@ -418,3 +431,90 @@ select:-moz-focusring {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Liste admin.php */
|
||||||
|
/**/
|
||||||
|
|
||||||
|
.base {
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
h3 {
|
||||||
|
font-weight: 400;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
.center-flex {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 50vh;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav a, button a {
|
||||||
|
font-size: 18px;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 8px 12px;
|
||||||
|
margin-right: 12px;
|
||||||
|
border: 1px solid rgb(154, 149, 73);
|
||||||
|
border-radius: 5px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
/*background-color: rgb(177, 172, 115);*/
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* styles links while mouse is hovered over */
|
||||||
|
nav a:hover, button a:hover {
|
||||||
|
background-color: orange;
|
||||||
|
border: 1px solid rgb(208, 134, 0);
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* styles links while being clicked */
|
||||||
|
nav a:active, button a:active {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
.green {
|
||||||
|
background-color: rgb(7, 141, 35);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
h3.redstyle {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
h3.greenstyle {
|
||||||
|
color: rgb(7, 141, 35);
|
||||||
|
}
|
||||||
|
.red {
|
||||||
|
background-color: rgb(219, 127, 101);
|
||||||
|
}
|
||||||
|
.kaki {
|
||||||
|
background-color: rgb(177, 172, 115);
|
||||||
|
}
|
||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.font10 {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
input[type="text"], textarea {
|
||||||
|
|
||||||
|
background-color : #eeeeee;
|
||||||
|
|
||||||
|
}
|
||||||
BIN
db_photo.sqlite3
155
edit_bdd.php
@@ -1,3 +1,44 @@
|
|||||||
|
<?php require ("3-protect.php");
|
||||||
|
include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
|
||||||
|
$base = 'db_photo.sqlite3';
|
||||||
|
$conn = new PDO("sqlite:$base");
|
||||||
|
$msg = "";
|
||||||
|
$req_edit = "";
|
||||||
|
|
||||||
|
if (isset($_SESSION["user"])) {
|
||||||
|
if ((isset($_POST["edit"])) && ($_POST["edit"] == "edit")) {
|
||||||
|
|
||||||
|
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
||||||
|
$rr = "";
|
||||||
|
foreach($_POST['coche'] as $key => $value) {
|
||||||
|
$r = "id = '" . $value . "' OR ";
|
||||||
|
$rr .= $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
$req = substr($rr, 0, -4);
|
||||||
|
$req_edit = "SELECT * FROM photos WHERE " . $req . " ORDER BY id";
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "view_bdd.php?message=" . urlencode(gettext("No images select !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "admin.php?message=" . urlencode(gettext("Please log in !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
@@ -5,118 +46,76 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php gettext('View photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/sls.css" />
|
<link rel="stylesheet" href="css/sls.css" />
|
||||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
<link rel='stylesheet' href='css/minimal.css' />
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
<?php include 'functions.php';
|
|
||||||
session_start();
|
|
||||||
if($_SESSION['Active'] == false){ /* Redirects user to login.php if not logged in */
|
|
||||||
header("location:admin/login.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
echo "_SESSION<br>";
|
|
||||||
_pr($_SESSION);
|
|
||||||
//echo $_SESSION['query'];
|
|
||||||
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
|
|
||||||
|
|
||||||
if (!empty($_POST)) {
|
|
||||||
/*
|
|
||||||
$_SESSION['query'] = $_POST;
|
|
||||||
echo "post query non vide";
|
|
||||||
echo gettype($_POST);
|
|
||||||
echo gettype($_SESSION['query']);
|
|
||||||
*/
|
|
||||||
#$liste = $_POST;
|
|
||||||
|
|
||||||
$liste = array_filter($_POST, function($key) {
|
|
||||||
return strpos($key, 'coche') === 0;
|
|
||||||
}, ARRAY_FILTER_USE_KEY);
|
|
||||||
|
|
||||||
if (count($liste) == 0) {
|
|
||||||
echo gettext('No image selected !');
|
|
||||||
header("location:view_bdd.php");
|
|
||||||
}
|
|
||||||
|
|
||||||
$r = "";
|
|
||||||
foreach ($liste as $key => $value) {
|
|
||||||
$r .= "filename LIKE '%" . $value . "' OR ";
|
|
||||||
}
|
|
||||||
$req = "WHERE " . substr($r, 0, -4);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1><?php echo gettext('Edit database'); ?></h1>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
debug_to_console($_GET);
|
||||||
|
debug_to_console($req_edit);
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$base = 'db_photo.sqlite3';
|
||||||
|
|
||||||
echo "<a href='close.php'> close session </a><br />";
|
echo '<h1>' . gettext('Edit database') . ': ' . $base . '</h1><br />';
|
||||||
|
|
||||||
|
echo '<h3>' . $msg . '</h3>';
|
||||||
|
|
||||||
$query = "SELECT * FROM photos " . $req . " ORDER BY id";
|
|
||||||
echo $query;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$conn = new PDO('sqlite:db_photo.sqlite3');
|
$conn = new PDO('sqlite:db_photo.sqlite3');
|
||||||
$stmt = $conn->prepare($query);
|
$stmt = $conn->prepare($req_edit);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
#$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
#$rowcount = count($result);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#_pr($result);
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo '<form id="editImage" name="editImage" action="modify_bdd.php" method="post" class="myForm" >';
|
echo '<form id="editImage" name="editImage" action="modify_bdd.php" method="post" class="myForm" >';
|
||||||
echo '<table class="styled-table">';
|
echo '<table class="styled-table">';
|
||||||
echo '<thead>';
|
echo '<thead>';
|
||||||
echo '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('Date') . ' </th><th>' . gettext('Lens') . '</th><th>' . gettext('Speed') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Width') . '</th><th>' . gettext('Height') . '</th>';
|
echo '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('Date') . ' </th><th>' . gettext('Speed') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Expo. correct') . '</th>';
|
||||||
echo '<th>' . gettext('Model') . '</th><th>' . gettext('Latitude') . '</th><th>' . gettext('Longitude') . '</th><th>' . gettext('Alttitude') . '</th><th>' . gettext('Legende') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Title') . '</th>';
|
echo '<th>' . gettext('Model') . '</th><th>' . gettext('Lens') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Program') . '</th><th>' . gettext('Wb') . '</th>';
|
||||||
echo '<th>' . gettext('Creator') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Flash') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Wb') . '</th><th>' . gettext('Program') . '</th><th>' . gettext('Html') . '</th>';
|
|
||||||
|
echo '<th>' . gettext('Flash') . '</th><th>' . gettext('Software') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Title') . '</th><th>' . gettext('Creator') . '</th><th>' . gettext('City') . '</th><th>' . gettext('Department') . '</th><th>' . gettext('Code') . '</th><th>' . gettext('Country') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Legende') . '</th>';
|
||||||
echo '</thead>';
|
echo '</thead>';
|
||||||
echo '<tbody>';
|
echo '<tbody>';
|
||||||
|
|
||||||
// lens legende copyright title creator keywords
|
|
||||||
$nRows = 0;
|
$nRows = 0;
|
||||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||||
$full = host() . $row['filename'];
|
$full = host() . $row['filename'];
|
||||||
|
|
||||||
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td>';
|
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td>';
|
||||||
echo '<td>' . $row['filename'] . '</td>';
|
echo '<td>' . $row['filename'] . '</td><td>' . $row['dateoriginal'] . '</td>';
|
||||||
echo '<td>' . $row['dateoriginal'] . '</td>';
|
echo '<td>' . $row['speed'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td>';
|
||||||
echo '<td><input type="text" id="flens" name="flens" value="' . $row['lens'] . '" size=""></td>';
|
echo '<td>' . $row['model'] . '</td>';
|
||||||
echo '<td>' . $row['speed'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['width'] . '</td><td>' . $row['height'] . '</td><td>' . $row['model'] . '</td>';
|
echo '<td><input type="text" id="lens" name="lens[]" value="' . $row['lens'] . '" size=""></td>';
|
||||||
echo '<td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td>';
|
echo '<td>' . $row['focal'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['program'] . '</td><td>' . $row['wb'] . '</td>';
|
||||||
echo '<td><input type="text" id="flegende" name="flegende" value="' . $row['legende'] . '" size=""></td>';
|
echo '<td>' . $row['flash'] . '</td><td>' . $row['software'] . '</td>';
|
||||||
echo '<td><input type="text" id="fcopyright" name="fcopyright" value="' . $row['copyright'] . '" size=""></td>';
|
//echo '<td><input type="text" id="keywords" name="keywords[]" value="' . $row['keywords'] . '" size=""></td>';
|
||||||
echo '<td><input type="text" id="ftitle" name="ftitle" value="' . $row['title'] . '" size=""></td>';
|
echo "<td><input type='text' id='keywords' name='keywords[]' value='" . $row['keywords'] . "' size=''></td>";
|
||||||
echo '<td><input type="text" id="fcreator" name="fcreator" value="' . $row['creator'] . '" size=""></td>';
|
echo '<td><input type="text" id="title" name="title[]" value="' . $row['title'] . '" size=""></td>';
|
||||||
echo '<td><input type="text" id="fkeywords" name="fkeywords" value="' . $row['keywords'] . '" size=""></td>';
|
echo '<td><input type="text" id="creator" name="creator[]" value="' . $row['creator'] . '" size=""></td>';
|
||||||
echo '<td>' . $row['metering'] . '</td><td>' . $row['flash'] . '</td><td>' . $row['focal'] . '</td><td>' . $row['wb'] . '</td><td>' . $row['program'] . '</td><td>' . $row['html'] . '</td></tr>';
|
|
||||||
echo '<input type="hidden" id="fid" name="fid" value="' . $row['id'] . '">';
|
|
||||||
|
|
||||||
|
echo '<td><input type="text" id="city" name="city[]" value="' . $row['city'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="department" name="department[]" value="' . $row['department'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="code" name="code[]" value="' . $row['code'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="country" name="country[]" value="' . $row['country'] . '" size=""></td>';
|
||||||
|
|
||||||
|
echo '<td><input type="text" id="copyright" name="copyright[]" value="' . $row['copyright'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="legende" name="legende[]" value="' . $row['legende'] . '" size=""></td></tr>';
|
||||||
|
|
||||||
|
echo '<input type="hidden" id="id" name="id[]" value="' . $row['id'] . '">';
|
||||||
|
|
||||||
$nRows++;
|
$nRows++;
|
||||||
}
|
}
|
||||||
@@ -133,12 +132,12 @@ _pr($_SESSION);
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="admin/index.php" title="<?php echo gettext("Admin"); ?>"><?php echo gettext("Admin"); ?></a></p>
|
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
BIN
exifs.xlsx
Normal file
BIN
exifs2.xlsx
Normal file
427
functions.php
@@ -1,10 +1,92 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
function _pr($d) {
|
||||||
|
echo "<div style='border: 1px solid#ccc; padding: 10px;'>";
|
||||||
|
echo '<strong>' . debug_backtrace()[0]['file'] . ' ' . debug_backtrace()[0]['line'] . '</strong>';
|
||||||
|
echo "</div>";
|
||||||
|
echo '<pre>';
|
||||||
|
if(is_array($d)) {
|
||||||
|
print_r($d);
|
||||||
|
} else if(is_object($d)) {
|
||||||
|
var_dump($d);
|
||||||
|
}
|
||||||
|
echo '</pre>';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple helper to debug to the console
|
||||||
|
*
|
||||||
|
* @param Array, Object, String $data
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
function debug_to_console( $data ) {
|
||||||
|
$output = '';
|
||||||
|
|
||||||
|
if ( is_array( $data ) ) {
|
||||||
|
$output .= "<script>console.warn( 'Debug Objects with Array.' ); console.log( '" . implode( ',', $data) . "' );</script>";
|
||||||
|
} else if ( is_object( $data ) ) {
|
||||||
|
$data = var_export( $data, TRUE );
|
||||||
|
$data = explode( "\n", $data );
|
||||||
|
foreach( $data as $line ) {
|
||||||
|
if ( trim( $line ) ) {
|
||||||
|
$line = addslashes( $line );
|
||||||
|
$output .= "console.log( '{$line}' );";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$output = "<script>console.warn( 'Debug Objects with Object.' ); $output</script>";
|
||||||
|
} else {
|
||||||
|
$output .= "<script>console.log( 'Debug Objects: {$data}' );</script>";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Fonction month(): convertit le mois (nb) en mois (texte) francais
|
/* Fonction month(): convertit le mois (nb) en mois (texte) francais
|
||||||
|
|
||||||
photo-du-mois.php
|
photo-du-mois.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function convert_bytes($val , $type_val , $type_wanted){
|
||||||
|
$tab_val = array("o", "ko", "Mo", "Go", "To", "Po", "Eo");
|
||||||
|
if (!(in_array($type_val, $tab_val) && in_array($type_wanted, $tab_val)))
|
||||||
|
return 0;
|
||||||
|
$tab = array_flip($tab_val);
|
||||||
|
$diff = $tab[$type_val] - $tab[$type_wanted];
|
||||||
|
if ($diff > 0)
|
||||||
|
return ($val * pow(1024, $diff));
|
||||||
|
if ($diff < 0)
|
||||||
|
return ($val / pow(1024, -$diff));
|
||||||
|
return ($val);
|
||||||
|
}
|
||||||
|
|
||||||
|
function taille_fichier($octets) {
|
||||||
|
$resultat = $octets;
|
||||||
|
for ($i=0; $i < 8 && $resultat >= 1024; $i++) {
|
||||||
|
$resultat = $resultat / 1024;
|
||||||
|
}
|
||||||
|
if ($i > 0) {
|
||||||
|
return preg_replace('/,00$/', '', number_format($resultat, 2, ',', ''))
|
||||||
|
. ' ' . substr('KMGTPEZY',$i-1,1) . 'o';
|
||||||
|
} else {
|
||||||
|
return $resultat . ' o';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatBytes($bytes, $precision = 2) {
|
||||||
|
$units = array('o', 'Ko', 'Mo', 'Go', 'To');
|
||||||
|
|
||||||
|
$bytes = max($bytes, 0);
|
||||||
|
$pow = floor(($bytes ? log($bytes) : 0) / log(1024));
|
||||||
|
$pow = min($pow, count($units) - 1);
|
||||||
|
|
||||||
|
// Uncomment one of the following alternatives
|
||||||
|
// $bytes /= pow(1024, $pow);
|
||||||
|
$bytes /= (1 << (10 * $pow));
|
||||||
|
|
||||||
|
return round($bytes, $precision) . " " .$units[$pow];
|
||||||
|
}
|
||||||
|
|
||||||
function month($w) {
|
function month($w) {
|
||||||
$m = date('m', strtotime($w)); // month
|
$m = date('m', strtotime($w)); // month
|
||||||
$y = date('Y', strtotime($w)); // year
|
$y = date('Y', strtotime($w)); // year
|
||||||
@@ -77,9 +159,11 @@ function get_gps($exif) {
|
|||||||
$GPSLongitude = isset($exif['GPS']['GPSLongitude']) ? $exif['GPS']['GPSLongitude'] : '';
|
$GPSLongitude = isset($exif['GPS']['GPSLongitude']) ? $exif['GPS']['GPSLongitude'] : '';
|
||||||
$GPSAltitude = isset($exif['GPS']['GPSAltitude']) ? $exif['GPS']['GPSAltitude'] : '';
|
$GPSAltitude = isset($exif['GPS']['GPSAltitude']) ? $exif['GPS']['GPSAltitude'] : '';
|
||||||
|
|
||||||
|
/*
|
||||||
echo $GPSLatitude;
|
echo $GPSLatitude;
|
||||||
echo $GPSLongitude;
|
echo $GPSLongitude;
|
||||||
echo $GPSAltitude;
|
echo $GPSAltitude;
|
||||||
|
*/
|
||||||
|
|
||||||
$lat_degrees = count($GPSLatitude) > 0 ? gps2Num($GPSLatitude[0]) : 0;
|
$lat_degrees = count($GPSLatitude) > 0 ? gps2Num($GPSLatitude[0]) : 0;
|
||||||
$lat_minutes = count($GPSLatitude) > 1 ? gps2Num($GPSLatitude[1]) : 0;
|
$lat_minutes = count($GPSLatitude) > 1 ? gps2Num($GPSLatitude[1]) : 0;
|
||||||
@@ -115,6 +199,7 @@ function get_gps($exif) {
|
|||||||
insert_bdd.php
|
insert_bdd.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
function create_thumb($thumb_w, $thumb_h, $image) {
|
function create_thumb($thumb_w, $thumb_h, $image) {
|
||||||
|
|
||||||
list($origin_w, $origin_h) = getimagesize($image);
|
list($origin_w, $origin_h) = getimagesize($image);
|
||||||
@@ -137,7 +222,6 @@ function create_thumb($thumb_w, $thumb_h, $image) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Fonction in_bdd(): test si la photo est déjà dans la bdd
|
/* Fonction in_bdd(): test si la photo est déjà dans la bdd
|
||||||
|
|
||||||
insert_bdd.php
|
insert_bdd.php
|
||||||
@@ -166,23 +250,6 @@ function in_bdd($image) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
function _pr($d) {
|
|
||||||
echo "<div style='border: 1px solid#ccc; padding: 10px;'>";
|
|
||||||
echo '<strong>' . debug_backtrace()[0]['file'] . ' ' . debug_backtrace()[0]['line'] . '</strong>';
|
|
||||||
echo "</div>";
|
|
||||||
echo '<pre>';
|
|
||||||
if(is_array($d)) {
|
|
||||||
print_r($d);
|
|
||||||
} else if(is_object($d)) {
|
|
||||||
var_dump($d);
|
|
||||||
}
|
|
||||||
echo '</pre>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* return geo exif in a nice form
|
/* return geo exif in a nice form
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@@ -227,8 +294,9 @@ function host() {
|
|||||||
if ($_SERVER['HTTP_HOST'] == "sur-le-sentier.fr") {
|
if ($_SERVER['HTTP_HOST'] == "sur-le-sentier.fr") {
|
||||||
$host = $pv_URIprotocol . $_SERVER['HTTP_HOST'] . "/";
|
$host = $pv_URIprotocol . $_SERVER['HTTP_HOST'] . "/";
|
||||||
}
|
}
|
||||||
elseif ($_SERVER['HTTP_HOST'] == "airbook.local") {
|
elseif ($_SERVER['HTTP_HOST'] == "sur-le-sentier.airbook.local") {
|
||||||
$host = $pv_URIprotocol . $_SERVER['HTTP_HOST'] . "/sls/";
|
//$host = $pv_URIprotocol . $_SERVER['HTTP_HOST'] . "/sls/";
|
||||||
|
$host = $pv_URIprotocol . $_SERVER['HTTP_HOST'] . "/";
|
||||||
}
|
}
|
||||||
return $host;
|
return $host;
|
||||||
}
|
}
|
||||||
@@ -279,8 +347,34 @@ function clean_keywords($keywords) {
|
|||||||
return $v;
|
return $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function conv_date($dateoriginal, $format) {
|
||||||
|
$locale = getenv('LC_ALL=');
|
||||||
|
|
||||||
|
if ($format == 1) {
|
||||||
|
$formatter = new IntlDateFormatter($locale, IntlDateFormatter::FULL, IntlDateFormatter::SHORT, "Europe/Paris");
|
||||||
|
// vendredi 16 septembre 2022 à 19:17
|
||||||
|
}
|
||||||
|
elseif ($format == 2) {
|
||||||
|
$formatter = new IntlDateFormatter($locale, IntlDateFormatter::LONG, IntlDateFormatter::LONG, "Europe/Paris");
|
||||||
|
// 16 septembre 2022 à 19:17:22 UTC+2
|
||||||
|
}
|
||||||
|
elseif ($format == 3) {
|
||||||
|
$formatter = new IntlDateFormatter($locale, IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM, "Europe/Paris");
|
||||||
|
// 16 sept. 2022, 19:17:22
|
||||||
|
}
|
||||||
|
elseif ($format == 4) {
|
||||||
|
$formatter = new IntlDateFormatter($locale, IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, "Europe/Paris");
|
||||||
|
// 16 sept. 2022, 19:17
|
||||||
|
}
|
||||||
|
|
||||||
|
$date = new DateTime($dateoriginal);
|
||||||
|
return $formatter->format($date);
|
||||||
|
}
|
||||||
|
|
||||||
function data_for_lightbox($data) {
|
function data_for_lightbox($data) {
|
||||||
|
|
||||||
|
//$query4 = "INSERT OR IGNORE INTO photos (filename, filesize, dateoriginal, lens, speed, correctexpo, iso, usercomment, comment, model, metering, flash, focal, program, wb, mode, width, height, html, aperture, software, lat, long, alt, keywords, title, creator, city, department, code, country, copyright, legende);
|
||||||
|
|
||||||
$filename = $data['filename'];
|
$filename = $data['filename'];
|
||||||
$title_thumb = pathinfo($filename, PATHINFO_FILENAME);
|
$title_thumb = pathinfo($filename, PATHINFO_FILENAME);
|
||||||
|
|
||||||
@@ -291,17 +385,25 @@ function data_for_lightbox($data) {
|
|||||||
$iso = $data['iso'];
|
$iso = $data['iso'];
|
||||||
$exif = $model . " \u{30FB} " . $objectif . " \u{30FB} " . $speed . " \u{30FB} " . $aperture . " \u{30FB} " . $iso . "ISO";
|
$exif = $model . " \u{30FB} " . $objectif . " \u{30FB} " . $speed . " \u{30FB} " . $aperture . " \u{30FB} " . $iso . "ISO";
|
||||||
|
|
||||||
|
$correctexpo = $data['correctexpo'];
|
||||||
|
$metering = $data['metering'];
|
||||||
|
$program = $data['program'];
|
||||||
|
$wb = $data['wb'];
|
||||||
|
$software = $data['software'];
|
||||||
|
$dateoriginal = conv_date($data['dateoriginal'], 4);
|
||||||
|
|
||||||
|
$focal = $data['focal'];
|
||||||
|
$flash = $data['flash'];
|
||||||
|
|
||||||
$latitude = $data['lat'];
|
$latitude = $data['lat'];
|
||||||
$longitude = $data['long'];
|
$longitude = $data['long'];
|
||||||
$altitude = $data['alt'];
|
$altitude = $data['alt'];
|
||||||
|
|
||||||
$da = isset($exif['EXIF']['DateTimeOriginal']) ? $exif['EXIF']['DateTimeOriginal'] : '';
|
|
||||||
|
|
||||||
$gps = (!empty($longitude) && !empty($latitude)) ? $latitude . "," . $longitude : "";
|
$gps = (!empty($longitude) && !empty($latitude)) ? $latitude . "," . $longitude : "";
|
||||||
|
|
||||||
//$gps = $longitude . "," . $latitude;
|
//$gps = $longitude . "," . $latitude;
|
||||||
|
|
||||||
$title = $data['title'];
|
$title = $data['title'];
|
||||||
|
|
||||||
$legende = $data['legende'];
|
$legende = $data['legende'];
|
||||||
$file = basename($filename);
|
$file = basename($filename);
|
||||||
if (!empty($title)) {
|
if (!empty($title)) {
|
||||||
@@ -317,12 +419,58 @@ function data_for_lightbox($data) {
|
|||||||
$y = "";
|
$y = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($gps)) {
|
||||||
|
$map = '<a href = "https://maps.google.com/maps?q=' . $gps . '&t=&z=9&ie=UTF8&iwloc=&output=embed" title="' . $title . '" data-lcl-txt="' . $legende . '">' . " \u{30FB} \u{2693} " . '</a>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$map = '';
|
||||||
|
}
|
||||||
|
|
||||||
$creator = $data['creator'];
|
$creator = $data['creator'];
|
||||||
|
|
||||||
$big = host() . $data['filename'];
|
$big = host() . $data['filename'];
|
||||||
$thumb = host() . str_replace("photos/img", "photos/thumb", $data['filename']);
|
$thumb = host() . str_replace("photos/img", "photos/thumb", $data['filename']);
|
||||||
|
|
||||||
$keywords = str_replace(',', " \u{30FB} ", clean_keywords($data['keywords']));
|
$keywords = str_replace(',', " \u{30FB} ", clean_keywords($data['keywords']));
|
||||||
|
$copyright = $data['copyright'];
|
||||||
|
|
||||||
|
$city = $data['city'];
|
||||||
|
$department = $data['department'];
|
||||||
|
$code = $data['code'];
|
||||||
|
$country = $data['country'];
|
||||||
|
|
||||||
|
$comment = $data['comment'];
|
||||||
|
$usercomment = $data['usercomment'];
|
||||||
|
|
||||||
|
$description = "<table>";
|
||||||
|
$description .= "<tr><td>" . gettext("Date") . "</td><td>" . $dateoriginal . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Speed") . "</td><td>" . $speed . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Aperture") . "</td><td>" . $aperture . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Iso") . "</td><td>" . $iso . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Model") . "</td><td>". $model . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Lens") . "</td><td>" . $objectif . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Focal") . "</td><td>" . $focal . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Exposure Correction") . "</td><td>" . $correctexpo . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Metering") . "</td><td>". $metering . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Program") . "</td><td>" . $program . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("White balance") . "</td><td>" . $wb . "</td></tr>";
|
||||||
|
|
||||||
|
if (! strcasecmp($flash, "Off") == 0) {
|
||||||
|
$description .= "<tr><td>" . gettext("Flash") . "</td><td>" . $flash . "</td></tr>";
|
||||||
|
}
|
||||||
|
$description .= "<tr><td>" . gettext("Software") . "</td><td>" . $software . "</td></tr>";
|
||||||
|
$description .= "<tr><td>" . gettext("Keywords") . "</td><td>" . $keywords . "</td></tr>";
|
||||||
|
(!empty($copyright)) && $description .= "<tr><td>" . gettext("Copyright") . "</td><td>" . $copyright . "</td></tr>";
|
||||||
|
|
||||||
|
(!empty($city)) && $description .= "<tr><td>" . gettext("City") . "</td><td>" . $city . "</td></tr>";
|
||||||
|
(!empty($department)) && $description .= "<tr><td>" . gettext("Department") . "</td><td>" . $department . "</td></tr>";
|
||||||
|
$code = (!empty($code)) ? " (" . $code . ")" : "";
|
||||||
|
(!empty($country)) && $description .= "<tr><td>" . gettext("Country") . "</td><td>" . $country . $code . "</td></tr>";
|
||||||
|
(!empty($map)) && $description .= "<tr><td>GPS</td><td>" . $map . "</td></tr>";
|
||||||
|
((!empty($comment)) || (!empty($usercomment))) && $description .= "<tr><td> </td><td> </td></tr>";
|
||||||
|
(!empty($comment)) && $description .= "<tr><td>" . gettext("Comment") . "</td><td>" . $comment . "</td></tr>";
|
||||||
|
(!empty($usercomment)) && $description .= "<tr><td>" . gettext("User comment") . "</td><td>" . $usercomment . "</td></tr>";
|
||||||
|
$description .= "</table>";
|
||||||
|
|
||||||
$lightbox = array();
|
$lightbox = array();
|
||||||
$lightbox['title_thumb'] = $title_thumb;
|
$lightbox['title_thumb'] = $title_thumb;
|
||||||
@@ -334,6 +482,7 @@ function data_for_lightbox($data) {
|
|||||||
$lightbox['keywords'] = $keywords;
|
$lightbox['keywords'] = $keywords;
|
||||||
$lightbox['creator'] = $creator;
|
$lightbox['creator'] = $creator;
|
||||||
$lightbox['gps'] = $gps;
|
$lightbox['gps'] = $gps;
|
||||||
|
$lightbox['description'] = $description;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Array
|
Array
|
||||||
@@ -346,240 +495,10 @@ function data_for_lightbox($data) {
|
|||||||
[big] => https://airbook.local/sls/photos/img/12_2021.jpg
|
[big] => https://airbook.local/sls/photos/img/12_2021.jpg
|
||||||
[keywords] => Carduelis carduelis ・ chardonneret élégant
|
[keywords] => Carduelis carduelis ・ chardonneret élégant
|
||||||
[creator] => @Bruno Pesenti
|
[creator] => @Bruno Pesenti
|
||||||
|
[description] => <table>...</table>
|
||||||
)
|
)
|
||||||
*/
|
*/
|
||||||
return $lightbox;
|
return $lightbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------
|
|
||||||
|
|
||||||
Localization:
|
|
||||||
|
|
||||||
-list_dir($dir) : liste le dossier des locales (Locale)
|
|
||||||
-locale_language_from_browser($languages) : Identify language from the Accept-language HTTP header
|
|
||||||
-localize() : fonction à ajouter sur chaque page
|
|
||||||
|
|
||||||
-----------------------------------------------------*/
|
|
||||||
|
|
||||||
function list_dir($dir) {
|
|
||||||
if ($handle = opendir($dir)) {
|
|
||||||
$files = array();
|
|
||||||
while(false!==($file = readdir($handle))) {
|
|
||||||
if (is_dir($dir . '/' . $file)) {
|
|
||||||
$files[] = $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
sort($files);
|
|
||||||
|
|
||||||
$i = 0;
|
|
||||||
global $myLanguages;
|
|
||||||
$myLanguages = array();
|
|
||||||
foreach($files as $f) {
|
|
||||||
if (strstr($f,'.') == false) {
|
|
||||||
$myLanguages[$i] = $f;
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
//$myLanguages[] = $f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo 'error: missing language files';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
//print_r($myLanguages);
|
|
||||||
return $myLanguages;
|
|
||||||
}
|
|
||||||
|
|
||||||
//function _locale_language_from_browser($languages) {
|
|
||||||
function _locale_language_from_browser() {
|
|
||||||
if (empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
$languages = "";
|
|
||||||
// The Accept-Language header contains information about the language
|
|
||||||
// preferences configured in the user's browser / operating system.
|
|
||||||
// RFC 2616 (section 14.4) defines the Accept-Language header as follows:
|
|
||||||
// Accept-Language = "Accept-Language" ":"
|
|
||||||
// 1#( language-range [ ";" "q" "=" qvalue ] )
|
|
||||||
// language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
|
|
||||||
// Samples: "hu, en-us;q=0.66, en;q=0.33", "hu,en-us;q=0.5"
|
|
||||||
$browser_langcodes = array();
|
|
||||||
if (preg_match_all('@(?<=[, ]|^)([a-zA-Z-]+|\\*)(?:;q=([0-9.]+))?(?:$|\\s*,\\s*)@', trim($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches, PREG_SET_ORDER)) {
|
|
||||||
foreach ($matches as $match) {
|
|
||||||
|
|
||||||
// We can safely use strtolower() here, tags are ASCII.
|
|
||||||
// RFC2616 mandates that the decimal part is no more than three digits,
|
|
||||||
// so we multiply the qvalue by 1000 to avoid floating point comparisons.
|
|
||||||
$langcode = strtolower($match[1]);
|
|
||||||
$qvalue = isset($match[2]) ? (double) $match[2] : 1;
|
|
||||||
$browser_langcodes[$langcode] = (int) ($qvalue * 1000);
|
|
||||||
|
|
||||||
_pr($match);
|
|
||||||
echo $langcode . '-' . $qvalue . '-' . $browser_langcodes[$langcode] . '<br>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//_pr($browser_langcodes);
|
|
||||||
|
|
||||||
// We should take pristine values from the HTTP headers, but Internet Explorer
|
|
||||||
// from version 7 sends only specific language tags (eg. fr-CA) without the
|
|
||||||
// corresponding generic tag (fr) unless explicitly configured. In that case,
|
|
||||||
// we assume that the lowest value of the specific tags is the value of the
|
|
||||||
// generic language to be as close to the HTTP 1.1 spec as possible.
|
|
||||||
// See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 and
|
|
||||||
// http://blogs.msdn.com/b/ie/archive/2006/10/17/accept-language-header-for-internet-explorer-7.aspx
|
|
||||||
asort($browser_langcodes);
|
|
||||||
foreach ($browser_langcodes as $langcode => $qvalue) {
|
|
||||||
$generic_tag = strtok($langcode, '-');
|
|
||||||
if (!isset($browser_langcodes[$generic_tag])) {
|
|
||||||
$browser_langcodes[$generic_tag] = $qvalue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "browser_langcodes<br>";
|
|
||||||
_pr($browser_langcodes);
|
|
||||||
echo "languages<br>";
|
|
||||||
_pr($languages);
|
|
||||||
|
|
||||||
// Find the enabled language with the greatest qvalue, following the rules
|
|
||||||
// of RFC 2616 (section 14.4). If several languages have the same qvalue,
|
|
||||||
// prefer the one with the greatest weight.
|
|
||||||
$best_match_langcode = FALSE;
|
|
||||||
$max_qvalue = 0;
|
|
||||||
foreach ($languages as $langcode => $language) {
|
|
||||||
|
|
||||||
// Language tags are case insensitive (RFC2616, sec 3.10).
|
|
||||||
$langcode = strtolower($langcode);
|
|
||||||
|
|
||||||
// If nothing matches below, the default qvalue is the one of the wildcard
|
|
||||||
// language, if set, or is 0 (which will never match).
|
|
||||||
$qvalue = isset($browser_langcodes['*']) ? $browser_langcodes['*'] : 0;
|
|
||||||
|
|
||||||
// Find the longest possible prefix of the browser-supplied language
|
|
||||||
// ('the language-range') that matches this site language ('the language tag').
|
|
||||||
$prefix = $langcode;
|
|
||||||
echo "prefix: " . $prefix . "<br>";
|
|
||||||
|
|
||||||
do {
|
|
||||||
if (isset($browser_langcodes[$prefix])) {
|
|
||||||
$qvalue = $browser_langcodes[$prefix];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} while ($prefix = substr($prefix, 0, strrpos($prefix, '-')));
|
|
||||||
|
|
||||||
// Find the best match.
|
|
||||||
if ($qvalue > $max_qvalue) {
|
|
||||||
$best_match_langcode = $language->language;
|
|
||||||
$max_qvalue = $qvalue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_pr($best_match_langcode);
|
|
||||||
echo "bml" . $best_match_langcode . "<br>";
|
|
||||||
|
|
||||||
return $best_match_langcode;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function locale_language_from_browser($languages) {
|
|
||||||
// Specified by the user via the browser's Accept Language setting
|
|
||||||
// Samples: "hu, en-us;q=0.66, en;q=0.33", "hu,en-us;q=0.5"
|
|
||||||
$browser_langs = array();
|
|
||||||
|
|
||||||
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
|
||||||
$browser_accept = explode(",", $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
|
||||||
foreach ($browser_accept as $langpart) {
|
|
||||||
// The language part is either a code or a code with a quality.
|
|
||||||
// We cannot do anything with a * code, so it is skipped.
|
|
||||||
// If the quality is missing, it is assumed to be 1 according to the RFC.
|
|
||||||
if (preg_match("!([a-z-]+)(;q=([0-9\\.]+))?!", trim($langpart), $found)) {
|
|
||||||
$browser_langs[$found[1]] = (isset($found[3]) ? (float) $found[3] : 1.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Order the codes by quality
|
|
||||||
arsort($browser_langs);
|
|
||||||
//Array ( [en-us] => 1 [en] => 0.7 [fr] => 0.3 ) Firefox Fr
|
|
||||||
//Array ( [fr-] => 1 [en-] => 1 [fr] => 0.8 [en] => 0.4 ) Chrome 5 Fr
|
|
||||||
//Array ( [fr-fr] => 1 ) Safari Fr
|
|
||||||
//Array ( [fr-fr] => 1 ) iCab Fr
|
|
||||||
//Array ( [zh-] => 1 [fr] => 1 [pt-] => 1 [en-] => 1 [en] => 0.9 [ja] => 0.7 [de] => 0.6 [es] => 0.5 [it] => 0.4 [pt] => 0.3 [pl] => 0.1 [ru] => 0.1 [ko] => 0.1 [sv] => 0.1 [nl] => 0.1 [nb] => 0.1 [da] => 0.1 [fi] => 0.1 ) Opera 10.6
|
|
||||||
|
|
||||||
// Try to find the first preferred language we have
|
|
||||||
foreach ($browser_langs as $langcode => $q) {
|
|
||||||
foreach ($languages as $value) {
|
|
||||||
/*
|
|
||||||
$string = strtolower(str_replace('_','-',$value));
|
|
||||||
echo $langcode . '-' . $q . '-' . $value . '<br>';
|
|
||||||
if ($string == $langcode) {
|
|
||||||
echo $value;
|
|
||||||
return $value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
//echo $langcode . '-' . $q . '-' . $value . '<br>';
|
|
||||||
if (substr($langcode, 0, 2) == substr($value, 0, 2)) {
|
|
||||||
$lang = $value;
|
|
||||||
break 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $lang;
|
|
||||||
}
|
|
||||||
|
|
||||||
function localize($domain) {
|
|
||||||
//if ($_SERVER['SERVER_NAME'] == 'airbook.local')
|
|
||||||
$root = $_SERVER['DOCUMENT_ROOT'];
|
|
||||||
//$root = dirname($_SERVER['SCRIPT_FILENAME']); // /Users/bruno/Sites/sls
|
|
||||||
//include($root.'/lib2/localize.php');
|
|
||||||
$dir_locales = $root . '/Locale';
|
|
||||||
|
|
||||||
$liste_locale = list_dir($dir_locales);
|
|
||||||
/*
|
|
||||||
Array
|
|
||||||
(
|
|
||||||
[0] => de_DE
|
|
||||||
[1] => en_US
|
|
||||||
[2] => es_ES
|
|
||||||
[3] => fr_FR
|
|
||||||
)
|
|
||||||
*/
|
|
||||||
|
|
||||||
//if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($liste_locale);
|
|
||||||
//else $langue = $_REQUEST['lang'];
|
|
||||||
if ((empty($_REQUEST['lang'])) and (empty($_SESSION['language']))){
|
|
||||||
$langue = locale_language_from_browser($liste_locale);
|
|
||||||
}
|
|
||||||
elseif (!empty($_REQUEST['lang'])) {
|
|
||||||
$langue = $_REQUEST['lang'];
|
|
||||||
$_SESSION['language'] = $_REQUEST['lang'];
|
|
||||||
}
|
|
||||||
else $langue = $_SESSION['language'];
|
|
||||||
$langue .= ".utf8";
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (isset($_GET['lang'])) echo "_GET lang: " . $_GET['lang'] . "<br>";
|
|
||||||
else echo "_GET lang: NULL" . "<br>";
|
|
||||||
if (isset($_REQUEST['lang'])) echo "_REQUEST lang: " . $_REQUEST['lang'] . "<br>";
|
|
||||||
else echo "_REQUEST lang: NULL" . "<br>";
|
|
||||||
if (isset($_SESSION['language'])) echo "_SESSION language: " . $_SESSION['language'] . "<br>";
|
|
||||||
else echo "_SESSION language: NULL" . "<br>";
|
|
||||||
echo "langue: " . $langue . "<br>";
|
|
||||||
*/
|
|
||||||
|
|
||||||
putenv('LC_ALL=' . $langue);
|
|
||||||
$loc = setlocale(LC_ALL, $langue);
|
|
||||||
|
|
||||||
bindtextdomain($domain, $root . '/Locale/');
|
|
||||||
bind_textdomain_codeset($domain, 'UTF-8');
|
|
||||||
textdomain($domain);
|
|
||||||
|
|
||||||
$nation = array('fr_FR' => gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
12
index.php
@@ -1,3 +1,9 @@
|
|||||||
|
<?php include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
?>
|
||||||
|
<?php session_start(); ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@@ -26,12 +32,6 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/sls.css" />
|
<link rel="stylesheet" type="text/css" href="css/sls.css" />
|
||||||
|
|
||||||
<?php include 'functions.php';
|
|
||||||
session_start();
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
//Get a list of file paths using the glob function.
|
//Get a list of file paths using the glob function.
|
||||||
$fileList = glob('vegas/img/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE);
|
$fileList = glob('vegas/img/*.{jpg,jpeg,JPG,JPEG,heic,HEIC,webp,WEBP}', GLOB_BRACE);
|
||||||
|
|||||||
119
info.php
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<?php
|
||||||
|
# Not in PHP-FPM:
|
||||||
|
// print_r(apache_get_modules());
|
||||||
|
# echo in_array('mod_rewrite', apache_get_modules());
|
||||||
|
|
||||||
|
function _pr($d) {
|
||||||
|
echo "<div style='border: 1px solid#ccc; padding: 10px;'>";
|
||||||
|
echo '<strong>' . debug_backtrace()[0]['file'] . ' ' . debug_backtrace()[0]['line'] . '</strong>';
|
||||||
|
echo "</div>";
|
||||||
|
echo '<pre>';
|
||||||
|
if(is_array($d)) {
|
||||||
|
print_r($d);
|
||||||
|
} else if(is_object($d)) {
|
||||||
|
var_dump($d);
|
||||||
|
}
|
||||||
|
echo '</pre>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "PHP_SAPI: ";
|
||||||
|
echo PHP_SAPI;
|
||||||
|
echo "<br /><br />";
|
||||||
|
|
||||||
|
echo "Display $ _SERVER: ";
|
||||||
|
_pr($_SERVER);
|
||||||
|
echo "<br /><br />";
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (is_mod_rewrite_enabled()) {
|
||||||
|
print "The apache module mod_rewrite is enabled.<br/>\n";
|
||||||
|
} else {
|
||||||
|
print "The apache module mod_rewrite is NOT enabled.<br/>\n";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Verifies if the mod_rewrite module is enabled
|
||||||
|
*
|
||||||
|
* @return boolean True if the module is enabled.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
function is_mod_rewrite_enabled() {
|
||||||
|
if ($_SERVER['HTTP_MOD_REWRITE'] == 'On') {
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Extensions PHP
|
||||||
|
echo "get_loaded_extensions:";
|
||||||
|
_pr(get_loaded_extensions());
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Informations on PHP
|
||||||
|
*
|
||||||
|
* @category Class
|
||||||
|
* @package MyPackage
|
||||||
|
* @author BP <bruno@clicclac.info>
|
||||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
||||||
|
* @link https://silverbook.local/
|
||||||
|
*/
|
||||||
|
phpinfo();
|
||||||
|
|
||||||
|
echo '<ul>';
|
||||||
|
/*
|
||||||
|
echo '<li>$_SERVER[PHP_SELF] -> '.$_SERVER['PHP_SELF'].'</li>';
|
||||||
|
echo '<li>$_SERVER[GATEWAY_INTERFACE] -> '.$_SERVER['GATEWAY_INTERFACE'].'</li>';
|
||||||
|
echo '<li>$_SERVER[SERVER_NAME] -> '.$_SERVER['SERVER_NAME'].'</li>';
|
||||||
|
echo '<li>$_SERVER[SERVER_SOFTWARE] -> '.$_SERVER['SERVER_SOFTWARE'].'</li>';
|
||||||
|
echo '<li>$_SERVER[SERVER_PROTOCOL] -> '.$_SERVER['SERVER_PROTOCOL'].'</li>';
|
||||||
|
echo '<li>$_SERVER[REQUEST_METHOD] -> '.$_SERVER['REQUEST_METHOD'].'</li>';
|
||||||
|
echo '<li>$_SERVER[REQUEST_TIME] -> '.$_SERVER['REQUEST_TIME'].'</li>';
|
||||||
|
echo '<li>$_SERVER[QUERY_STRING] -> '.$_SERVER['QUERY_STRING'].'</li>';
|
||||||
|
echo '<li>$_SERVER[DOCUMENT_ROOT] -> '.$_SERVER['DOCUMENT_ROOT'].'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTP_ACCEPT] -> '.(isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTP_ACCEPT_CHARSET] -> '.(isset($_SERVER['HTTP_ACCEPT_CHARSET']) ? $_SERVER['HTTP_ACCEPT_CHARSET'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTP_ACCEPT_ENCODING] -> '.(isset($_SERVER['HTTP_ACCEPT_ENCODING']) ? $_SERVER['HTTP_ACCEPT_ENCODING'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTP_ACCEPT_LANGUAGE] -> '.(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTP_CONNECTION] -> '.(isset($_SERVER['HTTP_CONNECTION']) ? $_SERVER['HTTP_CONNECTION'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTP_HOST] -> '.(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTP_REFERER] -> '.(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTP_USER_AGENT] -> '.(isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[HTTPS] -> '.(isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[REMOTE_ADDR] -> '.(isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[REMOTE_HOST] -> '.(isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[REMOTE_PORT] -> '.(isset($_SERVER['REMOTE_PORT']) ? $_SERVER['REMOTE_PORT'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[SCRIPT_FILENAME] -> '.(isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[SERVER_ADMIN] -> '.(isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[SERVER_PORT] -> '.(isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[SERVER_SIGNATURE] -> '.(isset($_SERVER['SERVER_SIGNATURE']) ? $_SERVER['SERVER_SIGNATURE'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[PATH_TRANSLATED] -> '.(isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[SCRIPT_NAME] -> '.(isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[REQUEST_URI] -> '.(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[PHP_AUTH_DIGEST] -> '.(isset($_SERVER['PHP_AUTH_DIGEST']) ? $_SERVER['PHP_AUTH_DIGEST'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[PHP_AUTH_USER] -> '.(isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[PHP_AUTH_PW] -> '.(isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER[AUTH_TYPE] -> '.(isset($_SERVER['AUTH_TYPE']) ? $_SERVER['AUTH_TYPE'] : "").'</li>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
echo '<li>$_SERVER["HTTPS"] -> '.(isset($_SERVER["HTTPS"]) ? $_SERVER["HTTPS"] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER["SERVER_PORT"] -> '.(isset($_SERVER["SERVER_PORT"]) ? $_SERVER["SERVER_PORT"] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER["HTTP_X_FORWARDED_PROTO"] -> '.(isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) ? $_SERVER["HTTP_X_FORWARDED_PROTO"] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER["HTTP_X_FORWARDED_SSL"] -> '.(isset($_SERVER["HTTP_X_FORWARDED_SSL"]) ? $_SERVER["HTTP_X_FORWARDED_SSL"] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER["HTTP_HTTPS"] -> '.(isset($_SERVER["HTTP_HTTPS"]) ? $_SERVER["HTTP_HTTPS"] : "").'</li>';
|
||||||
|
echo '<li>$_SERVER["REQUEST_SCHEME"] -> '.(isset($_SERVER["REQUEST_SCHEME"]) ? $_SERVER["REQUEST_SCHEME"] : "").'</li>';
|
||||||
|
|
||||||
|
echo '</ul>';
|
||||||
|
|
||||||
|
|
||||||
|
$email = "bruno@clicclac.info";
|
||||||
|
$default = 'http://' . $_SERVER['HTTP_HOST'] .'/images/avatar.jpg';
|
||||||
|
$size = 40;
|
||||||
|
$grav_url = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($email))) . "?d=" . urlencode($default) . "&s=" . $size;
|
||||||
|
echo '<img src="' . $grav_url . '" alt="" />';
|
||||||
|
?>
|
||||||
483
insert_bdd.php
@@ -1,3 +1,9 @@
|
|||||||
|
<?php require ("3-protect.php");
|
||||||
|
include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
@@ -5,77 +11,90 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php gettext('Insert photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('Insert photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/sls.css" />
|
<link rel="stylesheet" href="css/sls.css" />
|
||||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
<link rel='stylesheet' href='css/minimal.css' />
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
|
|
||||||
<?php include 'functions.php';
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
session_start();
|
|
||||||
if($_SESSION['Active'] == false){ /* Redirects user to login.php if not logged in */
|
|
||||||
header("location:admin/login.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$base = 'db_photo.sqlite3';
|
||||||
|
|
||||||
|
echo '<h1>' . gettext("Insert images in " . $base . " database.") . '</h1><br />';
|
||||||
|
|
||||||
|
if (file_exists($base)) {
|
||||||
|
echo '<h3 class="redstyle">Database ' . $base . ' already exist! Delete it !<h3>';
|
||||||
|
unlink($base);
|
||||||
|
}
|
||||||
|
|
||||||
// Taille des vignettes
|
// Taille des vignettes
|
||||||
$th_w = 300;
|
$th_w = 300;
|
||||||
$th_h = 300;
|
$th_h = 300;
|
||||||
|
|
||||||
$dir = (new AdvancedFilesystemIterator('photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP|avif|AVIF$/');
|
$dir = (new AdvancedFilesystemIterator('photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP|avif|AVIF$/');
|
||||||
|
|
||||||
echo '<h3>' . count($dir) . gettext(' images found in folder') . ' <i>photos/img/</i> ...</h3>';
|
echo '<h3>' . count($dir) . gettext(' images found in folder') . ' <i><a href="photos/img/">photos/img/</a></i> ...</h3>';
|
||||||
|
|
||||||
echo '<h3>' . gettext("Creation of the database") . ' <i>' . $base . '</i> ' . gettext("and the table") . ' <i>photo</i> (' . gettext("if necessary") . ')...</h3>';
|
echo '<h3>' . gettext("Creation of the database") . ' <i>' . $base . '</i> ' . gettext("and the table") . ' <i>photo</i> (' . gettext("if necessary") . ')...</h3>';
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
// Création de la base et de la table photos
|
// Création de la base et de la table photos
|
||||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$query = "CREATE TABLE IF NOT EXISTS photos (
|
$query = "CREATE TABLE IF NOT EXISTS photos (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
filename TEXT NOT NULL,
|
filename TEXT NOT NULL,
|
||||||
|
filesize TEXT,
|
||||||
dateoriginal TEXT,
|
dateoriginal TEXT,
|
||||||
lens TEXT,
|
lens TEXT,
|
||||||
speed TEXT,
|
speed TEXT,
|
||||||
|
correctexpo TEXT,
|
||||||
iso INTEGER,
|
iso INTEGER,
|
||||||
|
usercomment TEXT,
|
||||||
|
comment TEXT,
|
||||||
|
model TEXT,
|
||||||
|
metering TEXT,
|
||||||
|
flash TEXT,
|
||||||
|
focal TEXT,
|
||||||
|
program TEXT,
|
||||||
|
wb TEXT,
|
||||||
|
mode TEXT,
|
||||||
width INTEGER,
|
width INTEGER,
|
||||||
height INTEGER,
|
height INTEGER,
|
||||||
html TEXT,
|
html TEXT,
|
||||||
aperture TEXT,
|
aperture TEXT,
|
||||||
model TEXT,
|
software TEXT,
|
||||||
lat REAL,
|
lat TEXT,
|
||||||
long REAL,
|
long TEXT,
|
||||||
alt REAL,
|
alt TEXT,
|
||||||
legende TEXT,
|
|
||||||
copyright TEXT,
|
|
||||||
title TEXT,
|
|
||||||
creator TEXTr,
|
|
||||||
keywords TEXT,
|
keywords TEXT,
|
||||||
metering TEXT,
|
title TEXT,
|
||||||
flash TEXT,
|
creator TEXT,
|
||||||
focal TEXT,
|
city TEXT,
|
||||||
wb TEXT,
|
department TEXT,
|
||||||
program TEXT,
|
code TEXT,
|
||||||
|
country TEXT,
|
||||||
|
copyright TEXT,
|
||||||
|
legende TEXT,
|
||||||
UNIQUE(filename)
|
UNIQUE(filename)
|
||||||
)";
|
)";
|
||||||
$conn->exec($query);
|
// 33 entrées
|
||||||
|
|
||||||
echo '<h3>' . gettext('Read image files in the folder') . ' <i>photos/img/</i>...</h3>';
|
$conn->exec($query);
|
||||||
|
}
|
||||||
|
catch(PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<h3>' . gettext('Read image files in the folder') . ' <i><a href="photos/img/">photos/img/</a></i>...</h3>';
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$photos = array();
|
$photos = array();
|
||||||
@@ -88,11 +107,25 @@ foreach($dir as $file){
|
|||||||
$file = $file->getpathName();
|
$file = $file->getpathName();
|
||||||
$x = in_bdd($file);
|
$x = in_bdd($file);
|
||||||
|
|
||||||
|
/*
|
||||||
|
if ($i > 5) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// https://exiftool.org/TagNames/EXIF.html
|
||||||
|
// https://exiftool.org/TagNames/Canon.html
|
||||||
|
|
||||||
if ($x == false) { //false
|
if ($x == false) { //false
|
||||||
|
|
||||||
if ($exif = @exif_read_data($file, 0, true )) {
|
if ($exif = @exif_read_data($file, 0, true )) {
|
||||||
|
|
||||||
$mod = isset($exif['IFD0']['Model']) ? $exif['IFD0']['Model'] : '';
|
//_pr($exif);
|
||||||
|
|
||||||
|
unset($fla);
|
||||||
|
unset($flash);
|
||||||
|
|
||||||
|
$fs = isset($exif['FILE']['FileSize']) ? $exif['FILE']['FileSize'] : '';
|
||||||
|
$fsize = formatBytes($fs, $precision = 0);
|
||||||
|
|
||||||
# YYYY-MM-DD HH:MM:SS.SSS - 2019:10:01 14:03:12
|
# YYYY-MM-DD HH:MM:SS.SSS - 2019:10:01 14:03:12
|
||||||
$da = isset($exif['EXIF']['DateTimeOriginal']) ? $exif['EXIF']['DateTimeOriginal'] : '';
|
$da = isset($exif['EXIF']['DateTimeOriginal']) ? $exif['EXIF']['DateTimeOriginal'] : '';
|
||||||
@@ -100,13 +133,13 @@ foreach($dir as $file){
|
|||||||
$d = explode(' ', $exif['EXIF']['DateTimeOriginal']);
|
$d = explode(' ', $exif['EXIF']['DateTimeOriginal']);
|
||||||
$da = str_replace(':', '-', $d[0]) . " " . $d[1] . ".000";
|
$da = str_replace(':', '-', $d[0]) . " " . $d[1] . ".000";
|
||||||
} else {
|
} else {
|
||||||
$d = '';
|
$da = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($exif['EXIF']['UndefinedTag:0xA434'])) {
|
if (isset($exif['EXIF']['UndefinedTag:0xA434'])) {
|
||||||
$w = $exif['EXIF']['UndefinedTag:0xA434'];
|
$w = trim($exif['EXIF']['UndefinedTag:0xA434']);
|
||||||
|
|
||||||
$arr = array("100.0 mm" => "EF100mm f/2.8 Macro USM", "100.0-400.0 mm" => "EF100-400mm f/4.5-5.6L IS USM", "140.0-560.0 mm" => "EF100-400mm f/4.5-5.6L IS USM +1.4x II", "17.0-40.0 mm" => "EF17-40mm f/4L USM", "24-70mm" => "SIGMA 24-70mm F2.8 EX DG", "70.0-200.0 mm" => "EF70-200mm f/4L USM", "10.0-22.0 mm" => "EF-S10-22mm f/3.5-4.5 USM", "500.0 mm" => "Sigma 500mm f/4.5 EX HSM ", "500mm" => "Sigma 500mm f/4.5 EX HSM ");
|
$arr = array("600" => "EF600mm f/4L IS III USM", "100.0 mm" => "EF100mm f/2.8 Macro USM", "100.0-400.0 mm" => "EF100-400mm f/4.5-5.6L IS USM", "140.0-560.0 mm" => "EF100-400mm f/4.5-5.6L IS USM +1.4x II", "17.0-40.0 mm" => "EF17-40mm f/4L USM", "24-70mm" => "SIGMA 24-70mm F2.8 EX DG", "70.0-200.0 mm" => "EF70-200mm f/4L USM", "10.0-22.0 mm" => "EF-S10-22mm f/3.5-4.5 USM", "500.0 mm" => "SIGMA 500mm f/4.5 EX HSM", "500mm" => "SIGMA 500mm f/4.5 EX HSM");
|
||||||
|
|
||||||
if (array_key_exists($w, $arr)) $obj= $arr[$w];
|
if (array_key_exists($w, $arr)) $obj= $arr[$w];
|
||||||
else $obj = $w;
|
else $obj = $w;
|
||||||
@@ -122,7 +155,27 @@ foreach($dir as $file){
|
|||||||
$sp = '';
|
$sp = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$ev = isset($exif['EXIF']['ExposureBiasValue']) ? $exif['EXIF']['ExposureBiasValue'] : '';
|
||||||
|
$div = explode( "/", $ev);
|
||||||
|
$dividende = $div[0];
|
||||||
|
$diviseur = $div[1];
|
||||||
|
|
||||||
|
if (str_starts_with($ev, '0')) {
|
||||||
|
$ev = '0';
|
||||||
|
}
|
||||||
|
elseif ($dividende === $diviseur) {
|
||||||
|
$ev = '0';
|
||||||
|
}
|
||||||
|
if ((! str_starts_with($ev, '0')) && (! str_starts_with($ev, '-'))) {
|
||||||
|
$ev = "+" . $ev;
|
||||||
|
}
|
||||||
|
|
||||||
$iso = isset($exif['EXIF']['ISOSpeedRatings']) ? $exif['EXIF']['ISOSpeedRatings'] : '';
|
$iso = isset($exif['EXIF']['ISOSpeedRatings']) ? $exif['EXIF']['ISOSpeedRatings'] : '';
|
||||||
|
$uc = isset($exif['COMPUTED']['UserComment']) ? $exif['COMPUTED']['UserComment'] : '';
|
||||||
|
$comment = isset($exif['COMMENT']['0']) ? $exif['COMMENT']['0'] : '';
|
||||||
|
|
||||||
|
$mod = isset($exif['IFD0']['Model']) ? $exif['IFD0']['Model'] : '';
|
||||||
|
|
||||||
if (isset($exif['EXIF']['MeteringMode'])) {
|
if (isset($exif['EXIF']['MeteringMode'])) {
|
||||||
$mm = $exif['EXIF']['MeteringMode'];
|
$mm = $exif['EXIF']['MeteringMode'];
|
||||||
@@ -154,29 +207,64 @@ foreach($dir as $file){
|
|||||||
$mm = '';
|
$mm = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://stackoverflow.com/questions/7076958/read-exif-and-determine-if-the-flash-has-fired
|
||||||
|
|
||||||
if (isset($exif['EXIF']['Flash'])) {
|
if (isset($exif['EXIF']['Flash'])) {
|
||||||
$fla = $exif['EXIF']['Flash'];
|
$fla = $exif['EXIF']['Flash'];
|
||||||
|
|
||||||
|
$flash = $fla;
|
||||||
|
//$flashfired = ($fla & 1) != 0;
|
||||||
|
//echo "flashfired: " . $flashfired . "<br>";
|
||||||
|
|
||||||
|
// 12_2018.jpg No Flash 0
|
||||||
|
// 5_2013.jpg Off, Did not fire 16
|
||||||
|
// folder flash 9
|
||||||
|
|
||||||
switch ($fla) {
|
switch ($fla) {
|
||||||
case 0: $fla = gettext("Off");
|
case 0: $fla = gettext("No Flash");
|
||||||
break;
|
break;
|
||||||
case 1: $fla = gettext("Auto");
|
case 9: $fla = gettext("On, Fired");
|
||||||
break;
|
break;
|
||||||
case 2: $fla = gettext("On");
|
case 16: $fla = gettext("Off, Did not fire");
|
||||||
break;
|
|
||||||
case 3: $fla = gettext("Red Eye Reduction");
|
|
||||||
break;
|
|
||||||
case 4: $fla = gettext("Slow Synchro");
|
|
||||||
break;
|
|
||||||
case 5: $fla = gettext("Auto + Red Eye Reduction");
|
|
||||||
break;
|
|
||||||
case 6: $fla = gettext("On + Red Eye Reduction");
|
|
||||||
break;
|
|
||||||
case 16: $fla = gettext("External Flash");
|
|
||||||
break;
|
break;
|
||||||
default: $fla = gettext("Unknown");
|
default: $fla = gettext("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Exiftool:
|
||||||
|
[Flash] => On, Fired
|
||||||
|
[Flash Compensation] => -1
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
0x0 = No Flash
|
||||||
|
0x1 = Fired
|
||||||
|
0x5 = Fired, Return not detected
|
||||||
|
0x7 = Fired, Return detected
|
||||||
|
0x8 = On, Did not fire
|
||||||
|
0x9 = On, Fired
|
||||||
|
0xd = On, Return not detected
|
||||||
|
0xf = On, Return detected
|
||||||
|
0x10 = Off, Did not fire
|
||||||
|
0x14 = Off, Did not fire, Return not detected
|
||||||
|
0x18 = Auto, Did not fire
|
||||||
|
0x19 = Auto, Fired
|
||||||
|
0x1d = Auto, Fired, Return not detected
|
||||||
|
0x1f = Auto, Fired, Return detected
|
||||||
|
0x20 = No flash function
|
||||||
|
0x30 = Off, No flash function
|
||||||
|
0x41 = Fired, Red-eye reduction
|
||||||
|
0x45 = Fired, Red-eye reduction, Return not detected
|
||||||
|
0x47 = Fired, Red-eye reduction, Return detected
|
||||||
|
0x49 = On, Red-eye reduction
|
||||||
|
0x4d = On, Red-eye reduction, Return not detected
|
||||||
|
0x4f = On, Red-eye reduction, Return detected
|
||||||
|
0x50 = Off, Red-eye reduction
|
||||||
|
0x58 = Auto, Did not fire, Red-eye reduction
|
||||||
|
0x59 = Auto, Fired, Red-eye reduction
|
||||||
|
0x5d = Auto, Fired, Red-eye reduction, Return not detected
|
||||||
|
0x5f = Auto, Fired, Red-eye reduction, Return detected
|
||||||
|
*/
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$fla = '';
|
$fla = '';
|
||||||
}
|
}
|
||||||
@@ -188,33 +276,34 @@ foreach($dir as $file){
|
|||||||
$fl = '';
|
$fl = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
if (isset($exif['EXIF']['ExposureProgram'])) {
|
||||||
if (isset($exif['EXIF']['ExposureMode'])) {
|
$ep = $exif['EXIF']['ExposureProgram']; // 0
|
||||||
$em = $exif['EXIF']['ExposureMode'];
|
|
||||||
echo $em;
|
|
||||||
$em = hexdec(intel2Moto($exif['EXIF']['ExposureMode']));
|
|
||||||
echo $em;
|
|
||||||
|
|
||||||
switch ($em) {
|
switch ($ep) {
|
||||||
case 0: $em = gettext("EasyShoot");
|
case 0: $ep = gettext("EasyShoot");
|
||||||
break;
|
break;
|
||||||
case 1: $em = gettext("Program");
|
case 1: $ep = gettext("Program");
|
||||||
break;
|
break;
|
||||||
case 2: $em = gettext("Tv");
|
case 2: $ep = gettext("Tv (Shutter speed priority)");
|
||||||
break;
|
break;
|
||||||
case 3: $em = gettext("Av");
|
case 3: $ep = gettext("Av (Aperture-priority)");
|
||||||
break;
|
break;
|
||||||
case 4: $em = gettext("Manual");
|
case 4: $ep = gettext("Manual");
|
||||||
break;
|
break;
|
||||||
case 5: $em = gettext("Auto-DEP");
|
case 5: $ep = gettext("Auto-DEP");
|
||||||
break;
|
break;
|
||||||
default: $em = gettext("Unknown");
|
case 6: $ep = gettext("M-DEP");
|
||||||
|
break;
|
||||||
|
case 7: $ep = gettext("Bulb");
|
||||||
|
break;
|
||||||
|
case 8: $ep = gettext("F (Flexible-priority)");
|
||||||
|
break;
|
||||||
|
default: $ep = gettext("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$em = '';
|
$ep = '';
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
if (isset($exif['EXIF']['WhiteBalance'])) {
|
if (isset($exif['EXIF']['WhiteBalance'])) {
|
||||||
$wb = $exif['EXIF']['WhiteBalance'];
|
$wb = $exif['EXIF']['WhiteBalance'];
|
||||||
@@ -246,9 +335,21 @@ foreach($dir as $file){
|
|||||||
} else {
|
} else {
|
||||||
$wb = '';
|
$wb = '';
|
||||||
}
|
}
|
||||||
if (isset($exif['EXIF']['ExposureProgram'])) {
|
|
||||||
$ep = $exif['EXIF']['ExposureProgram'];
|
|
||||||
|
|
||||||
|
if (isset($exif['EXIF']['ExposureMode'])) {
|
||||||
|
$em = $exif['EXIF']['ExposureMode'];
|
||||||
|
//$em = hexdec(intel2Moto($exif['EXIF']['ExposureMode']));
|
||||||
|
//echo $em;
|
||||||
|
|
||||||
|
switch ($em) {
|
||||||
|
case 0: $em = gettext("OFF");
|
||||||
|
break;
|
||||||
|
case 1: $em = gettext("ON");
|
||||||
|
break;
|
||||||
|
default: $em = gettext("Unknown");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
switch ($ep) {
|
switch ($ep) {
|
||||||
case 1: $ep = gettext('Manual');
|
case 1: $ep = gettext('Manual');
|
||||||
break;
|
break;
|
||||||
@@ -266,89 +367,160 @@ foreach($dir as $file){
|
|||||||
break;
|
break;
|
||||||
case 8: $ep = gettext('Landscape');
|
case 8: $ep = gettext('Landscape');
|
||||||
break;
|
break;
|
||||||
default: $ep = gettext('Unknown') . ': ' . $data;
|
default: $ep = gettext('Unknown') . ': ' . $ep;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$ep = '';
|
$em = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$wi = isset($exif['COMPUTED']['Width']) ? $exif['COMPUTED']['Width'] : '';
|
$wi = isset($exif['COMPUTED']['Width']) ? $exif['COMPUTED']['Width'] : '';
|
||||||
$he = isset($exif['COMPUTED']['Height']) ? $exif['COMPUTED']['Height'] : '';
|
$he = isset($exif['COMPUTED']['Height']) ? $exif['COMPUTED']['Height'] : '';
|
||||||
$ht = isset($exif['COMPUTED']['html']) ? $exif['COMPUTED']['html'] : '';
|
$ht = isset($exif['COMPUTED']['html']) ? $exif['COMPUTED']['html'] : '';
|
||||||
$ap = isset($exif['COMPUTED']['ApertureFNumber']) ? $exif['COMPUTED']['ApertureFNumber'] : '';
|
$ap = isset($exif['COMPUTED']['ApertureFNumber']) ? $exif['COMPUTED']['ApertureFNumber'] : '';
|
||||||
|
$soft = isset($exif['IFD0']['Software']) ? $exif['IFD0']['Software'] : '';
|
||||||
|
|
||||||
$gps = get_gps($exif);
|
$gps = get_gps($exif);
|
||||||
if ($gps['latitude'] != "") {
|
|
||||||
echo "lat: " . $gps['latitude'] . "<br>";
|
|
||||||
echo "long: " . $gps['longitude'] . "<br>";
|
|
||||||
echo "alt: " . $gps['altitude'] . "<br>";
|
|
||||||
}
|
|
||||||
$photos[$i] = array(
|
$photos[$i] = array(
|
||||||
'filename' => $file,
|
'filename' => $file,
|
||||||
|
'filesize' => $fsize,
|
||||||
|
|
||||||
'dateoriginal' => $da,
|
'dateoriginal' => $da,
|
||||||
'lens' => $obj,
|
'lens' => $obj,
|
||||||
'speed' => $sp,
|
'speed' => $sp,
|
||||||
|
'correctexpo' => $ev,
|
||||||
'iso' => $iso,
|
'iso' => $iso,
|
||||||
|
|
||||||
|
'usercomment' => $uc,
|
||||||
|
'comment' => $comment,
|
||||||
|
'model' => $mod,
|
||||||
|
|
||||||
|
'metering' => $mm,
|
||||||
|
'flash' => $fla,
|
||||||
|
'focal' => $fl,
|
||||||
|
|
||||||
|
'program' => $ep,
|
||||||
|
'wb' => $wb,
|
||||||
|
'mode' => $em,
|
||||||
|
|
||||||
'width' => $wi,
|
'width' => $wi,
|
||||||
'height' => $he,
|
'height' => $he,
|
||||||
'html' => $ht,
|
'html' => $ht,
|
||||||
'aperture' => $ap,
|
'aperture' => $ap,
|
||||||
|
'software' => $soft,
|
||||||
'model' => $mod,
|
|
||||||
|
|
||||||
'lat' => $gps['latitude'],
|
'lat' => $gps['latitude'],
|
||||||
'long' => $gps['longitude'],
|
'long' => $gps['longitude'],
|
||||||
'alt' => $gps['altitude'],
|
'alt' => $gps['altitude'],
|
||||||
|
|
||||||
'metering' => $mm,
|
|
||||||
'flash' => $fla,
|
|
||||||
'focal' => $fl,
|
|
||||||
'wb' => $wb,
|
|
||||||
'program' => $ep
|
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($iptc = @getimagesize($file, $info)) {
|
if ($iptc = @getimagesize($file, $info)) {
|
||||||
//_pr($iptc);
|
|
||||||
|
//zz = iptcparse($info['APP1']);
|
||||||
|
//_pr(zz);
|
||||||
|
//$ww = iptcparse($info['8BIM']);
|
||||||
|
//_pr(ww);
|
||||||
|
|
||||||
if (isset($info["APP13"])) {
|
if (isset($info["APP13"])) {
|
||||||
$mots = "";
|
$mots = "";
|
||||||
$iptc = iptcparse ($info["APP13"]);
|
$iptc = iptcparse ($info["APP13"]);
|
||||||
$legende = (isset($iptc["2#120"][0])) ? $iptc["2#120"][0] : '';
|
//_pr($iptc);
|
||||||
$copyright = (isset($iptc["2#116"][0])) ? $iptc["2#116"][0] : '';
|
/*
|
||||||
$title = (isset($iptc["2#105"][0])) ? $iptc["2#105"][0] : '';
|
'2#005'=>'DocumentTitle',
|
||||||
$creator = (isset($iptc["2#080"][0])) ? $iptc["2#080"][0] : '';
|
'2#010'=>'Urgency',
|
||||||
$mots_cles = (isset($iptc["2#025"])) ? $iptc["2#025"] : ''; // array
|
'2#015'=>'Category',
|
||||||
|
'2#020'=>'Subcategories',
|
||||||
|
'2#040'=>'SpecialInstructions',
|
||||||
|
'2#055'=>'CreationDate', 20240619
|
||||||
|
'2#080'=>'AuthorByline',
|
||||||
|
'2#085'=>'AuthorTitle',
|
||||||
|
'2#090'=>'City',
|
||||||
|
'2#095'=>'State',
|
||||||
|
'2#101'=>'Country',
|
||||||
|
'2#103'=>'OTR',
|
||||||
|
'2#105'=>'Headline',
|
||||||
|
'2#110'=>'Source',
|
||||||
|
'2#115'=>'PhotoSource',
|
||||||
|
'2#116'=>'Copyright',
|
||||||
|
'2#120'=>'Caption',
|
||||||
|
'2#122'=>'CaptionWriter'
|
||||||
|
|
||||||
|
'1#090'=>'CodedCharacterSet' %G
|
||||||
|
'2#060' 200514+0200
|
||||||
|
'2#062' 20240619
|
||||||
|
'2#063' 200514+0200
|
||||||
|
*/
|
||||||
|
$mots_cles = (isset($iptc["2#025"])) ? $iptc["2#025"] : ''; // array - ok
|
||||||
if (!empty($mots_cles)) {
|
if (!empty($mots_cles)) {
|
||||||
foreach ($mots_cles as $key => $val) {
|
foreach ($mots_cles as $key => $val) {
|
||||||
$mots .= strtolower($val) . ",";
|
$mots .= strtolower($val) . ",";
|
||||||
}
|
}
|
||||||
$mots = substr($mots, 0, -1);
|
$mots = substr($mots, 0, -1);
|
||||||
}
|
}
|
||||||
|
$titre = (isset($iptc["2#005"][0])) ? $iptc["2#005"][0] : ''; // ok
|
||||||
|
$creator = (isset($iptc["2#080"][0])) ? $iptc["2#080"][0] : ''; //ok
|
||||||
|
//$AuthorTitle = (isset($iptc["2#085"][0])) ? $iptc["2#085"][0] : '';
|
||||||
|
$ville = (isset($iptc["2#090"][0])) ? $iptc["2#090"][0] : ''; //ok
|
||||||
|
$departement = (isset($iptc["2#095"][0])) ? $iptc["2#095"][0] : ''; //ok
|
||||||
|
$code = (isset($iptc["2#100"][0])) ? $iptc["2#100"][0] : ''; //ok
|
||||||
|
$pays = (isset($iptc["2#101"][0])) ? $iptc["2#101"][0] : ''; //ok
|
||||||
|
//$title = (isset($iptc["2#105"][0])) ? $iptc["2#105"][0] : '';
|
||||||
|
$copyright = (isset($iptc["2#116"][0])) ? $iptc["2#116"][0] : ''; //ok
|
||||||
|
$legende = (isset($iptc["2#120"][0])) ? $iptc["2#120"][0] : ''; //ok
|
||||||
|
|
||||||
$photos[$i]['legende'] = $legende;
|
/*
|
||||||
$photos[$i]['copyright'] = $copyright;
|
_pr($mots_cles); // ok
|
||||||
$photos[$i]['title'] = $title;
|
echo $city . "<br />"; //ok
|
||||||
|
echo $creator . "<br />"; // ok
|
||||||
|
echo $AuthorTitle . "<br />";
|
||||||
|
echo $ville . "<br />"; //ok
|
||||||
|
echo $departement . "<br />"; //ok
|
||||||
|
echo $code . "<br />";
|
||||||
|
echo $pays . "<br />"; //ok
|
||||||
|
echo $title . "<br />"; //ok
|
||||||
|
echo $copyright . "<br />";
|
||||||
|
echo $legende . "<br />";
|
||||||
|
*/
|
||||||
|
|
||||||
|
$photos[$i]['keywords'] = $mots;
|
||||||
|
$photos[$i]['title'] = $titre;
|
||||||
$photos[$i]['creator'] = $creator;
|
$photos[$i]['creator'] = $creator;
|
||||||
$photos[$i]['mots_cles'] = $mots;
|
$photos[$i]['city'] = $ville;
|
||||||
|
$photos[$i]['department'] = $departement;
|
||||||
|
$photos[$i]['code'] = $code;
|
||||||
|
$photos[$i]['country'] = $pays;
|
||||||
|
$photos[$i]['copyright'] = $copyright;
|
||||||
|
$photos[$i]['legende'] = $legende;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
else {
|
else {
|
||||||
$photos[$i]['legende'] = '';
|
|
||||||
$photos[$i]['copyright'] = '';
|
|
||||||
$photos[$i]['title'] = '';
|
|
||||||
$photos[$i]['creator'] = '';
|
|
||||||
$photos[$i]['mots_cles'] = '';
|
$photos[$i]['mots_cles'] = '';
|
||||||
|
$photos[$i]['titre'] = '';
|
||||||
|
$photos[$i]['creator'] = '';
|
||||||
|
$photos[$i]['ville'] = '';
|
||||||
|
$photos[$i]['departement'] = '';
|
||||||
|
$photos[$i]['code'] = '';
|
||||||
|
$photos[$i]['pays'] = '';
|
||||||
|
$photos[$i]['copyright'] = '';
|
||||||
|
$photos[$i]['legende'] = '';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// _pr($photos);
|
||||||
|
|
||||||
|
|
||||||
$z = count($photos);
|
$z = count($photos);
|
||||||
if ($z == 0) {
|
if ($z == 0) {
|
||||||
echo '<h3>' . gettext('No new image files to add') . '...</h3>';
|
echo '<h3>' . gettext('No new image files to add') . '...</h3>';
|
||||||
@@ -357,6 +529,8 @@ if ($z == 0) {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//_pr($photos);
|
||||||
|
|
||||||
$query5 = "SELECT MAX(id) FROM photos";
|
$query5 = "SELECT MAX(id) FROM photos";
|
||||||
$stmt = $conn->prepare($query5);
|
$stmt = $conn->prepare($query5);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
@@ -366,7 +540,7 @@ $avant = $resultat['MAX(id)'];
|
|||||||
$nb_avant = (isset($avant)) ? $avant : 0;
|
$nb_avant = (isset($avant)) ? $avant : 0;
|
||||||
|
|
||||||
|
|
||||||
echo '<h3>' . gettext('Creation of thumbnails') . ' ('. $th_w . 'px x ' . $th_h . 'px) ' . gettext('in the folder') . ' <i>photos/thumb/</i>.</h3>';
|
echo '<h3>' . gettext('Creation of thumbnails') . ' ('. $th_w . 'px x ' . $th_h . 'px) ' . gettext('in the folder') . ' <i><a href="photos/img/">photos/thumb/</a></i>.</h3>';
|
||||||
|
|
||||||
$b = ($z > 1) ? gettext('new images') : gettext('new image');
|
$b = ($z > 1) ? gettext('new images') : gettext('new image');
|
||||||
echo '<h3>' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database') . '...</h3>';
|
echo '<h3>' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database') . '...</h3>';
|
||||||
@@ -374,69 +548,100 @@ echo '<h3>' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database')
|
|||||||
// Insertion des photos dans la base
|
// Insertion des photos dans la base
|
||||||
// Création des vignettes
|
// Création des vignettes
|
||||||
try {
|
try {
|
||||||
$query2 = "INSERT OR IGNORE INTO photos (filename, dateoriginal, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program) VALUES (:filename, :dateoriginal, :lens, :speed, :iso, :width, :height, :html, :aperture, :model, :lat, :long, :alt, :legende, :copyright, :title, :creator, :keywords, :metering, :flash, :focal, :wb, :program)";
|
$query2 = "INSERT OR IGNORE INTO photos (filename, filesize, dateoriginal, lens, speed, correctexpo, iso, usercomment, comment, model, metering, flash, focal, program, wb, mode, width, height, html, aperture, software, lat, long, alt, keywords, title, creator, city, department, code, country, copyright, legende)
|
||||||
|
VALUES (:filename, :filesize, :dateoriginal, :lens, :speed, :correctexpo, :iso, :usercomment, :comment, :model, :metering, :flash, :focal, :program, :wb, :mode, :width, :height, :html, :aperture, :software, :lat, :long, :alt, :keywords, :title, :creator, :city, :department, :code, :country, :copyright, :legende)";
|
||||||
|
|
||||||
$stmt = $conn->prepare($query2);
|
$stmt = $conn->prepare($query2);
|
||||||
$stmt->bindParam(':filename', $file);
|
$stmt->bindParam(':filename', $file);
|
||||||
|
$stmt->bindParam(':filesize', $fsize);
|
||||||
$stmt->bindParam(':dateoriginal', $da);
|
$stmt->bindParam(':dateoriginal', $da);
|
||||||
$stmt->bindParam(':lens', $obj);
|
$stmt->bindParam(':lens', $obj);
|
||||||
$stmt->bindParam(':speed', $sp);
|
$stmt->bindParam(':speed', $sp);
|
||||||
|
$stmt->bindParam(':correctexpo', $ev);
|
||||||
$stmt->bindParam(':iso', $iso);
|
$stmt->bindParam(':iso', $iso);
|
||||||
$stmt->bindParam(':width', $wi);
|
|
||||||
$stmt->bindParam(':height', $he);
|
|
||||||
$stmt->bindParam(':html', $ht);
|
|
||||||
$stmt->bindParam(':aperture', $ap);
|
|
||||||
$stmt->bindParam(':model', $mod);
|
|
||||||
$stmt->bindParam(':lat', $gps['latitude']);
|
|
||||||
$stmt->bindParam(':long', $gps['longitude']);
|
|
||||||
$stmt->bindParam(':alt', $gps['altitude']);
|
|
||||||
|
|
||||||
$stmt->bindParam(':legende', $leg);
|
$stmt->bindParam(':usercomment', $uc);
|
||||||
$stmt->bindParam(':copyright', $cop);
|
$stmt->bindParam(':comment', $comment);
|
||||||
$stmt->bindParam(':title', $tit);
|
$stmt->bindParam(':model', $mod);
|
||||||
$stmt->bindParam(':creator', $crea);
|
|
||||||
$stmt->bindParam(':keywords', $mot);
|
|
||||||
|
|
||||||
$stmt->bindParam(':metering', $mm);
|
$stmt->bindParam(':metering', $mm);
|
||||||
$stmt->bindParam(':flash', $fla);
|
$stmt->bindParam(':flash', $fla);
|
||||||
$stmt->bindParam(':focal', $fl);
|
$stmt->bindParam(':focal', $fl);
|
||||||
$stmt->bindParam(':wb', $wb);
|
|
||||||
$stmt->bindParam(':program', $ep);
|
$stmt->bindParam(':program', $ep);
|
||||||
|
$stmt->bindParam(':wb', $wb);
|
||||||
|
$stmt->bindParam(':mode', $em);
|
||||||
|
|
||||||
|
$stmt->bindParam(':width', $wi);
|
||||||
|
$stmt->bindParam(':height', $he);
|
||||||
|
$stmt->bindParam(':html', $ht);
|
||||||
|
$stmt->bindParam(':aperture', $ap);
|
||||||
|
$stmt->bindParam(':software', $soft);
|
||||||
|
|
||||||
|
$stmt->bindParam(':lat', $gps['latitude']);
|
||||||
|
$stmt->bindParam(':long', $gps['longitude']);
|
||||||
|
$stmt->bindParam(':alt', $gps['altitude']);
|
||||||
|
|
||||||
|
$stmt->bindParam(':keywords', $mots);
|
||||||
|
$stmt->bindParam(':title', $titre);
|
||||||
|
$stmt->bindParam(':creator', $creator);
|
||||||
|
$stmt->bindParam(':city', $ville);
|
||||||
|
$stmt->bindParam(':department', $departement);
|
||||||
|
$stmt->bindParam(':code',$code);
|
||||||
|
$stmt->bindParam(':country',$pays);
|
||||||
|
$stmt->bindParam(':copyright', $copyright);
|
||||||
|
$stmt->bindParam(':legende', $legende);
|
||||||
|
|
||||||
|
|
||||||
if (isset($photos)) {
|
if (isset($photos)) {
|
||||||
|
|
||||||
|
//_pr($photos);
|
||||||
|
|
||||||
foreach ($photos as $item) {
|
foreach ($photos as $item) {
|
||||||
$file = $item['filename'];
|
$file = $item['filename']; // *** photos/img/3_2023.jpg
|
||||||
$da = $item['dateoriginal'];
|
$fsize = $item['filesize']; // 232 Ko
|
||||||
$obj = $item['lens'];
|
$da = $item['dateoriginal']; // *** 2023-03-04 10:05:25.000
|
||||||
$sp = $item['speed'];
|
$obj = $item['lens']; // *** EF600mm f/4L IS III USM +1.4x III
|
||||||
$iso = $item['iso'];
|
$sp = $item['speed']; // *** 1/3200
|
||||||
$wi = $item['width'];
|
$ev = $item['correctexpo']; // -1/3
|
||||||
$he = $item['height'];
|
$iso = $item['iso']; // *** 800
|
||||||
$ht = $item['html'];
|
|
||||||
$ap = $item['aperture'];
|
|
||||||
$mod = $item['model'];
|
|
||||||
$gps['latitude'] = $item['lat'];
|
|
||||||
$gps['longitude'] = $item['long'];
|
|
||||||
$gps['altitude'] = $item['alt'];
|
|
||||||
|
|
||||||
$leg = $item['legende'];
|
$uc = $item['usercomment'];
|
||||||
$cop = $item['copyright'];
|
$comment = $item['comment']; // Optimized by JPEGmini 3.18.9.220874607-AV 0x21824209
|
||||||
$tit = $item['title'];
|
$mod = $item['model']; // *** Canon EOS R7
|
||||||
$crea = $item['creator'];
|
|
||||||
$mot = $item['mots_cles'];
|
|
||||||
|
|
||||||
$mm = $item['metering'];
|
$mm = $item['metering']; // *** Mesure évaluative
|
||||||
$fla = $item['flash'];
|
$fla = $item['flash']; // Off
|
||||||
$fl = $item['focal'];
|
$fl = $item['focal']; // *** 840 mm
|
||||||
$wb = $item['wb'];
|
$ep = $item['program']; // Av (Priorité ouverture)
|
||||||
$ep = $item['program'];
|
$wb = $item['wb']; // *** Lumière du jour
|
||||||
|
$em = $item['mode']; // OFF
|
||||||
|
|
||||||
|
$wi = $item['width']; // 1600
|
||||||
|
$he = $item['height']; // 1067
|
||||||
|
$ht = $item['html']; // width="1600" height="1067"
|
||||||
|
$ap = $item['aperture']; // *** f/6.3
|
||||||
|
$soft = $item['software']; // Adobe Photoshop Lightroom Classic 12.2.1 (Macintosh)
|
||||||
|
|
||||||
|
$gps['latitude'] = $item['lat']; // *** 47.169489533333
|
||||||
|
$gps['longitude'] = $item['long']; // *** 4.7472749
|
||||||
|
$gps['altitude'] = $item['alt']; // *** 492
|
||||||
|
|
||||||
|
$mots = $item['keywords']; // *** falco peregrinus,falconidés,falconiformes,faucon pèlerin,oiseaux,_vert_,falaise,femelle
|
||||||
|
$creator = $item['creator']; // Pesenti
|
||||||
|
$ville = $item['city']; // Antheuil
|
||||||
|
$departement = $item['department']; // Côte-d'Or
|
||||||
|
$code = $item['code']; // FR
|
||||||
|
$pays = $item['country']; // France
|
||||||
|
$copyright = $item['copyright']; // clicclac.info
|
||||||
|
$titre = $item['title']; // ***
|
||||||
|
$legende = $item['legende']; // ***
|
||||||
|
|
||||||
create_thumb($th_w, $th_h, $file);
|
create_thumb($th_w, $th_h, $file);
|
||||||
|
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo "<br>";
|
||||||
}
|
}
|
||||||
catch(PDOException $e) {
|
catch(PDOException $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
@@ -502,12 +707,12 @@ try {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="admin/index.php" title="<?php echo gettext("Admin"); ?>"><?php echo gettext("Admin"); ?></a></p>
|
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
BIN
lc-lightbox/css/fonts/lc_lightbox.eot
Normal file
33
lc-lightbox/css/fonts/lc_lightbox.svg
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata>Generated by IcoMoon</metadata>
|
||||||
|
<defs>
|
||||||
|
<font id="lc_lightbox" horiz-adv-x="512">
|
||||||
|
<font-face units-per-em="512" ascent="480" descent="-32" />
|
||||||
|
<missing-glyph horiz-adv-x="512" />
|
||||||
|
<glyph unicode=" " horiz-adv-x="256" d="" />
|
||||||
|
<glyph unicode="" glyph-name="share" d="M411.861 145.136c-21.366 0-40.514-8.425-55.171-21.841l-175.683 86.653c0.159 1.849 0.581 3.671 0.581 5.599 0 1.241-0.317 2.43-0.369 3.618l180.965 91.882c13.786-10.697 30.848-17.351 49.678-17.351 45.109 0 81.688 36.552 81.688 81.582-0.026 45.056-36.579 81.582-81.688 81.582-44.977 0-81.503-36.526-81.503-81.555l-183.526-93.124c-13.258 9.35-29.343 14.949-46.826 14.949-45.030 0-81.555-36.526-81.555-81.582 0-45.003 36.526-81.635 81.555-81.635 17.378 0 33.383 5.573 46.614 14.817l184.24-90.826c2.906-42.336 37.873-75.904 80.975-75.904 45.109 0 81.688 36.499 81.688 81.529s-36.552 81.608-81.661 81.608z" />
|
||||||
|
<glyph unicode="" glyph-name="comprime" d="M252.457 197.202v-128c0-4.914-1.828-9.257-5.486-12.914s-7.886-5.372-12.8-5.372-9.257 1.829-12.915 5.486l-41.143 41.143-94.857-94.857c-1.943-1.943-4.114-2.857-6.629-2.857s-4.686 0.914-6.629 2.857l-32.572 32.572c-1.943 1.943-2.857 4.115-2.857 6.628s0.914 4.685 2.857 6.628l94.857 94.857-41.143 41.143c-3.657 3.657-5.486 7.885-5.486 12.914s1.829 9.257 5.486 12.914 7.886 5.486 12.915 5.486h128.114c4.915 0 9.257-1.829 12.915-5.486s5.371-8.228 5.371-13.143zM475.428 396.973c0-2.514-0.914-4.685-2.857-6.628l-94.857-94.857 41.143-41.143c3.657-3.657 5.486-7.886 5.486-12.915s-1.829-9.257-5.486-12.914c-3.657-3.657-7.885-5.257-12.8-5.257h-128c-4.914 0-9.257 1.828-12.914 5.486s-5.372 7.885-5.372 12.8v128c0 4.914 1.829 9.257 5.486 12.914s7.885 5.486 12.914 5.486c5.029 0 9.257-1.828 12.914-5.486l41.143-41.143 94.857 94.857c1.943 1.943 4.115 2.857 6.628 2.857s4.685-0.915 6.628-2.857l32.572-32.571c1.6-1.943 2.514-4.115 2.514-6.629z" />
|
||||||
|
<glyph unicode="" glyph-name="cancel" d="M313.392 223.984l97.536-97.536c6.336-6.336 6.336-16.624 0-22.96l-34.416-34.416c-6.336-6.336-16.608-6.336-22.96 0l-97.552 97.536-97.552-97.536c-6.336-6.336-16.608-6.336-22.944 0l-34.432 34.416c-6.336 6.336-6.336 16.608 0 22.96l97.552 97.536-97.552 97.552c-6.336 6.336-6.336 16.624 0 22.96l34.448 34.416c6.336 6.336 16.608 6.336 22.944 0l97.536-97.552 97.552 97.552c6.336 6.336 16.608 6.336 22.96 0l34.416-34.432c6.336-6.336 6.336-16.608 0-22.96l-97.536-97.536z" />
|
||||||
|
<glyph unicode="" glyph-name="th_new3" d="M229.134 237.154h-182.743c-5.029 0-9.143 4.114-9.143 9.143v183.315c0 5.029 4.114 9.143 9.143 9.143h182.743c5.029 0 9.143-4.115 9.143-9.143v-183.315c0-5.029-4.114-9.143-9.143-9.143zM229.134-36.56h-182.743c-5.029 0-9.143 4.115-9.143 9.143v182.743c0 5.029 4.114 9.143 9.143 9.143h182.743c5.029 0 9.143-4.115 9.143-9.143v-182.743c0-5.029-4.114-9.143-9.143-9.143zM319.991 236.925h182.857c5.029 0 9.143 4.115 9.143 9.143v182.857c0 5.029-4.115 9.143-9.143 9.143h-182.857c-5.029 0-9.143-4.115-9.143-9.143v-182.857c0-5.029 4.115-9.143 9.143-9.143zM319.991 165.154h182.857c5.029 0 9.143-4.115 9.143-9.143v-182.857c0-5.029-4.115-9.143-9.143-9.143h-182.857c-5.029 0-9.143 4.115-9.143 9.143v182.857c0 5.029 4.115 9.143 9.143 9.143z" />
|
||||||
|
<glyph unicode="" glyph-name="file-web" d="M458.9 360.929c-11.1 15.1-26.6 32.8-43.6 49.9s-34.7 32.5-49.9 43.6c-25.7 18.8-38.2 21-45.4 21h-248c-22.1 0-40-17.9-40-40v-432c0-22.1 17.9-40 40-40h368c22.1 0 40 17.9 40 40v312c0 7.2-2.2 19.7-21.1 45.5v0c0 0 0 0 0 0zM392.7 388.129c15.3-15.4 27.4-29.2 36.3-40.7h-77v77c11.5-8.9 25.3-21 40.7-36.3v0 0 0zM448 3.429c0-4.3-3.7-8-8-8h-368c-4.3 0-8 3.7-8 8v432c0 4.3 3.7 8 8 8 0 0 248 0 248 0v-112c0-8.8 7.2-16 16-16h112v-312zM254.2 283.429c71.7 0 129.8-58.2 129.8-129.8s-58.2-129.8-129.8-129.8-129.8 58.2-129.8 129.8 58.1 129.8 129.8 129.8zM300.5 195.329c-1.4-1-2.2-2.9-3.9-3.2 0.8 0.2 1.7 3.2 2.2 3.9 1 1.2 2.4 1.9 3.7 2.5 2.9 1.2 5.7 1.5 8.8 2 2.9 0.7 6.4 0.7 8.6-1.9-0.5 0.5 3.6 4.1 4.1 4.2 1.5 0.8 4.1 0.5 5.1 2 0.3 0.5 0.3 3.7 0.3 3.7-2.9-0.3-3.9 2.4-4.1 4.7 0-0.2-0.3-0.7-1-1.4 0.2 2.5-3 0.7-4.2 1-3.9 1-3.4 3.7-4.6 6.6-0.7 1.5-2.5 2-3.2 3.6-0.7 1-1 3.2-2.5 3.4-1 0.2-2.9-3.6-3.2-3.4-1.5 0.8-2.2-0.3-3.4-1-1-0.7-1.9-0.3-2.9-0.8 3 1-1.4 2.7-2.9 2.4 2.4 0.7 1.2 3.2-0.2 4.4h0.8c-0.3 1.5-5.1 2.9-6.6 3.9s-9.6 2.7-11.3 1.7c-2-1.2 0.5-4.6 0.5-6.3 0.2-2-2-2.5-2-4.2 0-2.9 5.4-2.4 4.1-6.3-0.8-2.4-4.1-2.9-5.4-4.7-1.4-1.7 0.2-4.7 1.5-5.9 1.4-1-2.4-2.7-2.9-3-2.9-1.4-5.1 2.9-5.7 5.4-0.5 1.9-0.7 4.1-2.7 5.1-1 0.3-4.2 0.8-4.9-0.2-1 2.5-4.6 3.6-6.9 4.4-3.4 1.2-6.3 1.2-9.8 0.7 1.2 0.2-0.3 5.4-3.2 4.6 0.8 1.7 0.5 3.6 0.8 5.2 0.3 1.4 1 2.7 2 3.9 0.3 0.7 4.1 4.6 2.9 4.7 2.9-0.3 6.1-0.5 8.5 1.9 1.5 1.5 2.2 4.1 3.7 5.7 2.2 2.5 4.9-0.7 7.3-0.8 3.4-0.2 3.2 3.6 1.4 5.2 2.2-0.2 0.3 3.9-0.8 4.4-1.5 0.5-7.3-1-4.2-2.2-0.7 0.3-4.7-8.1-7.1-3.9-0.7 0.8-1 4.4-2.5 4.6-1.4 0-2.2-1.5-2.7-2.5 0.8 2.2-4.7 3.7-5.9 3.9 2.5 1.7 0.5 3.6-1.4 4.6-1.4 0.8-5.6 1.5-6.8 0.2-3.2-3.9 3.4-4.4 5.1-5.4 0.5-0.3 2.5-1.5 1.4-2.4-1-0.5-4.1-1.4-4.4-2-1-1.5 1.2-3.2-0.3-4.7-1.5 1.5-1.5 4.1-2.7 5.7 1.5-1.9-6.1-0.8-5.9-0.8-2.5 0-6.6-1.7-8.5 0.8-0.3 0.7-0.3 4.6 0.7 3.7-1.5 1.2-2.5 2.4-3.6 3-5.6-1.9-10.8-4.2-15.9-6.9 0.7-0.2 1.2-0.2 2 0.2 1.4 0.5 2.5 1.4 3.9 2 1.7 0.7 5.2 2.7 7.1 1.2 0.2 0.3 0.7 0.7 0.8 0.8 1.2-1.4 2.4-2.7 3.4-4.2-1.4 0.7-3.6 0.3-5.1 0.2-1.2-0.3-3.2-0.7-3.7-2 0.5-0.8 1.2-2.2 0.8-3-2.2 1.5-3.9 4.1-6.9 4.4-1.4 0-2.7 0-3.7-0.2-16.2-9-29.9-22-39.7-37.5 0.7-0.7 1.4-1.2 2-1.4 1.7-0.5 0-5.4 3.2-2.9 1-0.8 1.2-2 0.5-3.2 0.2 0.2 6.9-4.2 7.4-4.6 1.2-1 3-2.2 3.6-3.6 0.3-1.2-0.7-2.5-1.7-3-0.2 0.3-2.7 2.9-3 2.2-0.5-0.8 0-5.4 1.9-5.2-2.7-0.2-1.5-10.7-2.2-12.7 0-0.2 0.3-0.2 0.3-0.2-0.5-2 1.2-10 4.6-9.1-2.2-0.5 3.9-8.3 4.7-8.8 2.2-1.5 4.7-2.5 6.3-4.7 1.7-2.4 1.7-5.9 4.1-7.8-0.7-2 3.6-4.4 3.4-7.3-0.3-0.2-0.5-0.2-0.8-0.3 0.8-2.4 4.1-2.4 5.2-4.6 0.7-1.4 0-4.6 2.2-3.9 0.3 3.7-2.2 7.4-4.1 10.5-1 1.7-2 3.2-2.9 4.9-0.8 1.5-1 3.4-1.7 5.1 0.7-0.2 4.4-1.5 4.1-2-1.4-3.4 5.4-9.3 7.3-11.5 0.5-0.5 4.4-5.6 2.4-5.6 2.2 0 5.2-3.4 6.3-5.1 1.5-2.5 1.2-5.7 2.2-8.5 1-3.4 5.7-4.9 8.5-6.4 2.4-1.2 4.4-2.9 6.8-3.7 3.6-1.4 4.4-0.2 7.4 0.3 4.4 0.7 4.9-4.2 8.5-6.1 2.2-1.2 6.9-2.9 9.3-1.9-1-0.3 3.6-7.3 3.9-7.8 1.5-2 4.4-3 6.1-5.1 0.5 0.3 1 0.8 1.2 1.5-0.7-1.9 2.5-5.4 4.2-5.1 1.9 0.3 2.4 4.1 2.4 5.4-3.4-1.7-6.4-0.3-8.3 3-0.3 0.8-3 5.6-0.7 5.6 3.2 0 1 2.5 0.7 4.9s-2.7 3.9-3.9 5.9c-1-2-4.4-1.5-5.4 0.2 0-0.5-0.5-1.4-0.5-2-0.8 0-1.7-0.2-2.5 0.2 0.3 2 0.5 4.6 1 6.8 0.8 3 6.4 9-0.8 8.6-2.5-0.2-3.6-1.2-4.4-3.4-0.8-2-0.5-3.9-2.9-4.9-1.5-0.7-6.6-0.3-8.1 0.5-3.2 1.9-5.4 7.8-5.4 11.2-0.2 4.6 2.2 8.6 0 12.8 1 0.8 2 2.5 3.2 3.4 1 0.7 2.2-0.5 2.7 1.5-0.5 0.3-1.2 1-1.4 1 2.5-1.2 7.3 1.7 9.5 0 1.4-1 2.9-1.4 3.7 0.3 0.2 0.5-1.2 2.5-0.5 3.9 0.5-2.9 2.4-3.4 4.9-1.5 1-1 3.7-0.7 5.6-1.7 1.9-1.2 2.2-3 4.4-0.5 1.4-2 1.5-2 2-4.1 0.5-1.9 1.5-6.6 3.2-7.4 3.6-2.2 2.7 3.7 2.4 5.7-0.2 0.2-0.2 5.7-0.3 5.7-5.4 1.2-3.4 5.4-0.3 8.3 0.5 0.3 4.4 1.7 6.1 3 1.5 1.4 3.4 3.7 2.5 5.9 0.8 0 1.5 0.7 1.9 1.5-0.5 0.2-2.5 1.9-2.9 1.7 1.2 0.7 1 1.7 0.3 2.7 1.7 1 0.8 2.9 2.5 3.6 1.9-2.5 5.6 0.3 3.7 2.4 1.7 2.4 5.6 1.2 6.6 3.4 2.5-0.7 0.7 2.5 2 4.4 1.2 1.5 3.2 1.5 4.7 2.4 0-0.2 4.2 2.4 2.9 2.5 2.9-0.3 8.6 2.7 4.2 5.2 0.7 1.5-1.5 2.2-3 2.5 1.2 0.3 2.7-0.3 3.7 0.3 2.2 1.5 0.7 2.2-1.2 2.7-2.8 1-5.9-0.5-7.7-1.7zM272.9 47.029c23.2 4.1 43.8 15.6 59.3 32-1 1-2.9 0.7-4.2 1.4-1.4 0.5-2.4 1-4.1 1.4 0.3 3.4-3.4 4.6-5.7 6.3-2.2 1.7-3.6 3.6-6.8 2.9-0.3-0.2-3.7-1.4-3-2-2.2 1.9-3.2 2.9-6.1 3.7-2.7 0.8-4.6 4.2-7.3 1.2-1.4-1.4-0.7-3.4-1.4-4.7-2.2 1.9 2 4.1 0.3 6.1-2 2.4-5.6-1.5-7.3-2.5-1-0.8-2.2-1.2-2.9-2.2-0.8-1.2-1.2-2.7-1.9-3.9-0.5 1.4-3.4 1-3.6 2 0.7-4.1 0.7-8.3 1.5-12.3 0.5-2.4 0-6.3-2-8.1s-4.6-3.9-4.9-6.8c-0.3-2 0.2-3.9 2-4.4 0.2-2.5-2.7-4.4-2.5-7.1 0.3-0.4 0.5-2.1 0.6-3z" />
|
||||||
|
<glyph unicode="" glyph-name="zoomin" d="M497.914-17.914c-18.783-18.781-49.226-18.781-68.008 0l-84.863 84.864c-34.889-22.366-76.131-35.718-120.66-35.718-123.915 0-224.383 100.454-224.383 224.384s100.468 224.384 224.383 224.384c123.931 0 224.384-100.453 224.384-224.384 0-44.529-13.352-85.771-35.718-120.675l84.864-84.848c18.782-18.782 18.782-49.224 0.001-68.007zM224.383 415.89c-88.511 0-160.274-71.763-160.274-160.274 0-88.526 71.763-160.274 160.274-160.274 88.527 0 160.274 71.748 160.274 160.274 0 88.511-71.747 160.274-160.274 160.274zM256.438 159.452h-64.109v64.109h-64.109v64.109h64.109v64.11h64.109v-64.11h64.11v-64.109h-64.11v-64.109z" />
|
||||||
|
<glyph unicode="" glyph-name="zoomout" d="M497.914 50.094l-84.864 84.848c22.366 34.903 35.718 76.146 35.718 120.675 0 123.93-100.454 224.383-224.385 224.383-123.915 0-224.383-100.453-224.383-224.384s100.468-224.384 224.383-224.384c44.529 0 85.771 13.352 120.66 35.718l84.863-84.864c18.782-18.781 49.225-18.781 68.008 0 18.781 18.783 18.781 49.225 0 68.008zM224.383 95.342c-88.511 0-160.274 71.748-160.274 160.274 0 88.511 71.763 160.274 160.274 160.274 88.527 0 160.274-71.763 160.274-160.274 0-88.526-71.747-160.274-160.274-160.274zM128.219 223.562h192.329v64.109h-192.329v-64.109z" />
|
||||||
|
<glyph unicode="" glyph-name="file-text2" d="M458.903 365.462c-11.106 15.146-26.587 32.85-43.589 49.852s-34.706 32.482-49.852 43.589c-25.787 18.91-38.296 21.097-45.462 21.097h-248c-22.056 0-40-17.944-40-40v-432c0-22.056 17.944-40 40-40h368c22.056 0 40 17.944 40 40v312c0 7.166-2.186 19.675-21.097 45.462zM392.687 392.687c15.35-15.35 27.4-29.199 36.29-40.687h-76.977v76.973c11.492-8.89 25.339-20.939 40.687-36.286zM448 8c0-4.336-3.664-8-8-8h-368c-4.336 0-8 3.664-8 8v432c0 4.336 3.664 8 8 8 0 0 247.978 0.001 248 0v-112c0-8.836 7.163-16 16-16h112v-312zM368 64h-224c-8.836 0-16 7.163-16 16s7.164 16 16 16h224c8.837 0 16-7.163 16-16s-7.163-16-16-16zM368 128h-224c-8.836 0-16 7.163-16 16s7.164 16 16 16h224c8.837 0 16-7.163 16-16s-7.163-16-16-16zM368 192h-224c-8.836 0-16 7.163-16 16s7.164 16 16 16h224c8.837 0 16-7.163 16-16s-7.163-16-16-16z" />
|
||||||
|
<glyph unicode="" glyph-name="file-picture" d="M416 32h-320v64l96 160 131.5-160 92.5 64v-128zM416 240c0-26.51-21.49-48-48-48-26.511 0-48 21.49-48 48s21.489 48 48 48c26.51 0 48-21.49 48-48zM458.903 365.462c-11.106 15.146-26.587 32.85-43.589 49.852s-34.706 32.482-49.852 43.589c-25.787 18.91-38.296 21.097-45.462 21.097h-248c-22.056 0-40-17.944-40-40v-432c0-22.056 17.944-40 40-40h368c22.056 0 40 17.944 40 40v312c0 7.166-2.186 19.675-21.097 45.462zM392.687 392.687c15.35-15.35 27.4-29.199 36.29-40.687h-76.977v76.973c11.492-8.89 25.339-20.939 40.687-36.286zM448 8c0-4.336-3.664-8-8-8h-368c-4.336 0-8 3.664-8 8v432c0 4.336 3.664 8 8 8 0 0 247.978 0.001 248 0v-112c0-8.836 7.163-16 16-16h112v-312z" />
|
||||||
|
<glyph unicode="" glyph-name="file-play" d="M192 288l160-112-160-112v224zM458.903 365.462c-11.106 15.146-26.587 32.85-43.589 49.852s-34.706 32.482-49.852 43.589c-25.787 18.91-38.296 21.097-45.462 21.097h-248c-22.056 0-40-17.944-40-40v-432c0-22.056 17.944-40 40-40h368c22.056 0 40 17.944 40 40v312c0 7.166-2.186 19.675-21.097 45.462zM392.687 392.687c15.35-15.35 27.4-29.199 36.29-40.687h-76.977v76.973c11.492-8.89 25.339-20.939 40.687-36.286zM448 8c0-4.336-3.664-8-8-8h-368c-4.336 0-8 3.664-8 8v432c0 4.336 3.664 8 8 8 0 0 247.978 0.001 248 0v-112c0-8.836 7.163-16 16-16h112v-312z" />
|
||||||
|
<glyph unicode="" glyph-name="download2" d="M448 224h-80l-112-112-112 112h-80l-64-128v-32h512v32l-64 128zM0 32h512v-32h-512v32zM288 320v128h-64v-128h-112l144-144 144 144h-112z" />
|
||||||
|
<glyph unicode="" glyph-name="chevron-left" horiz-adv-x="366" d="M34.751 219.427q0 7.428 5.428 12.857l212 212q5.429 5.429 12.857 5.429t12.857-5.429l47.428-47.428q5.428-5.428 5.428-12.857t-5.428-12.857l-151.714-151.714 151.714-151.714q5.428-5.428 5.428-12.857t-5.428-12.857l-47.428-47.428q-5.428-5.428-12.857-5.428t-12.857 5.428l-212 212q-5.428 5.428-5.428 12.857z" />
|
||||||
|
<glyph unicode="" glyph-name="chevron-right" horiz-adv-x="366" d="M34.748 54.858q0 7.428 5.428 12.857l151.714 151.714-151.714 151.714q-5.428 5.428-5.428 12.857t5.428 12.857l47.428 47.428q5.428 5.428 12.857 5.428t12.857-5.428l212-212q5.428-5.428 5.428-12.857t-5.428-12.857l-212-212q-5.428-5.428-12.857-5.428t-12.857 5.428l-47.428 47.428q-5.428 5.428-5.428 12.857z" />
|
||||||
|
<glyph unicode="" glyph-name="expand" d="M36.571 18.286v128q0 7.428 5.428 12.857t12.857 5.428 12.857-5.428l41.143-41.143 94.857 94.857q2.857 2.857 6.572 2.857t6.572-2.857l32.572-32.572q2.857-2.857 2.857-6.572t-2.857-6.572l-94.857-94.857 41.143-41.143q5.428-5.428 5.428-12.857t-5.428-12.857-12.857-5.428h-128q-7.428 0-12.857 5.428t-5.428 12.857zM259.714 265.143q0 3.714 2.857 6.572l94.857 94.857-41.143 41.143q-5.428 5.428-5.428 12.857t5.428 12.857 12.857 5.428h128q7.428 0 12.857-5.428t5.428-12.857v-128q0-7.428-5.428-12.857t-12.857-5.428-12.857 5.428l-41.143 41.143-94.857-94.857q-2.857-2.857-6.572-2.857t-6.572 2.857l-32.572 32.572q-2.857 2.857-2.857 6.572z" />
|
||||||
|
<glyph unicode="" glyph-name="twitter" horiz-adv-x="476" d="M12.61 78.004q10-1.143 22.285-1.143 64.285 0 114.572 39.428-30 0.572-53.715 18.428t-32.572 45.572q9.428-1.428 17.428-1.428 12.285 0 24.285 3.143-32 6.572-53 31.857t-21 58.714v1.143q19.428-10.857 41.715-11.714-18.857 12.572-30 32.857t-11.143 44q0 25.143 12.572 46.572 34.572-42.572 84.143-68.143t106.143-28.428q-2.286 10.857-2.286 21.143 0 38.286 27 65.286t65.286 27q40 0 67.428-29.143 31.143 6 58.572 22.286-10.572-32.857-40.572-50.857 26.572 2.857 53.143 14.286-19.143-28-46.286-47.715 0.286-4 0.286-12 0-37.143-10.857-74.143t-33-71-52.714-60.143-73.714-41.714-92.286-15.572q-77.428 0-141.714 41.428z" />
|
||||||
|
<glyph unicode="" glyph-name="facebook" horiz-adv-x="293" d="M22.823 198.576v84.572h72.857v62.286q0 53.143 29.715 82.428t79.143 29.286q42 0 65.143-3.429v-75.428h-44.857q-24.571 0-33.143-10.285t-8.572-30.857v-54h83.714l-11.143-84.572h-72.571v-216.857h-87.428v216.857h-72.857z" />
|
||||||
|
<glyph unicode="" glyph-name="playback-pause" horiz-adv-x="256" d="M-0.002 64.002h96v320h-96v-320zM159.998 384.002v-320h96v320h-96z" />
|
||||||
|
<glyph unicode="" glyph-name="playback-play" horiz-adv-x="256" d="M0.002 383.999l256-160-256-160v320z" />
|
||||||
|
<glyph unicode="" glyph-name="pinterest" d="M36.571 219.429q0 59.714 29.428 110.143t79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143-29.428-110.143-79.857-79.857-110.143-29.428q-31.715 0-62.285 9.143 16.857 26.572 22.286 46.857 2.571 9.714 15.428 60.286 5.714-11.143 20.857-19.286t32.571-8.143q34.572 0 61.714 19.572t42 53.857 14.857 77.143q0 32.572-17 61.143t-49.286 46.572-72.857 18q-30 0-56-8.286t-44.143-22-31.143-31.572-19.143-37-6.143-38.286q0-29.714 11.428-52.286t33.428-31.714q8.571-3.428 10.857 5.714 0.571 2 2.286 8.857t2.286 8.572q1.714 6.572-3.143 12.286-14.571 17.428-14.571 43.143 0 43.143 29.857 74.143t78.143 31q43.143 0 67.286-23.428t24.143-60.857q0-48.571-19.572-82.571t-50.143-34q-17.428 0-28 12.428t-6.572 29.857q2.286 10 7.572 26.714t8.572 29.428 3.286 21.572q0 14.286-7.714 23.714t-22 9.428q-17.714 0-30-16.286t-12.286-40.572q0-20.857 7.143-34.857l-28.285-119.428q-4.857-20-3.714-50.572-58.857 26-95.143 80.286t-36.285 120.857z" />
|
||||||
|
<glyph unicode="" glyph-name="quote-right" horiz-adv-x="476" d="M21.641 252.675v99.741q0 20.779 14.545 35.325t35.325 14.545h99.741q20.779 0 35.325-14.545t14.546-35.325v-182.858q0-27.014-10.519-51.559t-28.441-42.468-42.468-28.442-51.559-10.519h-16.624q-6.753 0-11.688 4.935t-4.935 11.688v33.247q0 6.753 4.935 11.688t11.688 4.935h16.624q27.532 0 47.013 19.481t19.481 47.014v8.312q0 10.389-7.273 17.663t-17.662 7.273h-58.182q-20.779 0-35.325 14.546t-14.546 35.325zM254.369 252.675v99.741q0 20.779 14.545 35.325t35.325 14.545h99.741q20.779 0 35.325-14.545t14.546-35.325v-182.858q0-27.014-10.519-51.559t-28.442-42.468-42.468-28.442-51.559-10.519h-16.623q-6.753 0-11.688 4.935t-4.935 11.688v33.247q0 6.753 4.935 11.688t11.688 4.935h16.623q27.533 0 47.014 19.481t19.481 47.014v8.312q0 10.389-7.273 17.663t-17.663 7.273h-58.182q-20.779 0-35.325 14.546t-14.546 35.325z" />
|
||||||
|
<glyph unicode="" glyph-name="chevron-circle-left" d="M36.571 219.429q0 59.714 29.428 110.143t79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143-29.428-110.143-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143zM135.428 219.429q0-7.428 5.428-12.857l129.714-129.714q5.428-5.428 12.857-5.428t12.857 5.428l29.143 29.143q5.428 5.428 5.428 12.857t-5.428 12.857l-87.714 87.714 87.714 87.714q5.428 5.428 5.428 12.857t-5.428 12.857l-29.143 29.143q-5.428 5.428-12.857 5.428t-12.857-5.428l-129.714-129.714q-5.428-5.428-5.428-12.857z" />
|
||||||
|
<glyph unicode="" glyph-name="chevron-circle-right" d="M36.571 219.429q0 59.714 29.428 110.143t79.857 79.857 110.143 29.428 110.143-29.428 79.857-79.857 29.428-110.143-29.428-110.143-79.857-79.857-110.143-29.428-110.143 29.428-79.857 79.857-29.428 110.143zM181.143 118.857q0-7.428 5.429-12.857l29.143-29.143q5.429-5.428 12.857-5.428t12.857 5.428l129.715 129.714q5.428 5.428 5.428 12.857t-5.428 12.857l-129.714 129.714q-5.428 5.429-12.857 5.429t-12.857-5.429l-29.143-29.143q-5.429-5.428-5.429-12.857t5.428-12.857l87.714-87.714-87.714-87.714q-5.428-5.428-5.428-12.857z" />
|
||||||
|
<glyph unicode="" glyph-name="whatsapp" horiz-adv-x="439" d="M281.428 197.143c4.857 0 51.428-24.286 53.428-27.714 0.572-1.428 0.572-3.143 0.572-4.286 0-7.143-2.286-15.143-4.857-21.714-6.572-16-33.143-26.286-49.428-26.286-13.714 0-42 12-54.286 17.714-40.857 18.572-66.286 50.286-90.857 86.572-10.857 16-20.572 35.714-20.285 55.428v2.286c0.572 18.857 7.428 32.286 21.143 45.143 4.286 4 8.857 6.286 14.857 6.286 3.429 0 6.857-0.857 10.571-0.857 7.714 0 9.143-2.286 12-9.714 2-4.857 16.572-43.714 16.572-46.572 0-10.857-19.714-23.143-19.714-29.714 0-1.429 0.571-2.857 1.429-4.286 6.286-13.428 18.285-28.857 29.143-39.143 13.143-12.572 27.143-20.857 43.143-28.857 2-1.143 4-2 6.286-2 8.571 0 22.857 27.714 30.285 27.714zM223.429 45.714c98.857 0 179.429 80.572 179.429 179.428s-80.572 179.429-179.429 179.429-179.429-80.572-179.429-179.429c0-37.714 12-74.571 34.285-105.143l-22.572-66.572 69.143 22c29.143-19.143 63.715-29.714 98.571-29.714zM223.429 440.572c118.857 0 215.429-96.571 215.429-215.428s-96.572-215.429-215.429-215.429c-36.285 0-72.285 9.143-104.285 26.857l-119.143-38.286 38.857 115.714c-20.285 33.428-30.857 72-30.857 111.143 0 118.857 96.572 215.429 215.429 215.429z" />
|
||||||
|
</font></defs></svg>
|
||||||
|
After Width: | Height: | Size: 18 KiB |
BIN
lc-lightbox/css/fonts/lc_lightbox.ttf
Normal file
BIN
lc-lightbox/css/fonts/lc_lightbox.woff
Normal file
1491
lc-lightbox/css/lc_lightbox.css
Normal file
1
lc-lightbox/css/lc_lightbox.min.css
vendored
Normal file
150
lc-lightbox/css/open_close_fx.css
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
/* fading */
|
||||||
|
.lcl_fade_oc.lcl_pre_show #lcl_overlay,
|
||||||
|
.lcl_fade_oc.lcl_pre_show #lcl_window,
|
||||||
|
.lcl_fade_oc.lcl_is_closing #lcl_overlay,
|
||||||
|
.lcl_fade_oc.lcl_is_closing #lcl_window {
|
||||||
|
opacity: 0 !important;
|
||||||
|
}
|
||||||
|
.lcl_fade_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
-webkit-transition-delay: .15s !important;
|
||||||
|
transition-delay: .15s !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* zoom-in */
|
||||||
|
.lcl_zoomin_oc.lcl_pre_show #lcl_window,
|
||||||
|
.lcl_zoomin_oc.lcl_is_closing #lcl_window {
|
||||||
|
opacity: 0 !important;
|
||||||
|
|
||||||
|
-webkit-transform: scale(0.05) translateZ(0) !important;
|
||||||
|
transform: scale(0.05) translateZ(0) !important;
|
||||||
|
}
|
||||||
|
.lcl_zoomin_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
opacity: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* bottom-to-top */
|
||||||
|
.lcl_bottop_oc.lcl_pre_show #lcl_overlay,
|
||||||
|
.lcl_bottop_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
opacity: 0 !important;
|
||||||
|
}
|
||||||
|
.lcl_bottop_oc.lcl_pre_show #lcl_window {
|
||||||
|
transition-property: transform !important;
|
||||||
|
opacity: 1 !important;
|
||||||
|
|
||||||
|
-webkit-transform: translate3d(0, 100vh, 0);
|
||||||
|
transform: translate3d(0, 100vh, 0);
|
||||||
|
}
|
||||||
|
.lcl_bottop_oc.lcl_is_closing #lcl_window {
|
||||||
|
-webkit-transform: translate3d(0, -100vh, 0);
|
||||||
|
transform: translate3d(0, -100vh, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* bottom-to-top v2 */
|
||||||
|
.lcl_bottop_v2_oc.lcl_pre_show #lcl_window,
|
||||||
|
.lcl_bottop_v2_oc.lcl_is_closing #lcl_window {
|
||||||
|
opacity: 0 !important;
|
||||||
|
|
||||||
|
-webkit-transition-timing-function: ease;
|
||||||
|
transition-timing-function: ease;
|
||||||
|
}
|
||||||
|
.lcl_bottop_v2_oc.lcl_pre_show #lcl_window {
|
||||||
|
top: 40vh;
|
||||||
|
}
|
||||||
|
.lcl_bottop_v2_oc.lcl_is_closing #lcl_window {
|
||||||
|
top: -40vh;
|
||||||
|
|
||||||
|
-webkit-transform: scale(0.8) translateZ(0);
|
||||||
|
transform: scale(0.8) translateZ(0);
|
||||||
|
|
||||||
|
-webkit-transition-delay: 0s !important;
|
||||||
|
transition-delay: 0s !important;
|
||||||
|
}
|
||||||
|
.lcl_bottop_v2_oc.lcl_pre_show #lcl_overlay {
|
||||||
|
top: 100vh;
|
||||||
|
}
|
||||||
|
.lcl_bottop_v2_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
top: -100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* right to left */
|
||||||
|
.lcl_rtl_oc.lcl_pre_show #lcl_overlay,
|
||||||
|
.lcl_rtl_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
opacity: 0 !important;
|
||||||
|
}
|
||||||
|
.lcl_rtl_oc.lcl_pre_show #lcl_window,
|
||||||
|
.lcl_rtl_oc.lcl_is_closing #lcl_window {
|
||||||
|
opacity: 1 !important;
|
||||||
|
-webkit-transform: scale(.8) translateZ(0);
|
||||||
|
transform: scale(.8) translateZ(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lcl_rtl_oc.lcl_pre_show #lcl_window {
|
||||||
|
left: -100vw;
|
||||||
|
}
|
||||||
|
.lcl_rtl_oc.lcl_is_closing #lcl_window {
|
||||||
|
left: 100vw;
|
||||||
|
}
|
||||||
|
.lcl_rtl_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
-webkit-transition-delay: .2s !important;
|
||||||
|
transition-delay: .2s !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* horizontal flip */
|
||||||
|
.lcl_horiz_flip_oc.lcl_pre_show #lcl_overlay,
|
||||||
|
.lcl_horiz_flip_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
opacity: 0 !important;
|
||||||
|
}
|
||||||
|
.lcl_horiz_flip_oc.lcl_pre_show #lcl_window,
|
||||||
|
.lcl_horiz_flip_oc.lcl_is_closing #lcl_window {
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
|
backface-visibility: hidden;
|
||||||
|
|
||||||
|
-webkit-transition-timing-function: ease;
|
||||||
|
transition-timing-function: ease;
|
||||||
|
}
|
||||||
|
.lcl_horiz_flip_oc.lcl_pre_show #lcl_window {
|
||||||
|
-webkit-transform: rotateY(90deg) perspective(800px);
|
||||||
|
transform: rotateY(90deg) perspective(800px);
|
||||||
|
}
|
||||||
|
.lcl_horiz_flip_oc.lcl_is_closing #lcl_window {
|
||||||
|
-webkit-transform: rotateY(-90deg) scale(.8) perspective(800px);
|
||||||
|
transform: rotateY(-90deg) scale(.8) perspective(800px);
|
||||||
|
}
|
||||||
|
.lcl_horiz_flip_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
-webkit-transition-delay: .2s !important;
|
||||||
|
transition-delay: .2s !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* vertical flip */
|
||||||
|
.lcl_vert_flip_oc.lcl_pre_show #lcl_overlay,
|
||||||
|
.lcl_vert_flip_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
opacity: 0 !important;
|
||||||
|
}
|
||||||
|
.lcl_vert_flip_oc.lcl_pre_show #lcl_window,
|
||||||
|
.lcl_vert_flip_oc.lcl_is_closing #lcl_window {
|
||||||
|
-webkit-backface-visibility: hidden;
|
||||||
|
backface-visibility: hidden;
|
||||||
|
|
||||||
|
-webkit-transition-timing-function: ease;
|
||||||
|
transition-timing-function: ease;
|
||||||
|
}
|
||||||
|
.lcl_vert_flip_oc.lcl_pre_show #lcl_window {
|
||||||
|
-webkit-transform: rotateX(-90deg) perspective(1000px);
|
||||||
|
transform: rotateX(-90deg) perspective(1000px);
|
||||||
|
}
|
||||||
|
.lcl_vert_flip_oc.lcl_is_closing #lcl_window {
|
||||||
|
opacity: .5 !important;
|
||||||
|
|
||||||
|
-webkit-transform: rotateX(90deg) scale(.6) perspective(1000px);
|
||||||
|
transform: rotateX(90deg) scale(.6) perspective(1000px);
|
||||||
|
}
|
||||||
|
.lcl_vert_flip_oc.lcl_is_closing #lcl_overlay {
|
||||||
|
-webkit-transition-delay: .2s !important;
|
||||||
|
transition-delay: .2s !important;
|
||||||
|
}
|
||||||
148
lc-lightbox/demo_gallery.html
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
<title>LC Lightbox - Image Gallery Demo</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- PAGE'S BASE CSS -->
|
||||||
|
<style type="text/css">
|
||||||
|
/*! normalize.css v2.1.2 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
body{font:14px/20px Arial,sans-serif;background-color:#4E5869;margin:0;padding:0;color:#000}dl,ol,ul{padding:0;margin:0}h1,h2,h3,h4,h5,h6,p{margin-top:0;padding-right:15px;padding-left:15px}a img{border:none}a:link{color:#414958;text-decoration:underline}a:visited{color:#4E5869;text-decoration:underline}a:active,a:focus,a:hover{text-decoration:none}.container{width:80%;max-width:1260px;min-width:335px;background-color:#FFF;margin:0 auto}.header{background-color:#fdfdfd;}.sidebar1{float:right;width:20%;background-color:#93A5C4;padding-bottom:10px}.content{padding:10px 0;width:100%;float:right;background-color:#efefef}.content ol,.content ul{padding:0 15px 15px 40px}ul.nav{list-style:none;border-top:1px solid #666;margin-bottom:15px}ul.nav li{border-bottom:1px solid #666}ul.nav a,ul.nav a:visited{padding:5px 5px 5px 15px;display:block;text-decoration:none;background-color:#8090AB;color:#000}ul.nav a:active,ul.nav a:focus,ul.nav a:hover{background-color:#6F7D94;color:#FFF}.fltrt{float:right;margin-left:8px}.fltlft{float:left;margin-right:8px}.clearfloat{clear:both;height:0;font-size:1px;line-height:0}.content,.sidebar1{min-height:500px}.content>div{margin:20px 15px}@media screen and (max-width:900px){.content>div{width:100%!important}}
|
||||||
|
|
||||||
|
#logo {
|
||||||
|
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYlJREFUeNrcV4FtgzAQBJQB3AlCN0gmiNkgnaBhg25QMUHSCUInKJkgZgNGyAhskP6r58qJsCEUE5qXLMvI8t//359NGDhMytWepk3gz7LQ4VzSdAw8WxTc2WYd9ymlymQop5Td87/IQEVDR137AhAahPNlFZWvtpVgRgtmulcA5CO5BmFyQHou8wJjmm3YB0B9TwAp1fKJ5mcap7EB7Mh5/qNKJTv/GAuAQsSHq+/zMaQ4R6RfzGRqpwJrZvWbbwDaGeuEwLc1hmm6HNshS8BMTxG5aDkjxv5sSAAFIo07nsPR7/p0RuSI6vWGcwQ4UQwFQPaQ6FVDp0z/RTRJAMxovj75rbDsqP0pnmyVjYikIawjR1z/TgA5HaYguRXEqO29qCXa1Y6iiVuRZaNr3dQxrrUTfGg+j8wfBtwBJ+hBm8pxBj7hfNsAWpdncZm60grA5EOG/n5H+mIAEx2y8wtAl/XWLhCIiCW5pPECciZ9ROcvPyacuj3Y/Pg6MDqAzLOP3EZAtm8BBgDqc3bEpb6xyQAAAABJRU5ErkJggg==') no-repeat center center transparent;
|
||||||
|
background-size: contain;
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
bottom: -4px;
|
||||||
|
left: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.elem, .elem * {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
.elem {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0;
|
||||||
|
width: 33%;
|
||||||
|
border: 20px solid transparent;
|
||||||
|
border-bottom: none;
|
||||||
|
background: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
height: auto;
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
.elem > span {
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: 70%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- REQUIRED ELEMENTS -->
|
||||||
|
|
||||||
|
<script src="lib/jquery.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="js/lc_lightbox.js" type="text/javascript"></script>
|
||||||
|
<link rel="stylesheet" href="css/lc_lightbox.css" />
|
||||||
|
<link rel="stylesheet" href="css/open_close_fx.css" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SKINS -->
|
||||||
|
<link rel="stylesheet" href="skins/minimal.css" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ASSETS -->
|
||||||
|
<script src="lib/AlloyFinger/alloy_finger.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="header">
|
||||||
|
|
||||||
|
<div style="text-align: center; color: #3f3f3f; padding: 40px 20px 25px; opacity: 0.9;">
|
||||||
|
<h1><span id="logo"></span> LC Lightbox</h1>
|
||||||
|
<h3>Yet.. another jQuery lightbox .. or not?<br/><br/>
|
||||||
|
<small>by <a href="https://lcweb.it/" target="_blank">LCweb</a></small>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<br/>
|
||||||
|
<h2 style="text-align: center;">Image Gallery</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a class="elem" href="https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?dpr=1&auto=format&fit=crop&w=2000&q=80&cs=tinysrgb" title="image 1" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone" data-lcl-thumb="https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
<a class="elem" href="https://images.unsplash.com/photo-1502082553048-f009c37129b9?dpr=1&auto=format&fit=crop&w=2000&q=80&cs=tinysrgb" title="image 2" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone" data-lcl-thumb="https://images.unsplash.com/photo-1502082553048-f009c37129b9?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1502082553048-f009c37129b9?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
<a class="elem" href="https://images.unsplash.com/photo-1442850473887-0fb77cd0b337?dpr=1&auto=format&fit=crop&w=2000&q=80&cs=tinysrgb" title="image 3" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone" data-lcl-thumb="https://images.unsplash.com/photo-1442850473887-0fb77cd0b337?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1442850473887-0fb77cd0b337?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a class="elem" href="https://images.unsplash.com/photo-1431794062232-2a99a5431c6c?dpr=1&auto=format&fit=crop&w=2000&q=80&cs=tinysrgb" title="image 4" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone" data-lcl-thumb="https://images.unsplash.com/photo-1431794062232-2a99a5431c6c?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1431794062232-2a99a5431c6c?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
<a class="elem" href="https://images.unsplash.com/photo-1432405972618-c60b0225b8f9?dpr=1&auto=format&fit=crop&w=2000&q=80&cs=tinysrgb" title="image 5" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone" data-lcl-thumb="https://images.unsplash.com/photo-1432405972618-c60b0225b8f9?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1432405972618-c60b0225b8f9?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
<a class="elem" href="https://images.unsplash.com/photo-1482192505345-5655af888cc4?dpr=1&auto=format&fit=crop&w=2000&q=80&cs=tinysrgb" title="image 6" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone" data-lcl-thumb="https://images.unsplash.com/photo-1482192505345-5655af888cc4?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1482192505345-5655af888cc4?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- LIGHTBOX INITIALIZATION -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
|
||||||
|
// live handler
|
||||||
|
lc_lightbox('.elem', {
|
||||||
|
wrap_class : 'lcl_rtl_oc',
|
||||||
|
gallery : true,
|
||||||
|
global_type: 'image',
|
||||||
|
thumb_attr: 'data-lcl-thumb',
|
||||||
|
|
||||||
|
skin: 'minimal',
|
||||||
|
radius: 0,
|
||||||
|
padding : 0,
|
||||||
|
border_w: 0,
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
170
lc-lightbox/demo_multitype.html
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
<title>LC Lightbox - Mixed Types Demo</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- PAGE'S BASE CSS -->
|
||||||
|
<style type="text/css">
|
||||||
|
/*! normalize.css v2.1.2 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
body{font:14px/20px Arial,sans-serif;background-color:#4E5869;margin:0;padding:0;color:#000}dl,ol,ul{padding:0;margin:0}h1,h2,h3,h4,h5,h6,p{margin-top:0;padding-right:15px;padding-left:15px}a img{border:none}a:link{color:#414958;text-decoration:underline}a:visited{color:#4E5869;text-decoration:underline}a:active,a:focus,a:hover{text-decoration:none}.container{width:80%;max-width:1260px;min-width:335px;background-color:#FFF;margin:0 auto}.header{background-color:#fdfdfd;}.sidebar1{float:right;width:20%;background-color:#93A5C4;padding-bottom:10px}.content{padding:10px 0;width:100%;float:right;background-color:#efefef}.content ol,.content ul{padding:0 15px 15px 40px}ul.nav{list-style:none;border-top:1px solid #666;margin-bottom:15px}ul.nav li{border-bottom:1px solid #666}ul.nav a,ul.nav a:visited{padding:5px 5px 5px 15px;display:block;text-decoration:none;background-color:#8090AB;color:#000}ul.nav a:active,ul.nav a:focus,ul.nav a:hover{background-color:#6F7D94;color:#FFF}.fltrt{float:right;margin-left:8px}.fltlft{float:left;margin-right:8px}.clearfloat{clear:both;height:0;font-size:1px;line-height:0}.content,.sidebar1{min-height:500px}.content>div{margin:20px 15px}@media screen and (max-width:900px){.content>div{width:100%!important}}
|
||||||
|
|
||||||
|
#logo {
|
||||||
|
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYlJREFUeNrcV4FtgzAQBJQB3AlCN0gmiNkgnaBhg25QMUHSCUInKJkgZgNGyAhskP6r58qJsCEUE5qXLMvI8t//359NGDhMytWepk3gz7LQ4VzSdAw8WxTc2WYd9ymlymQop5Td87/IQEVDR137AhAahPNlFZWvtpVgRgtmulcA5CO5BmFyQHou8wJjmm3YB0B9TwAp1fKJ5mcap7EB7Mh5/qNKJTv/GAuAQsSHq+/zMaQ4R6RfzGRqpwJrZvWbbwDaGeuEwLc1hmm6HNshS8BMTxG5aDkjxv5sSAAFIo07nsPR7/p0RuSI6vWGcwQ4UQwFQPaQ6FVDp0z/RTRJAMxovj75rbDsqP0pnmyVjYikIawjR1z/TgA5HaYguRXEqO29qCXa1Y6iiVuRZaNr3dQxrrUTfGg+j8wfBtwBJ+hBm8pxBj7hfNsAWpdncZm60grA5EOG/n5H+mIAEx2y8wtAl/XWLhCIiCW5pPECciZ9ROcvPyacuj3Y/Pg6MDqAzLOP3EZAtm8BBgDqc3bEpb6xyQAAAABJRU5ErkJggg==') no-repeat center center transparent;
|
||||||
|
background-size: contain;
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
bottom: -4px;
|
||||||
|
left: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.elem, .elem * {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
.elem {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0;
|
||||||
|
width: 33%;
|
||||||
|
border: 20px solid transparent;
|
||||||
|
border-bottom: none;
|
||||||
|
background: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
height: auto;
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
.elem > span {
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: 70%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- REQUIRED ELEMENTS -->
|
||||||
|
|
||||||
|
<script src="lib/jquery.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script src="js/lc_lightbox.js" type="text/javascript"></script>
|
||||||
|
<link rel="stylesheet" href="css/lc_lightbox.css" />
|
||||||
|
<link rel="stylesheet" href="css/open_close_fx.css" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SKINS -->
|
||||||
|
<link rel="stylesheet" href="skins/minimal.css" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ASSETS -->
|
||||||
|
<script src="lib/AlloyFinger/alloy_finger.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="header">
|
||||||
|
|
||||||
|
<div style="text-align: center; color: #3f3f3f; padding: 40px 20px 25px; opacity: 0.9;">
|
||||||
|
<h1><span id="logo"></span> LC Lightbox</h1>
|
||||||
|
<h3>Yet.. another jQuery lightbox .. or not?<br/><br/>
|
||||||
|
<small>by <a href="https://lcweb.it/" target="_blank">LCweb</a></small>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<br/>
|
||||||
|
<h2 style="text-align: center;">Mixed Types</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a class="elem" href="https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?dpr=1&auto=format&fit=crop&w=2000&q=80&cs=tinysrgb" title="Image" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone" data-lcl-type="image" data-lcl-thumb="https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
<a class="elem" href="https://www.youtube.com/watch?v=vI4LHl4yFuo" title="Youtube Video" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1502082553048-f009c37129b9?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
<a class="elem" href="https://vimeo.com/40291524" title="Vimeo Video" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1442850473887-0fb77cd0b337?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a class="elem" href="https://www.w3schools.com/html/movie.mp4;https://www.w3schools.com/html/movie.ogg" title="HTML Video" data-lcl-txt="lorem ipsum dolor sit amet" data-lcl-author="someone" data-lcl-type="video" data-lcl-poster="https://images.unsplash.com/photo-1431794062232-2a99a5431c6c?dpr=1&auto=format&fit=crop&w=1500&q=80&cs=tinysrgb" data-lcl-thumb="https://images.unsplash.com/photo-1431794062232-2a99a5431c6c?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1431794062232-2a99a5431c6c?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
<a class="elem" href="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d110268.93191923265!2d-74.01465745747427!3d40.69413031028365!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c24fa5d33f083b%3A0xc80b8f06e177fe62!2sNew+York%2C+%C3%89tat+de+New+York%2C+%C3%89tats-Unis!5e0!3m2!1sfr!2sfr!4v1488734776445" data-lcl-w="1000" data-lcl-h="700" data-lcl-outer-cmd="1" data-lcl-pthumb="https://images.unsplash.com/photo-1432405972618-c60b0225b8f9?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1432405972618-c60b0225b8f9?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
<a class="elem" href="#hidden_inline" data-lcl-outer-cmd="1" data-lcl-w="500" data-lcl-h="400" data-lcl-thumb="https://images.unsplash.com/photo-1482192505345-5655af888cc4?dpr=1&auto=format&fit=crop&w=150&q=80&cs=tinysrgb">
|
||||||
|
<span style="background-image: url(https://images.unsplash.com/photo-1482192505345-5655af888cc4?dpr=1&auto=format&fit=crop&w=400&q=80&cs=tinysrgb);"></span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- HIDDEN INLINE CONTENT -->
|
||||||
|
|
||||||
|
<div id="hidden_inline" style="display: none;">
|
||||||
|
|
||||||
|
<div style="padding: 20px;">
|
||||||
|
<h2 style="padding: 0; text-align: center;">Some title</h2>
|
||||||
|
<div> Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
|
||||||
|
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
<div> Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- LIGHTBOX INITIALIZATION -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
|
||||||
|
// live handler
|
||||||
|
lc_lightbox('.elem', {
|
||||||
|
wrap_class : 'lcl_rtl_oc',
|
||||||
|
gallery : true,
|
||||||
|
thumb_attr: 'data-lcl-thumb',
|
||||||
|
|
||||||
|
skin: 'minimal',
|
||||||
|
radius: 0,
|
||||||
|
padding : 0,
|
||||||
|
border_w: 0,
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
<!-- //////////////////////////////////////////////// -->
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
lc-lightbox/img/patterns/oblique_dots.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
lc-lightbox/img/patterns/pattern-1.png
Normal file
|
After Width: | Height: | Size: 931 B |
BIN
lc-lightbox/img/patterns/pattern-dot-1.png
Normal file
|
After Width: | Height: | Size: 215 B |
BIN
lc-lightbox/img/patterns/pattern-dot-2.png
Normal file
|
After Width: | Height: | Size: 125 B |
BIN
lc-lightbox/img/patterns/pattern-dot-b1.png
Normal file
|
After Width: | Height: | Size: 192 B |
BIN
lc-lightbox/img/patterns/pattern-dot-b2.png
Normal file
|
After Width: | Height: | Size: 192 B |
BIN
lc-lightbox/img/patterns/pattern-dot-b3.png
Normal file
|
After Width: | Height: | Size: 186 B |
BIN
lc-lightbox/img/patterns/pattern-dot-b4.png
Normal file
|
After Width: | Height: | Size: 1007 B |
BIN
lc-lightbox/img/patterns/pattern-triangle-05.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
lc-lightbox/img/patterns/pattern-triangle-10.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
lc-lightbox/img/patterns/pattern-triangle-20.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
lc-lightbox/img/patterns/pattern-triangle-30.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
lc-lightbox/img/patterns/pattern-triangle-40.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
lc-lightbox/img/patterns/pattern-ver-line-10.png
Normal file
|
After Width: | Height: | Size: 1000 B |
BIN
lc-lightbox/img/patterns/pattern-ver-line-20.png
Normal file
|
After Width: | Height: | Size: 1000 B |
BIN
lc-lightbox/img/patterns/pattern-ver-line-30.png
Normal file
|
After Width: | Height: | Size: 1000 B |
BIN
lc-lightbox/img/patterns/pattern-ver-line-40.png
Normal file
|
After Width: | Height: | Size: 1000 B |
BIN
lc-lightbox/img/patterns/pattern-ver-line-50.png
Normal file
|
After Width: | Height: | Size: 1000 B |
3621
lc-lightbox/js/lc_lightbox.js
Normal file
13
lc-lightbox/js/lc_lightbox.min.js
vendored
Normal file
21
lc-lightbox/lib/AlloyFinger/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2016 腾讯 AlloyTeam
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
100
lc-lightbox/lib/AlloyFinger/README.md
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# Install
|
||||||
|
|
||||||
|
You can install it via npm:
|
||||||
|
|
||||||
|
```html
|
||||||
|
npm install alloyfinger
|
||||||
|
```
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
|
||||||
|
### Omi Version:
|
||||||
|
|
||||||
|
* [omi-finger](https://github.com/AlloyTeam/omi/tree/master/plugins/omi-finger)
|
||||||
|
|
||||||
|
```js
|
||||||
|
render() {
|
||||||
|
return `
|
||||||
|
<div>
|
||||||
|
<div omi-finger ref="touchArea" onTap="handleTap" onSwipe="handleSwipe" >
|
||||||
|
Tap or Swipe Me!
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pure JS:
|
||||||
|
```js
|
||||||
|
var af = new AlloyFinger(element, {
|
||||||
|
touchStart: function () { },
|
||||||
|
touchMove: function () { },
|
||||||
|
touchEnd: function () { },
|
||||||
|
touchCancel: function () { },
|
||||||
|
multipointStart: function () { },
|
||||||
|
multipointEnd: function () { },
|
||||||
|
tap: function () { },
|
||||||
|
doubleTap: function () { },
|
||||||
|
longTap: function () { },
|
||||||
|
singleTap: function () { },
|
||||||
|
rotate: function (evt) {
|
||||||
|
console.log(evt.angle);
|
||||||
|
},
|
||||||
|
pinch: function (evt) {
|
||||||
|
console.log(evt.scale);
|
||||||
|
},
|
||||||
|
pressMove: function (evt) {
|
||||||
|
console.log(evt.deltaX);
|
||||||
|
console.log(evt.deltaY);
|
||||||
|
},
|
||||||
|
swipe: function (evt) {
|
||||||
|
console.log("swipe" + evt.direction);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this method can also add or remove the event handler
|
||||||
|
*/
|
||||||
|
var onTap = function() {};
|
||||||
|
|
||||||
|
af.on('tap', onTap);
|
||||||
|
af.on('touchStart', function() {});
|
||||||
|
|
||||||
|
af.off('tap', onTap);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this method can destroy the instance
|
||||||
|
*/
|
||||||
|
af = af.destroy();
|
||||||
|
```
|
||||||
|
|
||||||
|
### React Version:
|
||||||
|
|
||||||
|
```js
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<AlloyFinger
|
||||||
|
onTap={this.onTap.bind(this)}
|
||||||
|
onMultipointStart={this.onMultipointStart.bind(this)}
|
||||||
|
onLongTap={this.onLongTap.bind(this)}
|
||||||
|
onSwipe={this.onSwipe.bind(this)}
|
||||||
|
onPinch={this.onPinch.bind(this)}
|
||||||
|
onRotate={this.onRotate.bind(this)}
|
||||||
|
onPressMove={this.onPressMove.bind(this)}
|
||||||
|
onMultipointEnd={this.onMultipointEnd.bind(this)}
|
||||||
|
onDoubleTap={this.onDoubleTap.bind(this)}>
|
||||||
|
<div className="test">the element that you want to bind event</div>
|
||||||
|
</AlloyFinger>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Thanks and Donate
|
||||||
|
|
||||||
|
* [transformjs](http://alloyteam.github.io/AlloyTouch/transformjs/)
|
||||||
|
* [Donate to AlloyFinger](http://alloyteam.github.io/donate.html)
|
||||||
|
|
||||||
|
# License
|
||||||
|
This content is released under the [MIT](http://opensource.org/licenses/MIT) License.
|
||||||
291
lc-lightbox/lib/AlloyFinger/alloy_finger.js
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
/* AlloyFinger v0.1.6
|
||||||
|
* By dntzhang
|
||||||
|
* Github: https://github.com/AlloyTeam/AlloyFinger
|
||||||
|
*/
|
||||||
|
; (function () {
|
||||||
|
function getLen(v) {
|
||||||
|
return Math.sqrt(v.x * v.x + v.y * v.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
function dot(v1, v2) {
|
||||||
|
return v1.x * v2.x + v1.y * v2.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAngle(v1, v2) {
|
||||||
|
var mr = getLen(v1) * getLen(v2);
|
||||||
|
if (mr === 0) return 0;
|
||||||
|
var r = dot(v1, v2) / mr;
|
||||||
|
if (r > 1) r = 1;
|
||||||
|
return Math.acos(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
function cross(v1, v2) {
|
||||||
|
return v1.x * v2.y - v2.x * v1.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRotateAngle(v1, v2) {
|
||||||
|
var angle = getAngle(v1, v2);
|
||||||
|
if (cross(v1, v2) > 0) {
|
||||||
|
angle *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return angle * 180 / Math.PI;
|
||||||
|
}
|
||||||
|
|
||||||
|
var HandlerAdmin = function(el) {
|
||||||
|
this.handlers = [];
|
||||||
|
this.el = el;
|
||||||
|
};
|
||||||
|
|
||||||
|
HandlerAdmin.prototype.add = function(handler) {
|
||||||
|
this.handlers.push(handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
HandlerAdmin.prototype.del = function(handler) {
|
||||||
|
if(!handler) this.handlers = [];
|
||||||
|
|
||||||
|
for(var i=this.handlers.length; i>=0; i--) {
|
||||||
|
if(this.handlers[i] === handler) {
|
||||||
|
this.handlers.splice(i, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HandlerAdmin.prototype.dispatch = function() {
|
||||||
|
for(var i=0,len=this.handlers.length; i<len; i++) {
|
||||||
|
var handler = this.handlers[i];
|
||||||
|
if(typeof handler === 'function') handler.apply(this.el, arguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function wrapFunc(el, handler) {
|
||||||
|
var handlerAdmin = new HandlerAdmin(el);
|
||||||
|
handlerAdmin.add(handler);
|
||||||
|
|
||||||
|
return handlerAdmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
var AlloyFinger = function (el, option) {
|
||||||
|
|
||||||
|
this.element = typeof el == 'string' ? document.querySelector(el) : el;
|
||||||
|
|
||||||
|
this.start = this.start.bind(this);
|
||||||
|
this.move = this.move.bind(this);
|
||||||
|
this.end = this.end.bind(this);
|
||||||
|
this.cancel = this.cancel.bind(this);
|
||||||
|
this.element.addEventListener("touchstart", this.start, false);
|
||||||
|
this.element.addEventListener("touchmove", this.move, false);
|
||||||
|
this.element.addEventListener("touchend", this.end, false);
|
||||||
|
this.element.addEventListener("touchcancel", this.cancel, false);
|
||||||
|
|
||||||
|
this.preV = { x: null, y: null };
|
||||||
|
this.pinchStartLen = null;
|
||||||
|
this.scale = 1;
|
||||||
|
this.isDoubleTap = false;
|
||||||
|
|
||||||
|
var noop = function () { };
|
||||||
|
|
||||||
|
this.rotate = wrapFunc(this.element, option.rotate || noop);
|
||||||
|
this.touchStart = wrapFunc(this.element, option.touchStart || noop);
|
||||||
|
this.multipointStart = wrapFunc(this.element, option.multipointStart || noop);
|
||||||
|
this.multipointEnd = wrapFunc(this.element, option.multipointEnd || noop);
|
||||||
|
this.pinch = wrapFunc(this.element, option.pinch || noop);
|
||||||
|
this.swipe = wrapFunc(this.element, option.swipe || noop);
|
||||||
|
this.tap = wrapFunc(this.element, option.tap || noop);
|
||||||
|
this.doubleTap = wrapFunc(this.element, option.doubleTap || noop);
|
||||||
|
this.longTap = wrapFunc(this.element, option.longTap || noop);
|
||||||
|
this.singleTap = wrapFunc(this.element, option.singleTap || noop);
|
||||||
|
this.pressMove = wrapFunc(this.element, option.pressMove || noop);
|
||||||
|
this.touchMove = wrapFunc(this.element, option.touchMove || noop);
|
||||||
|
this.touchEnd = wrapFunc(this.element, option.touchEnd || noop);
|
||||||
|
this.touchCancel = wrapFunc(this.element, option.touchCancel || noop);
|
||||||
|
|
||||||
|
this.delta = null;
|
||||||
|
this.last = null;
|
||||||
|
this.now = null;
|
||||||
|
this.tapTimeout = null;
|
||||||
|
this.singleTapTimeout = null;
|
||||||
|
this.longTapTimeout = null;
|
||||||
|
this.swipeTimeout = null;
|
||||||
|
this.x1 = this.x2 = this.y1 = this.y2 = null;
|
||||||
|
this.preTapPosition = { x: null, y: null };
|
||||||
|
};
|
||||||
|
|
||||||
|
AlloyFinger.prototype = {
|
||||||
|
start: function (evt) {
|
||||||
|
if (!evt.touches) return;
|
||||||
|
this.now = Date.now();
|
||||||
|
this.x1 = evt.touches[0].pageX;
|
||||||
|
this.y1 = evt.touches[0].pageY;
|
||||||
|
this.delta = this.now - (this.last || this.now);
|
||||||
|
this.touchStart.dispatch(evt);
|
||||||
|
if (this.preTapPosition.x !== null) {
|
||||||
|
this.isDoubleTap = (this.delta > 0 && this.delta <= 250 && Math.abs(this.preTapPosition.x - this.x1) < 30 && Math.abs(this.preTapPosition.y - this.y1) < 30);
|
||||||
|
}
|
||||||
|
this.preTapPosition.x = this.x1;
|
||||||
|
this.preTapPosition.y = this.y1;
|
||||||
|
this.last = this.now;
|
||||||
|
var preV = this.preV,
|
||||||
|
len = evt.touches.length;
|
||||||
|
if (len > 1) {
|
||||||
|
this._cancelLongTap();
|
||||||
|
this._cancelSingleTap();
|
||||||
|
var v = { x: evt.touches[1].pageX - this.x1, y: evt.touches[1].pageY - this.y1 };
|
||||||
|
preV.x = v.x;
|
||||||
|
preV.y = v.y;
|
||||||
|
this.pinchStartLen = getLen(preV);
|
||||||
|
this.multipointStart.dispatch(evt);
|
||||||
|
}
|
||||||
|
this.longTapTimeout = setTimeout(function () {
|
||||||
|
this.longTap.dispatch(evt);
|
||||||
|
}.bind(this), 750);
|
||||||
|
},
|
||||||
|
move: function (evt) {
|
||||||
|
if (!evt.touches) return;
|
||||||
|
var preV = this.preV,
|
||||||
|
len = evt.touches.length,
|
||||||
|
currentX = evt.touches[0].pageX,
|
||||||
|
currentY = evt.touches[0].pageY;
|
||||||
|
this.isDoubleTap = false;
|
||||||
|
if (len > 1) {
|
||||||
|
var v = { x: evt.touches[1].pageX - currentX, y: evt.touches[1].pageY - currentY };
|
||||||
|
|
||||||
|
if (preV.x !== null) {
|
||||||
|
if (this.pinchStartLen > 0) {
|
||||||
|
evt.scale = getLen(v) / this.pinchStartLen;
|
||||||
|
this.pinch.dispatch(evt);
|
||||||
|
}
|
||||||
|
|
||||||
|
evt.angle = getRotateAngle(v, preV);
|
||||||
|
this.rotate.dispatch(evt);
|
||||||
|
}
|
||||||
|
preV.x = v.x;
|
||||||
|
preV.y = v.y;
|
||||||
|
} else {
|
||||||
|
if (this.x2 !== null) {
|
||||||
|
evt.deltaX = currentX - this.x2;
|
||||||
|
evt.deltaY = currentY - this.y2;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
evt.deltaX = 0;
|
||||||
|
evt.deltaY = 0;
|
||||||
|
}
|
||||||
|
this.pressMove.dispatch(evt);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.touchMove.dispatch(evt);
|
||||||
|
|
||||||
|
this._cancelLongTap();
|
||||||
|
this.x2 = currentX;
|
||||||
|
this.y2 = currentY;
|
||||||
|
if (len > 1) {
|
||||||
|
evt.preventDefault();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
end: function (evt) {
|
||||||
|
if (!evt.changedTouches) return;
|
||||||
|
this._cancelLongTap();
|
||||||
|
var self = this;
|
||||||
|
if (evt.touches.length < 2) {
|
||||||
|
this.multipointEnd.dispatch(evt);
|
||||||
|
}
|
||||||
|
this.touchEnd.dispatch(evt);
|
||||||
|
//swipe
|
||||||
|
if ((this.x2 && Math.abs(this.x1 - this.x2) > 30) ||
|
||||||
|
(this.y2 && Math.abs(this.y1 - this.y2) > 30)) {
|
||||||
|
evt.direction = this._swipeDirection(this.x1, this.x2, this.y1, this.y2);
|
||||||
|
this.swipeTimeout = setTimeout(function () {
|
||||||
|
self.swipe.dispatch(evt);
|
||||||
|
|
||||||
|
}, 0)
|
||||||
|
} else {
|
||||||
|
this.tapTimeout = setTimeout(function () {
|
||||||
|
self.tap.dispatch(evt);
|
||||||
|
// trigger double tap immediately
|
||||||
|
if (self.isDoubleTap) {
|
||||||
|
self.doubleTap.dispatch(evt);
|
||||||
|
clearTimeout(self.singleTapTimeout);
|
||||||
|
self.isDoubleTap = false;
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
|
||||||
|
if (!self.isDoubleTap) {
|
||||||
|
self.singleTapTimeout = setTimeout(function () {
|
||||||
|
self.singleTap.dispatch(evt);
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.preV.x = 0;
|
||||||
|
this.preV.y = 0;
|
||||||
|
this.scale = 1;
|
||||||
|
this.pinchStartLen = null;
|
||||||
|
this.x1 = this.x2 = this.y1 = this.y2 = null;
|
||||||
|
},
|
||||||
|
cancel: function (evt) {
|
||||||
|
clearTimeout(this.singleTapTimeout);
|
||||||
|
clearTimeout(this.tapTimeout);
|
||||||
|
clearTimeout(this.longTapTimeout);
|
||||||
|
clearTimeout(this.swipeTimeout);
|
||||||
|
this.touchCancel.dispatch(evt);
|
||||||
|
},
|
||||||
|
_cancelLongTap: function () {
|
||||||
|
clearTimeout(this.longTapTimeout);
|
||||||
|
},
|
||||||
|
_cancelSingleTap: function () {
|
||||||
|
clearTimeout(this.singleTapTimeout);
|
||||||
|
},
|
||||||
|
_swipeDirection: function (x1, x2, y1, y2) {
|
||||||
|
return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down')
|
||||||
|
},
|
||||||
|
|
||||||
|
on: function(evt, handler) {
|
||||||
|
if(this[evt]) {
|
||||||
|
this[evt].add(handler);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
off: function(evt, handler) {
|
||||||
|
if(this[evt]) {
|
||||||
|
this[evt].del(handler);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
if(this.singleTapTimeout) clearTimeout(this.singleTapTimeout);
|
||||||
|
if(this.tapTimeout) clearTimeout(this.tapTimeout);
|
||||||
|
if(this.longTapTimeout) clearTimeout(this.longTapTimeout);
|
||||||
|
if(this.swipeTimeout) clearTimeout(this.swipeTimeout);
|
||||||
|
|
||||||
|
this.element.removeEventListener("touchstart", this.start);
|
||||||
|
this.element.removeEventListener("touchmove", this.move);
|
||||||
|
this.element.removeEventListener("touchend", this.end);
|
||||||
|
this.element.removeEventListener("touchcancel", this.cancel);
|
||||||
|
|
||||||
|
this.rotate.del();
|
||||||
|
this.touchStart.del();
|
||||||
|
this.multipointStart.del();
|
||||||
|
this.multipointEnd.del();
|
||||||
|
this.pinch.del();
|
||||||
|
this.swipe.del();
|
||||||
|
this.tap.del();
|
||||||
|
this.doubleTap.del();
|
||||||
|
this.longTap.del();
|
||||||
|
this.singleTap.del();
|
||||||
|
this.pressMove.del();
|
||||||
|
this.touchMove.del();
|
||||||
|
this.touchEnd.del();
|
||||||
|
this.touchCancel.del();
|
||||||
|
|
||||||
|
this.preV = this.pinchStartLen = this.scale = this.isDoubleTap = this.delta = this.last = this.now = this.tapTimeout = this.singleTapTimeout = this.longTapTimeout = this.swipeTimeout = this.x1 = this.x2 = this.y1 = this.y2 = this.preTapPosition = this.rotate = this.touchStart = this.multipointStart = this.multipointEnd = this.pinch = this.swipe = this.tap = this.doubleTap = this.longTap = this.singleTap = this.pressMove = this.touchMove = this.touchEnd = this.touchCancel = null;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof module !== 'undefined' && typeof exports === 'object') {
|
||||||
|
module.exports = AlloyFinger;
|
||||||
|
} else {
|
||||||
|
window.AlloyFinger = AlloyFinger;
|
||||||
|
}
|
||||||
|
})();
|
||||||
16
lc-lightbox/lib/AlloyFinger/alloy_finger.min.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/* AlloyFinger v0.1.6
|
||||||
|
* By dntzhang
|
||||||
|
* Github: https://github.com/AlloyTeam/AlloyFinger
|
||||||
|
*/
|
||||||
|
(function(){function h(a){return Math.sqrt(a.x*a.x+a.y*a.y)}function d(a,b){var c=new f(a);c.add(b);return c}var f=function(a){this.handlers=[];this.el=a};f.prototype.add=function(a){this.handlers.push(a)};f.prototype.del=function(a){a||(this.handlers=[]);for(var b=this.handlers.length;0<=b;b--)this.handlers[b]===a&&this.handlers.splice(b,1)};f.prototype.dispatch=function(){for(var a=0,b=this.handlers.length;a<b;a++){var c=this.handlers[a];"function"===typeof c&&c.apply(this.el,arguments)}};var k=
|
||||||
|
function(a,b){this.element="string"==typeof a?document.querySelector(a):a;this.start=this.start.bind(this);this.move=this.move.bind(this);this.end=this.end.bind(this);this.cancel=this.cancel.bind(this);this.element.addEventListener("touchstart",this.start,!1);this.element.addEventListener("touchmove",this.move,!1);this.element.addEventListener("touchend",this.end,!1);this.element.addEventListener("touchcancel",this.cancel,!1);this.preV={x:null,y:null};this.pinchStartLen=null;this.scale=1;this.isDoubleTap=
|
||||||
|
!1;var c=function(){};this.rotate=d(this.element,b.rotate||c);this.touchStart=d(this.element,b.touchStart||c);this.multipointStart=d(this.element,b.multipointStart||c);this.multipointEnd=d(this.element,b.multipointEnd||c);this.pinch=d(this.element,b.pinch||c);this.swipe=d(this.element,b.swipe||c);this.tap=d(this.element,b.tap||c);this.doubleTap=d(this.element,b.doubleTap||c);this.longTap=d(this.element,b.longTap||c);this.singleTap=d(this.element,b.singleTap||c);this.pressMove=d(this.element,b.pressMove||
|
||||||
|
c);this.touchMove=d(this.element,b.touchMove||c);this.touchEnd=d(this.element,b.touchEnd||c);this.touchCancel=d(this.element,b.touchCancel||c);this.x1=this.x2=this.y1=this.y2=this.swipeTimeout=this.longTapTimeout=this.singleTapTimeout=this.tapTimeout=this.now=this.last=this.delta=null;this.preTapPosition={x:null,y:null}};k.prototype={start:function(a){if(a.touches){this.now=Date.now();this.x1=a.touches[0].pageX;this.y1=a.touches[0].pageY;this.delta=this.now-(this.last||this.now);this.touchStart.dispatch(a);
|
||||||
|
null!==this.preTapPosition.x&&(this.isDoubleTap=0<this.delta&&250>=this.delta&&30>Math.abs(this.preTapPosition.x-this.x1)&&30>Math.abs(this.preTapPosition.y-this.y1));this.preTapPosition.x=this.x1;this.preTapPosition.y=this.y1;this.last=this.now;var b=this.preV;if(1<a.touches.length){this._cancelLongTap();this._cancelSingleTap();var c=a.touches[1].pageY-this.y1;b.x=a.touches[1].pageX-this.x1;b.y=c;this.pinchStartLen=h(b);this.multipointStart.dispatch(a)}this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(a)}.bind(this),
|
||||||
|
750)}},move:function(a){if(a.touches){var b=this.preV,c=a.touches.length,d=a.touches[0].pageX,f=a.touches[0].pageY;this.isDoubleTap=!1;if(1<c){var g={x:a.touches[1].pageX-d,y:a.touches[1].pageY-f};if(null!==b.x){0<this.pinchStartLen&&(a.scale=h(g)/this.pinchStartLen,this.pinch.dispatch(a));var e;e=h(g)*h(b);0===e?e=0:(e=(g.x*b.x+g.y*b.y)/e,1<e&&(e=1),e=Math.acos(e));0<g.x*b.y-b.x*g.y&&(e*=-1);a.angle=180*e/Math.PI;this.rotate.dispatch(a)}b.x=g.x;b.y=g.y}else null!==this.x2?(a.deltaX=d-this.x2,a.deltaY=
|
||||||
|
f-this.y2):(a.deltaX=0,a.deltaY=0),this.pressMove.dispatch(a);this.touchMove.dispatch(a);this._cancelLongTap();this.x2=d;this.y2=f;1<c&&a.preventDefault()}},end:function(a){if(a.changedTouches){this._cancelLongTap();var b=this;2>a.touches.length&&this.multipointEnd.dispatch(a);this.touchEnd.dispatch(a);this.x2&&30<Math.abs(this.x1-this.x2)||this.y2&&30<Math.abs(this.y1-this.y2)?(a.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout(function(){b.swipe.dispatch(a)},
|
||||||
|
0)):(this.tapTimeout=setTimeout(function(){b.tap.dispatch(a);b.isDoubleTap&&(b.doubleTap.dispatch(a),clearTimeout(b.singleTapTimeout),b.isDoubleTap=!1)},0),b.isDoubleTap||(b.singleTapTimeout=setTimeout(function(){b.singleTap.dispatch(a)},250)));this.preV.x=0;this.preV.y=0;this.scale=1;this.x1=this.x2=this.y1=this.y2=this.pinchStartLen=null}},cancel:function(a){clearTimeout(this.singleTapTimeout);clearTimeout(this.tapTimeout);clearTimeout(this.longTapTimeout);clearTimeout(this.swipeTimeout);this.touchCancel.dispatch(a)},
|
||||||
|
_cancelLongTap:function(){clearTimeout(this.longTapTimeout)},_cancelSingleTap:function(){clearTimeout(this.singleTapTimeout)},_swipeDirection:function(a,b,c,d){return Math.abs(a-b)>=Math.abs(c-d)?0<a-b?"Left":"Right":0<c-d?"Up":"Down"},on:function(a,b){this[a]&&this[a].add(b)},off:function(a,b){this[a]&&this[a].del(b)},destroy:function(){this.singleTapTimeout&&clearTimeout(this.singleTapTimeout);this.tapTimeout&&clearTimeout(this.tapTimeout);this.longTapTimeout&&clearTimeout(this.longTapTimeout);
|
||||||
|
this.swipeTimeout&&clearTimeout(this.swipeTimeout);this.element.removeEventListener("touchstart",this.start);this.element.removeEventListener("touchmove",this.move);this.element.removeEventListener("touchend",this.end);this.element.removeEventListener("touchcancel",this.cancel);this.rotate.del();this.touchStart.del();this.multipointStart.del();this.multipointEnd.del();this.pinch.del();this.swipe.del();this.tap.del();this.doubleTap.del();this.longTap.del();this.singleTap.del();this.pressMove.del();
|
||||||
|
this.touchMove.del();this.touchEnd.del();this.touchCancel.del();return this.preV=this.pinchStartLen=this.scale=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=null}};"undefined"!==
|
||||||
|
typeof module&&"object"===typeof exports?module.exports=k:window.AlloyFinger=k})();
|
||||||
2
lc-lightbox/lib/jquery.js
vendored
Normal file
155
lc-lightbox/skins/dark.css
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
.lcl_dark #lcl_window,
|
||||||
|
.lcl_dark.lcl_txt_under #lcl_txt,
|
||||||
|
.lcl_dark #lcl_nav_cmd .lcl_icon,
|
||||||
|
.lcl_dark #lcl_corner_close,
|
||||||
|
.lcl_dark.lcl_txt_rside:not(.lcl_force_txt_over) #lcl_txt,
|
||||||
|
.lcl_dark.lcl_txt_lside:not(.lcl_force_txt_over) #lcl_txt,
|
||||||
|
.lcl_dark .lcl_tooltip {
|
||||||
|
background-color: #333;
|
||||||
|
}
|
||||||
|
.lcl_dark #lcl_subj {
|
||||||
|
background-color: #404040;
|
||||||
|
}
|
||||||
|
.lcl_dark.lcl_fullscreen_mode #lcl_subj {
|
||||||
|
background-color: #252525;
|
||||||
|
}
|
||||||
|
.lcl_dark #lcl_loader > span {
|
||||||
|
border-color: #999 #999 transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* COMMANDS */
|
||||||
|
.lcl_dark #lcl_nav_cmd .lcl_icon {
|
||||||
|
border-radius: 3px;
|
||||||
|
box-shadow: 0 0 2px rgb(240, 240, 240, 0.15);
|
||||||
|
border: 1px solid #484848;
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_icon:not(.lcl_counter):after {
|
||||||
|
background: #cfcfcf;
|
||||||
|
}
|
||||||
|
.lcl_dark#lcl_wrap:not(.lcl_on_mobile) .lcl_icon:not(.lcl_counter):not(.lcl_zoom_disabled):not(a):hover:before {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_twit:before {
|
||||||
|
background-color: #cfcfcf;
|
||||||
|
}
|
||||||
|
.lcl_dark.lcl_fullscreen_mode[lcl-type=iframe] #lcl_subj {
|
||||||
|
top: 58px;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_close {
|
||||||
|
margin-left: 14px !important;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_zoom_in {
|
||||||
|
margin-right: 14px !important;
|
||||||
|
}
|
||||||
|
@media screen and (min-width:500px) {
|
||||||
|
.lcl_dark .lcl_close {
|
||||||
|
margin-left: 28px !important;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_zoom_in {
|
||||||
|
margin-right: 28px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:500px) {
|
||||||
|
.lcl_dark #lcl_nav_cmd .lcl_icon {
|
||||||
|
margin: 3px 0;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_counter {
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:370px) {
|
||||||
|
.lcl_dark.lcl_outer_cmd #lcl_nav_cmd {
|
||||||
|
padding: 7px 10px;
|
||||||
|
}
|
||||||
|
.lcl_dark #lcl_nav_cmd .lcl_icon {
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* alternative inner close button */
|
||||||
|
.lcl_dark #lcl_corner_close {
|
||||||
|
border: 3px solid #8a8a8a !important;
|
||||||
|
}
|
||||||
|
.lcl_dark #lcl_corner_close:before {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TEXTS */
|
||||||
|
.lcl_dark #lcl_txt * {
|
||||||
|
font-family: Arial, 'sans-serif';
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
.lcl_dark #lcl_title {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
.lcl_dark #lcl_author {
|
||||||
|
color: #bfbfbf;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_txt_border {
|
||||||
|
border-bottom: 1px dashed #888 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* text over */
|
||||||
|
.lcl_dark.lcl_force_txt_over #lcl_txt,
|
||||||
|
.lcl_dark.lcl_txt_over #lcl_txt {
|
||||||
|
background: rgba(33, 33, 33, 0.9);
|
||||||
|
}
|
||||||
|
.lcl_dark.lcl_force_txt_over #lcl_txt:before,
|
||||||
|
.lcl_dark.lcl_txt_over #lcl_txt:before {
|
||||||
|
background: #666;
|
||||||
|
}
|
||||||
|
.lcl_dark.lcl_force_txt_over #lcl_txt:after,
|
||||||
|
.lcl_dark.lcl_txt_over #lcl_txt:after {
|
||||||
|
border-color: #3e3e3e;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* text block shadow */
|
||||||
|
.lcl_dark.lcl_txt_rside:not(.lcl_force_txt_over) #lcl_txt:after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to right, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.lcl_dark.lcl_txt_lside:not(.lcl_force_txt_over) #lcl_txt:after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to left, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
.lcl_dark.lcl_txt_under:not(.lcl_force_txt_over) #lcl_txt::after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%,rgba(0, 0, 0, 0) 100%);
|
||||||
|
height: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* TOOLTIP */
|
||||||
|
.lcl_dark .lcl_tooltip.lcl_tt_bottom:before {
|
||||||
|
border-color: transparent transparent #333;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_tooltip.lcl_tt_top:before {
|
||||||
|
border-color: #333 transparent transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SOCIALS VISIBILITY */
|
||||||
|
.lcl_dark .lcl_socials_tt a {
|
||||||
|
border-color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* THUMBS NAVIGATOR */
|
||||||
|
.lcl_dark #lcl_thumbs_nav span {
|
||||||
|
color: #dfdfdf;
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_tn_mixed_types li::before {
|
||||||
|
background: rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.lcl_dark .lcl_tn_mixed_types li:after {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PROGRESSBAR */
|
||||||
|
.lcl_dark #lcl_progressbar {
|
||||||
|
background: #eee;
|
||||||
|
}
|
||||||
154
lc-lightbox/skins/light.css
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
.lcl_light #lcl_window,
|
||||||
|
.lcl_light.lcl_txt_under #lcl_txt,
|
||||||
|
.lcl_light #lcl_nav_cmd .lcl_icon,
|
||||||
|
.lcl_light #lcl_corner_close,
|
||||||
|
.lcl_light.lcl_txt_rside:not(.lcl_force_txt_over) #lcl_txt,
|
||||||
|
.lcl_light.lcl_txt_lside:not(.lcl_force_txt_over) #lcl_txt,
|
||||||
|
.lcl_light .lcl_tooltip {
|
||||||
|
background-color: #fcfcfc;
|
||||||
|
}
|
||||||
|
.lcl_light #lcl_subj {
|
||||||
|
background-color: #4e4e4e;
|
||||||
|
}
|
||||||
|
.lcl_light #lcl_loader > span {
|
||||||
|
border-color: #aaa #aaa transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* COMMANDS */
|
||||||
|
.lcl_light #lcl_nav_cmd .lcl_icon {
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #fefefe;
|
||||||
|
box-shadow: 0 0 2px rgb(20, 20, 20, 0.05);
|
||||||
|
border: 1px solid #eaeaea;
|
||||||
|
color: #6f6f6f;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_icon:not(.lcl_counter):after {
|
||||||
|
background: #6f6f6f;
|
||||||
|
}
|
||||||
|
.lcl_light#lcl_wrap:not(.lcl_on_mobile) .lcl_icon:not(.lcl_counter):not(.lcl_zoom_disabled):not(a):hover:before {
|
||||||
|
color: #fefefe;
|
||||||
|
}
|
||||||
|
.lcl_light.lcl_fullscreen_mode[lcl-type=iframe] #lcl_subj {
|
||||||
|
top: 58px;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_close {
|
||||||
|
margin-left: 14px !important;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_zoom_in {
|
||||||
|
margin-right: 14px !important;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_twit:before {
|
||||||
|
background-color: #6f6f6f;
|
||||||
|
}
|
||||||
|
@media screen and (min-width:475px) {
|
||||||
|
.lcl_light .lcl_close {
|
||||||
|
margin-left: 28px !important;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_zoom_in {
|
||||||
|
margin-right: 28px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:475px) {
|
||||||
|
.lcl_light #lcl_nav_cmd .lcl_icon {
|
||||||
|
margin: 3px 0;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_counter {
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:370px) {
|
||||||
|
.lcl_light.lcl_outer_cmd #lcl_nav_cmd {
|
||||||
|
padding: 7px 10px;
|
||||||
|
}
|
||||||
|
.lcl_light #lcl_nav_cmd .lcl_icon {
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* alternative inner close button */
|
||||||
|
.lcl_light #lcl_corner_close {
|
||||||
|
border: 3px solid #d0d0d0 !important;
|
||||||
|
}
|
||||||
|
.lcl_light #lcl_corner_close:before {
|
||||||
|
color: #6f6f6f;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TEXTS */
|
||||||
|
.lcl_light #lcl_txt * {
|
||||||
|
font-family: Arial, 'sans-serif';
|
||||||
|
color: #2d2d2d;
|
||||||
|
}
|
||||||
|
.lcl_light #lcl_title {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
.lcl_light #lcl_author {
|
||||||
|
color: #626262;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_txt_border {
|
||||||
|
border-bottom: 1px dashed #d3d3d3 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* text over */
|
||||||
|
.lcl_light.lcl_force_txt_over #lcl_txt,
|
||||||
|
.lcl_light.lcl_txt_over #lcl_txt {
|
||||||
|
background: rgba(253, 253, 253, 0.9);
|
||||||
|
}
|
||||||
|
.lcl_light.lcl_force_txt_over #lcl_txt:before,
|
||||||
|
.lcl_light.lcl_txt_over #lcl_txt:before {
|
||||||
|
background: #c4c4c4;
|
||||||
|
}
|
||||||
|
.lcl_light.lcl_force_txt_over #lcl_txt:after,
|
||||||
|
.lcl_light.lcl_txt_over #lcl_txt:after {
|
||||||
|
border-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* text block shadow */
|
||||||
|
.lcl_light.lcl_txt_rside:not(.lcl_force_txt_over) #lcl_txt:after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to right, rgba(50, 50, 50, 0.25) 0%, rgba(50, 50, 50, 0) 100%);
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.lcl_light.lcl_txt_lside:not(.lcl_force_txt_over) #lcl_txt:after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to left, rgba(50, 50, 50, 0.25) 0%, rgba(50, 50, 50, 0) 100%);
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
.lcl_light.lcl_txt_under:not(.lcl_force_txt_over) #lcl_txt:after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to bottom, rgba(110, 110, 110, 0.25) 0%,rgba(110, 110, 110, 0) 100%);
|
||||||
|
height: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TOOLTIP */
|
||||||
|
.lcl_light .lcl_tooltip.lcl_tt_bottom:before {
|
||||||
|
border-color: transparent transparent #fff;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_tooltip.lcl_tt_top:before {
|
||||||
|
border-color: #fff transparent transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SOCIALS VISIBILITY */
|
||||||
|
.lcl_light .lcl_socials_tt a {
|
||||||
|
border-color: #eaeaea;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* THUMBS NAVIGATOR */
|
||||||
|
.lcl_light #lcl_thumbs_nav span {
|
||||||
|
color: #f5f5f5;
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_tn_mixed_types li::before {
|
||||||
|
background: rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.lcl_light .lcl_tn_mixed_types li:after {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PROGRESSBAR */
|
||||||
|
.lcl_light #lcl_progressbar {
|
||||||
|
background: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
254
lc-lightbox/skins/minimal.css
Normal file
@@ -0,0 +1,254 @@
|
|||||||
|
.lcl_minimal #lcl_window,
|
||||||
|
.lcl_minimal.lcl_txt_under #lcl_txt,
|
||||||
|
.lcl_minimal.lcl_txt_rside:not(.lcl_force_txt_over) #lcl_txt,
|
||||||
|
.lcl_minimal.lcl_txt_lside:not(.lcl_force_txt_over) #lcl_txt {
|
||||||
|
background-color: #3d3d3d;
|
||||||
|
}
|
||||||
|
.lcl_minimal #lcl_subj {
|
||||||
|
background-color: #474747;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_fullscreen_mode #lcl_subj {
|
||||||
|
background-color: #252525;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lcl_minimal #lcl_loader > span {
|
||||||
|
border-color: #999 #999 transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lcl_minimal.lcl_txt_rside:not(.lcl_force_txt_over) #lcl_txt:after,
|
||||||
|
.lcl_minimal.lcl_txt_lside:not(.lcl_force_txt_over) #lcl_txt:after {
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* COMMANDS */
|
||||||
|
.lcl_minimal #lcl_nav_cmd,
|
||||||
|
.lcl_minimal .lcl_outer_cmd #lcl_nav_cmd,
|
||||||
|
.lcl_minimal .lcl_forced_outer_cmd #lcl_nav_cmd {
|
||||||
|
padding: 4px !important;
|
||||||
|
}
|
||||||
|
.lcl_minimal #lcl_nav_cmd:before {
|
||||||
|
content: "";
|
||||||
|
background: rgba(0, 0, 0, 0.4);
|
||||||
|
height: 42px;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_fullscreen_mode[lcl-type=iframe] #lcl_nav_cmd:before {
|
||||||
|
background: #3d3d3d;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_fullscreen_mode[lcl-type=iframe] #lcl_subj {
|
||||||
|
top: 42px;
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_close {
|
||||||
|
margin-left: 14px !important;
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_zoom_in {
|
||||||
|
margin-right: 14px !important;
|
||||||
|
}
|
||||||
|
@media screen and (min-width:450px) {
|
||||||
|
.lcl_minimal .lcl_close {
|
||||||
|
margin-left: 28px !important;
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_zoom_in {
|
||||||
|
margin-right: 28px !important;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_inner_cmd:not(.lcl_on_mobile) #lcl_nav_cmd:before,
|
||||||
|
.lcl_minimal.lcl_fullscreen_mode.lcl_outer_cmd:not(.lcl_on_mobile):not([lcl-type=iframe]):not([lcl-type=html]) #lcl_nav_cmd:before {
|
||||||
|
opacity: 0;
|
||||||
|
|
||||||
|
-webkit-transition: opacity .2s ease-in .5s;
|
||||||
|
transition: opacity .2s ease-in .5s;
|
||||||
|
}
|
||||||
|
.lcl_minimal:not(.lcl_on_mobile) #lcl_window:hover #lcl_nav_cmd:before,
|
||||||
|
.lcl_minimal.lcl_fullscreen_mode.lcl_outer_cmd:not(.lcl_on_mobile):not([lcl-type=iframe]):not([lcl-type=html]):hover #lcl_nav_cmd:before {
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
|
-webkit-transition: all .2s ease-in 0s;
|
||||||
|
transition: all .2s ease-in 0s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.lcl_minimal #lcl_nav_cmd .lcl_icon {
|
||||||
|
color: #fafafa;
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
border: none !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
margin: 3px;
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_twit:before {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
@media screen and (max-width:475px) {
|
||||||
|
.lcl_minimal #lcl_nav_cmd .lcl_icon {
|
||||||
|
margin: 3px 0;
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_counter {
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:400px) {
|
||||||
|
.lcl_minimal #lcl_nav_cmd .lcl_icon {
|
||||||
|
width: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.lcl_minimal #lcl_nav_cmd .lcl_icon:before,
|
||||||
|
.lcl_minimal #lcl_nav_cmd .lcl_icon * {
|
||||||
|
text-shadow: 0 0 2px rgba(0, 0, 0, .6);
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_icon:not(.lcl_counter):after {
|
||||||
|
background: #cfcfcf;
|
||||||
|
}
|
||||||
|
.lcl_minimal#lcl_wrap:not(.lcl_on_mobile) .lcl_icon:not(.lcl_counter):not(a):hover:before {
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
.lcl_minimal:not(.lcl_on_mobile) .lcl_icon:not(.lcl_counter):after,
|
||||||
|
.lcl_minimal:not(.lcl_on_mobile) .lcl_icon:not(.lcl_counter):hover:after {
|
||||||
|
border-radius: 0;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.15) !important;
|
||||||
|
box-shadow: 0 0 0 7px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_nav_btn_middle .lcl_prev:before,
|
||||||
|
.lcl_minimal.lcl_nav_btn_middle .lcl_next:before {
|
||||||
|
font-size: 28px !important;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_nav_btn_middle .lcl_prev:after,
|
||||||
|
.lcl_minimal.lcl_nav_btn_middle .lcl_next:after {
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_nav_btn_middle .lcl_next:after, .lcl_minimal.lcl_nav_btn_middle .lcl_prev:after,
|
||||||
|
.lcl_minimal.lcl_nav_btn_middle:not(.lcl_on_mobile) .lcl_next:hover:after, .lcl_minimal.lcl_nav_btn_middle .lcl_prev:hover:after {
|
||||||
|
background: rgba(0, 0, 0, 0.3) !important;
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_counter {
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* alternative inner close button */
|
||||||
|
.lcl_minimal #lcl_corner_close {
|
||||||
|
background: #303030;
|
||||||
|
border-color: transparent !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
|
||||||
|
-webkit-transform: rotate(45deg);
|
||||||
|
-ms-transform: rotate(45deg);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
.lcl_minimal #lcl_corner_close:before {
|
||||||
|
color: #eee;
|
||||||
|
|
||||||
|
-webkit-transform: rotate(45deg);
|
||||||
|
-ms-transform: rotate(45deg);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
.lcl_minimal:not(.lcl_on_mobile) #lcl_corner_close:hover:before {
|
||||||
|
-webkit-transform: rotate(225deg);
|
||||||
|
-ms-transform: rotate(225deg);
|
||||||
|
transform: rotate(225deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TEXTS */
|
||||||
|
.lcl_minimal #lcl_txt * {
|
||||||
|
font-family: Arial, 'sans-serif';
|
||||||
|
color: #ddd;
|
||||||
|
color: rgba(255, 255, 255, 0.5); /* add */
|
||||||
|
}
|
||||||
|
.lcl_minimal #lcl_title {
|
||||||
|
color: #eee;
|
||||||
|
color: rgba(238, 238, 238, 0.7); /* add */
|
||||||
|
}
|
||||||
|
.lcl_minimal #lcl_author {
|
||||||
|
color: #bfbfbf;
|
||||||
|
color: rgba(191, 191, 191, 0.7); /* add */
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_txt_border {
|
||||||
|
border-bottom: 1px dotted #666 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* text over */
|
||||||
|
.lcl_minimal.lcl_force_txt_over #lcl_txt,
|
||||||
|
.lcl_minimal.lcl_txt_over #lcl_txt {
|
||||||
|
background: rgba(26, 26, 26, 0.2); /* modif */
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_force_txt_over #lcl_txt:before,
|
||||||
|
.lcl_minimal.lcl_txt_over #lcl_txt:before {
|
||||||
|
background: #444;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_force_txt_over #lcl_txt:after,
|
||||||
|
.lcl_minimal.lcl_txt_over #lcl_txt:after {
|
||||||
|
border-color: #3e3e3e;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* text block shadow */
|
||||||
|
.lcl_minimal.lcl_txt_rside:not(.lcl_force_txt_over) #lcl_txt:after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to right, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_txt_lside:not(.lcl_force_txt_over) #lcl_txt:after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to left, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
.lcl_minimal.lcl_txt_under:not(.lcl_force_txt_over) #lcl_txt::after {
|
||||||
|
content: "";
|
||||||
|
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
|
||||||
|
height: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* TOOLTIP */
|
||||||
|
.lcl_minimal .lcl_tooltip {
|
||||||
|
background: rgba(0,0,0, 0.5);
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_tooltip.lcl_tt_bottom:before {
|
||||||
|
border-color: transparent transparent #000;
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_tooltip.lcl_tt_top:before {
|
||||||
|
border-color: #000 transparent transparent;
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SOCIALS VISIBILITY */
|
||||||
|
.lcl_minimal .lcl_socials_tt a {
|
||||||
|
border-color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* THUMBS NAVIGATOR */
|
||||||
|
.lcl_minimal .lcl_tn_inner li {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.lcl_minimal #lcl_thumbs_nav span {
|
||||||
|
color: #dfdfdf;
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_tn_mixed_types li::before {
|
||||||
|
background: rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.lcl_minimal .lcl_tn_mixed_types li:after {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PROGRESSBAR */
|
||||||
|
.lcl_minimal #lcl_progressbar {
|
||||||
|
background: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ADDED */
|
||||||
|
|
||||||
|
.lcl_fullscreen_mode.lcl_force_txt_over #lcl_txt, .lcl_fullscreen_mode.lcl_txt_over #lcl_txt {
|
||||||
|
max-width: 40%;
|
||||||
|
}
|
||||||
27
maps.php
@@ -1,3 +1,9 @@
|
|||||||
|
<?php session_start();
|
||||||
|
include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
@@ -8,9 +14,9 @@
|
|||||||
<title><?php echo gettext("Maps"); ?></title>
|
<title><?php echo gettext("Maps"); ?></title>
|
||||||
<link rel="stylesheet" href="css/sls.css">
|
<link rel="stylesheet" href="css/sls.css">
|
||||||
|
|
||||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
<link rel='stylesheet' href='css/minimal.css' />
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
<style>
|
<style>
|
||||||
#map{
|
#map{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -22,13 +28,8 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<?php include 'functions.php';
|
|
||||||
session_start();
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
?>
|
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBhi566YKgkoys4UAInAeNkU1pkz4JU9I8"></script>
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBhi566YKgkoys4UAInAeNkU1pkz4JU9I8"></script>
|
||||||
<script src='https://code.jquery.com/jquery-3.2.1.min.js'></script>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
||||||
$query4 = "SELECT filename, dateoriginal, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program FROM photos WHERE lat != '' ORDER BY dateoriginal DESC";
|
$query4 = "SELECT filename, filesize, dateoriginal, lens, speed, correctexpo, iso, usercomment, comment, model, metering, flash, focal, program, wb, mode, width, height, html, aperture, software, lat, long, alt, keywords, title, creator, city, department, code, country, copyright, legende FROM photos WHERE lat != '' ORDER BY dateoriginal DESC";
|
||||||
|
|
||||||
$stmt = $conn4->prepare($query4);
|
$stmt = $conn4->prepare($query4);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
@@ -54,6 +55,8 @@
|
|||||||
catch(PDOException $e) {
|
catch(PDOException $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//_pr($result);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
@@ -184,8 +187,8 @@
|
|||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
<script src='js/lc_lightbox.min.js'></script>
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
<script src='js/alloy_finger.min.js'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
256
modify_bdd.php
@@ -1,3 +1,152 @@
|
|||||||
|
<?php require ("3-protect.php");
|
||||||
|
include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
|
||||||
|
$base = 'db_photo.sqlite3';
|
||||||
|
$conn = new PDO("sqlite:$base");
|
||||||
|
$msg = "";
|
||||||
|
|
||||||
|
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
|
//echo "<a href='close.php'> close session </a><br />";
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (!empty($_POST)) {
|
||||||
|
_pr($_POST);
|
||||||
|
}
|
||||||
|
|
||||||
|
Array
|
||||||
|
(
|
||||||
|
[lens] => EF17-40mm f/4L USM
|
||||||
|
[keywords] => _vert_,neige,vigne
|
||||||
|
[titre] => Vignes
|
||||||
|
[creator] => Pesenti Bruno
|
||||||
|
[city] => Fixin
|
||||||
|
[department] => Côte d'Or
|
||||||
|
[code] => FR
|
||||||
|
[country] => France
|
||||||
|
[copyright] => © bruno@clicclac.info
|
||||||
|
[legende] => Vignes dans la neige
|
||||||
|
[id] => 77
|
||||||
|
[update] => update
|
||||||
|
)
|
||||||
|
*/
|
||||||
|
if (isset($_POST['update']) && $_POST['update'] === 'update') {
|
||||||
|
|
||||||
|
$w = filter_var_array($_POST['id'], FILTER_VALIDATE_INT);
|
||||||
|
$z = "";
|
||||||
|
$count = 0;
|
||||||
|
$requests = array();
|
||||||
|
|
||||||
|
foreach ($w as $key => $value) {
|
||||||
|
|
||||||
|
if (isset($_POST['id'][$key]) && (! empty($_POST['id'][$key]))) {
|
||||||
|
|
||||||
|
$id = filter_var($_POST['id'][$key], FILTER_VALIDATE_INT);
|
||||||
|
|
||||||
|
$lens = filter_var($_POST['lens'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$keywords = filter_var($_POST['keywords'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$title = filter_var($_POST['title'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$creator = filter_var($_POST['creator'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$city = filter_var($_POST['city'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$department = filter_var($_POST['department'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$code = filter_var($_POST['code'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$country = filter_var($_POST['country'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$copyright = filter_var($_POST['copyright'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
$legende = filter_var($_POST['legende'][$key], FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
|
|
||||||
|
$z .= "id = '" . $id . "' OR ";
|
||||||
|
|
||||||
|
//echo $id . "----" . $lens. "----" . $keywords. "----" . $title. "----" . $creator. "----" . $city . "<br />";
|
||||||
|
//echo $department . "----" . $code. "----" . $country. "----" . $copyright. "----" . $legende . "<br /><br />";
|
||||||
|
/*
|
||||||
|
echo "id:$id--". "<br />";
|
||||||
|
echo "lens:$lens--". "<br />";
|
||||||
|
echo "keywords:$keywords--". "<br />";
|
||||||
|
echo "title:$title--". "<br />";
|
||||||
|
echo "creator:$creator--". "<br />";
|
||||||
|
echo "city :$city --". "<br />";
|
||||||
|
echo "department:$department--". "<br />";
|
||||||
|
echo "code:$code--". "<br />";
|
||||||
|
echo "country:$country--". "<br />";
|
||||||
|
echo "copyright:$copyright--". "<br />";
|
||||||
|
echo "legende:$legende--". "<br />". "<br />";
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
$id = $_POST['id'];
|
||||||
|
$lens = (isset($_POST['lens']) && (! empty($_POST['lens']))) ? $_POST['lens'] : '';
|
||||||
|
$keywords = (isset($_POST['keywords']) && (! empty($_POST['keywords']))) ? $_POST['keywords'] : '';
|
||||||
|
$title = (isset($_POST['title']) && (! empty($_POST['title']))) ? $_POST['title'] : '';
|
||||||
|
$creator = (isset($_POST['creator']) && (! empty($_POST['creator']))) ? $_POST['creator'] : '';
|
||||||
|
$city = (isset($_POST['city']) && (! empty($_POST['city']))) ? $_POST['city'] : '';
|
||||||
|
$department = (isset($_POST['department']) && (! empty($_POST['department']))) ? $_POST['department'] : '';
|
||||||
|
$code = (isset($_POST['code']) && (! empty($_POST['code']))) ? $_POST['code'] : '';
|
||||||
|
$country = (isset($_POST['country']) && (! empty($_POST['country']))) ? $_POST['country'] : '';
|
||||||
|
$copyright = (isset($_POST['copyright']) && (! empty($_POST['copyright']))) ? $_POST['copyright'] : '';
|
||||||
|
$legende = (isset($_POST['legende']) && (! empty($_POST['legende']))) ? $_POST['legende'] : '';
|
||||||
|
*/
|
||||||
|
|
||||||
|
$req = "UPDATE photos SET lens = :lens , keywords = :keywords , title = :title , creator = :creator ";
|
||||||
|
$req .= ", city = :city , department = :department , code = :code , country = :country ";
|
||||||
|
$req .= ", copyright = :copyright , legende = :legende WHERE id= :id";
|
||||||
|
|
||||||
|
// affichage requetes
|
||||||
|
$keys = array_keys($_POST);
|
||||||
|
$count_id = count($_POST["id"]);
|
||||||
|
|
||||||
|
for ($i = 0; $i < $count_id; $i++) {
|
||||||
|
|
||||||
|
foreach ($keys as $key => $value) {
|
||||||
|
if ($value != "update") {
|
||||||
|
$search = ":" . $value;
|
||||||
|
$replace = "'" . $_POST[$value][$i] . "'";
|
||||||
|
$replacements[$search] = $replace;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$requests[$i] = strtr($req, $replacements);
|
||||||
|
//$requests[$i] = wordwrap(strtr($req, $replacements), 120, "\n", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$stmt = $conn->prepare($req);
|
||||||
|
|
||||||
|
$stmt->bindValue(':id', $id);
|
||||||
|
$stmt->bindValue(':lens', $lens);
|
||||||
|
$stmt->bindValue(':keywords', $keywords);
|
||||||
|
$stmt->bindValue(':title', $title);
|
||||||
|
$stmt->bindValue(':creator', $creator);
|
||||||
|
$stmt->bindValue(':city', $city);
|
||||||
|
$stmt->bindValue(':department', $department);
|
||||||
|
$stmt->bindValue(':code', $code);
|
||||||
|
$stmt->bindValue(':country', $country);
|
||||||
|
$stmt->bindValue(':copyright', $copyright);
|
||||||
|
$stmt->bindValue(':legende', $legende);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
$count = $count + $stmt->rowCount();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$msg = "Updated $count rows with following request:";
|
||||||
|
$conn = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url = "view_bdd.php?message=" . urlencode(gettext("No image select !"));
|
||||||
|
header("location: $url");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
@@ -8,59 +157,92 @@
|
|||||||
<title><?php gettext('View photos in Sqlite base'); ?></title>
|
<title><?php gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/sls.css" />
|
<link rel="stylesheet" href="css/sls.css" />
|
||||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
<link rel='stylesheet' href='css/minimal.css' />
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
<?php include 'functions.php';
|
|
||||||
session_start();
|
|
||||||
if($_SESSION['Active'] == false){ /* Redirects user to login.php if not logged in */
|
|
||||||
header("location:admin/login.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
echo "_SESSION<br>";
|
|
||||||
_pr($_SESSION);
|
|
||||||
//echo $_SESSION['query'];
|
|
||||||
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
|
|
||||||
|
|
||||||
if (!empty($_POST)) {
|
|
||||||
_pr($_POST);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
$_SESSION['query'] = $_POST;
|
|
||||||
echo "post query non vide";
|
|
||||||
echo gettype($_POST);
|
|
||||||
echo gettype($_SESSION['query']);
|
|
||||||
*/
|
|
||||||
#$liste = $_POST;
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1><?php echo gettext('Edit database'); ?></h1>
|
<h1><?php echo gettext('Modify database'); ?></h1>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
echo '<h3 class="greenstyle">' . $msg . '</h3>';
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
echo '<pre class="font10"><code>';
|
||||||
|
foreach ($requests as $request) {
|
||||||
|
echo $request . "<br />";
|
||||||
|
}
|
||||||
|
echo '</code></pre>';
|
||||||
|
|
||||||
echo "<a href='close.php'> close session </a><br />";
|
|
||||||
|
$req = substr($z, 0, -4);
|
||||||
|
$req_edit = "SELECT * FROM photos WHERE " . $req . " ORDER BY id";
|
||||||
|
|
||||||
|
try {
|
||||||
|
$conn = new PDO('sqlite:db_photo.sqlite3');
|
||||||
|
$stmt = $conn->prepare($req_edit);
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
echo '<table class="styled-table">';
|
||||||
|
echo '<thead>';
|
||||||
|
echo '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th>' . gettext('Date') . ' </th><th>' . gettext('Speed') . '</th><th>' . gettext('Iso') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Expo. correct') . '</th>';
|
||||||
|
echo '<th>' . gettext('Model') . '</th><th>' . gettext('Lens') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Program') . '</th><th>' . gettext('Wb') . '</th>';
|
||||||
|
|
||||||
|
echo '<th>' . gettext('Flash') . '</th><th>' . gettext('Software') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Title') . '</th><th>' . gettext('Creator') . '</th><th>' . gettext('City') . '</th><th>' . gettext('Department') . '</th><th>' . gettext('Code') . '</th><th>' . gettext('Country') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Legende') . '</th>';
|
||||||
|
echo '</thead>';
|
||||||
|
echo '<tbody>';
|
||||||
|
|
||||||
|
$nRows = 0;
|
||||||
|
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||||
|
$full = host() . $row['filename'];
|
||||||
|
|
||||||
|
echo '<tr><td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td>';
|
||||||
|
echo '<td>' . $row['filename'] . '</td><td>' . $row['dateoriginal'] . '</td>';
|
||||||
|
echo '<td>' . $row['speed'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['correctexpo'] . '</td>';
|
||||||
|
echo '<td>' . $row['model'] . '</td>';
|
||||||
|
echo '<td><input type="text" id="lens" name="lens" value="' . $row['lens'] . '" size=""></td>';
|
||||||
|
echo '<td>' . $row['focal'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['program'] . '</td><td>' . $row['wb'] . '</td>';
|
||||||
|
echo '<td>' . $row['flash'] . '</td><td>' . $row['software'] . '</td>';
|
||||||
|
echo '<td><input type="text" id="keywords" name="keywords" value="' . $row['keywords'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="title" name="title" value="' . $row['title'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="creator" name="creator" value="' . $row['creator'] . '" size=""></td>';
|
||||||
|
|
||||||
|
echo '<td><input type="text" id="city" name="city" value="' . $row['city'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="department" name="department" value="' . $row['department'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="code" name="code" value="' . $row['code'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="country" name="country" value="' . $row['country'] . '" size=""></td>';
|
||||||
|
|
||||||
|
echo '<td><input type="text" id="copyright" name="copyright" value="' . $row['copyright'] . '" size=""></td>';
|
||||||
|
echo '<td><input type="text" id="legende" name="legende" value="' . $row['legende'] . '" size=""></td></tr>';
|
||||||
|
|
||||||
|
echo '<input type="hidden" id="id" name="id" value="' . $row['id'] . '">';
|
||||||
|
|
||||||
|
$nRows++;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</tbody></table>';
|
||||||
|
|
||||||
|
$conn = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="admin/index.php" title="<?php echo gettext("Admin"); ?>"><?php echo gettext("Admin"); ?></a></p>
|
|
||||||
|
|
||||||
|
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<?php session_start(); ?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
@@ -5,20 +6,21 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php echo gettext("Picture of the month"); ?></title>
|
<title><?php //echo gettext("Picture of the month"); ?></title>
|
||||||
<link rel="stylesheet" href="css/sls.css">
|
<link rel="stylesheet" href="css/sls.css">
|
||||||
|
|
||||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
<link rel='stylesheet' href='css/minimal.css' />
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
|
|
||||||
<?php include 'functions.php';
|
<?php
|
||||||
session_start();
|
include 'localize.php';
|
||||||
$domain = 'sentier';
|
$domain = 'sentier';
|
||||||
localize($domain);
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -32,10 +34,15 @@ else $page = intval($_GET['page']);
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
//$base = $_SERVER['DOCUMENT_ROOT'] . '/db_photo.sqlite3';
|
||||||
|
$base = 'db_photo.sqlite3';
|
||||||
|
|
||||||
|
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $base)) {
|
||||||
try {
|
try {
|
||||||
|
//$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
||||||
$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
||||||
// WHERE id='26'
|
// WHERE id='26'
|
||||||
$query4 = "SELECT filename, dateoriginal, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program FROM photos ORDER BY dateoriginal DESC LIMIT ? OFFSET ?";
|
$query4 = "SELECT filename, filesize, dateoriginal, lens, speed, correctexpo, iso, usercomment, comment, model, metering, flash, focal, program, wb, mode, width, height, html, aperture, software, lat, long, alt, keywords, title, creator, city, department, code, country, copyright, legende FROM photos ORDER BY dateoriginal DESC LIMIT ? OFFSET ?";
|
||||||
//nb d'archive par page
|
//nb d'archive par page
|
||||||
$limit = 13;
|
$limit = 13;
|
||||||
$offset = $limit * ($page -1);
|
$offset = $limit * ($page -1);
|
||||||
@@ -51,6 +58,10 @@ try {
|
|||||||
catch(PDOException $e) {
|
catch(PDOException $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else exit("Database " . $base . " does not exist !");
|
||||||
|
//_pr($result);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p class="month"><?php echo month($result[0]['dateoriginal']); ?></p>
|
<p class="month"><?php echo month($result[0]['dateoriginal']); ?></p>
|
||||||
@@ -58,12 +69,27 @@ try {
|
|||||||
<?php
|
<?php
|
||||||
$lb = data_for_lightbox($result[0]);
|
$lb = data_for_lightbox($result[0]);
|
||||||
|
|
||||||
|
//_pr($lb);
|
||||||
|
/*
|
||||||
|
$lightbox['title_thumb'] = $title_thumb;
|
||||||
|
$lightbox['exif'] = $exif;
|
||||||
|
$lightbox['title'] = $x;
|
||||||
|
$lightbox['legende'] = $y;
|
||||||
|
$lightbox['thumb'] = $thumb;
|
||||||
|
$lightbox['big'] = $big;
|
||||||
|
$lightbox['keywords'] = $keywords;
|
||||||
|
$lightbox['creator'] = $creator;
|
||||||
|
$lightbox['gps'] = $gps;
|
||||||
|
$lightbox['description'] = $description;
|
||||||
|
*/
|
||||||
|
|
||||||
echo '<div class="cadre" id="lcl_month">';
|
echo '<div class="cadre" id="lcl_month">';
|
||||||
echo '<a href ="' . $lb['big'] . '" title="' . $lb['title'] . '" data-lcl-txt="' . $lb['title'] .'" data-lcl-author="' . $lb['exif'] . '">';
|
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) .'" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
||||||
echo '<img src="' . $lb['big'] . '" class="trois" />';
|
echo '<img src="' . $lb['big'] . '" alt="' . htmlspecialchars($lb['title']) . '" class="trois" />';
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
if (!empty($lb['title']) || !empty($lb['legende'])) {
|
if (!empty($lb['title']) || !empty($lb['legende'])) {
|
||||||
?>
|
?>
|
||||||
<p class="titrePhoto"><?php echo $lb['title']; ?></p>
|
<p class="titrePhoto"><?php echo $lb['title']; ?></p>
|
||||||
@@ -117,6 +143,9 @@ try {
|
|||||||
for ($i = 1; $i <= ($rowcount -1); $i++) {
|
for ($i = 1; $i <= ($rowcount -1); $i++) {
|
||||||
$date = $result[$i]['dateoriginal'];
|
$date = $result[$i]['dateoriginal'];
|
||||||
|
|
||||||
|
//_pr($result[$i]);
|
||||||
|
//debug_to_console($result[$i]);
|
||||||
|
|
||||||
$lb = data_for_lightbox($result[$i]);
|
$lb = data_for_lightbox($result[$i]);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -132,7 +161,12 @@ try {
|
|||||||
//
|
//
|
||||||
|
|
||||||
echo '<div class="item">';
|
echo '<div class="item">';
|
||||||
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['title']) .'" data-lcl-author="' . htmlspecialchars($meta) . '">';
|
//echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['title']) .'" data-lcl-author="' . htmlspecialchars($meta) . '">';
|
||||||
|
//echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['exif']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
||||||
|
// '" by="par' .
|
||||||
|
|
||||||
|
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
||||||
|
|
||||||
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '" />';
|
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '" />';
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo '<span class="caption">' . month($date) . '</span>';
|
echo '<span class="caption">' . month($date) . '</span>';
|
||||||
@@ -163,31 +197,48 @@ try {
|
|||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var $obj = lc_lightbox('#lcl_gallery a', {
|
var $obj = lc_lightbox('#lcl_gallery a', {
|
||||||
img_zoom : true,
|
img_zoom : true, // whether to enable zooming system
|
||||||
|
|
||||||
|
author_by_txt : '<?php echo gettext("by"); ?>', // which text is used before the author name, by default is "by"
|
||||||
|
|
||||||
|
slideshow : true, // whether to enable slideshow
|
||||||
open_close_time : 200, // durée de l'animation pour l'ouverture et la fermeture de la lightbox
|
open_close_time : 200, // durée de l'animation pour l'ouverture et la fermeture de la lightbox
|
||||||
ol_time_diff : 100, // animation de superposition avance (à l'ouverture) et retard (à la fermeture) à la fenêtre
|
ol_time_diff : 100, // animation de superposition avance (à l'ouverture) et retard (à la fermeture) à la fenêtre
|
||||||
fading_time : 50, // durée de l'animation de fondu des éléments
|
fading_time : 50, // durée de l'animation de fondu des éléments
|
||||||
slideshow_time : 4000, // durée de l'intervalle du diaporama
|
|
||||||
animation_time : 100,
|
animation_time : 100,
|
||||||
|
slideshow_time : 4000, // durée de l'intervalle du diaporama
|
||||||
|
autoplay : false, // autoplay slideshow - bool
|
||||||
counter : false, // s'il faut afficher le compteur d'éléments
|
counter : false, // s'il faut afficher le compteur d'éléments
|
||||||
progressbar : false, // s'il faut afficher une barre de progression lors de l'exécution du diaporama
|
progressbar : false, // s'il faut afficher une barre de progression lors de l'exécution du diaporama
|
||||||
|
|
||||||
max_width : '95%', // largeur maximale de la lightbox
|
max_width : '95%', // largeur maximale de la lightbox
|
||||||
max_height : '95%', // hauteur maximale de la lightbox
|
max_height : '95%', // hauteur maximale de la lightbox
|
||||||
|
ol_opacity : 0.7, // overlay opacity / value between 0 and 1
|
||||||
|
ol_color : '#111', // background color of the overlay
|
||||||
|
ol_pattern : false, // overlay patterns - insert the pattern name or false
|
||||||
|
|
||||||
wrap_class : 'lcl_fade_oc', // Classes personnalisées ajoutées au wrapper: effet à l'ouverture de la lb (lcl_fade_oc | lcl_zoomin_oc | lcl_rtl_oc)
|
wrap_class : 'lcl_fade_oc', // Classes personnalisées ajoutées au wrapper: effet à l'ouverture de la lb (lcl_fade_oc | lcl_zoomin_oc | lcl_rtl_oc)
|
||||||
skin : 'minimal', // minimal | light | dark
|
skin : 'minimal', // minimal | light | dark
|
||||||
data_position : 'over', // Spécifie où les données des éléments seront affichées. Les modes disponibles sont :over, under|rside|lside
|
data_position : 'over', // Spécifie où les données des éléments seront affichées. Les modes disponibles sont :over, under|rside|lside
|
||||||
cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer
|
cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer
|
||||||
|
ins_close_pos : 'normal', // set closing button position for inner commands - normal/corner
|
||||||
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
|
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
|
||||||
|
|
||||||
|
txt_hidden : true, // whether to hide texts on lightbox opening - bool or int (related to browser's smaller side)
|
||||||
shox_title : true, // s'il faut afficher les titres
|
shox_title : true, // s'il faut afficher les titres
|
||||||
show_descr : false, // s'il faut afficher les descriptions
|
show_descr : true, // s'il faut afficher les descriptions
|
||||||
show_author : true, // s'il faut afficher les auteurs
|
show_author : true, // s'il faut afficher les auteurs
|
||||||
|
|
||||||
thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images)
|
thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images)
|
||||||
|
|
||||||
fullscreen : true, // Autoriser ou non le mode plein écran
|
fullscreen : true, // Autoriser ou non le mode plein écran
|
||||||
fs_img_behavior : 'smart', //Comportement de l'image en plein écran : fit|fill|smart
|
fs_img_behavior : 'smart', //Comportement de l'image en plein écran : fit|fill|smart
|
||||||
fs_only : 500, // s'il faut utiliser uniquement l'ouverture de la lightbox en mode plein écran (utile pour les appareils mobiles) : false | (integer)
|
fs_only : 500, // s'il faut utiliser uniquement l'ouverture de la lightbox en mode plein écran (utile pour les appareils mobiles) : false | (integer)
|
||||||
browser_fs_mode : true, // utiliser ou non le mode plein écran du navigateur
|
browser_fs_mode : true, // utiliser ou non le mode plein écran du navigateur
|
||||||
|
|
||||||
txt_toggle_cmd : true, // s'il faut afficher le bouton de basculement du texte de l'élément
|
txt_toggle_cmd : true, // s'il faut afficher le bouton de basculement du texte de l'élément
|
||||||
download : true, // whether to show element's file download button
|
download : true, // whether to show element's file download button
|
||||||
|
autoplay_videos : false, // bool / whether to autoplay videos (NB: modern browsers ignore this for deeplinked elements. Not applied if video has poster)
|
||||||
touchswipe : true, // permet les interactions tactiles (nécessite AlloyFinger)
|
touchswipe : true, // permet les interactions tactiles (nécessite AlloyFinger)
|
||||||
rclick_prevent : true, // s'il faut éviter le clic droit sur les éléments de la lightbox
|
rclick_prevent : true, // s'il faut éviter le clic droit sur les éléments de la lightbox
|
||||||
});
|
});
|
||||||
@@ -271,8 +322,8 @@ echo '</div>';
|
|||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
67
query_bdd.php
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
require ("3-protect.php");
|
||||||
|
include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
|
||||||
|
if (isset($_SERVER['HTTP_REFERER'])){
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$filename = $_GET['filename'];
|
||||||
|
$dateoriginal = $_GET['dateoriginal'];
|
||||||
|
$speed = $_GET['speed'];
|
||||||
|
$iso = $_GET['iso'];
|
||||||
|
$aperture = $_GET['aperture'];
|
||||||
|
$correctexpo = $_GET['correctexpo'];
|
||||||
|
$model = $_GET['model'];
|
||||||
|
$lens = $_GET['lens'];
|
||||||
|
$focal = $_GET['focal'];
|
||||||
|
$metering = $_GET['metering'];
|
||||||
|
$program = $_GET['program'];
|
||||||
|
$wb = $_GET['wb'];
|
||||||
|
$software = $_GET['software'];
|
||||||
|
$column = $_GET['column'];
|
||||||
|
$order = $_GET['order'];
|
||||||
|
class MyDB extends SQLite3 {
|
||||||
|
function __construct() {
|
||||||
|
$this->open('db_photo.sqlite3');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$db = new MyDB();
|
||||||
|
if(!$db){
|
||||||
|
echo $db->lastErrorMsg();
|
||||||
|
} else {
|
||||||
|
$ret = $db->query("SELECT * FROM photos WHERE id LIKE '$id%' AND filename LIKE '%$filename%' AND dateoriginal LIKE '%$dateoriginal%' AND speed LIKE '$speed%' AND iso LIKE '$iso%' AND aperture LIKE '$aperture%' AND correctexpo LIKE '$correctexpo%' AND model LIKE '%$model%' AND lens LIKE '%$lens%' AND focal LIKE '%$focal%' AND metering LIKE '%$metering%' AND program LIKE '%$program%' AND wb LIKE '%$wb%' AND software LIKE '%$software%' ORDER BY $column $order");
|
||||||
|
while($row = $ret->fetchArray(SQLITE3_ASSOC) ){
|
||||||
|
|
||||||
|
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||||
|
$full = host() . $row['filename'];
|
||||||
|
$lb = data_for_lightbox($row);
|
||||||
|
|
||||||
|
echo "<tr>";
|
||||||
|
echo (isset($_SESSION["user"])) ? '<td>' . '<input type="checkbox" id="edit" name="coche[]" value="' . $row['id'] . '" >' . '</td>' : '';
|
||||||
|
echo "<td class='priority-1 center'>".$row['id']."</td>";
|
||||||
|
echo "<td class='priority-1'>" . "<a href='" . $full . "' title='" . htmlspecialchars($lb['title']) . "' data-lcl-txt='" . htmlspecialchars($lb['description']) . "' data-lcl-author='" . htmlspecialchars($lb['creator']) . "' /><img src='" . $thumbnail . "' alt='" . htmlspecialchars($lb['title']) . "' /></a></td>";
|
||||||
|
echo "<td class='priority-2'>".$row['filename']."</td>";
|
||||||
|
echo "<td class='priority-8'>".$row['dateoriginal']."</td>";
|
||||||
|
echo "<td class='priority-3'>".$row['speed']."</td>";
|
||||||
|
echo "<td class='priority-4'>".$row['iso']."</td>";
|
||||||
|
echo "<td class='priority-5'>".$row['aperture']."</td>";
|
||||||
|
echo "<td class='priority-6'>".$row['correctexpo']."</td>";
|
||||||
|
echo "<td class='priority-7'>".$row['model']."</td>";
|
||||||
|
echo "<td class='priority-8'>".$row['lens']."</td>";
|
||||||
|
echo "<td class='priority-8'>".$row['focal']."</td>";
|
||||||
|
echo "<td class='priority-12'>".$row['metering']."</td>";
|
||||||
|
echo "<td class='priority-13'>".$row['program']."</td>";
|
||||||
|
echo "<td class='priority-14'>".$row['wb']."</td>";
|
||||||
|
|
||||||
|
echo "<td class='priority-14'>".$row['software']."</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$db->close();
|
||||||
|
}else{
|
||||||
|
header('Location: view_bdd.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
95
requests.php
@@ -1,3 +1,9 @@
|
|||||||
|
<?php //require ("3-protect.php");
|
||||||
|
|
||||||
|
include 'functions.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
@@ -5,28 +11,16 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php gettext('View photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/sls.css" />
|
<link rel="stylesheet" href="css/sls.css" />
|
||||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
<link rel='stylesheet' href='css/minimal.css' />
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
<?php include 'functions.php';
|
|
||||||
session_start();
|
|
||||||
if($_SESSION['Active'] == false){ /* Redirects user to login.php if not logged in */
|
|
||||||
header("location:admin/login.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -37,6 +31,49 @@
|
|||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$base = 'db_photo.sqlite3';
|
||||||
|
|
||||||
|
_pr($_POST);
|
||||||
|
/*
|
||||||
|
(
|
||||||
|
[model] => Canon EOS 7D
|
||||||
|
)
|
||||||
|
*/
|
||||||
|
//if ((isset($_POST)) and (! empty($_POST))) {
|
||||||
|
if (! empty($_POST)){
|
||||||
|
echo "info dispo";
|
||||||
|
$key = key($_POST);
|
||||||
|
$val = $_POST["$key"];
|
||||||
|
$_POST = array();
|
||||||
|
|
||||||
|
$page = 1;
|
||||||
|
|
||||||
|
//echo $key . " - " . $val;
|
||||||
|
$req = "SELECT * FROM photos WHERE " . $key . " = '" . $val . "'";
|
||||||
|
echo $req;
|
||||||
|
|
||||||
|
$conn2 = new PDO("sqlite:db_photo.sqlite3");
|
||||||
|
$conn2->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
|
$limit = 13;
|
||||||
|
$offset = $limit * ($page -1);
|
||||||
|
|
||||||
|
$stmt = $conn2->prepare($req);
|
||||||
|
//$stmt->execute(array($limit, $offset));
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
$rowcount = count($result);
|
||||||
|
echo $rowcount;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "non dispo";
|
||||||
|
}
|
||||||
|
|
||||||
|
_pr($_POST);
|
||||||
|
|
||||||
|
echo '<a href="requests.php">requests</a>';
|
||||||
|
|
||||||
|
|
||||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
@@ -124,12 +161,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="myForm">
|
<div class="myForm">
|
||||||
<form id="keywordSelect" name="keywordSelect" action="index.php" method="get" >
|
<form id="keywordSelect" name="keywordSelect" action="requests.php" method="post" >
|
||||||
<select name="keyword" id="keyword" class="classic">
|
<select name="keyword" id="keyword" class="classic">
|
||||||
<option value=""><?php echo gettext('keywords'); ?></option>
|
<option value=""><?php echo gettext('keywords'); ?></option>
|
||||||
<?php
|
<?php
|
||||||
for( $i = 0; $i < count($select[4]); $i++) {
|
for( $i = 0; $i < count($select[4]); $i++) {
|
||||||
echo '<option value="">' . $select[4]["$i"] . '</option>';
|
echo '<option value="' . $select[4]["$i"] . '">' . $select[4]["$i"] . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@@ -138,12 +175,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="myForm">
|
<div class="myForm">
|
||||||
<form name="modelSelect" action="index.php" method="get" >
|
<form name="modelSelect" action="requests.php" method="post" >
|
||||||
<select name="model" id="model" class="classic">
|
<select name="model" id="model" class="classic">
|
||||||
<option value=""><?php echo gettext('model'); ?></option>
|
<option value=""><?php echo gettext('model'); ?></option>
|
||||||
<?php
|
<?php
|
||||||
for( $i = 0; $i < count($select[1]); $i++) {
|
for( $i = 0; $i < count($select[1]); $i++) {
|
||||||
echo '<option value="">' . $select[1]["$i"] . '</option>';
|
echo '<option value="' . $select[1]["$i"] . '">' . $select[1]["$i"] . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@@ -151,12 +188,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="myForm">
|
<div class="myForm">
|
||||||
<form name="lensSelect" action="index.php" method="get" >
|
<form name="lensSelect" action="requests.php" method="post" >
|
||||||
<select name="lens" id="lens" class="classic">
|
<select name="lens" id="lens" class="classic">
|
||||||
<option value=""><?php echo gettext('lens'); ?></option>
|
<option value=""><?php echo gettext('lens'); ?></option>
|
||||||
<?php
|
<?php
|
||||||
for( $i = 0; $i < count($select[0]); $i++) {
|
for( $i = 0; $i < count($select[0]); $i++) {
|
||||||
echo '<option value="">' . $select[0]["$i"] . '</option>';
|
echo '<option value="' . $select[0]["$i"] . '">' . $select[0]["$i"] . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@@ -164,12 +201,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="myForm">
|
<div class="myForm">
|
||||||
<form name="isoSelect" action="index.php" method="get" >
|
<form name="isoSelect" action="requests.php" method="post" >
|
||||||
<select name="iso" id="iso" class="classic">
|
<select name="iso" id="iso" class="classic">
|
||||||
<option value=""><?php echo gettext('iso'); ?></option>
|
<option value=""><?php echo gettext('iso'); ?></option>
|
||||||
<?php
|
<?php
|
||||||
for( $i = 0; $i < count($select[2]); $i++) {
|
for( $i = 0; $i < count($select[2]); $i++) {
|
||||||
echo '<option value="">' . $select[2]["$i"] . '</option>';
|
echo '<option value="' . $select[2]["$i"] . '">' . $select[2]["$i"] . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@@ -177,12 +214,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="myForm">
|
<div class="myForm">
|
||||||
<form name="speedSelect" action="index.php" method="get" >
|
<form name="speedSelect" action="requests.php" method="get" >
|
||||||
<select name="speed" id="speed" class="classic">
|
<select name="speed" id="speed" class="classic">
|
||||||
<option value=""><?php echo gettext('speed'); ?></option>
|
<option value=""><?php echo gettext('speed'); ?></option>
|
||||||
<?php
|
<?php
|
||||||
for( $i = 0; $i < count($select[3]); $i++) {
|
for( $i = 0; $i < count($select[3]); $i++) {
|
||||||
echo '<option value="">' . $select[3]["$i"] . '</option>';
|
echo '<option value="' . $select[3]["$i"] . '">' . $select[3]["$i"] . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@@ -190,12 +227,12 @@ https://www.csscodelab.com/pure-css-custom-select-box-dropdown-styling/
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="admin/index.php" title="<?php echo gettext("Admin"); ?>"><?php echo gettext("Admin"); ?></a></p>
|
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
496
view_bdd.php
@@ -1,313 +1,174 @@
|
|||||||
|
<?php require ("3-protect.php");
|
||||||
|
include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
|
||||||
|
$base = 'db_photo.sqlite3';
|
||||||
|
$conn = new PDO("sqlite:$base");
|
||||||
|
$msg = "";
|
||||||
|
|
||||||
|
if(!empty($_GET['message'])) {
|
||||||
|
$msg = "<h3 class='redstyle'>" . $_GET['message'] . "</h3>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_SESSION["user"])) {
|
||||||
|
if ((isset($_POST["suppress"])) && ($_POST["suppress"] == "suppress")) {
|
||||||
|
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
||||||
|
$rr = "";
|
||||||
|
foreach($_POST['coche'] as $key => $value) {
|
||||||
|
$r = "id = " . $value . " OR ";
|
||||||
|
$rr .= $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
$req_delete = substr($rr, 0, strlen($rr)-4);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$req = "DELETE FROM Photos WHERE (" . $req_delete . ")";
|
||||||
|
$stmt = $conn->prepare($req);
|
||||||
|
$stmt->execute();
|
||||||
|
$nb = $stmt->rowCount();
|
||||||
|
}
|
||||||
|
catch(PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$msg = (($nb > 0) ? "<h3 class='greenstyle'>" . $nb . gettext(' photos successfully deleted !') . "</h3>" : "");
|
||||||
|
$request_delete = $req;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$msg = "<h3 class='redstyle'>" . gettext('Empty request !') . "</h3>" ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title><?php gettext('View photos in Sqlite base'); ?></title>
|
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/sls.css" />
|
<link rel="stylesheet" href="css/sls.css" />
|
||||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
<link rel='stylesheet' href='css/minimal.css' />
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
<?php include 'functions.php';
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
session_start();
|
|
||||||
if($_SESSION['Active'] == false){ /* Redirects user to login.php if not logged in */
|
<style>
|
||||||
header("location:admin/login.php");
|
input {width: 100%; padding: 5px 5px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;}
|
||||||
exit;
|
/* #Headings th:hover {background: rgb(255, 255, 255); color: black;}
|
||||||
|
#Headings th:hover {background-color: rgb(0, 152, 121); color: white;}*/
|
||||||
|
#details {font-family: Arial, Helvetica, sans-serif; font-size: 12px; border-collapse: collapse; width: 100%; background-color: #fff;}
|
||||||
|
#details td, th {border: 1px solid #fff; padding: 8px;}
|
||||||
|
#details tr:nth-child(even){background-color: #f2f2f2;}
|
||||||
|
#Table tr:hover {background-color: rgb(221, 221, 221); font-weight: bold;}
|
||||||
|
#Headings th {padding-top: 12px; padding-bottom: 12px; background-color: rgb(0, 152, 121); color: white; cursor: pointer;}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
function showUser(column) {
|
||||||
|
//if (column == "") {column = "ID"}
|
||||||
|
if (column == "") {column = "DateOriginal"} // tri par défaut
|
||||||
|
order = document.getElementById(column).getAttribute("class");
|
||||||
|
id = document.getElementById("filter_id").value;
|
||||||
|
filename = document.getElementById("filter_filename").value;
|
||||||
|
dateoriginal = document.getElementById("filter_dateoriginal").value;
|
||||||
|
speed = document.getElementById("filter_speed").value;
|
||||||
|
iso = document.getElementById("filter_iso").value;
|
||||||
|
aperture = document.getElementById("filter_aperture").value;
|
||||||
|
correctexpo = document.getElementById("filter_correctexpo").value;
|
||||||
|
model = document.getElementById("filter_model").value;
|
||||||
|
lens = document.getElementById("filter_lens").value;
|
||||||
|
focal = document.getElementById("filter_focal").value;
|
||||||
|
metering = document.getElementById("filter_metering").value;
|
||||||
|
program = document.getElementById("filter_program").value;
|
||||||
|
wb = document.getElementById("filter_wb").value;
|
||||||
|
software = document.getElementById("filter_software").value;
|
||||||
|
var xmlhttp = new XMLHttpRequest();
|
||||||
|
xmlhttp.onreadystatechange = function() {
|
||||||
|
if (this.readyState == 4 && this.status == 200) {
|
||||||
|
document.getElementById("Table").innerHTML = this.responseText;
|
||||||
}
|
}
|
||||||
echo "_SESSION<br>";
|
};
|
||||||
_pr($_SESSION);
|
|
||||||
//echo $_SESSION['query'];
|
|
||||||
|
|
||||||
$domain = 'sentier';
|
|
||||||
localize($domain);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
|
xmlhttp.open("GET","query_bdd.php?id=" + id + "&filename=" + filename + "&dateoriginal=" + dateoriginal + "&speed=" + speed + "&iso=" + iso + "&aperture=" + aperture + "&correctexpo=" + correctexpo + "&model=" + model + "&lens=" + lens + "&focal=" + focal + "&metering=" + metering + "&program=" + program + "&wb=" + wb + "&software=" + software + "&column=" + column + "&order=" + order, true);
|
||||||
|
xmlhttp.send();
|
||||||
|
if (order == "ASC") {document.getElementById(column).setAttribute("class", "DESC");} else {document.getElementById(column).setAttribute("class", "ASC");}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body onload="showUser('')">
|
||||||
|
|
||||||
<h1><?php echo gettext('View database'); ?></h1>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
echo '<h1>' . gettext('View database') . ': ' . $base . '</h1><br />';
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
echo $msg;
|
||||||
$perpage = 20;
|
|
||||||
|
|
||||||
echo "<a href='close.php'> close session </a>";
|
|
||||||
|
|
||||||
if (!isset($_GET['page'])) $page = 1;
|
|
||||||
else $page = intval($_GET['page']);
|
|
||||||
|
|
||||||
echo "_POST<br>";
|
|
||||||
_pr($_POST);
|
|
||||||
if (!empty($_POST)) {
|
|
||||||
$_SESSION['query'] = $_POST;
|
|
||||||
echo "post query non vide";
|
|
||||||
echo gettype($_POST);
|
|
||||||
echo gettype($_SESSION['query']);
|
|
||||||
}
|
|
||||||
echo "_SESSION['query']<br>";
|
|
||||||
_pr($_SESSION['query']);
|
|
||||||
$gps = (isset($_SESSION['query']['gps'])) ? $_SESSION['query']['gps'] : "off";
|
|
||||||
echo $gps;
|
|
||||||
// form option <selected>
|
|
||||||
|
|
||||||
$dir = (new AdvancedFilesystemIterator('photos/img/'))->match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP$/');
|
|
||||||
|
|
||||||
echo '<h3>' . count($dir) . gettext(' images found in folder') . ' <i>photos/img/</i> ...</h3>';
|
|
||||||
|
|
||||||
$conn = new PDO("sqlite:db_photo.sqlite3");
|
|
||||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
||||||
|
|
||||||
|
|
||||||
// Construction des requêtes
|
|
||||||
# SELECT * FROM photos WHERE dateoriginal LIKe '2021%'
|
|
||||||
# SELECT * FROM photos WHERE strftime('%Y', dateoriginal) = '2021' ORDER BY dateoriginal
|
|
||||||
# SELECT * FROM photos WHERE strftime('%Y', dateoriginal) = '2015' ORDER BY dateoriginal
|
|
||||||
|
|
||||||
# SELECT DISTINCT strftime('%Y', dateoriginal) FROM photos WHERE dateoriginal <> "" ORDER BY dateoriginal
|
|
||||||
|
|
||||||
$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'
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
$req = 'SELECT DISTINCT strftime("%Y", dateoriginal) FROM photos WHERE dateoriginal <> "" ORDER BY dateoriginal';
|
|
||||||
$query = $conn->query($req);
|
|
||||||
$res = $query->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
preprint($res);
|
|
||||||
$res = array_column($res,'strftime("%Y", dateoriginal)');
|
|
||||||
preprint($res);
|
|
||||||
*/
|
|
||||||
|
|
||||||
$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++;
|
|
||||||
}
|
|
||||||
|
|
||||||
//preprint($select);
|
|
||||||
|
|
||||||
// Affichage des photos
|
|
||||||
|
|
||||||
try {
|
|
||||||
$columns = array('dateoriginal','lens','model','iso','lat');
|
|
||||||
$column = isset($_GET['column']) && in_array($_GET['column'], $columns) ? $_GET['column'] : $columns[0];
|
|
||||||
$sort_order = isset($_GET['order']) && strtolower($_GET['order']) == 'desc' ? 'DESC' : 'ASC';
|
|
||||||
|
|
||||||
// SELECT id,filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program
|
|
||||||
/*
|
|
||||||
if (isset($_POST['lens'])) $req = "WHERE lens = '" . $_POST['lens'] . "' ";
|
|
||||||
elseif (isset($_POST['model'])) $req = "WHERE model = '" . $_POST['model'] . "' ";
|
|
||||||
elseif (isset($_POST['iso'])) $req = "WHERE iso = '" . $_POST['iso'] . "' ";
|
|
||||||
elseif (isset($_POST['speed'])) $req = "WHERE speed = '" . $_POST['speed'] . "' ";
|
|
||||||
elseif (isset($_POST['keyword'])) $req = "WHERE keywords LIKE '%" . str_replace("'","''", $_POST['keyword']) . "%' ";
|
|
||||||
else $req = "";
|
|
||||||
*/
|
|
||||||
$req1 = "";
|
|
||||||
$req2 = "";
|
|
||||||
$req3 = "";
|
|
||||||
$req4 = "";
|
|
||||||
$req5 = "";
|
|
||||||
$req6 = "";
|
|
||||||
$req7 = "";
|
|
||||||
if (!empty($_SESSION['query']['lens'])) $req1 = "lens = '" . $_SESSION['query']['lens'] . "'";
|
|
||||||
if (!empty($_SESSION['query']['model'])) $req2 = "model = '" . $_SESSION['query']['model'] . "'";
|
|
||||||
if (!empty($_SESSION['query']['iso'])) $req3 = "iso = '" . $_SESSION['query']['iso'] . "'";
|
|
||||||
if (!empty($_SESSION['query']['speed'])) $req4 = "speed = '" . $_SESSION['query']['speed'] . "'";
|
|
||||||
if (!empty($_SESSION['query']['keyword'])) $req5 = "keywords LIKE '%" . str_replace("'","''", $_SESSION['query']['keyword']) . "%'";
|
|
||||||
if (!empty($_SESSION['query']['all']) && ($_SESSION['query']['all'] == "all")) $req = "";
|
|
||||||
if (isset($_SESSION['query']['operator'])) $operator = " " . $_SESSION['query']['operator'] . " ";
|
|
||||||
if (!empty($_SESSION['query']['gps'])) $req6 = "lat != '' AND long != ''";
|
|
||||||
if (!empty($_SESSION['query']['date'])) $req7 = "strftime('%Y', dateoriginal) = '" . $_SESSION['query']['date'] . "'";
|
|
||||||
|
|
||||||
if (($req1 != "") || ($req2 != "") || ($req3 != "") || ($req4 != "") || ($req5 != "")) {
|
|
||||||
$req = "WHERE " . ($req1 != "" ? $req1 . $operator : "") . ($req2 != "" ? $req2 . $operator : "") . ($req3 != "" ? $req3 . $operator : "") . ($req4 != "" ? $req4 . $operator : "") . ($req5 != "" ? $req5 . $operator : "");
|
|
||||||
$req = substr_replace($req, " ", (strlen($req) - strlen($operator)), strlen($operator));
|
|
||||||
}
|
|
||||||
// add
|
|
||||||
elseif ($req6 != "") {
|
|
||||||
$req = "WHERE " . $req6 . " ";
|
|
||||||
}
|
|
||||||
elseif ($req7 != "") {
|
|
||||||
$req = "WHERE " . $req7 . " ";
|
|
||||||
}
|
|
||||||
//
|
|
||||||
else $req = "";
|
|
||||||
|
|
||||||
//echo '<pre><code>' . $req . '</code></pre>';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$query = "SELECT * FROM photos " . $req . "ORDER BY " . $column . " " . $sort_order . " " . "LIMIT ? OFFSET ?";
|
|
||||||
|
|
||||||
echo '<pre><code>' . $query . '</code></pre>';
|
|
||||||
|
|
||||||
$offset = $perpage * ($page -1);
|
|
||||||
|
|
||||||
$stmt = $conn->prepare($query);
|
|
||||||
$stmt->execute(array($perpage, $offset)); // (1,3...) 1=1ere valeur 3=valeur
|
|
||||||
// id 1 -> 3
|
|
||||||
//$stmt->execute(array(1, 3)); // WHERE id >= ? AND id <= ? ORDER BY date DESC";
|
|
||||||
|
|
||||||
//$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
//$count = $rows['count(*)'];
|
|
||||||
//echo count($result);
|
|
||||||
//_pr($rows);
|
|
||||||
|
|
||||||
$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"';
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form id="keywordSelect" name="keywordSelect" action="view_bdd.php" method="post" class="myForm" >
|
|
||||||
<fieldset>
|
|
||||||
<legend>APN</legend>
|
|
||||||
|
|
||||||
|
|
||||||
<select name="keyword" id="keyword" class="classic">
|
|
||||||
<option value=""><?php echo gettext('keywords'); ?></option>
|
|
||||||
<?php
|
<?php
|
||||||
for( $i = 0; $i < count($select[4]); $i++) {
|
if (isset($_SESSION["user"])) {
|
||||||
echo '<option>' . $select[4]["$i"] . '</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
<select name="model" id="model" class="classic">
|
|
||||||
<option value=""><?php echo gettext('model'); ?></option>
|
|
||||||
<?php
|
|
||||||
for( $i = 0; $i < count($select[1]); $i++) {
|
|
||||||
echo '<option>' . $select[1]["$i"] . '</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
<select name="lens" id="lens" class="classic">
|
|
||||||
<option value=""><?php echo gettext('lens'); ?></option>
|
|
||||||
<?php
|
|
||||||
for( $i = 0; $i < count($select[0]); $i++) {
|
|
||||||
echo '<option>' . $select[0]["$i"] . '</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
<select name="iso" id="iso" class="classic">
|
|
||||||
<option value=""><?php echo gettext('iso'); ?></option>
|
|
||||||
<?php
|
|
||||||
for( $i = 0; $i < count($select[2]); $i++) {
|
|
||||||
echo '<option>' . $select[2]["$i"] . '</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
<select name="speed" id="speed" class="classic">
|
|
||||||
<option value=""><?php echo gettext('speed'); ?></option>
|
|
||||||
<?php
|
|
||||||
for( $i = 0; $i < count($select[3]); $i++) {
|
|
||||||
echo '<option>' . $select[3]["$i"] . '</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
<span class="operateur"><?php echo gettext('Operator:'); ?></span>
|
|
||||||
<input type="radio" id="operator1" name="operator" value="AND" checked>
|
|
||||||
<label for="ope1"><?php echo gettext('AND'); ?></label>
|
|
||||||
<input type="radio" id="operator2" name="operator" value="OR">
|
|
||||||
<label for="ope1"><?php echo gettext('OR'); ?></label>
|
|
||||||
|
|
||||||
|
|
||||||
<button type="submit" class="myButton">OK</button>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
<form id="allSelect" name="allSelect" action="view_bdd.php" method="post" class="myForm" >
|
|
||||||
<fieldset>
|
|
||||||
<legend>All</legend>
|
|
||||||
<button type="submit" name = "all" value="all" class="myButton all"> <?php echo gettext('All photos'); ?> </button>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="dateSelect" name="dateSelect" action="view_bdd.php" method="post" class="myForm" >
|
|
||||||
<fieldset>
|
|
||||||
<legend>Divers</legend>
|
|
||||||
<select name="date" id="date" class="classic">
|
|
||||||
<option value=""><?php echo gettext('year'); ?></option>
|
|
||||||
<?php
|
|
||||||
for( $i = 0; $i < count($select[5]); $i++) {
|
|
||||||
echo '<option>' . $select[5]["$i"] . '</option>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<input type="checkbox" id="gps" name="gps">
|
|
||||||
<label for="gps">gps</label>
|
|
||||||
|
|
||||||
|
|
||||||
<button type="submit" name = "all" value="all" class="myButton all"> <?php echo gettext('OK'); ?> </button>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
echo '<div id="view_bdd">';
|
|
||||||
echo '<form id="viewSelect" name="viewSelect" action="view_bdd.php" method="post" class="myForm" >';
|
echo '<form id="viewSelect" name="viewSelect" action="view_bdd.php" method="post" class="myForm" >';
|
||||||
echo '<table class="styled-table">';
|
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
||||||
echo '<thead>';
|
echo '<button type="submit" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
echo '<th>' . gettext('Select') . '</th><th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . '</th><th><a class="sort" href="view_bdd.php?column=date&order=' . $asc_or_desc . '">' . gettext('Date') . ' <i class="fas fa-sort' . ($column == 'date' ? '-' . $up_or_down : '') . '"></i></a></th><th><a href="view_bdd.php?column=lens&order=' . $asc_or_desc . '">' . gettext('Lens') . ' <i class="fas fa-sort' . ($column == 'lens' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Speed') . '</th><th>' . gettext('Aperture') . '</th><th><a href="view_bdd.php?column=iso&order=' . $asc_or_desc . '">' . gettext('Iso') . ' <i class="fas fa-sort' . ($column == 'iso' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Width') . '</th><th>' . gettext('Height') . '</th>';
|
|
||||||
echo '<th><a href="view_bdd.php?column=model&order=' . $asc_or_desc . '">' . gettext('Model') . ' <i class="fas fa-sort' . ($column == 'Model' ? '-' . $up_or_down : '') . '"></i></a></th><th><a href="view_bdd.php?column=lat&order=' . $asc_or_desc . '">' . gettext('Latitude') . ' <i class="fas fa-sort' . ($column == 'lat' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Longitude') . '</th><th>' . gettext('Alttitude') . '</th><th>' . gettext('Legende') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Title') . '</th>';
|
|
||||||
echo '<th>' . gettext('Creator') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Flash') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Wb') . '</th><th>' . gettext('Program') . '</th><th>' . gettext('Html') . '</th>';
|
|
||||||
echo '</thead>';
|
|
||||||
echo '<tbody>';
|
|
||||||
|
|
||||||
$nRows = 0;
|
|
||||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
|
||||||
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
|
||||||
$full = host() . $row['filename'];
|
|
||||||
|
|
||||||
echo '<tr><td>' . '<input type="checkbox" id="edit" name="coche' . $nRows . '" value="' . basename($full) . '" >' . '</td><td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '"><img src="'.$thumbnail.'" /></a>' . '</td><td>' . $row['filename'] . '</td><td>' . $row['dateoriginal'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['aperture'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['width'] . '</td><td>' . $row['height'] . '</td><td>' . $row['model'] . '</td><td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td><td>' . $row['legende'] . '</td><td>' . $row['copyright'] . '</td><td>' . $row['title'] . '</td><td>' . $row['creator'] . '</td><td>' . $row['keywords'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['flash'] . '</td><td>' . $row['focal'] . '</td><td>' . $row['wb'] . '</td><td>' . $row['program'] . '</td><td>' . $row['html'] . '</td></tr>';
|
|
||||||
$nRows++;
|
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
if ($nRows == 0) echo '<tr><td colspan="25" class="noimg">' . gettext("No image found !") .'</td></tr>';
|
<table id="details" class="styled-table">
|
||||||
|
<thead>
|
||||||
|
<tr id="filters">
|
||||||
|
<?php echo (isset($_SESSION["user"])) ? '<th> </th>' : ''; ?>
|
||||||
|
<th><input type="text" id="filter_id" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('ID')"></th>
|
||||||
|
<!--th><input type="text" id="filter_thumb" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Thumb')"></th-->
|
||||||
|
<th> </th>
|
||||||
|
<th><input type="text" id="filter_filename" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('FileName')"></th>
|
||||||
|
<th><input type="text" id="filter_dateoriginal" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('DateOriginal')"></th>
|
||||||
|
<th><input type="text" id="filter_speed" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Speed')"></th>
|
||||||
|
<th><input type="text" id="filter_iso" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('ISO')"></th>
|
||||||
|
<th><input type="text" id="filter_aperture" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Aperture')"></th>
|
||||||
|
<th><input type="text" id="filter_correctexpo" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('CorrectExpo')"></th>
|
||||||
|
<th><input type="text" id="filter_model" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Model')"></th>
|
||||||
|
<th><input type="text" id="filter_lens" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Lens')"></th>
|
||||||
|
<th><input type="text" id="filter_focal" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Focal')"></th>
|
||||||
|
<th><input type="text" id="filter_metering" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Metering')"></th>
|
||||||
|
<th><input type="text" id="filter_program" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Program')"></th>
|
||||||
|
<th><input type="text" id="filter_wb" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('WB')"></th>
|
||||||
|
<th><input type="text" id="filter_software" placeholder="<?php echo gettext('Filter'); ?>" oninput="showUser('Software')"></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
echo '</tbody></table>';
|
<tr id = "Headings">
|
||||||
|
<?php if (isset($_SESSION["user"])) { ?>
|
||||||
|
<th id = "Coche" class="ASC" onclick="showUser('Coche')">X</th>
|
||||||
|
<?php } ?>
|
||||||
|
<th id = "ID" class="ASC" onclick="showUser('ID')">ID</th>
|
||||||
|
<th id = "Thumb" class="ASC" onclick="showUser('Thumb')"><?php echo gettext('Thumb'); ?></th>
|
||||||
|
<th id = "FileName" class="ASC" onclick="showUser('FileName')"><?php echo gettext('Filename'); ?></th>
|
||||||
|
<th id = "DateOriginal" class="DESC" onclick="showUser('DateOriginal')"><?php echo gettext('Date Original'); ?></th> <!-- ordre par défaut -->
|
||||||
|
<th id = "Speed" class="ASC" onclick="showUser('Speed')"><?php echo gettext('Speed'); ?></th>
|
||||||
|
<th id = "ISO" class="ASC" onclick="showUser('ISO')"><?php echo gettext('ISO'); ?></th>
|
||||||
|
<th id = "Aperture" class="ASC" onclick="showUser('Aperture')"><?php echo gettext('Aperture'); ?></th>
|
||||||
|
<th id = "CorrectExpo" class="ASC" onclick="showUser('CorrectExpo')"><?php echo gettext('Exposure corr.'); ?></th>
|
||||||
|
<th id = "Model" class="ASC" onclick="showUser('Model')"><?php echo gettext('Model'); ?></th>
|
||||||
|
<th id = "Lens" class="ASC" onclick="showUser('Lens')"><?php echo gettext('Lens'); ?></th>
|
||||||
|
<th id = "Focal" class="ASC" onclick="showUser('Focal')"><?php echo gettext('Focal'); ?></th>
|
||||||
|
<th id = "Metering" class="ASC" onclick="showUser('Metering')"><?php echo gettext('Metering'); ?></th>
|
||||||
|
<th id = "Program" class="ASC" onclick="showUser('Program')"><?php echo gettext('Programm'); ?></th>
|
||||||
|
<th id = "WB" class="ASC" onclick="showUser('WB')"><?php echo gettext('WB'); ?></th>
|
||||||
|
<th id = "Software" class="ASC" onclick="showUser('Software')"><?php echo gettext('Software'); ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="Table"></tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (isset($_SESSION["user"])) {
|
||||||
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
||||||
echo '<button type="submit" name="suppress" value="supress" class="myButton all">' . gettext('Suppress') . '</button>';
|
echo '<button type="submit" name="suppress" value="supress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
//$stmt = $conn->reset();
|
|
||||||
//$conn = null;
|
|
||||||
}
|
|
||||||
catch(PDOException $e) {
|
|
||||||
echo $e->getMessage();
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -316,31 +177,48 @@ try {
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
var $obj = lc_lightbox('td a', {
|
var $obj = lc_lightbox('td a', {
|
||||||
img_zoom : true,
|
img_zoom : true, // whether to enable zooming system
|
||||||
|
|
||||||
|
author_by_txt : '<?php echo gettext("by"); ?>', // which text is used before the author name, by default is "by"
|
||||||
|
|
||||||
|
slideshow : true, // whether to enable slideshow
|
||||||
open_close_time : 200, // durée de l'animation pour l'ouverture et la fermeture de la lightbox
|
open_close_time : 200, // durée de l'animation pour l'ouverture et la fermeture de la lightbox
|
||||||
ol_time_diff : 100, // animation de superposition avance (à l'ouverture) et retard (à la fermeture) à la fenêtre
|
ol_time_diff : 100, // animation de superposition avance (à l'ouverture) et retard (à la fermeture) à la fenêtre
|
||||||
fading_time : 50, // durée de l'animation de fondu des éléments
|
fading_time : 50, // durée de l'animation de fondu des éléments
|
||||||
slideshow_time : 4000, // durée de l'intervalle du diaporama
|
|
||||||
animation_time : 100,
|
animation_time : 100,
|
||||||
|
slideshow_time : 4000, // durée de l'intervalle du diaporama
|
||||||
|
autoplay : false, // autoplay slideshow - bool
|
||||||
counter : false, // s'il faut afficher le compteur d'éléments
|
counter : false, // s'il faut afficher le compteur d'éléments
|
||||||
progressbar : false, // s'il faut afficher une barre de progression lors de l'exécution du diaporama
|
progressbar : false, // s'il faut afficher une barre de progression lors de l'exécution du diaporama
|
||||||
|
|
||||||
max_width : '95%', // largeur maximale de la lightbox
|
max_width : '95%', // largeur maximale de la lightbox
|
||||||
max_height : '95%', // hauteur maximale de la lightbox
|
max_height : '95%', // hauteur maximale de la lightbox
|
||||||
|
ol_opacity : 0.7, // overlay opacity / value between 0 and 1
|
||||||
|
ol_color : '#111', // background color of the overlay
|
||||||
|
ol_pattern : false, // overlay patterns - insert the pattern name or false
|
||||||
|
|
||||||
wrap_class : 'lcl_fade_oc', // Classes personnalisées ajoutées au wrapper: effet à l'ouverture de la lb (lcl_fade_oc | lcl_zoomin_oc | lcl_rtl_oc)
|
wrap_class : 'lcl_fade_oc', // Classes personnalisées ajoutées au wrapper: effet à l'ouverture de la lb (lcl_fade_oc | lcl_zoomin_oc | lcl_rtl_oc)
|
||||||
skin : 'minimal', // minimal | light | dark
|
skin : 'minimal', // minimal | light | dark
|
||||||
data_position : 'over', // Spécifie où les données des éléments seront affichées. Les modes disponibles sont :over, under|rside|lside
|
data_position : 'over', // Spécifie où les données des éléments seront affichées. Les modes disponibles sont :over, under|rside|lside
|
||||||
cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer
|
cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer
|
||||||
|
ins_close_pos : 'normal', // set closing button position for inner commands - normal/corner
|
||||||
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
|
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
|
||||||
|
|
||||||
|
txt_hidden : true, // whether to hide texts on lightbox opening - bool or int (related to browser's smaller side)
|
||||||
shox_title : true, // s'il faut afficher les titres
|
shox_title : true, // s'il faut afficher les titres
|
||||||
show_descr : false, // s'il faut afficher les descriptions
|
show_descr : true, // s'il faut afficher les descriptions
|
||||||
show_author : true, // s'il faut afficher les auteurs
|
show_author : true, // s'il faut afficher les auteurs
|
||||||
|
|
||||||
thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images)
|
thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images)
|
||||||
|
|
||||||
fullscreen : true, // Autoriser ou non le mode plein écran
|
fullscreen : true, // Autoriser ou non le mode plein écran
|
||||||
fs_img_behavior : 'smart', //Comportement de l'image en plein écran : fit|fill|smart
|
fs_img_behavior : 'smart', //Comportement de l'image en plein écran : fit|fill|smart
|
||||||
fs_only : 500, // s'il faut utiliser uniquement l'ouverture de la lightbox en mode plein écran (utile pour les appareils mobiles) : false | (integer)
|
fs_only : 500, // s'il faut utiliser uniquement l'ouverture de la lightbox en mode plein écran (utile pour les appareils mobiles) : false | (integer)
|
||||||
browser_fs_mode : true, // utiliser ou non le mode plein écran du navigateur
|
browser_fs_mode : true, // utiliser ou non le mode plein écran du navigateur
|
||||||
|
|
||||||
txt_toggle_cmd : true, // s'il faut afficher le bouton de basculement du texte de l'élément
|
txt_toggle_cmd : true, // s'il faut afficher le bouton de basculement du texte de l'élément
|
||||||
download : true, // whether to show element's file download button
|
download : true, // whether to show element's file download button
|
||||||
|
autoplay_videos : false, // bool / whether to autoplay videos (NB: modern browsers ignore this for deeplinked elements. Not applied if video has poster)
|
||||||
touchswipe : true, // permet les interactions tactiles (nécessite AlloyFinger)
|
touchswipe : true, // permet les interactions tactiles (nécessite AlloyFinger)
|
||||||
rclick_prevent : true, // s'il faut éviter le clic droit sur les éléments de la lightbox
|
rclick_prevent : true, // s'il faut éviter le clic droit sur les éléments de la lightbox
|
||||||
});
|
});
|
||||||
@@ -348,52 +226,14 @@ try {
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a></p>' : ''; ?>
|
||||||
|
|
||||||
try {
|
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||||
//$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
|
||||||
$query4 = "SELECT COUNT(*) AS count FROM photos " . $req;
|
|
||||||
|
|
||||||
$stmt = $conn->prepare($query4);
|
|
||||||
$stmt->execute();
|
|
||||||
|
|
||||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
||||||
$numRows = $result['count'];
|
|
||||||
|
|
||||||
$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 '<div class="navPage">' . gettext("Page") . ': ';
|
|
||||||
if ($page >= 2) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$prec.'&column='.$column.'&order='.$sort_order.'" title="'.gettext("Previous Page").'">« '.gettext("prev").'</a> ';
|
|
||||||
for ($i = 1; $i <= $nbpages; $i++) {
|
|
||||||
if ($i != $page) {
|
|
||||||
echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$i.'&column='.$column.'&order='.$sort_order.'" title="'.gettext("Page").' '.$i.'">'.$i.' </a> ';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "<span class='gras'>".$i."</span> ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($page < $nbpages) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$suiv.'&column='.$column.'&order='.$sort_order.'" title="'.gettext("Next Page").'">'.gettext("next").' »</a> ';
|
|
||||||
echo '</div>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="admin/index.php" title="<?php echo gettext("Admin"); ?>"><?php echo gettext("Admin"); ?></a></p>
|
|
||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
<script src='js/lc_lightbox.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
<script src='js/alloy_finger.min.js' type='text/javascript'></script>
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
438
view_bdd2.php
Normal file
@@ -0,0 +1,438 @@
|
|||||||
|
<?php require ("3-protect.php");
|
||||||
|
session_start();
|
||||||
|
include 'localize.php';
|
||||||
|
$domain = 'sentier';
|
||||||
|
localize($domain);
|
||||||
|
include 'functions.php';
|
||||||
|
|
||||||
|
$base = 'db_photo.sqlite3';
|
||||||
|
$perpage = 20;
|
||||||
|
|
||||||
|
$conn = new PDO("sqlite:db_photo.sqlite3");
|
||||||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
|
if (!isset($_GET['page'])) $page = 1;
|
||||||
|
else $page = intval($_GET['page']);
|
||||||
|
|
||||||
|
|
||||||
|
// Suppression d'images
|
||||||
|
|
||||||
|
if (isset($_SESSION["user"])) {
|
||||||
|
if ((isset($_POST["suppress"])) && ($_POST["suppress"] == "suppress")) {
|
||||||
|
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
||||||
|
$rr = "";
|
||||||
|
foreach($_POST['coche'] as $key => $value) {
|
||||||
|
$r = "id = " . $value . " OR ";
|
||||||
|
$rr .= $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
$req_delete = substr($rr, 0, strlen($rr)-4);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$req = "DELETE FROM Photos WHERE (" . $req_delete . ")";
|
||||||
|
$stmt = $conn->prepare($req);
|
||||||
|
$stmt->execute();
|
||||||
|
$nb = $stmt->rowCount();
|
||||||
|
}
|
||||||
|
catch(PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
$msg = (($nb > 0) ? "<h3 class='greenstyle'>" . $nb . gettext(' photos successfully deleted !') . "</h3>" : "");
|
||||||
|
$request_delete = $req;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$msg = "<h3 class='redstyle'>" . gettext('Empty request !') . "</h3>" ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$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++;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title><?php echo gettext('View photos in Sqlite base'); ?></title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/sls.css" />
|
||||||
|
<link rel='stylesheet' href='lc-lightbox/css/lc_lightbox.min.css' />
|
||||||
|
<link rel='stylesheet' href='lc-lightbox/css/open_close_fx.css' />
|
||||||
|
<link rel='stylesheet' href='lc-lightbox/skins/minimal.css' />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<h1>' . gettext('View database') . ': ' . $base . '</h1><br />';
|
||||||
|
|
||||||
|
// Affichage des photos
|
||||||
|
|
||||||
|
try {
|
||||||
|
$columns = array('dateoriginal','lens','model','iso','lat');
|
||||||
|
$column = isset($_GET['column']) && in_array($_GET['column'], $columns) ? $_GET['column'] : $columns[0];
|
||||||
|
$sort_order = isset($_GET['order']) && strtolower($_GET['order']) == 'desc' ? 'DESC' : 'ASC';
|
||||||
|
|
||||||
|
$req1 = "";
|
||||||
|
$req2 = "";
|
||||||
|
$req3 = "";
|
||||||
|
$req4 = "";
|
||||||
|
$req5 = "";
|
||||||
|
$req6 = "";
|
||||||
|
$req7 = "";
|
||||||
|
|
||||||
|
if (!empty($_POST['lens'])) $req1 = "lens = '" . $_POST['lens'] . "'";
|
||||||
|
if (!empty($_POST['model'])) $req2 = "model = '" . $_POST['model'] . "'";
|
||||||
|
if (!empty($_POST['iso'])) $req3 = "iso = '" . $_POST['iso'] . "'";
|
||||||
|
if (!empty($_POST['speed'])) $req4 = "speed = '" . $_POST['speed'] . "'";
|
||||||
|
if (!empty($_POST['keyword'])) $req5 = "keywords LIKE '%" . str_replace("'","''", $_POST['keyword']) . "%'";
|
||||||
|
if (!empty($_POST['all']) && ($_POST['all'] == "all")) $req = "";
|
||||||
|
if (isset($_POST['operator'])) $operator = " " . $_POST['operator'] . " ";
|
||||||
|
if (!empty($_POST['gps'])) $req6 = "lat != '' AND long != ''";
|
||||||
|
if (!empty($_POST['date'])) $req7 = "strftime('%Y', dateoriginal) = '" . $_POST['date'] . "'";
|
||||||
|
|
||||||
|
|
||||||
|
if (($req1 != "") || ($req2 != "") || ($req3 != "") || ($req4 != "") || ($req5 != "")) {
|
||||||
|
$req = "WHERE " . ($req1 != "" ? $req1 . $operator : "") . ($req2 != "" ? $req2 . $operator : "") . ($req3 != "" ? $req3 . $operator : "") . ($req4 != "" ? $req4 . $operator : "") . ($req5 != "" ? $req5 . $operator : "");
|
||||||
|
$req = substr_replace($req, " ", (strlen($req) - strlen($operator)), strlen($operator));
|
||||||
|
}
|
||||||
|
elseif ($req6 != "") {
|
||||||
|
$req = "WHERE " . $req6 . " ";
|
||||||
|
}
|
||||||
|
elseif ($req7 != "") {
|
||||||
|
$req = "WHERE " . $req7 . " ";
|
||||||
|
}
|
||||||
|
else $req = "";
|
||||||
|
|
||||||
|
|
||||||
|
$query2 = "SELECT * FROM photos " . $req . "ORDER BY " . $column . " " . $sort_order . " " . "LIMIT ? OFFSET ?";
|
||||||
|
|
||||||
|
/* 1ere requete pour compter les resultats:*/
|
||||||
|
/*
|
||||||
|
$sql = "SELECT COUNT(*) FROM photos " . $req;
|
||||||
|
$statement = $conn->prepare($sql);
|
||||||
|
$statement->execute();
|
||||||
|
$ct = $statement->fetch(PDO::FETCH_NUM); // Return array indexed by column number
|
||||||
|
$count = $ct;
|
||||||
|
reset($ct); // Resets array cursor and returns first value (the count)
|
||||||
|
$count = current($ct);
|
||||||
|
//$count = $count[0];
|
||||||
|
echo $count;
|
||||||
|
*/
|
||||||
|
|
||||||
|
$query ="WITH cnt(total) as (SELECT COUNT(*) from photos " . $req . ") SELECT * FROM photos,cnt " . $req . "ORDER BY " . $column . " " . $sort_order . " " . "LIMIT ? OFFSET ?";
|
||||||
|
// WITH cnt(total) as (SELECT COUNT(*) from photos WHERE speed = '1.6s' ) SELECT * FROM photos,cnt WHERE speed = '1.6s' ORDER BY dateoriginal ASC LIMIT ? OFFSET ?
|
||||||
|
|
||||||
|
$offset = $perpage * ($page -1);
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->execute(array($perpage, $offset)); // (1,3...) 1=1ere valeur 3=valeur
|
||||||
|
|
||||||
|
// nb de resultats de la requete
|
||||||
|
$count = $stmt->fetchColumn(34); // total => 35
|
||||||
|
$stmt->execute(array($perpage, $offset));
|
||||||
|
|
||||||
|
if (empty($_POST)) {
|
||||||
|
echo '<h3 class="greenstyle">' . count($dir) . gettext(' images found in folder') . ' <i><a href="photos/img/">photos/img/</a></i> ...</h3>';
|
||||||
|
// Display request !!
|
||||||
|
echo '<pre><code>' . $query2 . '</code></pre>';
|
||||||
|
}
|
||||||
|
elseif ($_POST["suppress"] == "suppress") {
|
||||||
|
|
||||||
|
echo $msg;
|
||||||
|
|
||||||
|
if (isset($_POST['coche']) && (! empty($_POST['coche']))) {
|
||||||
|
echo '<pre><code>' . $request_delete . '</code></pre>';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo '<h3 class="greenstyle">' . $count . gettext(' images founds with the following request:') . '</h3>';
|
||||||
|
// Display request !!
|
||||||
|
echo '<pre><code>' . $query2 . '</code></pre>';
|
||||||
|
}
|
||||||
|
$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"';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="keywordSelect" name="keywordSelect" action="view_bdd2.php" method="post" class="myForm" >
|
||||||
|
<fieldset>
|
||||||
|
<legend>APN</legend>
|
||||||
|
|
||||||
|
|
||||||
|
<select name="keyword" id="keyword" class="classic">
|
||||||
|
<option value=""><?php echo gettext('keywords'); ?></option>
|
||||||
|
<?php
|
||||||
|
for( $i = 0; $i < count($select[4]); $i++) {
|
||||||
|
echo '<option>' . $select[4]["$i"] . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<select name="model" id="model" class="classic">
|
||||||
|
<option value=""><?php echo gettext('model'); ?></option>
|
||||||
|
<?php
|
||||||
|
for( $i = 0; $i < count($select[1]); $i++) {
|
||||||
|
echo '<option>' . $select[1]["$i"] . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<select name="lens" id="lens" class="classic">
|
||||||
|
<option value=""><?php echo gettext('lens'); ?></option>
|
||||||
|
<?php
|
||||||
|
for( $i = 0; $i < count($select[0]); $i++) {
|
||||||
|
echo '<option>' . $select[0]["$i"] . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<select name="iso" id="iso" class="classic">
|
||||||
|
<option value=""><?php echo gettext('iso'); ?></option>
|
||||||
|
<?php
|
||||||
|
for( $i = 0; $i < count($select[2]); $i++) {
|
||||||
|
echo '<option>' . $select[2]["$i"] . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<select name="speed" id="speed" class="classic">
|
||||||
|
<option value=""><?php echo gettext('speed'); ?></option>
|
||||||
|
<?php
|
||||||
|
for( $i = 0; $i < count($select[3]); $i++) {
|
||||||
|
echo '<option>' . $select[3]["$i"] . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<span class="operateur"><?php echo gettext('Operator:'); ?></span>
|
||||||
|
<input type="radio" id="operator1" name="operator" value="AND" checked>
|
||||||
|
<label for="ope1"><?php echo gettext('AND'); ?></label>
|
||||||
|
<input type="radio" id="operator2" name="operator" value="OR">
|
||||||
|
<label for="ope1"><?php echo gettext('OR'); ?></label>
|
||||||
|
|
||||||
|
|
||||||
|
<button type="submit" class="myButton">OK</button>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<form id="allSelect" name="allSelect" action="view_bdd2.php" method="post" class="myForm" >
|
||||||
|
<fieldset>
|
||||||
|
<legend>All</legend>
|
||||||
|
<button type="submit" name = "all" value="all" class="myButton all"> <?php echo gettext('All photos'); ?> </button>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form id="dateSelect" name="dateSelect" action="view_bdd2.php" method="post" class="myForm" >
|
||||||
|
<fieldset>
|
||||||
|
<legend>Divers</legend>
|
||||||
|
<select name="date" id="date" class="classic">
|
||||||
|
<option value=""><?php echo gettext('year'); ?></option>
|
||||||
|
<?php
|
||||||
|
for( $i = 0; $i < count($select[5]); $i++) {
|
||||||
|
echo '<option>' . $select[5]["$i"] . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<input type="checkbox" id="gps" name="gps">
|
||||||
|
<label for="gps">gps</label>
|
||||||
|
|
||||||
|
|
||||||
|
<button type="submit" name = "all" value="all" class="myButton all"> <?php echo gettext('OK'); ?> </button>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<div id="view_bdd">';
|
||||||
|
echo '<p></p>';
|
||||||
|
echo '<form id="viewSelect" name="viewSelect" action="view_bdd2.php" method="post" class="myForm" >';
|
||||||
|
|
||||||
|
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
||||||
|
echo '<button type="submit" name="suppress" value="suppress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
|
|
||||||
|
echo '<table class="styled-table">';
|
||||||
|
echo '<thead>';
|
||||||
|
echo ((isset($_SESSION["user"])) ? '<th>' . gettext('Select') . '</th>' : '') . '<th>' . gettext('Id') . '</th><th>' . gettext('Thumb') . '</th><th>' . gettext('Filename') . ' (' . gettext('Size') . ')</th><th><a class="sort" href="view_bdd.php?column=date&order=' . $asc_or_desc . '">' . gettext('Date') . ' <i class="fas fa-sort' . ($column == 'date' ? '-' . $up_or_down : '') . '"></i></a></th><th><a href="view_bdd.php?column=lens&order=' . $asc_or_desc . '">' . gettext('Lens') . ' <i class="fas fa-sort' . ($column == 'lens' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Speed') . '</th><th>' . gettext('Aperture') . '</th><th>' . gettext('Exposure corr.') . '</th><th><a href="view_bdd.php?column=iso&order=' . $asc_or_desc . '">' . gettext('Iso') . ' <i class="fas fa-sort' . ($column == 'iso' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Width') . '</th><th>' . gettext('Height') . '</th>';
|
||||||
|
echo '<th><a href="view_bdd.php?column=model&order=' . $asc_or_desc . '">' . gettext('Model') . ' <i class="fas fa-sort' . ($column == 'Model' ? '-' . $up_or_down : '') . '"></i></a></th><th><a href="view_bdd.php?column=lat&order=' . $asc_or_desc . '">' . gettext('Latitude') . ' <i class="fas fa-sort' . ($column == 'lat' ? '-' . $up_or_down : '') . '"></i></a></th><th>' . gettext('Longitude') . '</th><th>' . gettext('Alttitude') . '</th><th>' . gettext('Legende') . '</th><th>' . gettext('Copyright') . '</th><th>' . gettext('Title') . '</th>';
|
||||||
|
echo '<th>' . gettext('Creator') . '</th><th>' . gettext('Keywords') . '</th><th>' . gettext('Metering') . '</th><th>' . gettext('Flash') . '</th><th>' . gettext('Focal') . '</th><th>' . gettext('Wb') . '</th><th>' . gettext('Program') . '</th>';
|
||||||
|
echo '</thead>';
|
||||||
|
echo '<tbody>';
|
||||||
|
|
||||||
|
$nRows = 0;
|
||||||
|
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
|
||||||
|
$full = host() . $row['filename'];
|
||||||
|
$lb = data_for_lightbox($row);
|
||||||
|
|
||||||
|
echo '<tr>' . ((isset($_SESSION["user"])) ? '<td>' . '<input type="checkbox" id="edit" name="coche[]" value="' . $row['id'] . '" >' . '</td>' : '') . '<td>' . $row['id'] . '</td><td>' . '<a href="' . $full . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '"><img src="'.$thumbnail.'" alt="' . htmlspecialchars($lb['title']) . '" /></a>' . '</td><td>' . $row['filename'] . '<br />(' . $row['filesize'] . ')</td><td>' . $row['dateoriginal'] . '</td><td>' . $row['lens'] . '</td><td>' . $row['speed'] . '</td><td>' . $row['aperture'] . '</td> <td>' . $row['correctexpo'] . '</td><td>' . $row['iso'] . '</td><td>' . $row['width'] . '</td><td>' . $row['height'] . '</td><td>' . $row['model'] . '</td><td>' . $row['lat'] . '</td><td>' . $row['long'] . '</td><td>' . $row['alt'] . '</td><td>' . $row['legende'] . '</td><td>' . $row['copyright'] . '</td><td>' . $row['title'] . '</td><td>' . $row['creator'] . '</td><td>' . $row['keywords'] . '</td><td>' . $row['metering'] . '</td><td>' . $row['flash'] . '</td><td>' . $row['focal'] . '</td><td>' . $row['wb'] . '</td><td>' . $row['program'] . '</td></tr>';
|
||||||
|
$nRows++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($nRows == 0) echo '<tr><td colspan="25" class="noimg">' . gettext("No image found !") .'</td></tr>';
|
||||||
|
|
||||||
|
echo '</tbody></table>';
|
||||||
|
if (isset($_SESSION["user"])) {
|
||||||
|
echo '<button type="submit" formaction="edit_bdd.php" name="edit" value="edit" class="myButton all">' . gettext('Edit') . '</button>';
|
||||||
|
echo '<button type="submit" name="suppress" value="supress" class="myButton all">' . gettext('Suppress') . '</button>';
|
||||||
|
}
|
||||||
|
echo '</form>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(PDOException $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type='text/javascript'>
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
var $obj = lc_lightbox('td a', {
|
||||||
|
img_zoom : true, // whether to enable zooming system
|
||||||
|
|
||||||
|
author_by_txt : '<?php echo gettext("by"); ?>', // which text is used before the author name, by default is "by"
|
||||||
|
|
||||||
|
slideshow : true, // whether to enable slideshow
|
||||||
|
open_close_time : 200, // durée de l'animation pour l'ouverture et la fermeture de la lightbox
|
||||||
|
ol_time_diff : 100, // animation de superposition avance (à l'ouverture) et retard (à la fermeture) à la fenêtre
|
||||||
|
fading_time : 50, // durée de l'animation de fondu des éléments
|
||||||
|
animation_time : 100,
|
||||||
|
slideshow_time : 4000, // durée de l'intervalle du diaporama
|
||||||
|
autoplay : false, // autoplay slideshow - bool
|
||||||
|
counter : false, // s'il faut afficher le compteur d'éléments
|
||||||
|
progressbar : false, // s'il faut afficher une barre de progression lors de l'exécution du diaporama
|
||||||
|
|
||||||
|
max_width : '95%', // largeur maximale de la lightbox
|
||||||
|
max_height : '95%', // hauteur maximale de la lightbox
|
||||||
|
ol_opacity : 0.7, // overlay opacity / value between 0 and 1
|
||||||
|
ol_color : '#111', // background color of the overlay
|
||||||
|
ol_pattern : false, // overlay patterns - insert the pattern name or false
|
||||||
|
|
||||||
|
wrap_class : 'lcl_fade_oc', // Classes personnalisées ajoutées au wrapper: effet à l'ouverture de la lb (lcl_fade_oc | lcl_zoomin_oc | lcl_rtl_oc)
|
||||||
|
skin : 'minimal', // minimal | light | dark
|
||||||
|
data_position : 'over', // Spécifie où les données des éléments seront affichées. Les modes disponibles sont :over, under|rside|lside
|
||||||
|
cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer
|
||||||
|
ins_close_pos : 'normal', // set closing button position for inner commands - normal/corner
|
||||||
|
nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle
|
||||||
|
|
||||||
|
txt_hidden : true, // whether to hide texts on lightbox opening - bool or int (related to browser's smaller side)
|
||||||
|
shox_title : true, // s'il faut afficher les titres
|
||||||
|
show_descr : true, // s'il faut afficher les descriptions
|
||||||
|
show_author : true, // s'il faut afficher les auteurs
|
||||||
|
|
||||||
|
thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images)
|
||||||
|
|
||||||
|
fullscreen : true, // Autoriser ou non le mode plein écran
|
||||||
|
fs_img_behavior : 'smart', //Comportement de l'image en plein écran : fit|fill|smart
|
||||||
|
fs_only : 500, // s'il faut utiliser uniquement l'ouverture de la lightbox en mode plein écran (utile pour les appareils mobiles) : false | (integer)
|
||||||
|
browser_fs_mode : true, // utiliser ou non le mode plein écran du navigateur
|
||||||
|
|
||||||
|
txt_toggle_cmd : true, // s'il faut afficher le bouton de basculement du texte de l'élément
|
||||||
|
download : true, // whether to show element's file download button
|
||||||
|
autoplay_videos : false, // bool / whether to autoplay videos (NB: modern browsers ignore this for deeplinked elements. Not applied if video has poster)
|
||||||
|
touchswipe : true, // permet les interactions tactiles (nécessite AlloyFinger)
|
||||||
|
rclick_prevent : true, // s'il faut éviter le clic droit sur les éléments de la lightbox
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
try {
|
||||||
|
//$conn4 = new PDO('sqlite:db_photo.sqlite3');
|
||||||
|
$query4 = "SELECT COUNT(*) AS count FROM photos " . $req;
|
||||||
|
|
||||||
|
$stmt = $conn->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 '<div class="navPage">' . gettext("Page") . ': ';
|
||||||
|
if ($page >= 2) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$prec.'&column='.$column.'&order='.$sort_order.'" title="'.gettext("Previous Page").'">« '.gettext("prev").'</a> ';
|
||||||
|
for ($i = 1; $i <= $nbpages; $i++) {
|
||||||
|
if ($i != $page) {
|
||||||
|
echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$i.'&column='.$column.'&order='.$sort_order.'" title="'.gettext("Page").' '.$i.'">'.$i.' </a> ';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "<span class='gras'>".$i."</span> ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($page < $nbpages) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$suiv.'&column='.$column.'&order='.$sort_order.'" title="'.gettext("Next Page").'">'.gettext("next").' »</a> ';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php $logout = (isset($_SESSION["user"])) ? '<a class="" href="4-logout.php" role="button">' . gettext("Log out") . '</a></p>' : ''; ?>
|
||||||
|
|
||||||
|
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a> | <?php echo $logout; ?></p>
|
||||||
|
|
||||||
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
|
<script src='lc-lightbox/js/lc_lightbox.min.js' type='text/javascript'></script>
|
||||||
|
<script src='lc-lightbox/lib/AlloyFinger/alloy_finger.min.js' type='text/javascript'></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||