this is code diplays everything in one page how can i make this show more then one page?
thak you
// Addon Specific Function
function viewallusers_display_addon_link() {
// Show the link for the menu
$display = '<a href="index.php?action=addon_viewallusers_showpage1">View All Agents</a>';
return $display;
}
function viewallusers_display_addon_page() {
// display all the users in columns, pictures and names
global $conn, $lang, $config, $style;
require_once($config['basepath'].'/include/misc.inc.php');
$misc = new misc();
$display = '<table border="1" cellspacing="10" cellpadding="3" width="$style[admin_table_width]" class="form_main" align="center">';
$var_reset = 1; // Reset the var (counter) (DO NOT CHANGE)
// How Many To show Per Row
$user_col_max = 4; // Change this to suit your needs
// pull the user information from the table
$sql = "SELECT userdb_user_name, userdb_id, userdb_user_first_name, userdb_user_last_name FROM " . $config[table_prefix] . "userdb where userdb_is_agent = 'yes' order by userdb_user_name";
$recordSet1 = $conn->Execute($sql);
if ($recordSet1 === false) {
$misc->log_error($sql);
}
while (!$recordSet1->EOF) {
// loop through our users
$name = $misc->make_db_unsafe ($recordSet1->fields[userdb_user_name]);
$first = $misc->make_db_unsafe ($recordSet1->fields[userdb_user_first_name]);
$last = $misc->make_db_unsafe ($recordSet1->fields[userdb_user_last_name]);
$userID = $misc->make_db_unsafe ($recordSet1->fields[userdb_id]);
if ($var_reset == 0) {
$display .= "<tr>";
}
$display .= "<td align=\"center\" valign=\"top\"><a href=\"$config[baseurl]/index.php?action=view_user&user=$userID\">";
// get our image data using the userid
$user = $misc->make_db_unsafe($userID);
$sql = "SELECT userimages_id, userimages_caption, userimages_file_name, userimages_thumb_file_name FROM " . $config[table_prefix] . "userimages WHERE (userdb_id = $user) ";
$recordSet = $conn->SelectLimit($sql, 1, 0 );
if ($recordSet === false) {
$misc->log_error($sql);
}
$num_images = $recordSet->RecordCount();
if ($num_images > 0) {
// while (!$recordSet->EOF) {
$caption = $misc->make_db_unsafe ($recordSet->fields[userimages_caption]);
$thumb_file_name = $misc->make_db_unsafe ($recordSet->fields[userimages_thumb_file_name] );
$file_name = $misc->make_db_unsafe ($recordSet->fields[userimages_file_name]);
$imageID = $misc->make_db_unsafe ($recordSet->fields[userimages_id]);
$imagedata = GetImageSize("$config[user_upload_path]/$thumb_file_name" );
$imagewidth = $imagedata[0];
$imageheight = $imagedata[1];
$shrinkage = $config[thumbnail_width]/$imagewidth;
$displaywidth = $imagewidth * $shrinkage;
$displayheight = $imageheight * $shrinkage;
$display .= "<img src=\"$config[user_view_images_path]/$thumb_file_name\" height=\"$displayheight\" width=\"$displaywidth\"><br> ";
// $recordSet->MoveNext();
// }
} else {
$display .= "<img src=\"images/nophoto.gif\"><br>";
}
$display .= "<br>$first $last</a><br>";
$display .= "</td>";
if ($var_reset == $user_col_max) {
$display .= "</tr>";
$var_reset = 1;
} else {
$var_reset++;
}
$recordSet1->MoveNext();
} // end While loop
$display .= "</td></table><br>";
return $display;
} // end viewallusers_display_addon_page
// Addon Specific Function
function viewallusers_display_admin_page() {
}
?>