isInstalled('forum')) { header('Location: '.e_BASE.'index.php'); exit; } if(!USER) { header("location:".e_BASE.$PLUGINS_DIRECTORY."forum/forum.php"); exit; } include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_uploads.php'); e107::lan('forum','front'); if(is_array($_POST['delete'])) { foreach(array_keys($_POST['delete']) as $fname) { $f = explode("_", $fname); if($f[1] == USERID) { $path = e_UPLOAD.$fname; if(unlink($path) == TRUE) { $msg = FRMUP_2.": $path"; } else { $msg = FRMUP_3.": $path"; } } } } include_once(e_HANDLER."file_class.php"); include_once(HEADERF); if($msg) { $ns->tablerender(FRMUP_4, $msg); } $fi = new e_file; $mask = ".*_".USERID."_FT.*"; $fileList = $fi->get_files(e_UPLOAD, $mask); if($sql->db_Select('forum_thread','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'")) // FIXME new forum db structure { $threadList = $sql->db_getList(); } $filecount = 0; if(is_array($fileList)) { $txt = "
"; foreach($fileList as $finfo) { if($finfo['fname']) { $filecount++; $txt .= ""; $found = FALSE; if(is_array($threadList)) { foreach($threadList as $tinfo) { if(strpos($tinfo['thread_thread'], $finfo['fname']) != FALSE) { $found = $tinfo; break; } } } if($found != FALSE) { if($tinfo['thread_parent']) { $txt .= ""; } else { $txt .= ""; } } else { $txt .= ""; } $txt .= ""; } } $txt .= "
".FRMUP_5." ".FRMUP_6."
{$finfo['fname']}".FRMUP_7.": {$tinfo['thread_parent']}".FRMUP_7.": {$tinfo['thread_id']}".FRMUP_8."
"; } if(!$filecount) { $ns->tablerender(FRMUP_1,FRMUP_9); include_once(FOOTERF); exit; } $ns->tablerender(FRMUP_1, $txt); include_once(FOOTERF); ?>