2019-08-25 21:45:52 +02:00
|
|
|
<?PHP
|
|
|
|
echo '<link rel="stylesheet" type="text/css" href="css/main.css">';
|
|
|
|
echo '<div class="title">';
|
|
|
|
echo 'museum-digital CSV to XML converter';
|
|
|
|
echo '</div>';
|
|
|
|
echo '<div class="maincontent">';
|
2019-08-27 00:31:46 +02:00
|
|
|
$target = "csv/";
|
|
|
|
$target = $target . basename( $_FILES['uploaded']['name']);
|
2019-08-25 21:45:52 +02:00
|
|
|
$targetpart = basename( $_FILES['uploaded']['name']);
|
2019-08-27 00:31:46 +02:00
|
|
|
$ok = 1;
|
|
|
|
$semikoma = $_POST['deli'];
|
|
|
|
//This is our size condition
|
|
|
|
if ($uploaded_size > 40000000) {
|
|
|
|
echo "Your file is too large.<br>";
|
|
|
|
$ok = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
//Here we check that $ok was not set to 0 by an error
|
|
|
|
if ($ok == 0) {
|
|
|
|
echo "Sorry your file was not uploaded";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//If everything is ok we try to upload it
|
|
|
|
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) {
|
|
|
|
echo "The file <b>" . basename( $_FILES['uploaded']['name']) . "</b> has been uploaded<hr>";
|
|
|
|
echo '<a href="index2.php?fnam=' . basename( $_FILES['uploaded']['name']) . '"><img src="img/go.gif"> Create XML (iso8859)</a><br>';
|
|
|
|
echo '<a href="index4.php?fnam=' . basename( $_FILES['uploaded']['name']) . '"><img src="img/go.gif"> Create XML (utf-8)</a><br>';
|
|
|
|
echo '<a href="index3.php?fnam=' . basename( $_FILES['uploaded']['name']) . '"><img src="img/go.gif"> Check validity for museum-digital import</a>';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
echo "Sorry, there was a problem uploading your file.";
|
|
|
|
}
|
2019-08-25 21:45:52 +02:00
|
|
|
}
|
|
|
|
echo '</div>';
|