Clean code
This commit is contained in:
@@ -8,44 +8,16 @@
|
||||
<title><?= _("Picture of the month");?></title>
|
||||
<link rel="stylesheet" href="css/sls.css">
|
||||
|
||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='css/minimal.css' />
|
||||
<link rel='stylesheet' href='css/lc_lightbox.min.css' />
|
||||
<link rel='stylesheet' href='css/open_close_fx.css' />
|
||||
<link rel='stylesheet' href='css/minimal.css' />
|
||||
|
||||
<?php include 'functions.php';
|
||||
$domain = 'sentier';
|
||||
localize($domain);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/*
|
||||
//if ($_SERVER['SERVER_NAME'] == 'airbook.local')
|
||||
$root = $_SERVER['DOCUMENT_ROOT'];
|
||||
//$root = dirname($_SERVER['SCRIPT_FILENAME']); // /Users/bruno/Sites/sls
|
||||
include 'functions.php';
|
||||
include($root.'/lib2/localize.php');
|
||||
$dir_locales = $root . '/Locale';
|
||||
|
||||
$liste_locale = list_dir($dir_locales);
|
||||
_pr($liste_locale);
|
||||
//if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($myLanguages);
|
||||
if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($liste_locale);
|
||||
else $langue = $_REQUEST['lang'];
|
||||
|
||||
$domain = 'sentier';
|
||||
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') );
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -77,48 +49,27 @@ try {
|
||||
catch(PDOException $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
|
||||
$photo_du_mois = $result[0];
|
||||
$z = $photo_du_mois['date'];
|
||||
|
||||
$photo_du_mois['title'] = "Titre";
|
||||
$photo_du_mois['legende'] = "Légende";
|
||||
|
||||
if (!empty($photo_du_mois['title'])) {
|
||||
$x = $photo_du_mois['title'];
|
||||
$y = $photo_du_mois['legende'];
|
||||
}
|
||||
elseif (!empty($photo_du_mois['legende'])) {
|
||||
$x = $photo_du_mois['legende'];
|
||||
}
|
||||
else {
|
||||
$x = basename($photo_du_mois['filename']);
|
||||
$y = "";
|
||||
}
|
||||
|
||||
$month_exif = $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} " . $photo_du_mois['speed'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO";
|
||||
?>
|
||||
|
||||
<p class="month"><?php echo month($z); ?></p>
|
||||
<p class="month"><?php echo month($result[0]['date']); ?></p>
|
||||
|
||||
<?php
|
||||
$lb = data_for_lightbox($result[0]);
|
||||
|
||||
echo '<div class="cadre" id="lcl_month">';
|
||||
echo '<a href ="' . host() . $photo_du_mois['filename'] . '" title="' . $x . '" data-lcl-txt="' . $y .'" data-lcl-author="' . $month_exif . '">';
|
||||
echo '<img src="' . host() . $photo_du_mois['filename'] . '" class="trois" />';
|
||||
echo '<a href ="' . $lb['big'] . '" title="' . $lb['title'] . '" data-lcl-txt="' . $lb['title'] .'" data-lcl-author="' . $lb['exif'] . '">';
|
||||
echo '<img src="' . $lb['big'] . '" class="trois" />';
|
||||
echo "</a>";
|
||||
echo '</div>';
|
||||
|
||||
if (!empty($photo_du_mois['titre']) || !empty($photo_du_mois['legende'])) {
|
||||
if (!empty($lb['title']) || !empty($lb['legende'])) {
|
||||
?>
|
||||
<p class="titrePhoto"><?php echo $photo_du_mois['title']; ?></p>
|
||||
<p class="legendePhoto"><?php echo $photo_du_mois['legende']; ?></p>
|
||||
<p class="titrePhoto"><?php echo $lb['title']; ?></p>
|
||||
<p class="legendePhoto"><?php echo $lb['legende']; ?></p>
|
||||
<?php }
|
||||
|
||||
echo '<div class="exif">';
|
||||
//echo $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} ";
|
||||
//echo $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO";
|
||||
echo $month_exif;
|
||||
echo $lb['exif'];
|
||||
echo '</div>';
|
||||
?>
|
||||
|
||||
@@ -248,7 +199,7 @@ if ($page < $nbpages) echo '<a href="'.$_SERVER['PHP_SELF'].'?page='.$suiv.'" ti
|
||||
echo '</div>';
|
||||
?>
|
||||
|
||||
<p class="navPage"><a href="index.php"><?php echo gettext("Home"); ?></a> | <a href="maps.php"><?php echo gettext("Maps"); ?></a></p>
|
||||
<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></p>
|
||||
|
||||
<p><em><small>sur-le-sentier.fr@ 2022</small></em></p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user