$result447 = $db->query("SELECT * FROM `codes` WHERE `by`='$mytopid' AND `used`='0'") or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
// $invby = $db->fetch_assoc($result447);
if (!$pun_user['is_guest'] && basename($_SERVER['PHP_SELF']) == "index.php" && $db->num_rows($result447)){
?> <div class='notice-bar'><a href='profile.php?section=premium&id=<?php echo $mytopid ?>'>You have unused invitation codes!</a></div>
<?php }