<?php session_start(); include_once 'includes/connect.php'; include_once 'includes/config.php'; include_once 'includes/functions.php'; ?> <html> <head> <title> Photoderp </title> <link rel="stylesheet" href="style/style.css" type="text/css"> </head> <body> <div id="wrapper"> <div id="content"> <a href="index.php" style="font-size: 200%;text-decoration: none;">Photoderp</a><br /> <a href="most_viewed.php" style="text-decoration: none;">Most viewed</a> | <?php if (is_signed_in() == FALSE) { echo '<a href="signup.php" style="text-decoration: none;">Signup</a> | <a href="signin.php" style="text-decoration: none;">Signin</a><br /><br />'; } else { echo '<a href="signout.php" style="text-decoration: none;">Signout</a><br /><br />'; } ?>
<?php include_once 'includes/header.php'; if (is_signed_in() == TRUE) { echo 'API key: ' . $_SESSION['api_key']; ?> <form action="shorten.php" method="post"> Original URL: <input type="text" name="original-url" value=""><br /> Shortened URL: <input type="text" name="short-url" value=""><br /> <input type="submit" name="submit" value="Shorten"> </form> <?php } else { echo 'You need to be <a href="signin.php">signed-in</a> to shorten URLs.<br /> If you don\'t already have an account you can sign-up <a href="signup.php">here</a>.'; } include_once 'includes/footer.php';