98 lines
5.2 KiB
PHP
98 lines
5.2 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
use Coduo\PHPHumanizer\DateTimeHumanizer;
|
|
|
|
?>
|
|
<div class="right_col" role="main">
|
|
<div class="">
|
|
<div class="row">
|
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
|
<div class="x_panel">
|
|
<div class="x_title">
|
|
<h2>Weiterleitungen</h2>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
<div class="x_content">
|
|
<p class="text-muted font-13 m-b-30">
|
|
Hier sind alle derzeitigen Weiterleitungen (Short-Links) auf andere Seiten zu finden!
|
|
</p>
|
|
<div style="overflow-x: auto">
|
|
<table id="datatable-fixed-header" class="table table-striped table-bordered" data-page-length="25">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Redirect</th>
|
|
<th>URL</th>
|
|
<th>Datum</th>
|
|
<th>Temporär</th>
|
|
<th>Ablauf-Datum</th>
|
|
<th>Tools</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($redirects as $redirect) { ?>
|
|
<tr>
|
|
<td><?= $redirect['ID'] ?></td>
|
|
<td>
|
|
<a href="<?= base_url('r/' . $redirect['redirect']) ?>" target="_blank"><?= $redirect['redirect'] ?></a>
|
|
</td>
|
|
<td>
|
|
<a href="<?= $redirect['url'] ?>" target="_blank"><?= substr($redirect['url'], 0, 30) . '...' ?></a>
|
|
</td>
|
|
<td><?= date('d.m.Y H:i:s', strtotime($redirect['date'])) ?></td>
|
|
<td><?= $redirect['temporary'] ? '<i class="fa fa-check-circle"></i> Ja' : '<i class="fa fa-times-circle"></i> Nein' ?></td>
|
|
<td><?= $redirect['temporary'] ? date('d.m.Y H:i:s', strtotime($redirect['expireDate'])) : '' ?></td>
|
|
<td>
|
|
<a href="#" class="btn btn-xs btn-default" onclick="editRedirect(<?= $redirect['ID'] ?>, '<?= $redirect['redirect'] ?>', '<?= $redirect['url'] ?>')">
|
|
<i class="fa fa-edit"></i>
|
|
</a>
|
|
<a href="<?= base_url('admin/redirects/removeRedirect/' . $redirect['ID']) ?>" class="btn btn-xs btn-red" data-toggle="tooltip" data-placement="top" title="Weiterleitung entfernen">
|
|
<i class="fa fa-trash"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="x_panel">
|
|
<div class="x_title">
|
|
<h2>Weiterleitung hinzufügen</h2>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
<div class="x_content">
|
|
<p class="text-muted font-13 m-b-30">
|
|
Füge eine neue Weiterleitung hinzu.
|
|
</p>
|
|
<form action="<?= base_url('admin/redirects/addRedirect') ?>" method="post">
|
|
<input type="hidden" name="redirectID" id="redirectID">
|
|
<div class="form-group col-xs-12 col-md-3">
|
|
<label for="redirectName">Weiterleitungs-Name</label>
|
|
<input type="text" name="redirectName" id="redirectName" class="form-control">
|
|
</div>
|
|
<div class="form-group col-xs-12 col-md-3">
|
|
<label for="redirectUrl">Weiterleitungs-Ziel</label>
|
|
<input type="url" name="redirectUrl" id="redirectUrl" class="form-control">
|
|
</div>
|
|
<div class="form-group col-xs-12 col-md-3">
|
|
|
|
</div>
|
|
<div class="form-group col-xs-12 col-md-3">
|
|
<input type="submit" value="Hinzufügen" class="btn btn-primary">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|