<div class="table-summary" style="margin-bottom:10px;margin-top:10px"> 
  <h2>[l]SQL Tool[/l]</h2>
  [l]This tool allows you to query the database tables directly.  This is intended for experienced users who are familiar with SQL queries.[/l]
</div>

<!-- BEGIN DYNAMIC BLOCK: demoMode -->
<div class="notice notice-red"> 
  [l]This option does not work in demo mode[/l]
</div>
<!-- END DYNAMIC BLOCK: demoMode -->

<!-- BEGIN DYNAMIC BLOCK: executedQuery -->
<div class="blue-box">
  <span class="bold-item">[l]Query Run[/l]:</span> {queryRun}
</div>

<!-- BEGIN DYNAMIC BLOCK: queryFailed -->
<div class="notice notice-red"> 
  [l]Query Failed[/l]: {failedError}
</div>
<!-- END DYNAMIC BLOCK: queryFailed -->

<!-- BEGIN DYNAMIC BLOCK: queryResultStatus -->
<div class="notice notice-green"> 
  [l]Query Result[/l]: {queryStatus}
</div>
<!-- END DYNAMIC BLOCK: queryResultStatus -->

<!-- BEGIN DYNAMIC BLOCK: queryResult -->
<div class="scrollTable">
  <table class="data"> 
    <thead> 
      <tr>
        <!-- BEGIN DYNAMIC BLOCK: queryResultHeader -->
        <th>{columnHeader}</th> 
        <!-- END DYNAMIC BLOCK: queryResultHeader -->
      </tr> 
    </thead> 
    <tbody> 
      <!-- BEGIN DYNAMIC BLOCK: queryResultRow -->
      <tr class="{rowClass}"> 
        <!-- BEGIN DYNAMIC BLOCK: queryResultRowData -->
        <td>{rowData}</td> 
        <!-- END DYNAMIC BLOCK: queryResultRowData -->
      </tr> 
      <!-- END DYNAMIC BLOCK: queryResultRow -->
    </tbody> 
  </table>
</div>
<!-- END DYNAMIC BLOCK: queryResult -->

<!-- END DYNAMIC BLOCK: executedQuery -->

<form method="post" action="index.php?fuse=admin&amp;view=ShowDatabaseOptions">
  <dl class="form noborder automation-options"> 
    <dt>
      <label>[l]SQL Query[/l]:</label>
    </dt> 
    <dd class="full desc" style="border-bottom:0px;"> 
      <span>[l]Enter the SQL queries in the text area.  Each SQL query must end with a semi-colon.[/l]</span> 
    </dd>
    <dd class="full" style="padding-bottom:15px;"> 
      <textarea name="sqlQueries" cols="75" rows="15">{sqlQuery}</textarea>
    </dd>
  </dl>
  <div>
    <input type="submit" class="button" value='[l]Submit Query[/l]' />
  </div>
</form> 