<HTML><BODY BGCOLOR=FFFFFF> 
    <?php 
        $uploadDir = '../galleryimage/'; 


        if (isset($submit)){ 
            if ($upload != 'none'){ 
	
			    $upload_name=$id;
                $dest = $uploadDir . $upload_name; 
                if (@copy($upload, $dest)){ 
                    echo "Successfully uploaded $dest<BR>\n"; 
                } 
                else{ 
                    echo "<FONT COLOR=FF0000><B>File Upload Failed</B></FONT><BR>\n"; 
                    $perms = @fileperms($uploadDir); 
                    $owner = @fileowner($uploadDir); 
                    if (!$perms){ 
                        echo "Directory does not exist: $uploadDir<BR>\n"; 
                    } 
                    else{ 
                        $myuid = getmyuid(); 
                        if (!($perms & 2) && !(($owner == $myuid) && ($perms & 128))){ 
                            echo get_current_user(), " doesn't have permission to write in $uploadDir<BR>\n"; 
                        } 
                    } 
                } 
            } 
            else{ 
                echo "<FONT COLOR=FF0000><B>File Upload Failed</B></FONT><BR>\n"; 
                echo "Filesize exceeds limit in FORM or php.ini<BR>\n"; 
            } 
?>
<?php echo $upload_name ?>
<meta http-equiv="refresh" content="0;URL=edit_image.php?ID=<?php echo $id1 ?>">

       <?php } 
    ?> 
  <div align="center">  <FORM ENCTYPE=multipart/form-data ACTION=gallery_image.php METHOD=POST>
    <input type="hidden" name="upload_name" value="<?php echo $ID ?>">
    <INPUT TYPE=HIDDEN NAME=MAX_FILE_SIZE VALUE=9000000000000>
    <INPUT TYPE=HIDDEN NAME=id VALUE=<?php echo $ID ?>.jpg>
	<INPUT TYPE=HIDDEN NAME=id1 VALUE=<?php echo $ID ?>>
    Upload File: 
    <INPUT NAME=upload TYPE=FILE>
    <BR>
    <INPUT TYPE=SUBMIT NAME=submit VALUE="Upload">
</FORM>  </div>
</BODY></HTML> 