Add basic application in order to perform the tasks
This commit is contained in:
parent
46d993d168
commit
8d5109d7de
9 changed files with 295 additions and 5 deletions
56
resources/epub-loader/app/index.php
Normal file
56
resources/epub-loader/app/index.php
Normal file
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
/**
|
||||
* Epub loader application
|
||||
*
|
||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
||||
* @author Didier Corbière <didier.corbiere@opale-concept.com>
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Global defines
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Application version
|
||||
define('DEF_AppVersion', '1.0');
|
||||
// Application name
|
||||
define('DEF_AppName', 'epub loader');
|
||||
// Admin email
|
||||
define('DEF_AppAdminMail', 'didier.corbiere@opale-concept.com');
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Include files
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'config.php');
|
||||
require_once($gConfig['cops_directory'] . '/resources/epub-loader/CalibreDbLoader.class.php');
|
||||
require_once($gConfig['cops_directory'] . '/resources/epub-loader/BookExport.class.php');
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Start application
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Global vars
|
||||
$gErrorArray = array();
|
||||
|
||||
// Get the action to execute
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : null;
|
||||
|
||||
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'header.php');
|
||||
if (isset($action)) {
|
||||
$phpFile = sprintf('%s%saction_%s.php', realpath(dirname(__FILE__)), DIRECTORY_SEPARATOR, $action);
|
||||
require_once($phpFile);
|
||||
}
|
||||
else {
|
||||
// Display the available actions
|
||||
echo ' <ul>' . "\n";
|
||||
foreach ($gConfig['actions'] as $action => $actionInfo) {
|
||||
echo ' <li>' . "\n";
|
||||
echo ' <a href="./index.php?action=' . $action . '">' . $actionInfo . '</a>' . "\n";
|
||||
echo ' </li>' . "\n";
|
||||
}
|
||||
echo ' </ul>' . "\n";
|
||||
}
|
||||
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'footer.php');
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue