gecko-dev/webtools/partytool/views/users/view.thtml

44 lines
1.4 KiB
Plaintext
Executable File

<?php
if (!empty($user['User']['name']))
echo "<h1>".$user['User']['name']."</h1><br/>";
if ($user['User']['showemail'] == 1 && @$_SESSION['User'])
echo "Email: ".$user['User']['email']."<br/>";
if ($user['User']['showloc'] == 1 && !empty($user['User']['location']))
echo "Location: ".$user['User']['location']."<br/>";
if (!empty($user['User']['website']))
echo 'Website: <a href="'.$user['User']['website'].'" rel="nofollow">'.$user['User']['website'].'</a><br/>';
if (!empty($parties)) {
echo "Attending: ";
$c = count($parties) - 1;
$i = 0;
foreach ($parties as $party) {
echo '<a href="'.$html->url('/parties/view/'.$party['parties']['id']).'">'.$party['parties']['name'].'</a>';
echo ($i < $c) ? ', ' : '<br/>';
$i++;
}
}
if (!empty($hparties)) {
echo "Host of: ";
$c = count($hparties) - 1;
$i = 0;
foreach ($hparties as $party) {
echo '<a href="'.$html->url('/parties/view/'.$party['parties']['id']).'">'.$party['parties']['name'].'</a>';
echo ($i < $c) ? ', ' : '<br/>';
$i++;
}
}
?>
<?php if(isset($map) && $user['User']['showmap'] == 1): ?>
<br/>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo GMAP_API_KEY; ?>" type="text/javascript"></script>
<script src="<?php echo $html->url('/js/maps.js'); ?>" type="text/javascript"></script>
<div id="map" style="height: 200px; width: 350px;"></div>
<?php endif; ?>