* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ //////////// Check Inclusion de pages //////////// if (!class_exists('auth')) { include_once ("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// Check Droits utilisateur //////////// if (!$GLOBALS['l21auth']->isSuperAdmin()) ReloadIndex('admin'); //////////// global $plug; $cronfile = SITE_PATH.'config/cron/50_db-backup'; $options = $plug->retrieveValues($GLOBALS['sql_object']); isset($options['backup-scheduled']) ? $schedule = $options['backup-scheduled'] : $schedule = 'nocron'; isset($options['backup-library']) ? $prefix_exclude = 'checked' : $prefix_exclude = ''; isset($options['backup-library']) ? $performLibraryBackup = 'libraryBackup=true' : $performLibraryBackup = 'libraryBackup=false'; // we create cronjob fil if options already exists in database if($schedule != 'nocron') { // we create the new cron file $command = $schedule . ' '. $plug->getVar('relative_url') . 'backup.php' ; file_put_contents($cronfile, $command); } ?>