Current File : /home/users/kundensystem/www/admin/lslsit.php |
<?php
include './inc/header.php';
include './inc/sidebar.php';
if($adminRole['lizenz']!='1'&&$adminData['role']!='1'){
?><script>location.href="index.php";</script><?php
exit;
}
if($adminData['role']=='3') $st=" WHERE createdBy = '".$adminData['id']."'"; else $st='';
$sql = mysqli_query($conn,"SELECT * FROM ".$ls.$st);
?>
<main id="main" class="main">
<div class="pagetitle">
<h1>Angelegte Lizenzen</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item">Lizenz</li>
<li class="breadcrumb-item">Angelegte Lizenzen</li>
</ol>
</nav>
</div><!-- End Page Title -->
<section class="section dashboard">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Angelegte Lizenzen</h5>
<div class="responsive_table">
<table id="data_table" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>Nr</th>
<th>Lizenzinhaber</th>
<th>Email</th>
<th>Lizenz Nummer</th>
<th>URL</th>
<th>Status</th>
<th>Produkt</th>
<th>Optionen</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($sql)){
echo "<tr scope='row'>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['uname'] .' '. $row['ulastname']."</td>";
echo "<td>" . $row['uemail'] . "</td>";
echo "<td>" . $row['lcnum'] . "</td>";
echo "<td>" . $row['surl'] . "</td>";
if($row['lcst']=="Lizenz gesperrt") {
echo "<td style='color: red;font-weight: bold;'>" . $row['lcst'] . "</td>";
}
else{
echo "<td style='color: green;font-weight: bold;'>" . $row['lcst'] . "</td>";
}
if($row['pname']){
$arr=explode('/', $row['pname']); $arr=explode(':', $arr[0]);
$ss=trim($arr[1]);
} else {
$ss='';
}
echo "<td>".$ss."</td>";
$edit = "<a href='lsedit.php?ls=".$row['id']."' class='btn btn-success'><i class='bi bi-pencil-fill'></i></a>";
$nb = " ";
$view = "<a href='lsview.php?ls=".$row['id']."' class='btn btn-danger'><i class='bi bi-eye-fill'></i></a>";
echo "<td>".$edit.$nb.$view."</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
</main><!-- End #main -->
<?php
include './inc/footer.php';
?>
<link href="https://cdn.datatables.net/1.10.22/css/dataTables.bootstrap4.min.css" rel="stylesheet">
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js"></script>
<script>
$('.sub1 ul').addClass('show');
$('.sub1 .nav-link').removeClass('collapsed');
$(document).ready(function(){
$('#data_table').DataTable({
"order": [[ 0, "desc" ]],
"scrollX": true,
"language": {
"lengthMenu": "Zeige _MENU_ Einträge",
"info": "Zeige Eintrag _START_ bis _END_ von _TOTAL_ Einträgen",
"search": "Suche:",
"infoEmpty": "Zeige 0 bis 0 von 0 Einträgen",
"emptyTable": "Keine Daten verfügbar",
"paginate": {
"first": "First",
"last": "Last",
"next": "Nächste",
"previous": "Vorher"
},
}
});
})
</script>