<?PHP
//Filename : do_add_tshirt.php
//Description : step in adding a tshirt for sale
//Author : Marty
//Last modified : 2006.12.20
include ('../includes/auth.php');
//set where you want to store files
//in this example we keep file in folder upload
//$HTTP_POST_FILES['ufile']['name']; = upload file name
//for example upload file name cartoon.gif . $path will be upload/cartoon.gif
$path= "../images/shirts/".$HTTP_POST_FILES['ufile']['name'];
if($ufile != none)
{
if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path))
{
//$HTTP_POST_FILES['ufile']['name'] = file name
//$HTTP_POST_FILES['ufile']['size'] = file size
//$HTTP_POST_FILES['ufile']['type'] = type of file
//echo "File Name :".$HTTP_POST_FILES['ufile']['name']."<BR/>";
//echo "File Size :".$HTTP_POST_FILES['ufile']['size']."<BR/>";
//echo "File Type :".$HTTP_POST_FILES['ufile']['type']."<BR/>";
include('../includes/header.php');
echo "<center><img src=\"$path\">";
echo "<p>Image Upload Was Successful<p> Please fill out the form to make the t-shirt available for purchase.</center>";
echo "<center>
<p>
<form method=\"post\" action=\"tshirt_functions.php?cat=add_tshirt\">
<br />
<br />
<br />
<table width=\"329\" border=\"0\">
<tr>
<td width=\"117\">Designed By: </td>
<td width=\"202\"><p>
<input type=\"text\" name=\"design_by\" size=\"25\" />
</p>
</td>
</tr>
<tr>
<td>Title: </td>
<td><p>
<input type=\"text\" name=\"title\" size=\"25\" />
</p>
</td>
</tr>
<tr>
<td>Description: </td>
<td><textarea cols=\"23\" rows=\"5\" name=\"description\"></textarea></td>
</tr>
<tr>
<td><input type=\"hidden\" name=\"posted_by\" value=\"\" />
<input type=\"hidden\" name=\"image\" value=\"$path\" />
Price: </td>
<td><input type=\"text\" name=\"price\" size=\"2\" /></td>
</tr>
<tr><td><INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Add T-Shirt\"></td><td></td></tr>
</table>
<br />
</form>
</center>";include('../includes/footer.php');
}
else
{
echo "The Image did not upload correctly, please go <a href=\"add_tshirt3.php\">back</a> and try again.";
}
}
?>