<%@include file="include/header.jsp"%>
<%
//-----------------------------------------------
// Set permission for this page.
permission.addAdmin();

//Check permission.
if(!checkPermission()){
	return;
}

// Create data access object.
DomainTestDao dao = new DomainTestDao();

// Global.
DomainTestData data = dao.test(paramString("domain"));
%>
<%@include file="include/action_info.jsp"%>

<!-- view -->
<form action="<%= getPageName()%>" method="post">

<fieldset>
	<legend>DOMAIN TEST</legend>
<table class="view">

	<tr>
		<td colspan="2">
		Finding categories for a domain.
		</td>
	</tr>

	<tr>
		<td width="200">Domain</td>
		<td>
			<input type="text" name="domain" size="50" value="<%= data.domain%>">
		</td>
	</tr>

	<tr>
		<td></td>
		<td>
			<input type="button" value="SUBMIT" onclick="javascript:this.form.submit();">
			<input type="button" value="RESET" onclick="javascript:this.form.reset();">
		</td>
	</tr>

</table>
</fieldset>
</form>
<!-- /view -->

<!-- view -->
<%if(isNotEmpty(data.category)){%>
<form>
<fieldset>
	<legend>TEST RESULT</legend>
<table class="view">

	<tr>
		<td width="200">Category</td>
		<td><%= data.category%></td>
	</tr>

</table>
</fieldset>
</form>
<%}%>
<!-- /view -->

<%@include file="include/footer.jsp"%>
