fixInput($_GET['name'], FALSE);
if (!isset($fname))
exit();
$trans = TransManager::getInstance();
$trans->beginTrans();
$userdb = new UserDB();
$quizdb = new QuizDB();
$user = $userdb->lookupUserInformation($fname, $trans->getPDO());
if ($user) {
$profile = $userdb->getProfile($user->getUserId(), $trans->getPDO());
$details = $userdb->getProfileDetails($user->getUserId(), $trans->getPDO());
$pictures = $userdb->getPictures($user->getUserId(), $trans->getPDO(), $tinyPicsOnProfile);
$tags = $userdb->getUserInterestTags($user->getUserId(), $trans->getPDO());
$frienddb = new FriendDB();
$friends = $frienddb->getFriends($user->getUserId(), $trans->getPDO());
}
else {
$trans->commit();
$trans->disconnect();
exit();
}
session_start();
$myprofile = (isset($_SESSION['user']) && $_SESSION['user']->getUserId() == $user->getUserId());
if ($myprofile) {
$commcount = $userdb->getCommentCount($user->getUserId(), $trans->getPDO());
$tookcount = $quizdb->getTookQuizCount($user->getUserId(), $trans->getPDO());
}
$quizKey = $quizdb->hasActiveQuiz($user->getUserId(), $trans->getPDO());
$trans->commit();
$trans->disconnect();
if (!$user) {
echo 'No such user.';
exit();
}
$picture = $user->getPicture();
$ui = Component::getInstance();
?>
Profile For = $user->getName() ?>
= $user->getName() ?>'s Profile Details
Gender: |
= ($user->getGender() == 'M' ? 'Man' : 'Woman') ?> |
Age: |
= $user->getAge() ?> |
Drinker: |
= $profile->getDrinker() ?> |
Education: |
= $profile->getEducation() ?> |
Smoker: |
= $profile->getSmoker() ?> |
Income: |
= $profile->getIncome() ?> |
Status: |
= $profile->getMaritalStatus() ?> |
Religion: |
= $profile->getReligion() ?> |
Orientation: |
= $profile->getOrientation() ?> |
Ethnicity: |
= $profile->getRace() ?> |
Kids? |
getHasKids() == 'T') {
if ($profile->getWantsKids() == 'T')
echo 'Has kids and is interested in more';
else if ($profile->getWantsKids() == 'F')
echo 'Has kids and does not want more';
else
echo 'Has kids, declines to specify about more';
}
else if ($profile->getWantsKids() == 'F') {
if ($profile->getWantsKids() == 'T')
echo 'No kids but wants them some day';
else if ($profile->getWantsKids() == 'F')
echo 'No kids, does not want';
else
echo 'No kids, declines to specify about more';
}
else {
if ($profile->getWantsKids() == 'T')
echo 'Declines to specify, but wants kids';
else if ($profile->getWantsKids() == 'F')
echo 'Declines ot specify, but does not want';
else
echo 'Decline to specify';
}
?>
|
getLocation();
if ($loc) {
?>
Location: |
= $loc->getCity() ?>, = $loc->getState() ?>, = $loc->getCountry() ?> |
Why here? |
= $profile->getRelationship() ?> |
getDirName() . $picture->getFileName() .'" id="selfpic">
';
else
echo '
';
if ($pictures && (count($pictures) > 1 || !isset($picture))) {
echo '
';
for ($i = 0, $n = count($pictures); $i < $n; ++$i) {
if (!isset($picture) || $pictures[$i]->getPictureId() != $picture->getPictureId())
echo ' | ';
}
echo '
';
}
if ($myprofile)
echo '
';
else if (count($pictures) == $tinyPicsOnProfile)
echo '
';
if ($myprofile) {
?>
= $user->getName() ?>'s Description
= $details->getDescription() ?> |
= $user->getName() ?>'s Interest Tags: |
'. $user->getName() .' has not listed any interest tags';
else {
for ($i = 0, $n = count($tags); $i < $n; ++$i)
echo ($i != 0 ? ', ' : '') . $tags[$i];
}
?>
|
= $user->getName() ?>'s Friends: |
'. $user->getName() .' has not yet added any friends';
else {
echo '';
}
if (count($friends))
echo '';
?>
|
drawHeader($_SESSION['user']);
$ui->drawFooter();
?>