Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add website ability to delete containers
- Loading branch information
1 parent
625f1d6
commit 1ca9b8a
Showing
6 changed files
with
155 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
require_once("swordappentry.php"); | ||
|
||
class SWORDAPPResponse extends SWORDAPPEntry { | ||
|
||
// Construct a new deposit response by passing in the http status code | ||
function __construct($sac_newstatus, $sac_thexml) { | ||
// Call the super constructor | ||
parent::__construct($sac_newstatus, $sac_thexml); | ||
|
||
} | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
// Load the PHP library | ||
include_once('../../../../swordappclient.php'); | ||
include_once('../../utils.php'); | ||
|
||
// Store the values | ||
session_start(); | ||
|
||
// Try and delete the edit-iri package | ||
$client = new SWORDAPPClient(); | ||
$response = $client->deleteContainer($_POST['editiri'], $_SESSION['u'], $_SESSION['p'], $_SESSION['obo']); | ||
|
||
if ($response->sac_status != 204) { | ||
$error = 'Unable to delete container. HTTP response code: ' . | ||
$response->sac_status; | ||
} else { | ||
$_SESSION['error'] = ''; | ||
} | ||
|
||
?> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<title>SWORD v2 exerciser - DELETE a container</title> | ||
<link rel='stylesheet' type='text/css' media='all' href='../../css/style.css' /> | ||
</head> | ||
<body> | ||
|
||
<div id="header"> | ||
<h1>SWORD v2 exerciser</h1> | ||
</div> | ||
|
||
<div class="section"> | ||
<h2>Response:</h2> | ||
<pre>Status code: <?php echo $response->sac_status; ?></pre> | ||
<pre><?php | ||
if ($response->sac_status != 204) { | ||
echo htmlentities($response->sac_xml); | ||
}?></pre> | ||
</div> | ||
|
||
<div id="footer"> | ||
<a href='../../'>Home</a> | Based on the <a href="http://github.com/stuartlewis/swordappv2-php-library/">swordappv2-php-library</a> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
// Load the PHP library | ||
include_once('../../../../swordappclient.php'); | ||
include_once('../../utils.php'); | ||
|
||
// Store the values | ||
session_start(); | ||
|
||
// Try and delete the edit-iri package | ||
$client = new SWORDAPPClient(); | ||
$response = $client->deleteResourceContent($_POST['editmediairi'], $_SESSION['u'], $_SESSION['p'], $_SESSION['obo']); | ||
|
||
if ($response->sac_status != 204) { | ||
$error = 'Unable to delete content. HTTP response code: ' . | ||
$response->sac_status; | ||
} else { | ||
$_SESSION['error'] = ''; | ||
} | ||
|
||
?> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<title>SWORD v2 exerciser - DELETE a resource container</title> | ||
<link rel='stylesheet' type='text/css' media='all' href='../../css/style.css' /> | ||
</head> | ||
<body> | ||
|
||
<div id="header"> | ||
<h1>SWORD v2 exerciser</h1> | ||
</div> | ||
|
||
<div class="section"> | ||
<h2>Response:</h2> | ||
<pre>Status code: <?php echo $response->sac_status; ?></pre> | ||
<pre><?php | ||
if ($response->sac_status != 204) { | ||
echo htmlentities($response->sac_xml); | ||
}?></pre> | ||
</div> | ||
|
||
<div id="footer"> | ||
<a href='../../'>Home</a> | Based on the <a href="http://github.com/stuartlewis/swordappv2-php-library/">swordappv2-php-library</a> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters