diff options
Diffstat (limited to 'linkshorter/index.php')
| -rw-r--r-- | linkshorter/index.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/linkshorter/index.php b/linkshorter/index.php index 75ac9aa..1d56be5 100644 --- a/linkshorter/index.php +++ b/linkshorter/index.php @@ -2,10 +2,12 @@ require 'functions.php'; require 'db.php'; -ob_start("sanitize_output"); +//ob_start("sanitize_output"); +ob_start(); if ( $_SERVER['REQUEST_METHOD'] != 'POST'){ +/* $key = "lscache_" . md5( strtolower($_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"].$_SERVER["QUERY_STRING"])); if ( $db->exists($key) ) { header("X-Cache: Hit"); @@ -13,6 +15,7 @@ if ( $_SERVER['REQUEST_METHOD'] != 'POST'){ ob_end_flush(); exit; } +*/ ?> <!doctype html> @@ -20,11 +23,12 @@ if ( $_SERVER['REQUEST_METHOD'] != 'POST'){ <head> <meta charset="utf-8"> <title>Link Shorter</title> - <!--style>html{position:relative;min-height:100%}body{margin-bottom:60px}.footer{position:absolute;bottom:0;width:100%}#copyright-text{text-decoration:underline;color:#333}</style--> + <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> + <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <style> <?php echo file_get_contents("../tools/style.css"); ?> </style> - <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> + <noscript><style>.navbar{margin-bottom:0;}</style></noscript> <link rel='shortcut icon' href='../tools/favicon.ico' type='image/x-icon'> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> @@ -35,7 +39,9 @@ if ( $_SERVER['REQUEST_METHOD'] != 'POST'){ <form class="form-horizontal " method="POST"> <fieldset> - <legend class="text-centered"><h1>Amazing Linkshorter</h1></legend> + <legend class="text-centered"><h1>Amazing Linkshorter</h1> + <p>Short your link and use a easy to remembery query string</p> + </legend> <div class="form-group"> <label class="col-md-4 control-label" for="url">Link:</label> @@ -56,7 +62,7 @@ if ( $_SERVER['REQUEST_METHOD'] != 'POST'){ <div class="form-group"> <label class="col-md-4 control-label" for="singlebutton"></label> <div class="col-md-4"> - <button id="singlebutton" name="singlebutton" class="btn btn-info" type="submit">Short!</button> + <button id="singlebutton" name="singlebutton" class="btn btn-primary" type="submit">Short!</button> </div> </div> @@ -104,5 +110,5 @@ if ( $_SERVER['REQUEST_METHOD'] != 'POST'){ } $db->set($short, $_POST["url"]); - do_output("<p>Your short link for <a href=\"".htmlentities($_POST["url"])."\">".htmlentities($_POST["url"])."</a> is <br> http://".$_SERVER["HTTP_HOST"]."/".$short."</p>", "200 OK", false, "<h1>Success</h1>"); + do_output("<p>Your short link for <a href=\"".htmlentities($_POST["url"])."\">".htmlentities($_POST["url"])."</a> is <br> http://s.moehm.org/".$short."</p>", "200 OK", false, "<h1>Success</h1>"); } |
