attachment.php
上传用户:gzy2002
上传日期:2010-02-11
资源大小:1785k
文件大小:2k
源码类别:

电子政务应用

开发平台:

Java

  1. <?php
  2. // +-------------------------------------------------------------+
  3. // | DeskPRO v [2.0.1 Production]
  4. // | Copyright (C) 2001 - 2004 Headstart Solutions Limited
  5. // | Supplied by WTN-WDYL
  6. // | Nullified by WTN-WDYL
  7. // | Distribution via WebForum, ForumRU and associated file dumps
  8. // +-------------------------------------------------------------+
  9. // | DESKPRO IS NOT FREE SOFTWARE
  10. // +-------------------------------------------------------------+
  11. // | License ID : Full Enterprise License =) ...
  12. // | License Owner : WTN-WDYL Team
  13. // +-------------------------------------------------------------+
  14. // | $RCSfile: attachment.php,v $
  15. // | $Date: 2004/02/10 01:34:26 $
  16. // | $Revision: 1.6 $
  17. // +-------------------------------------------------------------+
  18. // | File Details:
  19. // | - Attachment downloading and processing.
  20. // +-------------------------------------------------------------+
  21. error_reporting(E_ALL ^ E_NOTICE);
  22. include "./../global.php";
  23. // default do
  24. $_REQUEST['do'] = trim($_REQUEST['do']);
  25. if (!isset($_REQUEST['do']) or $_REQUEST['do'] == "") {
  26. $_REQUEST['do'] = "download";
  27. }
  28. // globalise variables
  29. $global = array (
  30. array('id')
  31. );
  32. rg($global);
  33. ############################### DOWNLOAD ATTACHMENT ############################### 
  34. if ($_REQUEST['do'] == 'download') {
  35. get_attachment($id, 'faq_attachments', 1);
  36. }
  37. ############################### DELETE ATTACHMENT ############################### 
  38. if ($_REQUEST['do'] == 'delete') {
  39. $result = $db->query_return("SELECT blobid, filename, articleid FROM faq_attachments WHERE id = '$id'");
  40. $db->query("DELETE FROM faq_attachments WHERE id = '$id'");
  41. $db->query("DELETE FROM blobs WHERE id = '$result[id]'");
  42. jump("view.php?id=$result[ticketid]&articleid=$result[articleid]", 'Attachment deleted.');
  43. }