<HTML>
<HEAD><TITLE>
MySQLMan: SQL Monitor
</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: SQL Monitor</b>
			</td></tr>
			<tr><td>
<%include header.txt%>
<UL>
<%if feedback%>
<%include message.txt%>
<%endif%>
<FORM METHOD="POST" ACTION="<%script_url%>">	

	<li><B>Run SQL query/queries</B><BR>
	(If running multiple queries, each query must start in a new line and end with a semi-colon (;).)</BR></li>
	<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="checkbox" NAME="save_query" VALUE="1"> Save query<BR>
	<INPUT TYPE="submit" value=" Go ">

</FORM>

<%if query_table_cnt%>
<TABLE border=1 cellspacing=0 cellpadding=5>        
  <FORM METHOD="POST" ACTION="<%script_url%>">
    <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">
<TR>
<TH><INPUT TYPE="submit" value="Run Query" name = "from_saved_queries"></TH>
<TH>SAVED QUERY</TH>
<TH>COMPLETE QUERY</TH>
<TH><INPUT TYPE="submit" value="Delete Query" name = "delete_query"></TH>
</TR>
<%loop query_table%>
<TR>
  <TD><CENTER><INPUT TYPE="radio" NAME="query_select" VALUE="<%num%>"></CENTER></TD>
<TD><%partial_query%></TD>
<TD><CENTER><a href="<%show_link%>" target="_">Show</a><CENTER></TD>
<TD><CENTER><INPUT TYPE="checkbox" NAME="delete_query_<%num%>" VALUE="1"></CENTER></TD>
</TR>
<%endloop%>
</FORM>
</TABLE>
<%endif%>

<FORM ENCTYPE="multipart/form-data" METHOD="POST" ACTION="<%script_url%>">	

	<li><B>Run queries saved in a file.</B><BR>
	(Please note that all queries that require display would not be <br>
	displayed to the screen.)</li>
	<INPUT TYPE="hidden" name="<%do_param%>" VALUE='sql_monitor_file'>
	<INPUT TYPE="hidden" NAME=data_source VALUE="<%data_source%>">
	
	<table>
	<tr>
	<td><b>File on server.&nbsp;&nbsp;</b></td>
	<td>Path: <INPUT TYPE="text" NAME="server_file" VALUE= "" SIZE="64"></td>
	</tr>
	<tr>
	<td>OR</td>
	</tr>
	<tr>
	<td><b>File on local drive.&nbsp;&nbsp;</b></td>
	<td>Path: <INPUT TYPE="file" NAME="upload_local_file" VALUE= "" SIZE="64"></td>
	</tr>
	</table>

	<INPUT TYPE="submit" value=" Go ">

</FORM>

</UL>
</td></tr></table>
</BODY>
</HTML>
