global $wfsConfig; if (!is_dir($_POST['uploadpath']) ) { redirect_header("filemanager.php?rootpath=".$dirpath."",1,"No Dir selected"); exit; } if (!is_writeable($_POST['uploadpath']) ) { redirect_header("filemanager.php?rootpath=".$dirpath."",1,"Path Not writable"); exit; } $upload = new uploadfile(); $upload->loadPostVars(); $upload->setMode($wfsConfig['wfsmode']); $upload->setMaxImageHight($wfsConfig['imgheight']); $upload->setMaxImageWidth($wfsConfig['imgwidth']); $upload->setMaxFilesize($wfsConfig['filesize']); if (isset($_POST['imgname']) && !empty($_POST['imgname'])) $imgname = strtolower($_POST['imgname']); $distfilename = $upload->doUploadimage($_POST['uploadpath'], $imgname); if ( $distfilename ) { redirect_header("filemanager.php?rootpath=".$_POST['uploadpath']."",1,_AM_UPLOADED); exit(); } else { xoops_cp_header(); echo"<table width='100%' border='0' cellspacing='1' cellpadding = '2'><tr><td>"; echo "<div class='confirmMsg'>"; echo "<h4>"._AM_UPLOADFAIL."</h4>"; echo "File: ".$upload->originalName."<br />";