372 lines
15 KiB
PHP
372 lines
15 KiB
PHP
<?php
|
|
/* Smarty version 4.3.0, created on 2024-04-08 12:41:47
|
|
from '/var/www/vhosts/jb-data.de/httpdocs/template/tpl/v_karten.tpl' */
|
|
|
|
/* @var Smarty_Internal_Template $_smarty_tpl */
|
|
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
|
'version' => '4.3.0',
|
|
'unifunc' => 'content_6613c9eb3468b1_37808106',
|
|
'has_nocache_code' => false,
|
|
'file_dependency' =>
|
|
array (
|
|
'0fd1659b180248447c940bf66ded022dbbaaad3f' =>
|
|
array (
|
|
0 => '/var/www/vhosts/jb-data.de/httpdocs/template/tpl/v_karten.tpl',
|
|
1 => 1707991287,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'includes' =>
|
|
array (
|
|
),
|
|
),false)) {
|
|
function content_6613c9eb3468b1_37808106 (Smarty_Internal_Template $_smarty_tpl) {
|
|
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/var/www/vhosts/jb-data.de/httpdocs/lib/plugins/function.html_options.php','function'=>'smarty_function_html_options',),1=>array('file'=>'/var/www/vhosts/jb-data.de/httpdocs/lib/plugins/modifier.date_format.php','function'=>'smarty_modifier_date_format',),));
|
|
?>
|
|
<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älen"><font color="#0949CC">alle Karten</td></tr>
|
|
<tr><td><a href="?s=v_karten&wahl=2" title="Kicke zum auswälen"><font color="#0949CC">freie Karten</td></tr>
|
|
<tr><td><a href="?s=v_karten&wahl=6" title="Kicke zum auswälen"><font color="#0949CC">Sperre nach Zeit</td></tr>
|
|
<tr><td><a href="?s=v_karten&wahl=3" title="Kicke zum auswälen"><font color="#0949CC">gesperrte Karten</td></tr>
|
|
<tr><td><a href="?s=v_karten&wahl=4" title="Kicke zum auswälen"><font color="#0949CC">verlorene Karten</td></tr>
|
|
<tr><td><a href="?s=v_karten&wahl=9" title="Kicke zum auswä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>
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['mitarbeiter']->value, 'ma');
|
|
$_smarty_tpl->tpl_vars['ma']->do_else = true;
|
|
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['ma']->value) {
|
|
$_smarty_tpl->tpl_vars['ma']->do_else = false;
|
|
?>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
<?php if ($_smarty_tpl->tpl_vars['ma']->value['aktiv'] == 0) {?><td><a href="?s=v_karten&wahl=5&id=<?php echo $_smarty_tpl->tpl_vars['ma']->value['id'];?>
|
|
" title="Kicke zum auswälen"><font color="#A8A5A5"><?php echo $_smarty_tpl->tpl_vars['ma']->value['name'];?>
|
|
</td><?php }?>
|
|
<?php if ($_smarty_tpl->tpl_vars['ma']->value['aktiv'] > 0) {?><td><a href="?s=v_karten&wahl=5&id=<?php echo $_smarty_tpl->tpl_vars['ma']->value['id'];?>
|
|
" title="Kicke zum auswälen"><font color="#0949CC"><?php echo $_smarty_tpl->tpl_vars['ma']->value['name'];?>
|
|
</td><?php }?>
|
|
</tr>
|
|
<?php
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!---------------------------------------------------------------------->
|
|
<!-- mitte seite -->
|
|
<!---------------------------------------------------------------------->
|
|
<div class="col-md-10">
|
|
<?php if ($_smarty_tpl->tpl_vars['wahl']->value == 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: <?php echo $_smarty_tpl->tpl_vars['nextid']->value;?>
|
|
</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>
|
|
<?php } elseif ($_smarty_tpl->tpl_vars['wahl']->value == 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>
|
|
<?php } 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>
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['karte']->value, 'kdata');
|
|
$_smarty_tpl->tpl_vars['kdata']->do_else = true;
|
|
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['kdata']->value) {
|
|
$_smarty_tpl->tpl_vars['kdata']->do_else = false;
|
|
?>
|
|
<form action="" method="post">
|
|
<tr>
|
|
<td nowrap style="width:50px;font-size:11pt"><b> <?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
</td>
|
|
<td nowrap style="width:100px;font-size:10pt"><b> <?php echo $_smarty_tpl->tpl_vars['kdata']->value['karte'];?>
|
|
</td>
|
|
|
|
<td nowrap style="width:180px;font-size:11pt">
|
|
<select name="list[<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
][Fahrer]" id="user_<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
" style="width:180px;" onChange="save_user(<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
)" >
|
|
<?php
|
|
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['fahrer_array']->value, 'allfahrer');
|
|
$_smarty_tpl->tpl_vars['allfahrer']->do_else = true;
|
|
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['allfahrer']->value) {
|
|
$_smarty_tpl->tpl_vars['allfahrer']->do_else = false;
|
|
?>
|
|
<?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['allfahrer']->value['id'],'output'=>$_smarty_tpl->tpl_vars['allfahrer']->value['name'],'selected'=>$_smarty_tpl->tpl_vars['kdata']->value['user']),$_smarty_tpl);?>
|
|
|
|
<?php
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
|
</select>
|
|
</td>
|
|
<td nowrap style="width:10px;font-size:11pt">
|
|
<input type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
" id="info1_<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
" onChange="save_c1(<?php echo $_smarty_tpl->tpl_vars['kdata']->value['gesperrt'];?>
|
|
,<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
)"
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['gesperrt'] == 1) {?> checked="checked" <?php }?>>
|
|
</td>
|
|
|
|
<td nowrap style="width:10px;font-size:11pt">
|
|
<input type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
" id="info2_<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
" onChange="save_c2(<?php echo $_smarty_tpl->tpl_vars['kdata']->value['verloren'];?>
|
|
,<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
)"
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['verloren'] == 1) {?> checked="checked" <?php }?>>
|
|
</td>
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['status'] == 0) {?>
|
|
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF0000'>unklar</td>
|
|
<?php }?>
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['status'] == 1) {?>
|
|
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#0000FF'>freigeschaltet</td>
|
|
<?php }?>
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['status'] == 2) {?>
|
|
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#0099FF'>aktiv Zeit</td>
|
|
<?php }?>
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['status'] == 3) {?>
|
|
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF6600'>Kalender</td>
|
|
<?php }?>
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['status'] == 4) {?>
|
|
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF6600'>keine Tour</td>
|
|
<?php }?>
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['status'] == 9 && $_smarty_tpl->tpl_vars['kdata']->value['verloren'] == 1) {?>
|
|
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF0000'>Kartenverlust</td>
|
|
<?php }?>
|
|
<?php if ($_smarty_tpl->tpl_vars['kdata']->value['status'] == 9 && $_smarty_tpl->tpl_vars['kdata']->value['verloren'] == 0) {?>
|
|
<td nowrap align="right" style="width:99px;font-size:11pt"><b><span style='color:#FF0000'>gesperrt</td>
|
|
<?php }?>
|
|
<td nowrap align="right" style="width:130px;font-size:8pt"><b> <?php echo $_smarty_tpl->tpl_vars['kdata']->value['lastlog'];?>
|
|
Uhr</td>
|
|
|
|
<td><input type="text" value="<?php echo $_smarty_tpl->tpl_vars['kdata']->value['info'];?>
|
|
" id="info_<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
" style="width:170px;font-size:11pt" name="info<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
" onChange="save_info(<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
)"></td>
|
|
|
|
<!-- <td nowrap style="width:200px;font-size:11pt"><b> <?php echo $_smarty_tpl->tpl_vars['kdata']->value['info'];?>
|
|
</td>
|
|
<td nowrap <input type="hidden" name="savetour" value="<?php echo $_smarty_tpl->tpl_vars['kdata']->value['kID'];?>
|
|
"/>
|
|
<input type="image" name="savetour" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
|
|
" src="template/images/icon/save.png"></td>-->
|
|
</tr> <?php
|
|
}
|
|
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
|
</form>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php }?>
|
|
<!-- rechte seite -->
|
|
<!-- ------------------------------------
|
|
<?php echo '<script'; ?>
|
|
> var tagheute = '<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['datum_unix']->value,"%Y-%m-%d");?>
|
|
';<?php echo '</script'; ?>
|
|
>
|
|
-->
|
|
|
|
</div></div>
|
|
|
|
<?php echo '<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)
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
<?php echo '</script'; ?>
|
|
>
|
|
|
|
<?php }
|
|
}
|