"index.php");
if(empty($config['allow_add'])) {
unset($op);
} else if(isset($_POST['op'])) {
$op = $_POST['op'];
} else {
$op = $_GET['op'];
}
// include html header
include("include/header.inc.php");
switch($op) {
case "add":
addArchive($_POST);
break;
default :
addForm();
break;
}
// include html footer
include("include/footer.inc.php");
// add a new archive to the database
function addArchive($vars) {
global $db, $dbtable, $config, $baseurl;
?>
Add an Archive
You did not fill out one of the form fields. Please go back and complete your submission.
query("SELECT id FROM $dbtable[archives] WHERE oai='$vars[archive_oai]'");
if($db->num_rows($result) != 0) {
?>
This archive has already been indexed. If you believe this message to be in error, please contact .
Back to Home
The URL you entered does not appear to be a valid OAI 1.1 or 2.0 archive. Please go back and verify that you entered the correct URL.
query("INSERT INTO $dbtable[archives] (name, repositoryname, email, url, oai, protocol, description, rst, datestamp) VALUES ('$vars[archive_name]', '$vars[repositoryname]', '$vars[admin_email]', '$vars[archive_url]', '$vars[archive_oai]', '$vars[protocol_version]', '$vars[archive_description]', '$vars[archive_rst]', NOW())");
if(!empty($config['add_notify'])) {
// send notification email to admin
mail($config['contact_email'], $config['short_title'] . " - Archive submitted", "The archive ".sanitize_output($vars[archive_name])." has been submitted to the " . $config['short_title'] . ". Please login at {$baseurl}admin.php to index this archive.", "From: " . $config['contact_email']);
}
?>
The archive has been successfully added to our database, and will be indexed shortly. Thank you for your submission.
Back to Home
Add an Archive
If you would like your site added to our index, please contact .
If you have any questions, please contact .