diff --git a/chant.php b/chant.php
index 82aea48..abfa094 100644
--- a/chant.php
+++ b/chant.php
@@ -128,6 +128,7 @@ if(count($c_p) > 0) {
$cnt = 1;
foreach($c_p as $s) {
$source_label = "".$sources[$s[0]]['title'].", ".$sources[$s[0]]['editor'].", ".($sources[$s[0]]['period']?$sources[$s[0]]['period']:$sources[$s[0]]['year'])."".($s[1]>''?", p. ".$s[1]:'');
+ $urls = $sources[$s[0]]['urls'];
if (count($s) > 2) {
echo '
'.$source_label."\n";
$sources_img .= ''.$source_label." ";
@@ -173,7 +174,10 @@ if(count($c_p) > 0) {
if($next) $sources_img .= ' ▶';
$sources_img .= "
\n";
for($i = 0; $i < max(1, $s[3]); $i++) {
- $sources_img .= '.'.png)
'."\n";
+ if(is_array($urls)) $sources_img .= '';
+ $sources_img .= '
';
+ if(is_array($urls)) $sources_img .= '';
+ $sources_img .= '
'."\n";
}
$sources_img .= "
\n
\n";
} else {
diff --git a/gregobase_structure.sql b/gregobase_structure.sql
index 027060c..0064bd4 100644
--- a/gregobase_structure.sql
+++ b/gregobase_structure.sql
@@ -1,11 +1,11 @@
-- phpMyAdmin SQL Dump
--- version 5.1.0-rc1
+-- version 5.1.0-rc2
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
--- Généré le : jeu. 11 fév. 2021 à 22:29
+-- Généré le : dim. 21 fév. 2021 à 19:10
-- Version du serveur : 10.4.17-MariaDB-1:10.4.17+maria~xenial
--- Version de PHP : 7.4.14
+-- Version de PHP : 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
@@ -66,7 +66,8 @@ CREATE TABLE `gregobase_chants` (
`gabc` text COLLATE utf8_unicode_ci DEFAULT NULL,
`gabc_verses` text COLLATE utf8_unicode_ci DEFAULT NULL,
`tex_verses` text COLLATE utf8_unicode_ci DEFAULT NULL,
- `remarks` text COLLATE utf8_unicode_ci DEFAULT NULL
+ `remarks` text COLLATE utf8_unicode_ci DEFAULT NULL,
+ `copyrighted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
@@ -138,7 +139,8 @@ CREATE TABLE `gregobase_sources` (
`title` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci NOT NULL,
`caption` text COLLATE utf8_unicode_ci NOT NULL,
- `pages` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL
+ `pages` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
+ `urls` text COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
diff --git a/source.php b/source.php
index 03c961f..ad8236a 100644
--- a/source.php
+++ b/source.php
@@ -31,6 +31,7 @@ echo "$title
\n";
if(array_key_exists('images', $_GET) && $_GET['images'] == '1') {
$ipp = 25;
if(is_array($sources[$s]['pages'])) {
+ $urls = $sources[$s]['urls'];
$np = count($sources[$s]['pages']);
$start = array_key_exists('index', $_GET) ? intval($_GET['index']*$ipp) : 0;
if($start > $np) $start = 0;
@@ -64,7 +65,11 @@ if(array_key_exists('images', $_GET) && $_GET['images'] == '1') {
echo "\n";
echo "\n";
if(is_dir('./sources/'.$s)) {
- echo ' | ';
+ echo '';
+ if(is_array($urls)) echo '';
+ echo ' ';
+ if(is_array($urls)) echo '';
+ echo ' | ';
}
}
echo "\n";