Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/modflags.php
<?
include('dbconn.php');
include('flagchk.php');
$result = mysql_query("SELECT usrname, usrflags,usrpass FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE usrname='$OekakiU'");
extract(mysql_fetch_array($result));
if($OekakiPass != $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 access flag modification."));
exit;
}
mysql_close($dbconn);
?>
<html>
<?

include('header.php');


?>
<p></p>
<br>
<br>
<table width="<?=$hWidth?>" cellpadding="<?=$hCellPadding?>" align="center" cellspacing="2" class="infotable">
  <tr> 
    <td> 
      <? if($muser!=="Submit") {
$result2 = mysql_query("SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki where usrflags!='P' order by usrname asc");
$rownum = mysql_numrows($result2);
$i = 0; ?>     
 <form name="form1" method="get" action="modflags.php">
        <table width="75%" border="0" cellspacing="0" cellpadding="3" align="center" class="txtinfo">
          <tr> 
            <td colspan="2" class="header"><?=$langop_niftytoo_permissions?></td>
          </tr>
          <tr> 
            <td width="24%"> 
              <div align="right"><?=$langop_word_username?>:</div>
            </td>
            <td width="76%"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
              <select name="usrname2" class="txtinput">
                <? 
WHILE ($i < $rownum):
?>
                <option value="<?=mysql_result($result2,$i,"usrname");?>"> 
                <?=mysql_result($result2,$i,"usrname");?>
                </option>
                <?
$i++; 
endwhile; 
mysql_close($dbconn);
?>
              </select>
              </font></td>
          </tr>
          <tr> 
            <td width="24%">&nbsp;</td>
            <td width="76%"> 
              <input type="submit" name="muser" value="Submit" class="submit">
            </td>
          </tr>
        </table></form>
<?}?>
      <br>
<? if($muser=="Submit") { 
$result1 = mysql_query("SELECT usrflags FROM ".$OekakiPoteto_MemberPrefix."oekaki where usrname='$usrname2'");
$row2 = mysql_fetch_array($result1);
$result2 = mysql_query("SELECT usrflags FROM ".$OekakiPoteto_MemberPrefix."oekaki where usrname='$OekakiU'");
$row = mysql_fetch_array($result2)
?>
      <form name="form2" method="post" action="functions.php">
        <table width="75%" border="0" cellspacing="0" cellpadding="3" align="center" class="txtinfo">
          <tr> 
            <td colspan="2" class="header"> 
              <?=$langop_niftytoo_permissions?>
              [ 
              <?=$usrname2?>
              ] </td>
          </tr>
          <tr> 
            <td colspan="2"> <div align="center"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"> 
                <? if (strstr($row[usrflags],"O")) { ?>
                </font> 
                <input type="checkbox" name="sa" value="S" <?if (strstr($row2[usrflags],"S")) {
	echo "checked";
}?>>
                <?=$langop_type_sadmin?>
                <?}?>
                <? if (strstr($row[usrflags],"S")) { ?>
                <input type="checkbox" name="admin" value="A" <?if (strstr($row2[usrflags],"A")) {
	echo "checked";
}?>>
                <?=$langop_type_admin?>
                <?}?>
                <? if (strstr($row[usrflags],"A") || strstr($row[usrflags],"S") || strstr($row[usrflags],"O")) { ?>
                <input type="checkbox" name="drawd" value="D" <?if (strstr($row2[usrflags],"D")) {
	echo "checked";
}?>>
                <?=$langop_type_daccess?>
                <?}?>
                <? if (strstr($row[usrflags],"A") || strstr($row[usrflags],"S") || strstr($row[usrflags],"O")) { ?>
                <input type="checkbox" name="drawm" value="M" <?if (strstr($row2[usrflags],"M")) {
	echo "checked";
}?>>
                <?=$langop_type_aaccess?>
                <?}?>
                <? if (strstr($row[usrflags],"A") || strstr($row[usrflags],"S") || strstr($row[usrflags],"O")) { ?>
                <input type="checkbox" name="immunity" value="I" <?if (strstr($row2[usrflags],"I")) {
	echo "checked";
}?>>
                <?=$langop_type_immunity?>
                <?}?>
                <input type="checkbox" name="gusr" value="G" <?if (strstr($row2[usrflags],"G")) {
	echo "checked";
}?>>
                <?=$langop_type_guser?>
              </div></td>
          </tr>
          <tr> 
            <td colspan="2" valign="top"> <div align="right"></div>
              <p><b><?=$langop_type_sadmin?></b> - <?=$langop_type_sabil?><br>
                <b><?=$langop_type_admin?></b> - <?=$langop_type_aabil?><br>
                <b><?=$langop_type_guser?></b> - <?=$langop_type_general?><br>
                <b><?=$langop_type_daccess?></b> - <?=$langop_type_gdaccess?><br>
                <b><?=$langop_type_aaccess?></b> - <?=$langop_type_gaaccess?><br>
                <strong><?=$langop_type_immunity?></strong> - <?=$langop_type_userkill?></p>
              <p> 
                <input type="hidden" name="usrname2" value="<?=$usrname2?>">
                <input type="hidden" name="ax" value="<?if (strstr($row2[usrflags],"X")) {  echo "X";}?>">
              </p></td>
          </tr>
          <tr> 
            <td width="24%">&nbsp;</td>
            <td width="76%"> <input type="submit" name="muser2" value="Submit" class="submit"> 
            </td>
          </tr>
        </table>
      </form>
<?}?>
      <p align="center">&nbsp;</p>
      
    </td>
  </tr>
</table>
</body>
<? include('footer.php'); ?>
Return current item: OekakiPoteto