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

550 lines
18 KiB
Smarty

<!-- ********** -->
{literal}
<script>
function tload(tld) {
$.ajax({
type: 'POST',
url: "ajax.php?s=tload&tpl",
dataType: 'html',
data: 'tld=' + tld,
success: function (data) {
$("#tload"+tld).html(data);
}
});
}
</script>
{/literal}
<!-- ********** -->
<section class="col-md-9" style="background-color:#333333">
<div class="row sortable">
<!-- Main Section -- mittlere Spalte -->
<div class="col-md-2">
<div class="panel">
<table class="no-style full">
<tbody>
<td nowrap style="align:center;width:320px;font-size:14pt">
<a class="fa fa-arrow-left" href="?s=pnacht&wahl=1&jahr={$jahr}&monat={$monat}"></a>
<strong>{$monat}/{$jahr} </strong>
<a class="fa fa-arrow-right" href="?s=pnacht&wahl=2&jahr={$jahr}&monat={$monat}"></a></td>
</tbody>
</table>
</div>
<div class="panel" style="background-color:gray;">
<div class="panel-heading" style="background-color:yellow;">
<spawn style="width:5px;height:2px;font-size:16pt;">{$datum_unix|date_format:"%d.%m.%y"}</spawn>
</div>
<div class="panel-body">
<table class="table-hover" style="font-size:11pt;line-height: 14pt">
<tbody>
{foreach from=$tage item=tage}
{if $tage.tagt==1}
<tr>
<td> </td>
<td nowrap style="width:5px;font-size:4pt;line-height: 5pt" >&nbsp;</td>
</tr>
<tr style="width:5px;background-color: gray;color:#fff">
<td> </td>
<td nowrap style="width:70px;font-size:8pt">--- {$tage.kw}.KW ---</td>
</tr>
{/if}
<tr style="background:gray">
{if $tage.t==0}
<td style="font-size:8pt;color:darkred" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}</td>
<td style="font-size:13pt;color:darkred" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}</td>
{elseif $tage.btag!=0}
<td style="font-size:8pt;color:blue" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}</td>
<td style="font-size:13pt;color:blue" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}</td>
{elseif $tage.ftag!=0}
<td style="font-size:8pt;color:orange" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}</td>
<td style="font-size:13pt;color:orange" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}</td>
{else}
<td style="font-size:8pt;color:#fff" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}</td>
<td style="font-size:13pt;color:#fff" onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}</td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
{if $old>0}
<div class="col-md-10">
<div class="panel-heading" style="background-color:darkred;">
<spawn style='width:5px;height:2px;font-size:16pt;color:white;'><strong>Achtung!</strong> Diese Planung liegt in der Vergangenheit...</spawn>
</div>
</div>
{/if}
{if $fttest>0}
<div class="col-md-10">
<div class="panel panel-danger">
<div class="panel-heading">Feiertag</div>
<table class="table-condensed">
<tbody>
<td nowrap style="width:100px;line-height:120%;font-size:14pt"> <strong>{$ftrow.tag}</strong></td>
<td nowrap style="width:500px;line-height:120%;font-size:14pt"> <strong>{$ftrow.bez}</strong></td>
</tbody>
</table>
</div>
</div>
{/if}
<div class="col-md-10">
<div class="panel" style="border: black 1px solid;">
<div class="panel-body" style="background-color: gray">
<table style="line-height:20px;font-size:11pt;color:#FFFFFF">
<tbody>
{foreach from=$tag_tour2 item=tour}
{if $tour.test==99}
</tbody>
</table>
</div>
</div>
<div class="panel" style="border: black 1px solid;">
<div class="panel-body" style="background-color: gray">
<table style="line-height:20px;font-size:11pt;color:#FFFFFF">
<tbody>
{/if}
<!-- --------------------------- Einsatzplanung ---------------------------------------- -->
<tr id="_tload{$tour.id}" style="border-bottom: 1px solid #000;">
{if $tour.aktiv==1}
<td nowrap style="width:90px">{$tour.tour}</td>
{else}
<td nowrap style="width:90px;color: aquamarine">{$tour.tour}</td>
{/if}
<td nowrap style="width:195px;font-size:11pt;">
<!-- --------------------------- -->
<select name="Fahrer[{$tour.id}]" style="width:190px;border:none;background-color: gray"
{if $tour.fahrer_id==0} style="border-bottom: 1px solid #FF2222;"
{elseif $tour.fahrer_ok==0} style="border-bottom: 1px solid #FF2222;"
{elseif $tour.fahrer_ok==2} style="border-bottom: 1px solid #FF9900;"
{elseif $tour.fahrer_ok==3} style="border-bottom: 1px solid #99FF00;"
{else} style="border-bottom: 1px solid #dcdcdc;"
{/if}
onChange="save_user({$tour.id})";>
<!-- --------------------------- fahrer_array -->
{foreach from=$fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
{/foreach}
<!-- --------------------------- -->
</select>
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="width:100px">
<select name="Fahrzeug[{$tour.id}]" id="car_{$tour.id}" style="width:95px;border:none;background-color: gray"
{if $tour.auto_id==0} style="border-bottom: 1px solid #ff0000;"
{else} style="border-bottom: 1px solid #dcdcdc;"
{/if}
style="width:95px;"
onChange="save_car({$tour.id})" >
{foreach from=$auto_array item=allauto}
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
{/foreach}
</select>
</td>
<!-- --------------------------- Zusatzinfo neu -->
<td nowrap align="right" style="width:240px; font-size:6pt;">info </td>
<td style="position:static; width:50px; font-size:7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="hidden" name="sendtour" value="{$tour.id}"/>
<td>
<td nowrap>
<input type="hidden" name="savetour" value="{$tour.id}"/>
</center></td>
<td><center>
<input type="hidden" name="sendtour" value="{$tour.id}"/>
<td>
<center>
</div>
</center>
</td>
<!-- Infobereich !!!!! ------------------------------------- -->
<!-- SMS Status !!!!! ------------------------------------- -->
<td nowrap align="center" style="width:30px" id="smscheck{$tour.tourid}">
<i class="fal fa-comment-alt fa-1x" style="color:#303030" ></i>
</td>
<!-- Infobereich !!!!! ------------------------------------- -->
<td nowrap align="center" style="width:20px">
<i class="fal fa-info fa-1x" style="color:#0080FF" onclick="tinfo({$tour.tourid})"></i>
</td>
<!-- SMS senden Änderung ------------------------------------- -->
<td nowrap align="center" style="width:20px; font-size:13pt;"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tag}&sms={$tour.id}'";>
<i class="fal fa-sms" style="color:white" >
</td>
{if $tour.zusatz==0}
<!-- 2. Tour hinzufügen ------------------------------------- -->
<td nowrap align="center" style="width:30px; font-size:13pt;"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tag}&dazu={$tour.tid}&kw={$tour.kw}'";>
<i class="fal fa-plus" style="color:white" >
</td>
{/if}
{if $tour.zusatz==1}
<!-- 2. Tour löschen ------------------------------------- -->
<td nowrap align="center" style="width:30px; font-size:13pt;"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tag}&daweg={$tour.id}&kw={$tour.kw}'";>
<i class="fas fa-times" style="color:white" >
</td>
{/if}
{if $tour.zusatz==2}
<!-- 2. Tour hinzufügen ------------------------------------- -->
<td nowrap align="center" style="width:30px; font-size:13pt;">
<i class="fal fa-minus" style="color:white" >
</td>
{/if}
</tr>
<script>
var tld = '{$tour.id}';
</script>
{literal}
<script>
tload(tld);
</script>
{/literal}
{/foreach}
</tbody>
</table>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-body">
<table class="table-hover" style="font-size:11pt">
<tbody>
<tr>
<td></td>
<td><input type="submit" id="notifyBtn" name="vortag" value="vortag übernehmen" onclick="return confirm('M&ouml;chten sie wirklich den Vortag kopieren ??')"> </td>
<td align="right"><H6></H6>"Tag-Touren" werden nicht kopiert.</td>
</form>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- -------------------------------------->
</div>
</section>
<!-- rechte seite -->
<!-- -------------------------------------->
<!-- Sidebar -->
<aside class="col-md-3" style="background:gray">
<div class="panel panel-default">
<div class="panel-body">
<table class="no-style full" style="margin:-20px">
<thead>
<tr>
<td nowrap align="center" style="width:150px;font-size: 40pt">
<i class="far fa-sms"></i>
</td>
<td nowrap align="center" style="width:100px;font-size: 40pt">
<i class="far fa-copy"></i>
</td>
</tr>
</thead>
</table>
</div>
</div>
<div id="rightmenu" class="panel panel-default">
<table class="no-style full">
<tbody>
<td>
<form action="" method="post">
<input type="hidden" name="smst" value="{$tag}"/>
<input type="hidden" name="smsm" value="{$monat}"/>
<input type="hidden" name="smsj" value="{$jahr}"/>
<input type="submit" id="notifyBtn" value="SMS senden" name="smspower" value="kompl. Liste per SMS senden" onclick="return confirm('M&ouml;chten sie wirklich alle SMS senden ?')">
</form>
</td>
</tbody>
</table>
</div>
<!-- ------------------------------------ -->
<!-- --------------------------------------------------------------------------------- -->
<!-- -------------------------------- History -->
<div id="tinfo"></div>
<!-- -------------------------------- fehlende Mitarbeiter heute / Calender -->
<div id="rightmenu" class="panel panel-primary">
<header class="panel-heading" style="font-size: 16pt;line-height:80%"><span class="fad fa-calendar-alt pull-left"></span><div class="panel-title">&nbsp;&nbsp;Kalender - {$tag}.{$monat}.{$jahr}</div></header>
<div class="panel-body">
<table class="no-style full" style="margin:-8px">
<tbody>
{foreach from=$maf1 item=maf1 }
<tr align="left" >
<td align="center" nowrap style="width:15px;font-size:11pt;"><i class='{$maf1.icon}'></i></td>
<td align="left" nowrap style="width:130px;font-size:10pt">&nbsp;&nbsp;{$maf1.fahrer}</td>
<td align="right" nowrap style="width:100px;font-size:10pt">{$maf1.bez}&nbsp;</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
<!-- --------------------------------------------------------------------------------- -->
<!-- -------------------------------- verfügbare Mitarbeiter -->
<div id="freema"></div>
<!-- -------------------------------- verfügbare Fahrzeuge -->
<div id="freecar"></div>
<!-- --------------------------------------------------------------------------------- -->
</br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br>
</aside>
<!-- --------------------------------------------------------------------------------- -->
<!-- Sidebar End -->
<!-- <script> var tagheute = '{$datum_unix|date_format:"%Y-%m-%d"}';</script> -->
<script> var tag = '{$tag}';</script>
<script> var monat = '{$monat}';</script>
<script> var jahr = '{$jahr}';</script>
{literal}
<script>
function tinfo(tid) {
$.ajax({
type: 'POST',
url: "ajax.php?s=tinfo&tpl",
dataType: 'html',
data: 'tid=' + tid,
success: function (data) {
$("#tinfo").html(data);
}
});
}
function load_free_cars(tag,monat,jahr) {
$.ajax({
type: 'POST',
url: "ajax.php?s=free_car&tpl",
dataType: 'html',
data: 'tag=' + tag + "&monat=" + monat + "&jahr=" + jahr,
success: function (data) {
$("#freecar").html(data);
}
});
}
function load_free_ma(tag,monat,jahr) {
$.ajax({
type: 'POST',
url: "ajax.php?s=free_ma&tpl",
dataType: 'html',
data: 'tag=' + tag + "&monat=" + monat + "&jahr=" + jahr,
success: function (data) {
$("#freema").html(data);
}
});
}
function save_car(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=paktuell&a=car_save",
dataType: 'json',
data: 'tourID=' + tourID + "&car=" + $("#car_"+tourID).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'
}
});
}
load_free_cars(tag,monat,jahr);
}
});
}
function save_info(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=paktuell&a=info_save",
dataType: 'json',
data: 'tourID=' + tourID + "&info=" + $("#info_"+tourID).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'
}
});
}
});
}
function save_user(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=paktuell&a=user_save",
dataType: 'json',
data: 'tourID=' + tourID + "&user=" + $("#user_"+tourID).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'
}
});
}
load_free_ma(tag,monat,jahr);
}
});
}
load_free_ma(tag,monat,jahr);
load_free_cars(tag,monat,jahr);
</script>
<script>
var countryResult = [];
$(document).on('keyup' , '#search-keyword' ,function(){
var keyvalue = $("#search-keyword").val();
var xhttp;
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
countryResult = [];
myFunction(this , keyvalue);
}
};
xhttp.open("GET", "country.xml", true);
xhttp.send();
});
function myFunction(xml , key) {
var x, i, xmlDoc , key;
xmlDoc = xml.responseXML;
x = xmlDoc.getElementsByTagName("country");
var counter = 0;
for (i = 0; i < x.length; i++) {
var value = x[i].childNodes[0].nodeValue.trim();
var pattern = value.substring(0 , key.length);
if(key.toUpperCase() == pattern.toUpperCase() && counter < 10){
countryResult.push(value);
counter++;
}
}
$("#search-keyword").autocomplete({
source: countryResult
});
}
$( function() {
$( "#search-keyword" ).autocomplete({
source:countryResult
});
});
</script>
{/literal}