diff options
Diffstat (limited to 'linkshorter')
| -rw-r--r-- | linkshorter/index.php | 10 | ||||
| -rw-r--r-- | linkshorter/robots.txt | 2 | ||||
| -rw-r--r-- | linkshorter/view/templ-head.php | 1 | ||||
| -rw-r--r-- | linkshorter/view/templ-index.php | 2 | ||||
| -rw-r--r-- | linkshorter/view/templ-password.php | 2 |
5 files changed, 10 insertions, 7 deletions
diff --git a/linkshorter/index.php b/linkshorter/index.php index c60bc82..cca4f20 100644 --- a/linkshorter/index.php +++ b/linkshorter/index.php @@ -45,7 +45,7 @@ if ( ! isset($_REQUEST['checkpassword']) || $_REQUEST['checkpassword'] != 1 ) $options["ttl"] = ""; else { if ( ! preg_match( "/^[0-9]+$/", trim($_REQUEST["ttl"]) ) ){ - _do_output("Failure", "Your Lifetime doesn't look like a valid number."); + _do_output("Failure!", "Your Lifetime doesn't look like a valid number."); } $options["ttl"] = $_REQUEST["ttl"]; } @@ -58,20 +58,20 @@ if ( ! isset($_REQUEST['checkpassword']) || $_REQUEST['checkpassword'] != 1 ) $db = new Database(REDIS_CONNECT, REDIS_SELECT); if ( $options["short"] != "" && $db->exists($options["short"]) ) - _do_output("Failure", "Query string '".htmlentities($options["short"])."' already taken. Please choose a different one."); + _do_output("Failure!", "Query string '".htmlentities($options["short"])."' already taken. Please choose a different one."); if ( $options["short"] == "" ) $options["short"] = getToken(); if ( $options["ttl"] != "" ){ if ( ! $db->set($options["short"], json_encode($options), $options["ttl"]) ){ - _do_output("Failure", "Database went away. :("); + _do_output("Failure!", "Database went away. :("); } } else { if ( ! $db->set($options["short"], json_encode($options)) ){ - _do_output("Failure", "Database went away. :("); + _do_output("Failure!", "Database went away. :("); } } - _do_output("Success!", "Your shortlink is " . SHORTDOMAIN . htmlentities($options["short"]) . "."); + _do_output("Success!", "Your short link is " . SHORTDOMAIN . htmlentities($options["short"]) . "."); } diff --git a/linkshorter/robots.txt b/linkshorter/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/linkshorter/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/linkshorter/view/templ-head.php b/linkshorter/view/templ-head.php index abc29bf..2eee43c 100644 --- a/linkshorter/view/templ-head.php +++ b/linkshorter/view/templ-head.php @@ -4,6 +4,7 @@ <meta charset="utf-8"> <title><?php echo $title; ?></title> <link rel="stylesheet" href="https://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"); ?> .grey { color: #737373;} diff --git a/linkshorter/view/templ-index.php b/linkshorter/view/templ-index.php index b78b5c7..17b042e 100644 --- a/linkshorter/view/templ-index.php +++ b/linkshorter/view/templ-index.php @@ -35,7 +35,7 @@ <div class="form-group"> <label class="col-md-4 control-label grey" for="ttl">(optional)</label> <div class="col-md-4"> - <input id="ttl" name="ttl" class="form-control input-md" type="number"> + <input id="ttl" name="ttl" class="form-control input-md" type="number" min="0"> <span class="help-block text-left">Choose how long the shortlink should be valid. (In seconds)</span> </div> </div> diff --git a/linkshorter/view/templ-password.php b/linkshorter/view/templ-password.php index 2be90f3..727ecd3 100644 --- a/linkshorter/view/templ-password.php +++ b/linkshorter/view/templ-password.php @@ -23,7 +23,7 @@ <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">Submit</button> </div> </div> |
