diff --git a/epub.php b/epub.php
index 01d6fbd..4fc270d 100644
--- a/epub.php
+++ b/epub.php
@@ -1,4 +1,9 @@
+
+
+ Fichiers epub
+
+
error ) {
+ $epub->CreateEPUB();
+
+ if ( ! $epub->error ) {
+ echo 'Success: ' . $epub->epub_file . ' created.
';
+ }
+ else
+ {
+ echo $epub->error;
+ }
+
+ } else {
+ echo $epub->error;
+ }
+ }
+
date_default_timezone_set('Europe/Paris');
$date = (new DateTime('today'))->format('Ymd');
@@ -97,21 +120,7 @@
$epub->AddPage($pagecontent, false, strip_tags($articlebody->Title));
}
}
-
- if ( ! $epub->error ) {
- $epub->CreateEPUB();
-
- if ( ! $epub->error ) {
- echo 'Success: ' . $epub->epub_file . ' created.
';
- }
- else
- {
- echo $epub->error;
- }
-
- } else {
- echo $epub->error;
- }
+ write_epub($epub);
}
// Mediapart
@@ -199,20 +208,7 @@
}
}
- if ( ! $epub->error ) {
- $epub->CreateEPUB();
-
- if ( ! $epub->error ) {
- echo 'Success: ' . $epub->epub_file . ' created.
';
- }
- else
- {
- echo $epub->error;
- }
-
- } else {
- echo $epub->error;
- }
+ write_epub($epub);
}
// New York Times
@@ -301,30 +297,18 @@
}
}
- if ( ! $epub->error ) {
- $epub->CreateEPUB();
-
- if ( ! $epub->error ) {
- echo 'Success: ' . $epub->epub_file . ' created.
';
- }
- else
- {
- echo $epub->error;
- }
-
- } else {
- echo $epub->error;
- }
+ write_epub($epub);
}
// list existing files
+ echo '';
?>