Archived
1
0
This repository has been archived on 2020-12-10. You can view files and clone it, but cannot push or open issues or pull requests.
old/application/views/redirect.php

65 lines
2.7 KiB
PHP
Raw Normal View History

2018-10-16 16:28:42 +00:00
<?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>