# License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined("EXPONENT")) { exit(""); } if (!defined("SYS_FORMS")) { require_once BASE . "subsystems/forms.php"; } if (!defined("SYS_FILES")) { require_once BASE . "subsystems/files.php"; } $template = new template("importer", "_usercsv_form_start"); if (exponent_files_canCreate(BASE . "modules/importer/importers/usercsv/tmp/test") != SYS_FILES_SUCCESS) { $template->assign("error", "The modules/importer/importers/usercsv/tmp directory is not writable. Please contact your administrator."); $template->output(); } else { //initialize the for stuff exponent_forms_initialize(); $i18n = exponent_lang_loadFile('modules/importer/importers/usercsv/start.php'); //Setup the mete data (hidden values) $form = new form(); $form->meta("module", "importer"); $form->meta("action", "page"); $form->meta("page", "mapper"); $form->meta("importer", "usercsv"); //Setup the arrays with the name/value pairs for the dropdown menus $delimiterArray = array(',' => $i18n['comma'], ';' => $i18n['semicolon'], ':' => $i18n['colon'], ' ' => $i18n['space']); //Register the dropdown menus
# Exponent is free software; you can redistribute # it and/or modify it under the terms of the GNU # General Public License as published by the Free # Software Foundation; either version 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## // Part of the Extensions category. if (!defined('EXPONENT')) { exit(''); } if (exponent_permissions_check('extensions', exponent_core_makeLocation('AdministrationModule'))) { if (!defined('SYS_FILES')) { require_once BASE . 'subsystems/files.php'; } $ext_filename = BASE . "/tmp/uploads/" . session_id(); $files = array(); foreach (exponent_files_listFlat($ext_filename, true, null, array(), $ext_filename) as $key => $f) { if ($key != '/archive.tar' && $key != '/archive.tar.gz' && $key != '/archive.tar.bz2' && $key != '/archive.zip') { $files[] = array('absolute' => $key, 'relative' => $f, 'canCreate' => exponent_files_canCreate(BASE . substr($key, 1)), 'ext' => substr($f, -3, 3)); } } $template = new template('AdministrationModule', '_upload_filesList', $loc); $template->assign('relative', $ext_filename); $template->assign('files', $files); $template->output(); } else { echo SITE_403_HTML; }
# Exponent is free software; you can redistribute # it and/or modify it under the terms of the GNU # General Public License as published by the Free # Software Foundation; either version 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined('EXPONENT')) { exit(''); } $dest_dir = $_POST['dest_dir']; $files = array(); if (!defined('SYS_FILES')) { require_once BASE . 'subsystems/files.php'; } foreach (array_keys($_POST['mods']) as $mod) { $files[$mod] = array('', array()); if (class_exists($mod)) { $files[$mod][0] = call_user_func(array($mod, 'name')); } foreach (array_keys(exponent_files_listFlat($dest_dir . '/files/' . $mod, 1, null, array(), $dest_dir . '/files/' . $mod . '/')) as $file) { $files[$mod][1][$file] = exponent_files_canCreate(BASE . 'files/' . $mod . '/' . $file); } } exponent_sessions_set('dest_dir', $dest_dir); exponent_sessions_set('files_data', $files); $template = new template('importer', '_files_verifyFiles'); $template->assign('files_data', $files); $template->output();