/beta/accounting/ShowItem.asp

http://github.com/khaneh/Orders · ASP · 38 lines · 38 code · 0 blank · 0 comment · 2 complexity · b6838e2d153e7ae8c9e60e696c6403da MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><%
  2. Response.Buffer=True
  3. %>
  4. <!--#include file="../config.asp" -->
  5. <%
  6. sys=request.queryString("sys")
  7. Item=request.queryString("Item")
  8. if sys<>"" and IsNumeric(Item) then
  9. Set rs=Conn.Execute("Select Link, Type FROM "& sys & "Items WHERE (ID='"& Item & "')")
  10. if rs.eof then
  11. response.redirect "../AO/AccountReport.asp?errmsg=" & Server.URLEncode(" .")
  12. else
  13. ItemLink=rs("Link")
  14. ItemType=rs("Type")
  15. end if
  16. rs.close
  17. set rs= Nothing
  18. select case ItemType
  19. case 1
  20. Action="showInvoice&invoice="
  21. case 2
  22. Action="showReceipt&receipt="
  23. case 3
  24. Action="showMemo&sys="& sys & "&memo="
  25. case 4
  26. Action="showInvoice&invoice="
  27. case 5
  28. Action="showPayment&payment="
  29. case 6
  30. Action="showVoucher&voucher="
  31. case else
  32. response.redirect "../" & sys & "/AccountReport.asp?errmsg=" & Server.URLEncode(" .")
  33. end select
  34. response.redirect "../" & sys & "/AccountReport.asp?act=" & Action & ItemLink
  35. else
  36. response.redirect "../" & sys & "/AccountReport.asp?errmsg=" & Server.URLEncode(" .")
  37. end if
  38. %>