Ejemplo n.º 1
0
}
if (isset($attachments)) {
    if (empty($attachments) && !isset($orphans['files']) && isset($_GET['ext'])) {
        $main_content .= '
			<h4>Oh noes - this appears to be an empty folder! Would you like to delete it?</h4>
			
			<form action="' . $action_url . '" method="post" id="delete_folder_form">
				<p>
					<span class="note">
					<input name="remove_folder" type="submit" value="yes - make this an ex-folder"/>
					</span>
				</p>
			</form>
			';
    } else {
        $main_content .= build_file_listing($attachments);
    }
} else {
    // confirm file delete
    if (isset($_GET['action']) && $_GET['action'] == 'delete') {
        $main_content .= '
				<h2>Are you sure you want to delete this attachment?</h2>
				<form action="' . $action_url . '" method="post" name="confirm_delete_attachment_form">
					<input name="filename" type="hidden" value="' . $attachment['filename'] . '"/>
					<input name="ext" type="hidden" value="' . $attachment['ext'] . '"/>
					<input name="attachment_id" type="hidden" value="' . $attachment['id'] . '"/>
					<input name="confirm_delete_attachment" type="submit" value="Yes"/>
					<input name="cancel_delete_attachment" type="submit" value="No" />
				</form>
				';
    }
Ejemplo n.º 2
0
        if (isset($_GET['action']) && $_GET['action'] == 'delete') {
            $main_content .= '
					<h2>Are you sure you want to delete this file?</h2>
					<form action="' . $action_url . '" method="post" name="confirm_delete_file_form">
						<input name="filename" type="hidden" value="' . $file_details['filename'] . '"/>
						<input name="folder" type="hidden" value="' . $_GET['folder'] . '"/>
						<input name="confirm_delete_file" type="submit" value="Yes"/>
						<input name="cancel_delete_file" type="submit" value="No" />
					</form>
					';
        }
        $main_content .= "\r\n\t\t\t\t<hr />\r\n\t\t\t\t<h4>file details</h4>\r\n\t\t\t\t\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t<li><strong>filename: </strong><a href=\"" . $file_details['path'] . "\">" . $file_details['filename'] . "</a></li>\r\n\t\t\t\t\t<li><strong>size: </strong>" . get_kb_size($file_details['size']) . "</li>\r\n\t\t\t\t\t<li><strong>date uploaded: </strong>" . date('d F Y', $file_details['date_uploaded']) . "</li>\r\n\t\t\t\t</ul>";
        // get file listing if a folder name is set via url
    } elseif (isset($_GET['folder'])) {
        if (!empty($files)) {
            $main_content .= build_file_listing($files);
        } else {
            $main_content .= '<h4>Aha! An empty folder... wanna delete it?
				
				<form action="' . $action_url . '" method="post" id="delete_folder_form">
					<p>
						<span class="note">
						<input name="remove_folder" type="submit" value="yes - make this an ex-folder"/>
						</span>
					</p>
				</form>
				';
        }
    }
}
// output aside content - into $aside_content variable