<?php
global $user;
$uid = $user ? $user->uid : 0;
$username = $user->name;
?>
<div id="logintout">
<?php if ($uid>0): ?>
<h2>Welcome Back</h2>
<p>
<?php echo "<a href='/user/$uid'>$username</a>"; ?>
</p>
<p class="button"><a id="loginbutton" href="/logout/"><img src="/images/logout-tout-btn.gif" alt="logout"></a></p>
<?php else: ?>
<h2>Create your MyH2O account &mdash; it's FREE!</h2>
<p>As a member, you can sign up to receive our quarterly e-newsletter,
the Weekly Watering Number, and upcoming workshops.</p>
<p class="button"><a id="loginbutton" href="/user/login/"><img src="/images/login-tout-btn.gif" alt="login"></a></p>
<?php endif; ?>
</div>