Initial.
This commit is contained in:
40
upload.php
Normal file
40
upload.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?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">';
|
||||
$target = "csv/";
|
||||
$target = $target . basename( $_FILES['uploaded']['name']) ;
|
||||
$targetpart = basename( $_FILES['uploaded']['name']);
|
||||
$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.";
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
?>
|
Reference in New Issue
Block a user