$r = redisLink(); ?> <div id="postform"> <form method="POST" action="post.php"> <?php echo utf8entities($User['username']); ?> , what you are doing? <br> <table> <tr><td><textarea cols="70" rows="3" name="status"></textarea></td></tr> <tr><td align="right"><input type="submit" name="doit" value="Update"></td></tr> </table> </form> <div id="homeinfobox"> <?php echo $r->scard("uid:" . $User['id'] . ":followers"); ?> followers<br> <?php echo $r->scard("uid:" . $User['id'] . ":following"); ?> following<br> </div> </div> <? $start = gt("start") === false ? 0 : intval(gt("start")); showUserPostsWithPagination(false,$User['id'],$start,10); include("footer.php") ?>
<?php include "retwis.php"; include "header.php"; $r = redisLink(); if (!gt("u") || !($userid = $r->hget("users", gt("u")))) { header("Location: index.php"); exit(1); } echo "<h2 class=\"username\">" . utf8entities(gt("u")) . "</h2>"; if (isLoggedIn() && $User['id'] != $userid) { $isfollowing = $r->zscore("following:" . $User['id'], $userid); if (!$isfollowing) { echo "<a href=\"follow.php?uid={$userid}&f=1\" class=\"button\">Follow this user</a>"; } else { echo "<a href=\"follow.php?uid={$userid}&f=0\" class=\"button\">Stop following</a>"; } } $start = gt("start") === false ? 0 : intval(gt("start")); showUserPostsWithPagination(gt("u"), $userid, $start, 10); include "footer.php";