function content() { $playername = ""; if (isset($_SESSION['username'])) { $playername = $_SESSION['username']; } if (isset($_GET['player'])) { $playername = $_GET['player']; } if (isset($_POST['player'])) { $playername = $_POST['player']; } if (chop($playername) != "") { $player = Player::findByName($playername); if (!is_null($player)) { profileTable($player); } else { echo "<center>\n"; echo "{$playername} could not be found in the database. Please check"; echo " your spelling and try again.\n"; echo "</center>\n"; } } else { echo "<center>\n"; echo "Please <a href=\"login.php\">log in</a> to see"; echo " your profile. You may also use the search below without"; echo " logging in.\n"; echo "</center>\n"; } echo "<br><br>\n"; searchForm($playername); }
function content() { global $playername; if (chop($playername) != "") { $player = Player::findByName($playername); if (!is_null($player)) { profileTable($player); } else { echo "<center>\n"; echo "{$playername} could not be found in the database. Please check"; echo " your spelling and try again.\n"; echo "</center>\n"; } } else { echo "<center>\n"; echo "Please <a href=\"login.php\">log in</a> to see"; echo " your profile. You may also use the search without"; echo " logging in.\n"; echo "</center>\n"; } echo "<br /><br />\n"; }
} </script> </head> <body> <div class="Canvas"> <?php echo menuHeader(isset($_SESSION['nick']), $_SESSION['nick'], $_SESSION['role']); ?> <div class="GeneralDisplay"> <h1><?php echo $targetNick; ?> </h1> <?php echo profileTable($nick, $targetNick); ?> <h1>Álbumes de <?php echo $targetNick; ?> </h1> <div id="display" class="Display"></div> <br/><br/> </div> </div> </body> </html>