4 include_once(
'../../../../packager_atom_multipart.php');
8 $_SESSION[
'durl'] = $_POST[
'durl'];
11 include(
'../../config.php');
14 $test_rootin = $_SESSION[
'location'];
15 $test_dirin =
'files';
16 $test_rootout = $_SESSION[
'location'] .
'/files';
17 $test_fileout = mt_rand() .
'.multipart';
21 $test_packager->setTitle($_POST[
'title']);
22 $test_packager->setIdentifier($_POST[
'identifier']);
23 $test_packager->addEntryAuthor($_POST[
'author']);
24 $test_packager->setSummary($_POST[
'abstract']);
25 $test_packager->addMetadata(
"abstract", $_POST[
'abstract']);
26 $test_packager->addMetadata(
"available", $_POST[
'date']);
27 $test_packager->addMetadata(
"creator", $_POST[
'author']);
28 $test_packager->addMetadata(
"identifier", $_POST[
'identifier']);
29 $test_packager->addMetadata(
"title", $_POST[
'title']);
31 $filename = $test_rootin . $test_dirin .
'/' . basename($_FILES[
'file'][
'name']);
32 move_uploaded_file($_FILES[
'file'][
'tmp_name'], $filename);
33 $test_packager->addFile(basename($_FILES[
'file'][
'name']));
35 $test_packager->create();
37 $_SESSION[
'filename'] = $test_rootout .
'/' . $test_fileout;
41 if(isset($_POST[
'inprogress'])) {
42 $_SESSION[
'inprogress'] =
"true";
44 $_SESSION[
'inprogress'] =
"false";
47 header(
'Location: ../../post/multipart/');