1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-09-19 23:21:47 +02:00
polr/index.php

39 lines
1.7 KiB
PHP
Raw Permalink Normal View History

<?php
2015-01-10 01:27:32 +01:00
if (!@include('config.php')) {
header('Location:setup.php');
}
@session_start();
2015-01-10 01:27:32 +01:00
if (strlen($_SESSION['username']) < 1 && $li_show_front === true) {
2015-11-01 21:36:49 +01:00
if ($li_index_redirect) {
header("Location: " . $li_index_redirect);
2015-11-01 21:36:49 +01:00
die();
}
else {
die("<h1>401 Unauthorized</h1><em><a href='login.php'>Login</a> to access this resource.</em>");
}
}
2014-11-08 16:10:31 +01:00
2015-01-10 03:38:28 +01:00
require_once('layout-headerlg.php');
?>
<h1 class='title'><?php require_once('config.php');echo $wsn;?></h1>
<form id='shortenform' method="POST" action="createurl.php" role="form">
<input type="text" class="form-control" placeholder="URL" id="url" value="http://" name="urlr" />
2015-01-10 03:38:28 +01:00
<div id='options'>
<br />
<div class="btn-group btn-toggle" data-toggle="buttons">
<label class="btn btn-primary btn-sm active">
<input type="radio" name="options" value="p" checked=""> Public
</label>
<label class="btn btn-sm btn-default">
<input type="radio" name="options" value="s"> Secret
</label>
</div> <br /><br />
2015-05-31 21:53:00 +02:00
<br>Customize link: <br><div style='color: green'><h2 style='display:inline'><?php require_once('config.php');echo $wsa;?>/</h2><input type='text' id='custom' class="form-control" name='custom' /><br>
2015-01-10 03:38:28 +01:00
<a href="#" class="btn btn-inverse btn-sm" id='checkavail'>Check Availability</a><div id='status'></div></div>
</div>
<br><input type="submit" class="btn btn-info" id='shorten' value="Shorten!"/> <a href="#" class="btn btn-warning" id='showoptions'>Link Options</a>
<input type="hidden" id="hp" name="hp" value="<?php echo $hp; ?>"/>
</form>
<br><br><div id="tips" class='text-muted'><i class="fa fa-spinner"></i> Loading Tips...</div>
<?php require_once('layout-footerlg.php');