<%
	Response.buffer = true
%>
<!--#include file="../library/libraryinc.inc" -->
<%	
	Timeout(1)
	
	set con = server.createobject("ADODB.Connection")
	con.open Application("CString")
%>
<html>
<head>
<title>Untitled Document</title>
<script>
	function ConfirmDelete(urlName, urlTarget)
	{
		if (confirm("Are you sure you want to delete this user?"))
		{
			window.open(urlName, urlTarget);
		}
	}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../StyleSheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr> 
    <td class="pageheadings"> Maintain file categories</td>
  </tr>
<tr><td valign="top" class="tableborders">
        <%
	strSQL = "SELECT *  FROM FileCategories Order by CNAme"	
	set rsUsers = con.execute(strSQL)
	
	if rsUsers.EOF then
%>
      
      <p>No file categories.</p>
      <%	
	else
%>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
        <tr > 
          <td colspan="2">&nbsp;</td>
          <td height="22" align="center" class="tableheadings"><p><b><font color="#FFFFFF">Category 
              Name</font></b></p></td>
        </tr>
        <%counterx = 0%>
        <%do until rsUsers.EOF%>
        <%
			i_CatID = rsUsers("CategoryID")
			s_CatName = rsUsers("CName")
		%>
        <!--#include file="../library/eyeline.asp" -->
        <tr bgcolor="<%=colorx%>"> 
           <td width="23" height="20" align="center" style="border-width: 1px; border-style: solid; border-color: #FFFFFF #000000 #000000 #FFFFFF; padding: 2px 2px 2px 2px; color: #000000; cursor:hand; background-color: #CCCCCC;	" onClick="javascript:window.open('edit_cat.asp?CatID=<%=i_CatID%>&cache=<%=now()%>','_self');"> 
		    <img src="../Images/icons_edit.gif" alt="Edit"></td>
			<td width="23" height="20" align="center" valign="middle" style="border-width: 1px; border-style: solid; border-color: #FFFFFF #000000 #000000 #FFFFFF; padding: 2px 2px 2px 2px; color: #000000; cursor:hand; background-color: #CCCCCC;	" onClick="javascript:ConfirmDelete('delete_cat.asp?ID=<%=i_CatID%>','_self');">	<img src="../Images/icons_delete.gif" alt="Delete"></td>
			<td style="padding-left:5px;"><p><b><%=s_CatName%></b></p></td>
        </tr>
        <%rsUsers.MoveNext%>
        <%loop%>
      </table>
      <%end if%>
    </td>


  </tr>
</table>
</body>
</html>
