<?php
session_save_path("/home/users/web/b557/sl.flyingcoachlimo/public_html/cgi-bin/tmp");
session_start();
if (!isset($_SESSION["verified"])) {
header ("Location: index.php");
exit();
}
// Connect to the database
include("incDBConnectAdmin.php");
// Determine if the user had submitted new data and update the database
if (isset($_POST["submit"])) {
$target_path = "/home/users/web/b557/sl.flyingcoachlimo/public_html/images/backdrops/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
$query = "INSERT INTO images (eID, eFilename) VALUES (NULL, '" . $_FILES['uploadedfile']['name'] . "')";
mysql_query($query);
echo "<h3 style=color:red>The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded</h3>";
} else{
echo "<h3 style=color:red>There was an error uploading the file, please try again!</h3>";
}
}
?>
<link rel="stylesheet" href="../stylesheet.css" type="text/css" />
<form enctype="multipart/form-data" action="uploadbackdrop.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000000" />
<table align="center" border="0" width="350">
<tr valign="top" height="25">
<td>
<h1>
www.LetUsDesign.it - Edit.it CMS v1.0.7
</h1>
<p>
Please be sure to make all files uploaded have a width of 941px and a height of 312px<br/><br/>
</p>
</td>
</tr>
<tr>
<td>
<br/><br/>
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" name="submit" value="Upload File" /><br/><br/>
<?php echo "<input type='hidden' name='pageID' value='" . $pageID . "'>"; ?>
<?php echo "<input type='hidden' name='pageSection' value='" . $pageSection . "'>"; ?>
</td>
</tr>
<tr>
<td>
<br/><br/>
<a href="main.php">Go Back To Main Menu</a>
<br/><br/>
<a href="logout.php">Logout of Page Editor</a>
</td>
</tr>
</table>
</form>
</body>
</html>