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

616 lines
23 KiB
Smarty

<!-- ********** -->
<!-- ********** -->
<section class="col-md-9">
<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 class="panel">
<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: 2pt">
<tbody>
{foreach from=$tage item=tage}
<tr>
{if $tage.tagt==1}
<td> </td><td nowrap style="width:5px;line-height:120%;font-size:4pt" >&nbsp;</td>
</tr>
<td style="background-color: lightgray"> </td>
<td nowrap style="width:5px;line-height:120%;font-size:8pt;background-color: lightgray">--- {$tage.kw}.KW ---</td>
<tr>
{/if}
{if $tage.aktiv>0}
<td nowrap style="width:5px;line-height:120%;font-size:8pt;background:#FF0"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}
</td>
<td nowrap style="width:70px;line-height:120%;font-size:12pt;background:#FF0"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}
</td>
{elseif $tage.ft>0}
<td nowrap style="width:5px;line-height:120%;font-size:8pt;background:#F5A50D"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}
</td>
<td nowrap style="width:70px;line-height:120%;font-size:12pt;background:#F5A50D"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}
</td>
{elseif $tage.wahl>0}
<td nowrap style="width:5px;line-height:120%;font-size:8pt;border: 1px solid #000099"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}
</td>
<td nowrap style="width:70px;line-height:120%;font-size:12pt;border: 1px solid #000099"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}
</td>
{else}
<td nowrap style="width:5px;line-height:120%;font-size:8pt"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}
</td>
<td nowrap style="width:70px;line-height:120%;font-size:12pt"
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>
</div>
<!--
<div class="panel-body">
<table class="table-hover" style="font-size:11pt;line-height: 2pt">
<tbody>
{foreach from=$tage item=tage}
<tr>
{if $tage.tagt==1} <td><hr></td><td><hr></td></tr><tr> {/if}
{if $tage.aktiv>0}
<td nowrap style="width:5px;line-height:120%;font-size:8pt;background:#FF0"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}
</td>
<td nowrap style="width:70px;line-height:120%;font-size:12pt;background:#FF0"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}
</td>
{elseif $tage.ft>0}
<td nowrap style="width:5px;line-height:120%;font-size:8pt;background:#F5A50D"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}
</td>
<td nowrap style="width:70px;line-height:120%;font-size:12pt;background:#F5A50D"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}
</td>
{elseif $tage.wahl>0}
<td nowrap style="width:5px;line-height:120%;font-size:8pt;border: 1px solid #000099"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}
</td>
<td nowrap style="width:70px;line-height:120%;font-size:12pt;border: 1px solid #000099"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.datum}
</td>
{else}
<td nowrap style="width:5px;line-height:120%;font-size:8pt"
onclick="window.location='?s=pnacht&jahr={$jahr}&monat={$monat}&tag={$tage.tag}&anz={$anz}'">{$tage.wt}
</td>
<td nowrap style="width:70px;line-height:120%;font-size:12pt"
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>
-->
<!-- mitte seite -->
<!-- <div id="phelp" style="text-align:center;"></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 panel-primary">
<div class="panel-body">
<table class="table-hover" style="font-size:11pt">
<tbody>
{foreach from=$tag_tour2 item=tour}
{if $tour.test==99}
</tbody>
</table>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-body">
<table class="table-hover" style="font-size:11pt">
<tbody>
{/if}
<tr>
<form action="" method="post">
<td nowrap style="width:90px;line-height:50%;">{if $tour.aktiv==0}<mark>{/if}{$tour.tour}</mark>
</td>
<!-- --------------------------- fahrer mit anwesenheitsprüfung
<td nowrap id="ma_wahl{$tour.id},{$tour.typ},{$tour.fahrer_id}" style="width:165px;font-size:10pt;"></td> -->
<!-- --------------------------- fahrer mit anwesenheitsprüfung -->
<td nowrap style="width:195px;">
<!-- --------------------------- -->
<!-- --------------------------- -->
<select name="Fahrer[{$tour.id}]" id="user_{$tour.id}"
{if $tour.fahrer_id==0} style="width:190px;border:none;border-bottom: 1px solid #FF2222;"
{elseif $tour.fahrer_ok==0} style="width:190px;border:none;border-bottom: 1px solid #FF2222;"
{elseif $tour.fahrer_ok==2} style="width:190px;border:none;border-bottom: 1px solid #FF9900;"
{elseif $tour.fahrer_ok==3} style="width:190px;border:none;border-bottom: 1px solid #99FF00;"
{else} style="width:190px;border:none;border-bottom: 1px solid #dcdcdc;"
{/if}
onChange="save_user({$tour.id})";>
<!-- --------------------------- fahrer fährt ständig *** typ -->
<optgroup label="aktuelle Fahrer">
{foreach from=$tour.fahrer_array1 item=allfahrer}
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if}>
<strong>{$allfahrer.name}</strong>
</option>
{/foreach}
</optgroup>
<!-- --------------------------- fahrer noch nie *** typ x -->
<optgroup label="------------------------------------">
{if $tour.typ== 3}
{foreach from=$fahrer_array3 item=allfahrer}
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} style="color: darkgray">{$allfahrer.name}</option>{/foreach}
{/if}
{if $tour.typ== 4}
{foreach from=$fahrer_array4 item=allfahrer}
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} style="color: darkgray">{$allfahrer.name}</option>{/foreach}
{/if}
{if $tour.typ== 5}
{foreach from=$fahrer_array5 item=allfahrer}
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} style="color: darkgray">{$allfahrer.name}</option>{/foreach}
{/if}
{if $tour.typ== 17}
{foreach from=$fahrer_array17 item=allfahrer}
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} style="color: darkgray">{$allfahrer.name}</option>{/foreach}
{/if}
</optgroup>
<!-- --------------------------- -->
</select>
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="width:100px;">
<select name="Fahrzeug[{$tour.id}]" id="car_{$tour.id}"
{if $tour.auto_id==0} style="width:100px;border:none;border-bottom: 1px solid #ff0000;"
{else} style="width:95px;border:none;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 id="ma_gh{$tour.id}" style="width:125px; font-size:7pt;">
<input type="text" value="{$tour.infotext}" id="info_{$tour.id}"
style="width:122px;height:22px;border-color:#dcdcdc;border:none;border-bottom: 1px solid #dcdcdc;" name="infotext[{$tour.id}]"
onChange="save_info({$tour.id})">
</td>
<td nowrap id="ma_gh{$tour.id}" style="width:117px;font-size:7pt;">
{if $tour.stamm_info==1}
<div style="text-align: right; width:115px;font-size:8pt;color:#FF2222">{$tour.stamminfo}</div>
{/if}
{if $tour.stamm_info==2}
<div style="text-align: right; width:115px;font-size:8pt;color:#FF9900">{$tour.stamminfo}</div>
{/if}
</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 id="smsstatus{$tour.id}" style="text-align:center;">
{if $tour.fahrer_id==0 || $tour.fahrer_ok==0}
<button type='submit' name="smssenden" data-toggle="tooltip" title="SMS senden nicht möglich" value="{$tour.id}"><i class='fa fa-times' style="color:#000000;"></i></button>
{else}
{if $tour.smsstatus==0} <!-- SMS in Warteschleife -->
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-commenting-o' style="color:#0080FF
;"></i></button>
{/if}
{if $tour.smsstatus==20 || $tour.smsstatus==8} <!-- SMS in Warteschleife -->
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-spinner fa-pulse' style="color:#FF8000;"></i></button>
{/if}
{if $tour.smsstatus==1 || $tour.smsstatus==3 || $tour.smsstatus==4} <!-- SMS in statusbericht abfarge -->
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-check-square-o' style="color:#FF8000;"></i></button>
{/if}
{if $tour.smsstatus==2}
<button type='submit' name="smssenden" data-toggle="tooltip" title="zugestellt am: {$tour.smsstatusdate|date_format:"%d.%m.%Y-%H:%M"} Uhr" value="{$tour.id}"><i class='fa fa-check-square-o' style="color:#04B404;"></i></button>
{/if}
{if $tour.smsstatus==5}
<button type='submit' name="smssenden" data-toggle="tooltip" title="Versand fehlgeschlagen !!" value="{$tour.id}"><i class='fa fa-ban' style="color:#ff0000;"></i></button>
{/if}
{if $tour.smsstatus==99}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-question' style="color:#FF8000;"></i></button>
{/if}
{/if}
</div>
{if $tour.smsstatus!=2}
<script> var tid = '{$tour.id}';</script>
{literal}
<script>
timer = 30000;
var refresh_EDV = setInterval(function() {
$.ajax({
type : "POST",
url : 'ajax.php?s=msmsstatus&tpl',
cache : false,
data : {
id: tid,
},
dataType : "html",
success : function(data){
$("#smsstatus"+tid).html(data);
},
})
},timer);
</script>
{/literal}
{/if}
</center>
</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>
</tr>
{/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">
<div id="rightmenu" 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:150px;font-size: 40pt">
<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}"/>
<button type="submit" class="btn btn" id="notifyBtn" value="SMS senden" name="smspower" value="kompl. Liste per SMS senden" onclick="return confirm('M&ouml;chten sie wirklich alle SMS senden ?')">
<i style="font-size: 40pt" class="far fa-sms fa-lg"></i>
</form>
</td>
<td></td>
<td nowrap align="center" style="width:100px;font-size: 40pt">
<form action="" method="post">
<button type="submit" class="btn btn" id="notifyBtn" name="vortag" value="vortag übernehmen" value="kompl. Liste per SMS senden" onclick="return confirm('M&ouml;chten sie wirklich den Vortag kopieren ??')">
<i style="font-size: 40pt" class="far fa-copy fa-lg"></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>
<!-- --------------------------------------------------------------------------------- -->
</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>
{/literal}