// ###################################################################
-if ($_REQUEST['do'] == 'kill')
-{
- if (!can_perform('caneditattach'))
- {
- $message->error_permission();
- }
-
- $db->query("DELETE FROM " . TABLE_PREFIX . "attachment WHERE attachmentid = $attachment[attachmentid]");
-
- $log->arguments = array($attachment['attachmentid']);
- $log->allowempty = true;
- $log->log();
-
- $message->redirect($lang->string('The attachment has been removed.'), "showreport.php?bugid=$bug[bugid]");
-}
-
-// ###################################################################
-
-if ($_REQUEST['do'] == 'delete')
-{
- if (!can_perform('caneditattach'))
- {
- $message->error_permission();
- }
-
- $message->message(sprintf($lang->string('Are you sure want to delete this attachment (id: %1$s)? <a href="attachment.php?do=kill&attachmentid=%1$s">Yes</a>'), $attachment['attachmentid']));
-}
-
-// ###################################################################
-
if ($_POST['do'] == 'insert')
{
if (!can_perform('canputattach'))
<div id="submitrow">
<input name="submit" type="submit" value=" {@"Submit"} " accesskey="s" />
<input name="reset" type="reset" value=" {@"Reset"} " accesskey="r" />
- [<a href="attachment.php?do=delete&attachmentid=$attachment[attachmentid]\">{@"Delete"}</a>]
</div>
</form>