} foreach ($HTTP_GET_VARS as $k => $v) { ${$k} = $v; } if (empty($fileid)) { redirect_header("index.php"); } include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/class/wfsfiles.php'; global $wfsConfig; if (empty($wfsConfig['filesbasepath'])) { $workdir = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/cache/uploaded"; } else { $workdir = XOOPS_ROOT_PATH . "/" . $wfsConfig['filesbasepath'] . "/"; } $file = new WfsFiles($fileid); $filename = $file->getFileRealName(); if (!is_readable($workdir . "/" . $filename)) { redirect_header(XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/index.php?articleid=" . $file->getArticleid(), 1, _WFS_NOFILE); exit; } $size = filesize($workdir . "/" . $filename); $dlfilename = $file->getDownloadname(); if (empty($dlfilename)) { $dlfilename = $fileid . "." . $file->getExt(); } if (strstr($HTTP_SERVER_VARS["HTTP_USER_AGENT"], "MSIE")) { // For IE if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/" . $xoopsConfig['language'] . "/convert.php")) { $langdir = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/" . $xoopsConfig['language']; } else { $langdir = XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->dirname() . "/language/english";
include_once "../class/wfsfiles.php"; if ($ok) { $file = new WfsFiles($fileid); $articleid = $file->getArticleid(); $file->delete(); redirect_header("index.php?op=edit&articleid=" . $articleid, 1, _AM_DBUPDATED); exit; } else { xoops_cp_header(); global $xoopsConfig, $wfsConfig; echo "<table width='100%' border='0' cellspacing='1'><tr><td>"; echo "<div class='confirmMsg'>"; echo "<h4>" . _AM_FILEDEL . "</h4>"; $file = new WfsFiles($fileid); $filename = XOOPS_URL . "/" . $wfsConfig['filesbasepath']; echo $filename . "/" . $file->getFileRealName() . " (" . $file->getDownloadname() . ")\n"; echo "<table><tr><td><br />"; echo myTextForm("index.php?op=delfile&fileid=" . $fileid . "&ok=1", _AM_YES); echo "</td><td><br />"; echo myTextForm("javascript:history.go(-1)", _AM_NO); echo "</td></tr></table>"; echo "</div>"; echo "</td></tr></table>"; } break; case "filesave": include_once "../class/wfsfiles.php"; if (!empty($fileid)) { $file = new WfsFiles($fileid); } else { $file = new WfsFiles();