$s

"; global $ftproot; $sigfile=$ftproot.'signal.dat'; if (file_exists($sigfile)) echo "
".file_get_contents($sigfile).'
'; echo ''; } if ($f=$_FILES['data']) { if (strstr($_SERVER['CONTENT_TYPE'],'Muon1') && $_POST['folder']) switch ($f['error']) { case UPLOAD_ERR_OK: $dest=$ftproot.$_POST['folder'].'/'.$f['name']; $dest=str_replace('../','',$dest); if (!file_exists($dest)) { if (move_uploaded_file($f['tmp_name'],$dest)) h('HTTP/1.1 200 OK (file uploaded successfully)'); else h('HTTP/1.1 500 Server Error (cannot move uploaded file from tmp folder to '.$dest.')'); } else h('HTTP/1.1 403 Forbidden (will not overwrite existing file)'); break; case UPLOAD_ERR_INI_SIZE: h('HTTP/1.1 413 Request Entity Too Large (exceeds upload_max_filesize directive in php.ini)'); break; case UPLOAD_ERR_FORM_SIZE: h('HTTP/1.1 413 Request Entity Too Large (exceeds MAX_FILE_SIZE directive in the HTML form)'); break; case UPLOAD_ERR_PARTIAL: h('HTTP/1.1 500 Server Error (file only partially uploaded)'); break; case UPLOAD_ERR_NO_FILE: h('HTTP/1.1 500 Server Error (no file was uploaded)'); break; case UPLOAD_ERR_NO_TMP_DIR: h('HTTP/1.1 500 Server Error (no upload_tmp_dir given in php.ini)'); break; case UPLOAD_ERR_CANT_WRITE: h('HTTP/1.1 500 Server Error (failed to write file to disk)'); break; default: h('HTTP/1.1 500 Server Error (unknown error!)'); break; } else h('HTTP/1.1 403 Forbidden (upload not from Muon1 client)'); } else h('HTTP/1.1 403 Forbidden (not a file upload)'); ?>