null,1=>null,2=>null); include('include/functions.php'); $PAGE = (isset($_GET['page'])) ? $_GET['page'] : 'home'; ### CONFIGURATION ### if (!file_exists('config.xml')) { $ERRORS['fatal']['ErrorConfigFile'] = true; } else { $CONF = load_config('config.xml'); } if (!file_exists('include/nconvert.exe')) { $ERRORS['fatal']['ErrorNconvert'] = true; } ### HEADER ### $CONF = array_merge($CONF, GetLanguage()); include('language/'.$CONF['user_lang'].'/'.$CONF['user_lang'].'.php'); include('include/header.php'); ### PROCESSUS ### if ($PAGE == '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'] = true; } if ($CONF['silentORNOT'] == 'block' AND !is_dir_empty($CONF['DIRsortie'])) { $ERRORS['fatal']['ErrorFolderOut'] = true; } else if ($CONF['silentORNOT'] == 'erase' AND !is_dir_empty($CONF['DIRsortie'])) { $ERRORS['notice']['EraseFolderOut'] = true; } } } else if ($PAGE == 'setup') { if (isset($_GET['ErrorConfig'])) { $ERRORS['notice']['ErrorConfig'] = true; } if (isset($_POST['DIRsource'])) { include('include/save_config.php'); } } else if ($PAGE = 'process') { include('include/main.php'); } ### ERREURS ### if (isset($ERRORS['fatal'])) { $PAGE_CONTENT[1] .= '