/beta/admin/xml_InvoiceItemCategories.asp

http://github.com/khaneh/Orders · ASP · 28 lines · 26 code · 1 blank · 1 comment · 3 complexity · 238df6e60ca4a68d3ecca416ea737390 MD5 · raw file

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%>
  2. <!--#include file="../config.asp" -->
  3. <?xml version="1.0" encoding="windows-1256"?>
  4. <%
  5. InvItemID=request("id")
  6. if isNumeric(InvItemID) then
  7. InvItemID=clng(InvItemID)
  8. else
  9. InvItemID=0
  10. end if
  11. 'sql="SELECT * FROM InvoiceItems WHERE (ID='" & InvItemID &"') AND (Enabled=1)"
  12. mySQL="SELECT InvoiceItemCategories.* FROM InvoiceItemCategoryRelations INNER JOIN InvoiceItemCategories ON InvoiceItemCategoryRelations.InvoiceItemCategory = InvoiceItemCategories.ID WHERE (InvoiceItemCategoryRelations.InvoiceItem = '" & InvItemID &"')"
  13. set rs=Conn.Execute(mySQL)
  14. if NOT rs.eof then
  15. %><Categories>
  16. <%
  17. Do while NOT rs.eof
  18. %><Category id="<%=rs("id")%>"><%=rs("name")%></Category>
  19. <%
  20. rs.MoveNext
  21. Loop
  22. %></Categories>
  23. <%
  24. end if
  25. rs.close()
  26. conn.close()
  27. %>