Contributions by Keith Gable This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. In addition to being restricted by the GNU General Public License, Essence Engine may not be sold, rented, sublicensed, or leased; you are not permitted to generate revenue with the Essence Engine source code. You may, however, use Essence Engine to run a website that generates revenue via other means. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA $Id$ */ // Profiles // View profiles for members of the site include("mainheader.php"); if ($_GET["userid"]) { //echo "
Coming soon...
\n"; $result = mysql_query("SELECT dispname FROM users WHERE username='" . mysql_escape_string($_GET["userid"]) . "'", $db); if ($viewname = mysql_fetch_array($result)) $pagetitle = "Viewing Profile for " . safetext($viewname["dispname"]); else $pagetitle = "Profiles"; } else $pagetitle = "Profiles"; include("themeheader.php"); if ($loggedin) echo "
Edit your profile
\n"; if ($_GET["userid"]) { //echo "
Coming soon...
\n"; $resultuser = mysql_query("SELECT * FROM users WHERE username='" . mysql_escape_string($_GET["userid"]) . "'", $db); if ($profuser = mysql_fetch_array($resultuser)) { $resultprof = mysql_query("SELECT * FROM profiles WHERE username='" . mysql_escape_string($_GET["userid"]) . "'", $db); $profile = mysql_fetch_array($resultprof); echo "\"Profile\n"; echo "\n"; if ($profile["profile"]) { ?> \n"; } else { sysmsg('The profile for "' . $_GET["userid"] . '" was not found.'); sendlocation("profiles.php"); } } else { $perpage = 25; if ($_GET["page"]) $pagenum = mysql_escape_string($_GET["page"]); else $pagenum = 1; $pageresult = mysql_query("SELECT count(*) FROM users WHERE hide=0 and hidepriv=0 and usertype>1", $db); $totalusers = mysql_fetch_array($pageresult); $totalusers = $totalusers["count(*)"]; $totalpages = ceil($totalusers / $perpage); if ($totalpages > 1) { echo "
Go to page: \n"; for ($curpage = 1; $curpage <= $totalpages; ++$curpage) { if ($curpage == $pagenum) echo $curpage; else echo '' . $curpage . "\n"; if ($curpage != $totalpages) echo " - "; } echo "\n
\n"; } $query = "SELECT * FROM users WHERE hide=0 and hidepriv=0 and usertype>1 ORDER BY usertype DESC, dispname ASC LIMIT $perpage OFFSET " . (($pagenum - 1) * $perpage); $result = mysql_query($query, $db); if (mysql_affected_rows()) $gotusers = true; $utype = 10; if ($gotusers) { echo "
\n"; ?> Real Name:
Screen Names:
E-mail address:
Website: ' . safetext($profuser["link"]) . ""; else echo '' . safetext($profuser["link"]) . ""; } ?>
Tagline:
Total forum posts:
Member since:
Age:
Sex:
Location:
Hair:
Eyes:
Height:
Weight:
MSN:
AIM:
Yahoo:
ICQ:
\n"; echo "\n\n"; while ($curuser = mysql_fetch_array($result)) { if ($curuser["usertype"] < $utype) { echo '\n"; $utype = $curuser["usertype"]; } echo '"; if ($curuser["tagline"]) echo "\n"; } echo "\n
UserTaglineLast Visit
' . type2str($curuser["usertype"], 1) . "
' . safetext($curuser["dispname"]) . "" . safetext($curuser["tagline"]); else echo "<No tagline>"; echo "" . safetext(date("g:i A, Y-m-d",$curuser["lastvisit"])) . "
\n"; } else echo "
No users found.
\n"; if ($totalpages > 1) { echo "
Go to page: \n"; for ($curpage = 1; $curpage <= $totalpages; ++$curpage) { if ($curpage == $pagenum) echo $curpage; else echo '' . $curpage . "\n"; if ($curpage != $totalpages) echo " - "; } echo "\n
\n"; } } include("themefooter.php"); ?>