Open Journal Systems  3.3.0
atomentry/make.php
1 <?php
2 
3  // Load the PHP library
4  include_once('../../../../packager_atom_multipart.php');
5 
6  // Store the values
7  session_start();
8  $_SESSION['durl'] = $_POST['durl'];
9 
10  // Set the location of this site on file
11  include('../../config.php');
12 
13  // Construct the package
14  $test_rootin = $_SESSION['location'];
15  $test_dirin = 'files';
16  $test_rootout = $_SESSION['location'] . '/files';
17  $test_fileout = 'atom';
18 
19  // Create the test package
20  $test_packager = new PackagerAtomMultipart($test_rootin, $test_dirin, $test_rootout, $test_fileout);
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']);
30 
31  $test_packager->create();
32 
33  $_SESSION['filename'] = $test_rootout . '/' . $test_fileout;
34 
35  // Is it in progress?
36  if(isset($_POST['inprogress'])) {
37  $_SESSION['inprogress'] = "true";
38  } else {
39  $_SESSION['inprogress'] = "false";
40  }
41 
42  header('Location: ../../post/atomentry/');
43 
44 ?>
PackagerAtomMultipart
Definition: packager_atom_multipart.php:5