<HTML>
<HEAD><TITLE>
MySQLMan: View Table <%table%>
</TITLE></HEAD>
<BODY BGCOLOR="#CCCCCC">
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width="100%" align=center valign=top>
			<tr><td bgcolor="navy">
					<FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
                    <b>MySQLMan: View Table <%table%></b>
			</td></tr>
			<tr><td>
<%include header.txt%>

<%if from_monitor%>
<UL>
<P>
<FORM METHOD="POST" ACTION="<%script_url%>">	
	<B>* Run SQL query/queries</B><BR>
	<INPUT TYPE="hidden" name="<%do_param%>" VALUE='sql_monitor'>
	<INPUT TYPE="hidden" NAME=data_source VALUE="<%data_source%>">
	<INPUT TYPE="hidden" NAME=action VALUE="monitor">
	<INPUT TYPE="hidden" NAME=from_monitor VALUE="1">
	<TEXTAREA NAME="query" ROWS="7" COLS="40" VALUE= ""></TEXTAREA><BR>
	<INPUT TYPE="submit" value=" Go ">
</FORM>
<P>
<%if total_rows%>
( <%total_rows%> rows affected )
<%endif%>
</UL>
<%endif%>

<%ifnot from_monitor%>
<TABLE BORDER=1 >
<TR><TD><B>SQL-query</B></TD></TR>
<TR><TD><%query_printed%></TD></TR>
</TABLE>
<P>
<%if total_rows%>
( <%total_rows%> records in total )  <a href="<%save_search_link%>">Save Result</a>
<%endif%>
<%endif%>


<%page_jump%>
<%page_link%>
<%if empty_set%>
<TABLE BORDER = 2 CELLPADDING = 10>
<TD><B>Empty Set</B></TD>
</TABLE>
<%else%>
<TABLE BORDER=2>
<TR>
  <%loop col_name%>
  <TD><B><%if link%><a href="<%link%>"><%endif%><%name%><%if link%></a><%endif%></B></TD>
  <%endloop%>
<%if pri_key%>
	<TD></TD><TD></TD>
<%endif%>
</TR>
<%loop table_records%>
<tr>
  <%loop record%>
  <td><%if null and show_null%><font color="green">NULL</font><%elsif name eq ''%>&nbsp;<%else%><%name%><%endif%></td>
  <%if pri_key and last%>
  <td><a href="<%edit_link%>">Edit</a></td>
  <td><a href="<%delete_link%>"<%if confirm_delete_record%> onClick="return confirm('Delete the record?')"<%endif%>>Delete</a></td>
  <%endif%>
  <%endloop%>
</tr>
<%endloop%>
</TABLE>
<%endif%>
<%page_link%>
</td></tr></table>
</BODY></HTML>
