Location: PHPKode > scripts > OekakiPoteto > oekakipoteto/memberlist.php
<html>
<?
include('header.php');
if(!isset($pageno)) $pageno = 0;
$searchqry = "SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki LIMIT ".($pageno*$ppage).", ".$ppage;
$searchqry2 = "SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki";

if (isset($searchop) && $searchop != "0"){

		$searchqry = "SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE ".$searchop." LIKE "."'%".$searchstr."%' ORDER BY ".$searchop." ".$order." LIMIT ".($pageno*$ppage).", ".$ppage;
		$searchqry2 = "SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki WHERE ".$searchop." LIKE "."'%".$searchstr."%' ORDER BY ".$searchop." ".$order;
	
	if($searchop=="joindate" || $searchop=="lastlogin") {
		$searchqry = "SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki ORDER BY ".$searchop." ".$order." LIMIT ".($pageno*$ppage).", ".$ppage;
		$searchqry2 = "SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki ORDER BY ".$searchop." ".$order;
	}
}

if ($searchop == "") {
$searchqry = "SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki LIMIT ".($pageno*$ppage).", ".$ppage;
$searchqry2 = "SELECT * FROM ".$OekakiPoteto_MemberPrefix."oekaki";
}

$search = mysql_query($searchqry);
$search2 = mysql_query($searchqry2);
$searchrows = mysql_numrows($search);
$searchrows2 = mysql_numrows($search2);
$pages = intval($searchrows2/$ppage) + 1;
?>
<br>
<br>
<div align="center"> 
  <form name="form1" method="get" action="memberlist.php">
    <table width="<?=$hWidth?>" border="0" cellspacing="0" cellpadding="2" align="center" class="infotable">
      <tr> 
        <td><font size="-2"><b><?=$langop_common_moveto?>:</b> 
          <? for ($i2=0; $i2 < $pages; $i2++){?>
[ <a href="memberlist.php?pageno=<?=$i2?>&searchop=<?=$searchop?>&order=<?=$order?>&searchstr=<?=$searchstr?>"><?=$i2+1?></a> ] 
          <? }?>
          </font></td>
      </tr>
    </table>
    <div align="center"></div>
    <table width="<?=$hWidth?>" cellpadding="3" align="center" class="infotable">
      <tr class="header"> 
        <td> 
          <div align="left"><b><?=$langop_mlist_title?></b> - 
            <select name="searchop" class="multiline">
              <option value="usrname" selected><?=$langop_word_username?></option>
              <option value="name"><?=$langop_word_name?></option>
		      <option value="age"><?=$langop_word_age?></option>
	          <option value="gender"><?=$langop_word_gender?></option>
              <option value="location"><?=$langop_word_location?></option>			  
              <option value="piccount"><?=$langop_common_picposts?></option>
              <option value="commcount"><?=$langop_common_compost?></option>			  			  
              <option value="joindate"><?=$langop_common_jdate?></option>
              <option value="lastlogin"><?=$langop_common_lastlogin?></option>			  
              <option value="email"><?=$langop_word_email?></option>
              <option value="aim"><?=$langop_word_aolinstantmessenger?></option>
              <option value="icq"><?=$langop_word_icq?></option>
              <option value="MSN"><?=$langop_word_microsoftmessenger?></option>
              <option value="yahoo"><?=$langop_word_yahoomessenger?></option>
              <option value="IRCserver"><?=$langop_word_ircserver?></option>
              <option value="IRCnick"><?=$langop_word_ircnickname?></option>			  			  			  			  
              <option value="usrflags"><?=$langop_word_flags?></option>
			  <option value="language"><?=$langop_word_language?></option>
			  <option value="templatesel"><?=$langop_word_template?></option>
            </select>
            <select name="order" class="multiline">
              <option value="ASC" selected><?=$langop_word_ascending?></option>
              <option value="DESC"><?=$langop_word_decending?></option>
            </select>
            <b> <?=$langop_word_search?>:</b> 
            <input type="text" name="searchstr" class="txtinput">
            <input type="submit" name="search" value="Search" class="submit">
          </div>
        </td>
      </tr>
      <tr> 
        <td> 
          <table width="100%" border="0" cellspacing="2" cellpadding="0" class="infotable">
            <tr> 
              <td><b><?=$langop_word_username?></b></td>
              <td><b><?=$langop_word_email?></b></td>
              <td><strong><?=$langop_common_compost?></strong></td>
              <td><strong><?=$langop_common_picposts?></strong></td>
              <td><b><?=$langop_word_flags?></b></td>
              <?if (isset($searchop) && $searchop !==""){?>
              <td> <b> 
                <?=$searchop;?>
                </b> </td>
              <? } ?>
            </tr>
            <?for($i=0; $i < $searchrows; $i++) { ?>
            <tr> 
              <td> <a onClick="openWindow('profile.php?user=<?=mysql_result($search,$i,"usrname");?>', 300, 400); return false" a href="profile.php?user=<?=mysql_result($search,$i,"usrname");?>"> 
                <?=mysql_result($search,$i,"usrname");?>
                </a> </td>
              <td> <a href="mailto:<?=mysql_result($search,$i,"email");?>"> 
                <?=mysql_result($search,$i,"email");?>
                </a> </td>
              <td> 
                <?=mysql_result($search,$i,"commcount");?>
              </td>
              <td> 
                <?=mysql_result($search,$i,"piccount");?>
              </td>
              <td> 
                <?=mysql_result($search,$i,"usrflags");?>
              </td>
              <?if (isset($searchop) && $searchop != ""){?>
              <td> 
                <?=mysql_result($search,$i,$searchop);?>
              </td>
              <? }?>
            </tr>
            <? } ?>
          </table>
        </td>
      </tr>
    </table>
  </form>
</div>
<div align="center"><br>
  <table width="<?=$hWidth?>" border="0" cellspacing="0" cellpadding="2" class="infotable">
    <tr> 
      <td class="header"><b><?=$langop_word_help?></b></td>
    </tr>
    <tr> 
      <td> 
        <div align="left"> 
          <p><?=$langop_mlist_helpd?><br>
            <br>
            <?=$langop_word_flags?>:<br>
            A - <?=$langop_type_admin?><br>
            D - <?=$langop_type_daccess?><br>
            M - <?=$langop_type_aaccess?><br>
            G - <?=$langop_type_guser?><br>
            O - <?=$langop_word_owner?><br>
            P - <?=$langop_mlist_pending?><br>
            S - <?=$langop_type_sadmin?><br>
            I - <?=$langop_type_immunity?><br>
            X - <?=$langop_eprofile_adult?><br>
          </p>
        </div>
      </td>
    </tr>
  </table>
</div>
</body>
<?
mysql_close($dbconn);
 include('footer.php'); ?>
Return current item: OekakiPoteto