65 lines
2.7 KiB
PHP
65 lines
2.7 KiB
PHP
|
<?php
|
||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||
|
?>
|
||
|
|
||
|
<section class="container">
|
||
|
<div class="row">
|
||
|
<?= $message; ?>
|
||
|
<form class="form-horizontal" method="post">
|
||
|
<div class="form-group">
|
||
|
<label for="redirectInput" class="col-sm-2 control-label">Umleitungs-Code</label>
|
||
|
<div class="col-sm-10">
|
||
|
<input type="text" class="form-control" id="redirectInput" name="redirectInput" placeholder="Bsp.: abc123">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label for="redirectUrl" class="col-sm-2 control-label">Umleitungs-Adresse</label>
|
||
|
<div class="col-sm-10">
|
||
|
<input type="url" class="form-control url-input" id="redirectUrl" name="redirectUrl" placeholder="http://example.com">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<div class="col-sm-offset-2 col-sm-10">
|
||
|
<button type="submit" class="btn btn-default">Absenden</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
<div class="gap"></div>
|
||
|
<div class="row">
|
||
|
<div class="table-responsive">
|
||
|
<table class="table table-hover table-striped table-condensed">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<td>ID</td>
|
||
|
<td>Umleitungs-Url</td>
|
||
|
<td>Umleitungs-Code</td>
|
||
|
<td>Hinzugefügt am...</td>
|
||
|
<td>Temporär</td>
|
||
|
<td>Temporäre Bestehungszeit</td>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<?php foreach($allItems as $item) { ?>
|
||
|
<tr>
|
||
|
<td><?= $item['ID']; ?></td>
|
||
|
<td><a href="<?= $item['url']; ?>" target="_blank"><?php if(strlen($item['url']) > 100) { echo substr_replace($item['url'], '...', 100); } else { echo $item['url']; } ?></a></td>
|
||
|
<td><a href="<?= base_url('r/p/' . $item['redirect']); ?>" target="_blank"><?= $item['redirect']; ?></a></td>
|
||
|
<td><?= date("d.m.Y H:i:s", strtotime($item['date'])); ?></td>
|
||
|
<td><?= $item['temporary'] ? 'Ja' : 'Nein' ?></td>
|
||
|
<td><?= $item['temporaryTime'] ?></td>
|
||
|
</tr>
|
||
|
<?php } ?>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</section>
|
||
|
|
||
|
<script type="text/javascript" src="/assets/js/cleave.min.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
new Cleave('.url-input', {
|
||
|
prefix: 'http://'
|
||
|
});
|
||
|
</script>
|