jb-data.de/template/tpl/v_karten.tpl
2025-08-11 22:23:30 +02:00

292 lines
11 KiB
Smarty

<div class="container-fluid" style="background-color:#333333">
<div class="row sortable">
<div class="col-md-2">
<div class="panel panel-warning">
<header class="panel-heading"><h2 class="panel-title">Anzeige Karten</span></h2></header>
<table class="table table-hover">
<thead>
<tr><td><a href="?s=v_karten&wahl=1" title="Kicke zum ausw&auml;len"><font color="#0949CC">alle Karten</td></tr>
<tr><td><a href="?s=v_karten&wahl=2" title="Kicke zum ausw&auml;len"><font color="#0949CC">freie Karten</td></tr>
<tr><td><a href="?s=v_karten&wahl=6" title="Kicke zum ausw&auml;len"><font color="#0949CC">Sperre nach Zeit</td></tr>
<tr><td><a href="?s=v_karten&wahl=3" title="Kicke zum ausw&auml;len"><font color="#0949CC">gesperrte Karten</td></tr>
<tr><td><a href="?s=v_karten&wahl=4" title="Kicke zum ausw&auml;len"><font color="#0949CC">verlorene Karten</td></tr>
<tr><td><a href="?s=v_karten&wahl=9" title="Kicke zum ausw&auml;len"><font color="#0949CC">Karten hinzufügen</td></tr>
</thead>
</table>
</div>
<!-- linkes Menue 2 nach Mitarbeiter -->
<div class="panel panel-warning">
<header class="panel-heading"><h2 class="panel-title">Karten/Mitarbeiter</span></h2></header>
<table class="table-condensed" style="font-size:11pt">
<thead>
{foreach from=$mitarbeiter item=ma}
<tr>
{if $ma.aktiv==0}<td><a href="?s=v_karten&wahl=5&id={$ma.id}" title="Kicke zum ausw&auml;len"><font color="#A8A5A5">{$ma.name}</td>{/if}
{if $ma.aktiv >0}<td><a href="?s=v_karten&wahl=5&id={$ma.id}" title="Kicke zum ausw&auml;len"><font color="#0949CC">{$ma.name}</td>{/if}
</tr>
{/foreach}
</thead>
</table>
</div>
</div>
<!---------------------------------------------------------------------->
<!-- mitte seite -->
<!---------------------------------------------------------------------->
<div class="col-md-10">
{if $wahl==9}
<div class="panel panel-primary">
<div class="panel-heading">Neue Karten im System anlernen</div>
<table class="table-condensed">
<tbody>
<tr>
<td nowrap style="line-height:120%;font-size:12pt"> <strong>lesen Sie jetzt Bitte die neue Karte ein</strong></td>
</tr>
<tr>
<td nowrap style="line-height:120%;font-size:14pt"> <strong>Neue Karten-ID: {$nextid}</strong></td>
<td nowrap style="line-height:120%;font-size:14pt"> <strong>lesen Sie jetzt die neue Karte ein</strong></td>
</tr>
</tbody>
</table>
</div>
{elseif $wahl==0}
<div class="panel panel-danger">
<div class="panel-heading">keine Auswahl getroffen........</div>
<table class="table-condensed">
<tbody>
<td nowrap style="line-height:120%;font-size:14pt"> <strong>Bitte auswählen !!!</strong></td>
</tbody>
</table>
</div>
{else}
<div class="panel panel-default">
<div class="panel-heading">Auswahl</div>
<table class="table table-hover">
<thead>
<tr>
<th style=font-size:10pt;>Karten ID</th>
<th style=font-size:10pt;>Seriennr.</th>
<th style=font-size:10pt;>Zuordnung</th>
<th style=font-size:10pt;>Sperre</th>
<th style=font-size:10pt;>lost</th>
<th style=font-size:10pt;>Status</th>
<th style=font-size:10pt;>lastLog</th>
<th style=font-size:10pt;>Bemerkung</th>
</tr>
</thead>
<tbody>
{foreach from=$karte item=kdata}
<form action="" method="post">
<tr>
<td nowrap style="width:50px;font-size:11pt"><b> {$kdata.kID}</td>
<td nowrap style="width:100px;font-size:10pt"><b> {$kdata.karte}</td>
<td nowrap style="width:180px;font-size:11pt">
<select name="list[{$kdata.kID}][Fahrer]" id="user_{$kdata.kID}" style="width:180px;" onChange="save_user({$kdata.kID})" >
{foreach from=$fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$kdata.user}
{/foreach}
</select>
</td>
<td nowrap style="width:10px;font-size:11pt">
<input type="checkbox" value="{$kdata.kID}" id="info1_{$kdata.kID}" onChange="save_c1({$kdata.gesperrt},{$kdata.kID})"
{if $kdata.gesperrt==1} checked="checked" {/if}>
</td>
<td nowrap style="width:10px;font-size:11pt">
<input type="checkbox" value="{$kdata.kID}" id="info2_{$kdata.kID}" onChange="save_c2({$kdata.verloren},{$kdata.kID})"
{if $kdata.verloren==1} checked="checked" {/if}>
</td>
{if $kdata.status==0}
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF0000'>unklar</td>
{/if}
{if $kdata.status==1}
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#0000FF'>freigeschaltet</td>
{/if}
{if $kdata.status==2}
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#0099FF'>aktiv Zeit</td>
{/if}
{if $kdata.status==3}
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF6600'>Kalender</td>
{/if}
{if $kdata.status==4}
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF6600'>keine Tour</td>
{/if}
{if $kdata.status==9 && $kdata.verloren==1}
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF0000'>Kartenverlust</td>
{/if}
{if $kdata.status==9 && $kdata.verloren==0}
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF0000'>gesperrt</td>
{/if}
<td nowrap align="right" style="width:130px;font-size:8pt"><b> {$kdata.lastlog} Uhr</td>
<td><input type="text" value="{$kdata.info}" id="info_{$kdata.kID}" style="width:170px;font-size:11pt" name="info{$kdata.kID}" onChange="save_info({$kdata.kID})"></td>
<!-- <td nowrap style="width:200px;font-size:11pt"><b> {$kdata.info}</td>
<td nowrap <input type="hidden" name="savetour" value="{$kdata.kID}"/>
<input type="image" name="savetour" value="{$tour.id}" src="template/images/icon/save.png"></td>-->
</tr> {/foreach}
</form>
</tbody>
</table>
</div>
</div>
{/if}
<!-- rechte seite -->
<!-- ------------------------------------
<script> var tagheute = '{$datum_unix|date_format:"%Y-%m-%d"}';</script>
-->
</div></div>
{literal}
<script>
function save_c1(karteID,karteID) {
var remember = document.getElementById('info1_'+karteID);
if (remember.checked) {
var istC = 1;
}else{
var istC = 0;
}
$.ajax({
type: 'POST',
url: "ajax.php?s=v_karte&a=save_c1",
dataType: 'json',
data: 'karteID=' + karteID + "&istC="+istC,
success: function (data) {
if(data.success == true) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
}
console.log(data)
}
});
}
function save_c2(karteID,karteID) {
var remember = document.getElementById('info2_'+karteID);
if (remember.checked) {
var istC = 1;
}else{
var istC = 0;
}
$.ajax({
type: 'POST',
url: "ajax.php?s=v_karte&a=save_c2",
dataType: 'json',
data: 'karteID=' + karteID + "&istC="+istC,
success: function (data) {
if(data.success == true) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
}
console.log(data)
}
});
}
function save_info(karteID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=v_karte&a=info_save",
dataType: 'json',
data: 'karteID=' + karteID + "&info=" + $("#info_"+karteID).val(),
success: function (data) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'info',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
console.log(data)
}
});
}
function save_user(karteID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=v_karte&a=user_save",
dataType: 'json',
data: 'karteID=' + karteID + "&user=" + $("#user_"+karteID).val(),
success: function (data) {
if(data.success == true) {
$.notify({
icon: 'glyphicon glyphicon-warning-ok',
message: data.lastnote
},{
type: 'success',
showProgressbar: true,
delay: 300,
newest_on_top: false,
element: 'body',
placement: {
from: "bottom",
align: "right"
},
animate: {
enter: 'animated fadeInDown',
exit: 'animated fadeOutUp'
}
});
}
console.log(data)
}
});
}
</script>
{/literal}