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

578 lines
22 KiB
Smarty
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script> var tagheute = '{$datum_unix|date_format:"%Y-%m-%d"}';</script>
{literal}
<style>
select {
width: 250px;
border:none;
border-bottom: 1px solid #333333;
color: #999999;
background-color: #222222;
}
input[type=number] {
width: 250px;
border:none;
border-bottom: 1px solid #333333;
color: #DCDCDC;
background-color: #222222;
}
</style>
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
<script>
$(document).ready(function() {
$("[rel=popover]").popover({'trigger':'hover'});
});
</script>
<style>
[rel="popover"]{
cursor: pointer;
display:inline-block; /* chrome-fix */
}
</style>
<script>
function caricon(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=ss&a=load_car_icon",
dataType: "json",
//contentType: "application/json; charset=utf-8",
data: 'tourID=' + tourID,
success: function (data) {
$("#caricon"+data.zeile).html(data.htmlresult);
}
});
}
function usericon(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=ss&a=load_user_icon",
dataType: "json",
//contentType: "application/json; charset=utf-8",
data: 'tourID=' + tourID,
success: function (data) {
$("#usericon"+data.zeile).html(data.htmlresult);
}
});
}
function load_free_cars(date) {
$.ajax({
type: 'POST',
url: "ajax.php?s=ss&a=load_free_cars",
dataType: "text",
//contentType: "application/json; charset=utf-8",
data: "date=" + date,
success: function (data) {
data = jQuery.parseJSON(data); // <-- *** ADD THIS LINE ***
console.log("data")
console.log(data)
$("#trp").html("");
$.each( data.trp, function( key, value ) {
$("#trp").append(value+"<br>");
});
}
});
}
function save_lohn(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=ss&a=lohn_save",
dataType: 'json',
data: 'tourID=' + tourID + "&lohn=" + $("#lohn_"+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'
}
});
}
console.log(data)
caricon(data.zeile);
}
});
}
function save_car(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=ss&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'
}
});
}
console.log(data)
caricon(data.zeile);
load_free_cars(tagheute);
}
});
}
function save_user(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=ss&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'
}
});
}
console.log(data)
usericon(data.zeile);
}
});
}
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
load_free_cars(tagheute);
</script>
{/literal}
<!-- ********** --> <div class="container-fluid" style="background-color:#333333">
<div class="row">
{if $ssa1 !=0}
<div class="col-md-8">
<div class="panel panel-sbox">
<div class="panel-body">
<table class="no-style full" style="font-size:11pt">
<tbody>
{foreach from=$ss1 item=tour}
<!-- ************************************************************************************************************** -->
{if $tour.wechsel==1}
</tbody>
</table>
</div>
</div>
<div class="panel panel-sbox">
<div class="panel-body">
<table class="no-style full" style="font-size:11pt">
<tbody>
{/if}
<!-- **************************************************************************************************************
<td nowrap style="width:65px;line-height:2;font-size:11pt;" rel="stylesheet" title="{$tour.info}" id="button1">
{if $tour.afirma!=1}<mark>{/if}{$tour.tname}</mark>
</td
-->
<tr>
<form action="" method="post">
{if $tour.aktiv!=0}
<td nowrap style="width:65px;line-height:2;font-size:11pt;" rel="stylesheet" title="{$tour.info}" id="button1">{$tour.tname}
</td>
{else}
<td nowrap style="width:60px;line-height:2;font-size:11pt;color:#115270;" rel="stylesheet" title="{$tour.info}" id="button1">
{$tour.tname}
</td>
{/if}
<td nowrap style="width:55px;font-size:8pt" align="right">{$tour.zeit} Uhr</td>
<!--
<td nowrap style="width:30px;font-size:8pt" align="right">
{if $tour.utyp == 11}-1A-{/if}
{if $tour.utyp == 12}-1B-{/if}
{if $tour.utyp == 21}-2A-{/if}
{if $tour.utyp == 22}-2B-{/if}
{if $tour.utyp == 31}-3A-{/if}
{if $tour.utyp == 32}-3B-{/if}
{if $tour.utyp == 41}-4A-{/if}
{if $tour.utyp == 42}-4B-{/if}
{if $tour.utyp == 51}-5A-{/if}
{if $tour.utyp == 52}-5B-{/if}
</td>
-->
{if $tour.gewicht4 >2200}
<td nowrap style="width:20px;font-size:11pt;text-align:right;color:red"><i class="fa fa-stack-exchange"></i></td> {elseif $tour.gewicht4 >1800}
<td nowrap style="width:20px;font-size:11pt;text-align:right;color:orange"><i class="fa fa-stack-exchange"></i></td> {elseif $tour.gewicht4 >0}
<td nowrap style="width:20px;font-size:11pt;text-align:right;color:green"><i class="fa fa-stack-exchange"></i></td>
{else}
<td nowrap style="width:20px;font-size:11pt;text-align:right;color:gray"><i class="fa fa-stack-exchange"></i></td>
{/if}
<td nowrap style="width:50px;font-size:8pt" align="right">({$tour.gewicht} kg)</td>
<td nowrap style="width:60px;font-size:11pt" align="right">{$tour.gewicht4} kg</td>
{if $tour.pakete!=$tour.pakete2}
<td nowrap style="width:70px;font-size:10pt" align="right">{$tour.pakete2} / {$tour.pakete}</td>
{else}
<td nowrap style="width:70px;font-size:10pt" align="right">{$tour.pakete}</td>
{/if}
<td nowrap style="width:23px;font-size:11pt;text-align:right;color:gray" id="usericon{$tour.id}">
<i class="fad fa-circle-notch"></i>
{literal}
<script>usericon({/literal}{$tour.id}{literal});
</script>
{/literal}
</td>
<td nowrap style="width:200px;font-size:11pt;" title="Stammfahrer: {$tour.sfahrer}" id="button4">
<select name="Fahrer[{$tour.id}]" id="user_{$tour.id}"
style="width:195px"
onChange="save_user({$tour.id})">
{foreach from=$fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
{/foreach}
</select>
</td>
<td nowrap style="width:20px;font-size:11pt;text-align:right;color:gray" id="caricon{$tour.id}">
<span class="fa fa-truck"></i>
{literal}
<script>caricon({/literal}{$tour.id}{literal});
</script>
{/literal}
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="width:100px;font-size:11pt;color:gray" title="Stammfahrzeug: {$tour.sauto}" id="button4">
<select name="Fahrzeug[{$tour.id}]" id="car_{$tour.id}"
style="width:100px"
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>
<!-- --------------------------- Lohneinstellung -->
<!--
<td nowrap align="right" style="width:45px;font-size:11pt;color: lightgray" title="Lohnauswahl: {$tour.lohnbez}">
<select name="lohnstatus[{$tour.id}]" id="lohn_{$tour.id}"
style="width:35px;border:none;border-bottom: 1px solid #dcdcdc;"
onChange="save_lohn({$tour.id})" >
{foreach from=$lohn_array item=lstatus}
{html_options values=$lstatus.id output=$lstatus.bez selected=$tour.lohnstatus}
{/foreach}
</select>
</td>
-->
<!--
<td nowrap align="right" id="ma_gh{$tour.id}" style="width:25px;font-size:10pt;">
<input type="text" value="{$tour.lohnstatus}" id="info_{$tour.id}"
style="width:20px;border-color:#dcdcdc;border:none;border-bottom: 1px solid #dcdcdc;" name="infotext[{$tour.id}]"
onChange="save_lohn({$tour.id})">
</td>
<!-- --------------------------- history -->
<td nowrap style="width:35px;font-size:11pt;text-align:center;color:gray">
<i style="width:20px;font-size:13pt" class="fa fa-info-circle" data-toggle="modal" data-target="#history"></i>
<!-- The Modal -->
<div class="modal fade" id="history">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">History für Tor {$tour.tname}</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- ------------------------------------------------------------------------------------ -->
<!-- Modal body -->
<div class="modal-body">
<table class="table-striped">
<thead>
<tr>
<th style="width:200px";align="left"><strong>Fahrer</strong></th>
<th nowrap style="width:200px";align="right"><strong>wie oft gefahren</strong></th>
<th style="width:200px";align="right"><strong>zuletzt am</strong></th>
</tr>
</thead>
<tbody>
{foreach from=$tour.history item=hinfo}
<tr>
<td nowrap style="width:200px"><b> {$hinfo.name}</td>
<td nowrap style="width:100px" align="right"> {$hinfo.zahl} x</td>
<td nowrap style="width:200px" align="right"> {$hinfo.last} Uhr</td>
<!-- --------------------------- fahrer -->
</tr>
{/foreach}
</tbody>
</table>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</td>
<!-- --------------------------- sms ohne ajax
<td nowrap style="width:20px;font-size:11pt;text-align:right;color:gray" id="smsicon{$tour.id}">
{if $tour.fahrer_id==0}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-times' style="color:#000000;"></i></button>
{elseif $tour.auto_id==0}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-times' style="color:#000000;"></i></button>
{elseif $tour.smsstatus==0}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-comment-o' style="color:#0080FF;"></i></button>
{elseif $tour.smsstatus==1}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-check' style="color:#FF8000;"></i></button>
{elseif $tour.smsstatus==2}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-check' style="color:#04B404;"></i></button>
{elseif $tour.smsstatus==3}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-question' style="color:#FF8000;"></i></button>
{elseif $tour.smsstatus==4}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-question' style="color:#FF8000;"></i></button>
{elseif $tour.smsstatus==5}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-ban' style="color:#ff0000;"></i></button>
{elseif $tour.smsstatus==8}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-check' style="color:#FF8000;"></i></button>
{elseif $tour.smsstatus==20}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-spinner fa-pulse' style="color:#FF8000;"></i></button>
{elseif $tour.smsstatus==99}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-question' style="color:#FF8000;"></i></button>
{/if}
</td>
-->
<!-- --------------------------- sms neu 2020
<td nowrap style="width:20px;font-size:11pt;text-align:right;color:gray" id="smsicon{$tour.id}">
<span class="fa fa-question"></i>
{literal}
<script>smsicon({/literal}{$tour.id}{literal});
</script>
{/literal}
</td>
-->
<!-- --------------------------- sms alt -->
<td nowrap style="width:20px;text-align:right;font-size:11pt;" id="smsstatus{$tour.id}">
<div id="smsstatus{$tour.id}" style="text-align:center;">
{if $tour.fahrer_id==0 || $tour.auto_id==0}
<button type='submit' style="background-color:#333333" name="smssenden" data-toggle="tooltip" title="SMS senden nicht möglich" value="{$tour.id}">
<i class='fa fa-times' style="color:#999999;"></i>
</button>
{else}
{if $tour.smsstatus==0} <!-- SMS in Warteschleife -->
<button type='submit' style="background-color:#333333" 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' style="background-color:#333333" 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' style="background-color:#333333" 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' style="background-color:#333333" 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' style="background-color:#333333" name="smssenden" value="{$tour.id}">
<i class='fa fa-question' style="color:#FF8000;"></i>
</button>
{/if}
{/if}
</div>
{if $tour.smsstatus==8 OR $tour.smsstatus==20}
<script> var tid = '{$tour.id}';</script>
{literal}
<script>
timer = 300000;
var refresh_EDV = setInterval(function() {
$.ajax({
type : "POST",
url : 'ajax.php?s=ssstatus&tpl',
cache : false,
data : {
id: tid,
},
dataType : "html",
success : function(data){
$("#smsstatus"+tid).html(data);
},
})
},timer);
</script>
{/literal}
{/if}
</center>
</td>
<!--
<td nowrap style="width:20px;text-align:right;font-size:11pt;" id="smsstatus{$tour.id}">
{if $tour.smsstatus==0}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-comment-o' style="color:#0080FF;"></i></button>
{else}
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-question' style="color:#FF8000;"></i></button>
{/if}
{if $tour.smsstatus!=0}
{literal}
<script>
timer = 50000;
var refresh_EDV{/literal}{$tour.id}{literal} = setInterval(function() {
$.ajax({
type : "POST",
url : 'ajax.php?s=ssstatus&tpl',
cache : false,
data : {
id:{/literal}{$tour.id}{literal},
},
dataType : "html",
})
},timer);
</script>
{/literal}
{/if}
</td>
-->
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<!-- -------------------------------------- -->
{else}
<div class="col-md-8">
<div class="panel panel-danger">
<div class="panel-body">
<h3>Keine Daten angelegt ...</h3>
</div>
</div>
</div>
{/if}
<!-- -------------------------------------->
<!-- -------------------------------------->
<!-- Sidebar -->
<aside class="col-md-4">
<!-- -------------------------------------->
<div id="rightmenu" class="panel panel-primary">
<div class="panel-heading"><h2 class="panel-title">Ausgabe {$kw}/{$jahr} - {$datum}</h2></div>
<section class="panel-body">
<table class="table-condensed">
<form action="" method="post">
<input type="submit" class="btn btn-link" value="alle SMS für {$datum} senden " name="smspower" value="kompl. Liste per SMS senden" onclick="return confirm('M&ouml;chten sie wirklich alle SMS senden ?')">
</form>
</table>
</section>
</div>
<!-- -------------------------------------->
<div id="rightmenu" class="panel panel-primary">
<section class="panel-body">
<table class="table-condensed">
<b><i><span style='font-size:12pt;line-height:115%;
color:#4F81BD'>SaSo 2020 </span></i></b>&#160;&#160;&#160;
<b><i><span style='font-size:12pt;line-height:115%;
color:#4F81BD'><a class="button-blue" href="?s=pss&wahl=1&jahr={$jahr}&kw={$kw}">&laquo;</a>
&#160;&#160;{$kw}.KW / {$jahr}&#160;&#160;
<a class="button-blue" href="?s=pss&wahl=2&jahr={$jahr}&kw={$kw}">&raquo;</a></span></i></b>
</p>
</table>
</section>
</div>
<!-- -------------------------------------
<!-- -------------------------------------->
<div id="rightmenu" class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title"><span style='font-size:12pt; color:#4F81BD'>Kalender f&uuml;r {$datum}</h2></header>
<section class="panel-body">
<table class="no-style full">
<tbody> {foreach from=$maf1 item=maf }
<td nowrap style="width:160px;height:10px;font-size:10pt"> {$maf.fahrer}</td>
<td nowrap style= "width:30px;height:10px;font-size:10pt"> <img src="/template/images/icon/{$maf.icon}" width="12" height="12"/></td>
<td nowrap style="width:150px;height:10px;font-size:10pt"> {$maf.bez}</td>
</tbody> {/foreach}
</table>
</section>
</div>
<!-- -------------------------------------->
<div id="rightmenu" class="panel panel-success">
<header class="panel-heading"><h2 class="panel-title">Freie Transporter (tagsüber) am {$datum}</h2></header>
<section class="panel-body">
<section>
<table class="no-style full" id="trp" style="font-size:10pt">
</table>
</div>
</aside>
</div>