'home', 'header' => null, 'content' => null, 'msgs' => null, 'end' => null, ); include('include/functions.php'); if (isset($_GET['page'])) $PAGE['section'] = $_GET['page']; ### CONFIGURATION ### if (!file_exists('config.xml')) { $ERRORS['fatal'][] = 'ErrorConfigFile'; } else { $CONF = load_config('config.xml'); } if (!file_exists('include/nconvert.exe')) { $ERRORS['fatal'][] = 'ErrorNconvert'; } $CONF = array_merge($CONF, GetLanguage()); include('language/'.$CONF['user_lang'].'/common.lang.php'); ### PROCESSUS ### switch ($PAGE['section']) { case 'home': if (!isset($ERRORS['fatal'])) { if (!file_exists($CONF['DIRsource'])) { mkdir($CONF['DIRsource']); } if (!file_exists($CONF['DIRsortie'])) { mkdir($CONF['DIRsortie']); } if (is_dir_empty($CONF['DIRsource'])) { $ERRORS['fatal'][] = 'ErrorFolderIn'; } if ($CONF['silentORNOT'] == 'block' AND !is_dir_empty($CONF['DIRsortie'])) { $ERRORS['fatal'][] = 'ErrorFolderOut'; } else if ($CONF['silentORNOT'] == 'erase' AND !is_dir_empty($CONF['DIRsortie'])) { $ERRORS['notice'][] = 'EraseFolderOut'; } } break; case 'setup': if (isset($_POST['submit'])) { include('include/save_config.php'); } break; case 'process': include('include/main.php'); break; } ### AFFICHAGE ### switch ($PAGE['section']) { case 'home': include('include/display_config.php'); if (isset($ERRORS['fatal'])) { $PAGE['end'] .= '
'; } else { $PAGE['end'] .= '