<?php
include('../../../common.php');
include($phpshe['path_include'].'class/upload.class.php');
include($phpshe['path_include'].'class/thumb.class.php');
if ($_FILES) {
	$upload = new upload($_FILES['Filedata'], 'data/cache/attachment/');

	$newimgpath = 'data/cache/attachment/' . $upload->file_name;

	$thumb = new thumb($phpshe['path_root'] . $newimgpath);   
	$thumb->resizeImage(600, 430, 0);   
	$thumb->saveImage($phpshe['path_root'] . $newimgpath, 100);

	echo $newimgpath;
}
?>