diff options
| author | root | 2014-11-27 02:41:21 +0100 |
|---|---|---|
| committer | root | 2014-11-27 02:41:21 +0100 |
| commit | 92babb43a2a0041a71b54db35cbc9d2fba908a63 (patch) | |
| tree | 8971101b53b6a6b12a092b456dc11a4dbfc034a3 /linkshorter/view | |
| parent | 2b24f3ef0e800f878177973eefcb28380a292503 (diff) | |
| download | tools.iamfabulous.de-92babb43a2a0041a71b54db35cbc9d2fba908a63.tar.gz | |
Rewrote the linkshorter.
Diffstat (limited to 'linkshorter/view')
| -rw-r--r-- | linkshorter/view/templ-head.php | 15 | ||||
| -rw-r--r-- | linkshorter/view/templ-index.php | 55 | ||||
| -rw-r--r-- | linkshorter/view/templ-output.php | 12 | ||||
| -rw-r--r-- | linkshorter/view/templ-password.php | 35 |
4 files changed, 117 insertions, 0 deletions
diff --git a/linkshorter/view/templ-head.php b/linkshorter/view/templ-head.php new file mode 100644 index 0000000..abc29bf --- /dev/null +++ b/linkshorter/view/templ-head.php @@ -0,0 +1,15 @@ +<!doctype html> +<html> +<head> + <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"> + <style> + <?php echo file_get_contents("../tools/style.css"); ?> + .grey { color: #737373;} + </style> + <link rel='shortcut icon' href='../tools/favicon.ico' type='image/x-icon'> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> + <?php require("../tools/navbar.php"); ?> + diff --git a/linkshorter/view/templ-index.php b/linkshorter/view/templ-index.php new file mode 100644 index 0000000..b78b5c7 --- /dev/null +++ b/linkshorter/view/templ-index.php @@ -0,0 +1,55 @@ +<?php + $title= "Link Shorter"; + require 'view/templ-head.php'; +?> + <div class="container"> + <div class="text-center"> + <div class="row center-block vertical-center"> + <form class="form-horizontal " method="POST" action=""> + <fieldset> + + <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> + <div class="col-md-5"> + <input id="url" name="url" placeholder="http://www.moehm.org/" class="form-control input-md" required="" type="text"> + </div> + </div> + + <div class="form-group"> + <label class="col-md-4 control-label grey" for="short">(optional)</label> + <div class="col-md-4"> + <input id="short" name="short" placeholder="Your own query string here." class="form-control input-md" type="text"> + </div> + </div> + + <!-- Password input--> + <div class="form-group"> + <label class="col-md-4 control-label grey" for="password">(optional)</label> + <div class="col-md-4"> + <input id="password" name="password" placeholder="Protect your link with a password." class="form-control input-md" type="password"> + </div> + </div> + + <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"> + <span class="help-block text-left">Choose how long the shortlink should be valid. (In seconds)</span> + </div> + </div> + + <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-primary" type="submit">Short!</button> + </div> + </div> + + </fieldset> + </form> + </div> + </div> + </div> + <?php require("../tools/footer.php"); ?> diff --git a/linkshorter/view/templ-output.php b/linkshorter/view/templ-output.php new file mode 100644 index 0000000..0ca6d29 --- /dev/null +++ b/linkshorter/view/templ-output.php @@ -0,0 +1,12 @@ +<?php + $title= $heading; + require 'view/templ-head.php'; +?> +<div class="container text-center pagination-centered"> + <div class="row"> + <h1><?php echo $heading; ?></h1> + <hr> + <h4><?php echo $reason; ?></h4> + </div> +</div> + <?php require("../tools/footer.php"); ?> diff --git a/linkshorter/view/templ-password.php b/linkshorter/view/templ-password.php new file mode 100644 index 0000000..2be90f3 --- /dev/null +++ b/linkshorter/view/templ-password.php @@ -0,0 +1,35 @@ +<?php + $title= "Passwort Required | Link Shorter"; + require 'view/templ-head.php'; +?> +<div class="container text-center pagination-centered"> + <div class="row"> + <form class="form-horizontal" action="<?php echo ADMINDOMAIN; ?>" method="POST"> + <fieldset> + + <!-- Form Name --> + <legend><h1>Password Required</h1><p>Enter the correct password and you will be redirected.</p></legend> + + <!-- Password input--> + <div class="form-group"> + <label class="col-md-4 control-label" for="password">Password</label> + <div class="col-md-4"> + <input id="password" name="password" placeholder="Password" class="form-control input-md" required="" type="password"> + </div> + </div> + <input type="hidden" name="checkpassword" value="1"> + <input type="hidden" name="short" value="<?php echo htmlentities($_REQUEST ["short"]); ?>"> + + <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> + </div> + </div> + + </fieldset> + </form> + + </div> +</div> + <?php require("../tools/footer.php"); ?> |
