Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/addusr.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') && !check_flag('A')) {
	header('Location: error.php?error='.urlencode("You do not have the credentials to add users."));
exit;
}
mysql_close($dbconn);

?>
<html>
<?
include('header.php');
$result2 = mysql_query("SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki where usrflags='P'");
$rownum = mysql_numrows($result2);
$i = 0;
?>
<p></p>
<br>
<? if ($pmember != "Submit") { ?>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" class="header">
  <tr> 
    <td><?=$langop_addusr_vpending?></td>
  </tr>
</table>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" cellspacing="2" class="infotable">
  <tr> 
    <td> 
      <form name="form1" method="get" action="addusr.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,"usrname");?>"> 
                <?=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 usrname, comment, url, email FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE usrname='$usrname2'");
extract(mysql_fetch_array($result));
?>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" class="header">
  <tr> 
    <td><?=$langop_addusr_vpendingdet?></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"> 
              <?=$usrname2?>
              <input type="hidden" name="usrname2" value="<?=$usrname2?>">
            </td>
          </tr>
          <tr> 
            <td width="24%">
              <?=$langop_word_email?>
            </td>
            <td width="76%"> 
              <?=$email?>
            </td>
          </tr>
          <tr> 
            <td width="24%">
              <?=$langop_addusr_IPdet?>
            </td>
            <td width="76%"> 
              <?=$comment?>
            </td>
          </tr>
          <tr> 
            <td width="24%"><?=$langop_addusr_arturl?></td>
            <td width="76%"> 
              <a href="<?=$url?>" target="_new"><?=$url?></a>
            </td>
          </tr>
          <tr> 
            <td width="24%">&nbsp;</td>
            <td width="76%">&nbsp;</td>
          </tr>
          <tr> 
            <td width="24%">
              <?=$langop_common_drawacc?>
            </td>
            <td width="76%"> 
              <select name="drawa" class="multiline">
                <option value="0" selected><?=$langop_word_disable?></option>
                <option value="1"><?=$langop_word_enable?></option>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="24%">
              <?=$langop_common_aniacc?>
            </td>
            <td width="76%">
              <select name="animation" class="multiline">
                <option value="0" selected><?=$langop_word_disable?></option>
                <option value="1"><?=$langop_word_enable?></option>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="24%">
              <?=$langop_word_action?>
            </td>
            <td width="76%"> 
              <select name="action" class="multiline">
                <option value="0" selected><?=$langop_word_accept?></option>
                <option value="1"><?=$langop_word_reject?></option>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="24%"><?=$langop_addusr_comment?>:</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 width="24%">&nbsp;</td>
            <td width="76%">&nbsp;</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="pmember2" value="Submit" class="submit">
              </font></td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
<? } ?>
</body>
<? include('footer.php'); ?>
Return current item: OekakiPoteto