forked from SIBiUSP/coletaprod
-
Notifications
You must be signed in to change notification settings - Fork 9
/
dspaceConnect.php
42 lines (29 loc) · 1005 Bytes
/
dspaceConnect.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
require 'inc/config.php';
require 'inc/functions.php';
print_r($_REQUEST);
echo "<br/><br/>";
$cookies = DSpaceREST::loginREST();
print_r($cookies);
if (isset($_REQUEST['_id'])){
$cursor = Elasticsearch::get($_REQUEST['_id'], null);
}
if (isset($_REQUEST["createRecord"])) {
if ($_REQUEST["createRecord"] == "true") {
$dataString = DSpaceREST::buildDC($cursor, $_REQUEST['_id']);
echo "<br/><br/>";
print_r($dataString);
echo "<br/><br/>";
$resultCreateItemDSpace = DSpaceREST::createItemDSpace($dataString, $dspaceCollection, $cookies);
echo "<br/><br/>";
print_r($resultCreateItemDSpace);
// echo "<script type='text/javascript'>
// $(document).ready(function(){
// //Reload the page
// window.location = window.location.href;
// });
// </script>";
}
}
DSpaceREST::logoutREST($cookies);
?>