View the User Picture Gallery. [Generate]
Browse profiles by country. [Generate]
Browse profiles at random,
at random with pictures, or
at random without pictures.
Alphabetical profile listings:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
");
row1("Search");
end_table();
echo "
";
end_table();
page_tail();
function execute_command() {
// Request for a random profile.
if ($_GET['cmd'] == "rand") {
if ($_GET['pic']) {
if ($_GET['pic'] == 0) {
$result = mysql_query("SELECT userid FROM profile WHERE has_picture = 0");
} else if ($_GET['pic'] == 1) {
$result = mysql_query("SELECT userid FROM profile WHERE has_picture = 1");
}
} else {
$result = mysql_query("SELECT userid FROM profile");
}
while ($row = mysql_fetch_row($result)) {
$userIds[] = $row[0];
}
shuffle($userIds);
header("Location: " . MASTER_URL . "view_profile.php?userid=" . $userIds[0]);
exit();
}
else if ($_GET['cmd'] == "search") {
if ($_GET['name']) {
$result = mysql_query("SELECT id FROM user WHERE name = " . $_GET['name']);
if ($result) {
while ($row = mysql_fetch_row($result)) {
echo "
ID ", $row['0'], " has a name that matches your query.";
}
} else {
echo "No names matched your query.
";
}
}
}
}
?>