Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/delusr.php
<?
include('dbconn.php');
include('flagchk.php');
$result = mysql_query("SELECT usrname,usrpass, usrflags FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE usrname='$OekakiU'");
$row = mysql_fetch_array($result);
$usrflags = $row[usrflags];
if($OekakiPass != $row[usrpass]){
header('Location: index.php');
exit;
}
if (!check_flag('O') && !check_flag('S')) {
	header('Location: error.php?error='.urlencode("You do not have the credentials to delete users."));
exit;
}
mysql_close($dbconn);
?>
<html>
<?
include('header.php');
$result2 = mysql_query("SELECT ID, usrflags, usrname FROM ".$OekakiPoteto_MemberPrefix."oekaki where usrflags NOT LIKE '%S%' ORDER BY usrname ASC");

$rownum = mysql_numrows($result2);
$i = 0;
?>
<p></p>
<br>
<? if ($pmember != "Submit") { ?>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" class="header">
  <tr> 
    <td><?=$langop_deluser_title?></td>
  </tr>
</table>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" cellspacing="2" class="infotable">
  <tr> 
    <td> 
      <form name="form1" method="get" action="delusr.php">
<table width="75%" border="0" cellspacing="0" cellpadding="3" align="center">
          <tr> 
            <td width="24%"> 
              <div align="right"><?=$langop_word_username?>:</div>
            </td>
            <td width="76%"> 
              <select name="usrname2" class="multiline">
                <? 
WHILE ($i < $rownum):
?>
                <option value="<?=mysql_result($result2,$i,"ID");?>"> 
                <?=mysql_result($result2,$i,"usrname");?>
                </option>
                <?
$i++; 
endwhile; 
mysql_close($dbconn);
?>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="24%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">&nbsp;</font></td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input type="submit" name="pmember" value="Submit" class="submit">
              </font></td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
<? } else {
$result = mysql_query("SELECT ID, usrname, comment, url, email FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE ID='$usrname2'");
$row = mysql_fetch_array($result);
?>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" class="header">
  <tr> 
    <td><?=$langop_deluser_title?></td>
  </tr>
</table>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" cellspacing="2" class="infotable">
  <tr> 
    <td> 
      <form name="form1" method="post" action="functions.php">
        <table width="75%" border="0" cellspacing="0" cellpadding="3" align="center">
          <tr> 
            <td width="24%" height="26"> <?=$langop_word_username?>:</td>
            <td width="76%" height="26"> 
              <?=$row[usrname]?>
              <input type="hidden" name="usrname2" value="<?=$row[ID]?>"> </td>
          </tr>
          <tr> 
            <td width="24%"><?=$langop_word_email?>:</td>
            <td width="76%"> 
              <?=$row[email]?>
            </td>
          </tr>
          <tr> 
            <td width="24%">&nbsp;</td>
            <td width="76%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="24%"> <?=$langop_word_delete?>?</td>
            <td width="76%"> <select name="action" class="multiline">
                <option value="0"><?=$langop_word_yes?></option>
                <option value="1" selected><?=$langop_word_no?></option>
              </select> </td>
          </tr>
          <tr> 
            <td width="24%"><?=$langop_word_reason?> (<?=$langop_deluser_mreason?>):</td>
            <td width="76%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <textarea name="reason" cols="30" rows="5" class="multiline"></textarea>
              </font></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td width="24%">&nbsp;</td>
            <td width="76%"><?=$langop_deluser_disclaimer?></td>
          </tr>
          <tr> 
            <td width="24%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">&nbsp;</font></td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <input name="memdel" type="submit" class="submit" id="memdel" value="Delete">
              </font></td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
<? } ?>
</body>
<? include('footer.php'); ?>
Return current item: OekakiPoteto