<?
session_start();
if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); parent.document.location='ind.php' </script>";
  return;
}

if($up)
{
if($ff !="none")
{
   $fl=$HTTP_POST_FILES['ff']['name'];
   $file_dir=$fldr;
   $tmp_name=$_FILES['ff']['tmp_name'];
   move_uploaded_file($tmp_name,"$file_dir/$ff_name") or die(' Err: could not copy file');
   print "<center>Copied file ".$ff_name." ==> ".$fldr;

 }
}
?>
<style>
body,td{font-family:'arial narrow';letter-spacing:1;}
th{background-color:c1d799}
.mnu{margin-left:5}
</style>
<center>
<form action='<?print $PHP_SELF?>' method='post' ENCTYPE="multipart/form-data">
<table cellspacing=1 cellpadding=1 bgcolor='orange'>
<tr><td bgcolor='white'>
<table>
<th Colspan=2>Upload Files</th>
<tr><td>Select target folder </td><td><input type=text name='fldr' size=40 value='/PSN_WEB/'></td></tr>
<tr><td>Select File</td><td><input type=file name='ff'></td></tr>
<tr><td colspan=2 align=center><input type=submit value='Upload' name='up'></td></tr>
</table>
</td></tr>
</table>
</form>
