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

电子政务应用

开发平台:

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:25 $
  16. // | $Revision: 1.14 $
  17. // +-------------------------------------------------------------+
  18. // | File Details:
  19. // | - Attachment viewer
  20. // +-------------------------------------------------------------+
  21. error_reporting(E_ALL & ~E_NOTICE);
  22. require_once('./global.php');
  23. //Nullify WTN-WDYL Team
  24. // globalise variables
  25. $global = array (
  26. array('id')
  27. );
  28. rg($global);
  29. check_user();
  30. $result = $db->query_return("
  31. SELECT ticket.userid
  32. FROM ticket_attachments
  33. LEFT JOIN ticket ON (ticket_attachments.ticketid = ticket.id)
  34. WHERE ticket_attachments.id = " . intval($id) . "
  35. ");
  36. if ($result['userid'] != $session[userid]) {
  37. error('error_noticket_permission');
  38. }
  39. get_attachment($id, 'ticket_attachments');