<html>
<head>
<title>Pedersens Hire - Western Australia's leading supplier of event and function hire equipment</title>
<meta name="keywords" content="Pedersens Hire, party hire, party hire Perth, catering equipment hire, event hire Perth, event furniture hire, Perth party hire, marquee hire, marquee perth, event hire Perth, wedding hire, crockery hire, chair hire Perth, party hire WA, furniture hire" />
<meta name="description" content="Pedersens Hire is Western Australia's leading supplier of event and function hire equipment. Pedersens is synonymous with Western Australia's most coveted parties and glamorous events. The team at Pedersens continues to set event trends by continually offering innovative hire solutions to ensure your next function is one to remember." />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="style.css">
<!-- Google analytics -->
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-83423726-1', 'auto');
  ga('send', 'pageview');

</script>
<!-- end of Google Analytics -->
</head>
<body>
<div style="background:#FFFFFF; width:100%; height:100%"><table width="400" bgcolor="#FFFFFF" align="center" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="400" height="20"></td>
	</tr>
<%
On Error Resume Next
Response.Expires = 0
Dim objConn, objRS, strQuery, PobjRS, PstrQuery
Dim strConnection
Dim tPID
Dim count

if Session("Admin") = "" then
  Response.Write "<tr><td width=""400"" height=""150"" align=""center"" class=""h2"">You have been logout.</td></tr>"
else

Set objConn = Server.CreateObject("ADODB.Connection")
strConnection = "DSN=pdsb;Database=BlogDB.mdb;"

objConn.Open strConnection

tPID = Request.QueryString("pid")

PstrQuery = "SELECT * FROM Product WHERE ID = " & tPID
Set PobjRS = objConn.Execute(PstrQuery)

strQuery = "SELECT * FROM Category ORDER BY Rank"
Set objRS = objConn.Execute(strQuery)

if objRS.EOF then
%>							
	<tr>
		<td width="400" height="50"></td>
	</tr>
	<tr>
		<td width="400" align="center" class="p">Currently there are no categories available.</td>
	</tr>
<%
else
%>								
	<tr>
		<td align="center" class="h1"><%= PobjRS("Title") %></td>
	</tr>
	<tr>
		<td height="20"></td>
	</tr>
	<form name="fmEditProduct" method="post" action="productCategoryUpdate.asp">
	<tr>
		<td align="center"><table border="0" cellpadding="0" cellspacing="0">
        	<input type="hidden" name="ID" value="<%= PobjRS("ID") %>">
<%
	count = 1
	
	Do While not objRS.EOF
	
		PCstrQuery = "SELECT * FROM ProductCategory WHERE ProductID = " & tPID & " AND CategoryID = " & objRS("ID")
		Set PCobjRS = objConn.Execute(PCstrQuery)

		Response.Write "<tr>"
		if PCobjRS.EOF then
			Response.Write "<td><input name=""category" & count & """ type=""checkbox"" value=""" & objRS("ID") & """></td>"
		else
			Response.Write "<td><input name=""category" & count & """ type=""checkbox"" value=""" & objRS("ID") & """ checked></td>"
		end if
		Response.Write "<td width=""10""></td>"
		Response.Write "<td class=""p"">" & objRS("Name") & "</td>"
		Response.Write "</tr>"

		count = count + 1
		objRS.MoveNext
	Loop

    Session("TNumber") = count - 1
%>                                    
		</table></td>
	</tr>			
	<tr>
		<td height="10"></td>
	</tr>			
	<tr>
		<td height="25" align="center"><input name="submit" type="submit" value="Submit" class="submit"></td>
	</tr>
	</form>
<%
end if

PobjRS.close
objConn.close
Set PobjRS = Nothing
Set objConn = Nothing

end if
%>
	<tr>
		<td width="400" height="20"></td>
	</tr>
</table></div>
</body>
</html>