<?php 
$setpage = 'add_user';
$return = 'show_users';
$table = "USERS";
if (empty($rowxxx[SUL])) $limit = 50; else $limit = $rowxxx[SUL];

if ($_POST[SEARCH] != $nil) {
$search = "WHERE EMAIL = '$_POST[SEARCH]'";
}

$string = "$search ORDER BY ID DESC LIMIT $limit";
?> 
<table  width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr> 
    
<td class="td3" > <b> Search User</b></td>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr> 
    <td class="td4"> 
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <form name="form1" method="post" action="?page=show_users">
          <?php
$qt = update;
?>
          <tr> 
            <td width="100%" nowrap> 
              <div align="center"> 
                <input type="text" name="SEARCH" size="20" value="<?php echo $row[SEARCH]; ?>">
                
<input type="submit" name="Submit" value="Search User Email">
              </div>
            </td>
          </tr>
        </form>
      </table>
    </td>
    <td class="td4" width="100%"> 
      
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<form name="form1" method="post" action="../library/query.php">
<?php
$qt = update;
?>
<input type="hidden" name="controller" value="SETTINGS~<?php echo $qt; ?>~show_users~1">
<tr>
<td class="font1" nowrap> User Records to Show</td>
<td class="font1" nowrap> 
<input type="text" name="SUL" size="5" value="<?php echo $rowxxx[SUL]; ?>">
</td>
<td class="font1" width="100%"> 
<input type="submit" name="Submit" value="Show">
</td>
</tr>
</form>
</table>
    </td>
  </tr>
</table>
<br>
<table  width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr> 
    
<td NOWRAP class="td3"> <b> Users</b></td>
  </tr>
</table>
<TABLE  WIDTH="100%" cellpadding="0" cellspacing="0" border="0">
  <?php
$SQL = "SELECT * from $table $string";
$result = @mysql_query( $SQL ); while( $row = @mysql_fetch_array( $result ) ) {
if ($row[STATUS] != 1) {
?>
  <TR> 
  <TD NOWRAP CLASS="td4"> 
      #<?php echo $row[ID]; ?>
    </TD>

    
<TD NOWRAP CLASS="td4" width="100%"> 
<?php echo "<a href=\"?page=$setpage&id=$row[ID]&qt=update\">$row[USERNAME]"; ?>
</TD>

    
<TD CLASS="td4"> <A HREF="<?php echo "?page=$setpage&id=$row[ID]&qt=update"; ?>"> <img src="../images/edit_listing.jpg" border="0" alt="Edit this listing" width="22" height="22" /></A> </TD>
    <TD CLASS="td4" width="0" height="0"> <A HREF="../library/delete.php?id=<?php echo $row[ID]; ?>&amp;return=<?php echo $return; ?>&amp;type=<?php echo "$table"; ?>"> <IMG SRC="../images/delete-page-red.gif" ALT="Delete this listing" BORDER="0" WIDTH="14" HEIGHT="14" /></A> 
    </TD>
  </TR>
  <DIV ALIGN="center"> 
    <?php }} ?>
  </DIV>
</TABLE>
