Location: PHPKode > projects > PhpProMembers > phpProMembers3/public_html/admin/members_list.php
<?php 
	$page_account = "admin";
	require_once('include.php'); 
?>
<?php
$currentPage = $HTTP_SERVER_VARS["PHP_SELF"];

$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($HTTP_GET_VARS['pageNum_Recordset1'])) {
  $pageNum_Recordset1 = $HTTP_GET_VARS['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_dbConnection, $dbConnection);
$query_Recordset1 = "SELECT first_name, last_name, e_mail_address, user_name FROM members";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $dbConnection) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($HTTP_GET_VARS['totalRows_Recordset1'])) {
  $totalRows_Recordset1 = $HTTP_GET_VARS['totalRows_Recordset1'];
} else {
  $all_Recordset1 = mysql_query($query_Recordset1);
  $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1 = 10);
$pageNum_Recordset1 = 0;
if (isset($HTTP_GET_VARS['pageNum_Recordset1'])) {
  $pageNum_Recordset1 = $HTTP_GET_VARS['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_dbConnection, $dbConnection);
$query_Recordset1 = "SELECT id, first_name, last_name, e_mail_address, user_name FROM members";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $dbConnection) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($HTTP_GET_VARS['totalRows_Recordset1'])) {
  $totalRows_Recordset1 = $HTTP_GET_VARS['totalRows_Recordset1'];
} else {
  $all_Recordset1 = mysql_query($query_Recordset1);
  $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

$queryString_Recordset1 = "";
if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
  $params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_Recordset1") == false && 
        stristr($param, "totalRows_Recordset1") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_Recordset1 = "&" . implode("&", $newParams);
  }
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body bgcolor="#CCCCCC">
<form name="form1" method="post" action="">
  <div align="center">
    <input name="Button" type="button" onClick="MM_goToURL('self','members_insert.php');return document.MM_returnValue" value="Add A Member">
  </div>
</form>
<table border="0" width="50%" align="center">
  <tr> 
    <td width="23%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
      <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><img src="First.gif" border=0></a> 
      <?php } // Show if not first page ?> </td>
    <td width="31%" align="center"> <?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
      <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><img src="Previous.gif" border=0></a> 
      <?php } // Show if not first page ?> </td>
    <td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
      <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><img src="Next.gif" border=0></a> 
      <?php } // Show if not last page ?> </td>
    <td width="23%" align="center"> <?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
      <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><img src="Last.gif" border=0></a> 
      <?php } // Show if not last page ?> </td>
  </tr>
</table>


<table width="100%" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#0000CC" bgcolor="#CCCCCC">
  <tr bgcolor="#6600FF"> 
    <td bgcolor="#0000CC"> <div align="center"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Name</strong></font></div></td>
    <td bgcolor="#0000CC"> <div align="center"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>E-Mail 
        Address </strong></font></div></td>
    <td bgcolor="#0000CC"><div align="center"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>User 
        Name </strong></font></div></td>
    <td bgcolor="#0000CC"> <div align="center"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><strong>Process</strong></font></div></td>
  </tr>
  <?php do { ?>
  <tr bordercolor="#000000" bgcolor="#FFFFFF"> 
    <td><strong><font size="1" face="Arial, Helvetica, sans-serif"><?php echo $row_Recordset1['first_name']; ?> <?php echo $row_Recordset1['last_name']; ?></font></strong></td>
    <td><strong><font color="#0000CC" size="1" face="Arial, Helvetica, sans-serif"><a href="mailto:<?php echo $row_Recordset1['e_mail_address']; ?>"><?php echo $row_Recordset1['e_mail_address']; ?></a></font></strong></td>
    <td><strong><font size="1" face="Arial, Helvetica, sans-serif"><?php echo $row_Recordset1['user_name']; ?></font></strong></td>
    <td> 
      <div align="center"> <strong><a href="add_membership.php?memberid=<?php echo $row_Recordset1['id']; ?>"><font color="#0000CC" size=1 face="Arial, Helvetica, sans-serif">+</font> 
        </a> <font color="#000000" size=1 face="Arial, Helvetica, sans-serif">/</font> 
        <font face="Arial, Helvetica, sans-serif"><a href="members_update.php?id=<?php echo $row_Recordset1['id']; ?>"><font color="#0000CC" size=1>U</font></a> 
        <font color="#000000" size="1">/</font></font> <font face="Arial, Helvetica, sans-serif"><a href="members_list.php" onClick="MM_openBrWindow('members_details.php?id=<?php echo $row_Recordset1['id']; ?>','','width=325,height=450')"><font color="#0000CC" size=1>D</font></a> 
        <font color="#000000" size=1>/</font></font> <font face="Arial, Helvetica, sans-serif"><a href="members_list.php" onClick="MM_openBrWindow('member_memberships.php?name=<?php echo $row_Recordset1['user_name']; ?>','','width=325,height=225')"><font color="#0000CC" size=1>MD</font></a> 
        <font color="#000000" size=1>/ </font></font><font size="1" face="Arial, Helvetica, sans-serif"><a href="member_stats.php?user_name=<?php echo $row_Recordset1['user_name']; ?>"><font color="#0000CC">S</font></a> 
        / </font><font face="Arial, Helvetica, sans-serif"><a href="members_delete.php?id=<?php echo $row_Recordset1['id']; ?>"><font color="#FF0000" size=1>X</font></a> 
        <font size="1">/ <a href="block_list.php?user_name=<?php echo $row_Recordset1['user_name']; ?>"><font color="#0000CC">UB</font></a></font></font> 
        </strong></div></td>
  </tr>
  <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

Return current item: PhpProMembers