407 lines
23 KiB
Smarty
407 lines
23 KiB
Smarty
<script>
|
|
timercount=0;
|
|
</script>
|
|
|
|
|
|
<!-- --------------------------- Sms sendebutton -->
|
|
<form action="" method="post">
|
|
<b><i><span style='font-size:16pt;line-height:115%; color:#4F81BD'>Werbung / Exxtra für die {$kw_aktuell}.KW </span></i></b>
|
|
<input type="submit" class="btn btn-link" value="alle SMS senden" name="smspower" value="kompl. Liste per SMS senden" onclick="return confirm('Möchten sie wirklich alle SMS senden ?')">
|
|
</form>
|
|
<!-- -------------------------------------->
|
|
<section class="col-md-8">
|
|
<form action="" method="post">
|
|
<div class="row sortable">
|
|
<div class="col-md-12">
|
|
<!-- --------------------------- Werbung-Land -->
|
|
{if ($atyp1)==1}
|
|
<div class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title"><span style='font-size:14pt'>Werbung Ausgabe Land - {$kw_aktuell}.KW {$datumland}</span></h2></header>
|
|
<div class="panel-body">
|
|
<table class="no style" {if $tour.lock==1} span style='color:#ff0000' {/if}>
|
|
<thead>
|
|
<tr>
|
|
<th style="width:90px;font-size:8pt" align="left">Tour</th>
|
|
<th style="width:80px;font-size:8pt" align="left">Zeit</th>
|
|
<th style="width:80px;font-size:8pt" align="right">G.-Gewicht</th>
|
|
<th style="width:80px;font-size:8pt" align="right">Rampe kg</th>
|
|
<th style="width:210px;font-size:8pt" >Fahrer</th>
|
|
<th style="width:120px;font-size:8pt" >Fahrzeug</th>
|
|
<th style="width:30px;font-size:8pt">SMS</th>
|
|
<th style="width:30px;font-size:8pt">edit</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody> {foreach from=$tour1 item=tour}
|
|
<td nowrap style="width:90px;font-size:12pt {if $tour.lock==1};color:#228B22{/if}"><strong>{$tour.tour}</strong></td>
|
|
<td nowrap style="width:80px;font-size:12pt {if $tour.lock==1};color:#BEBEBE{/if}"> <b>{$tour.time|date_format:"%H:%M"} Uhr</td>
|
|
<td nowrap style="width:80px;font-size:12pt {if $tour.lock==1};color:#BEBEBE{/if}" align="right"> <b>{$tour.gewicht} kg</td> </right>
|
|
<td nowrap style="width:80px;font-size:10pt {if $tour.lock==1};color:#BEBEBE{/if}" align="left"> <b> ({$tour.gewicht4} kg)</td> </right>
|
|
<!-- --------------------------- fahrer -->
|
|
<td nowrap style="width:210px;font-size:12pt"><center>
|
|
<select name="list[{$tour.tid}][Fahrer]" id="user_{$tour.id}"
|
|
{if $tour.fahrer_id==0} style="width:200px;border-color:#FC060A"
|
|
{else} style="width:200px {if $tour.lock==1};color:#BEBEBE{/if}"
|
|
{/if}
|
|
onChange="save_user({$tour.id})" {if $tour.lock==1} disabled {/if}>
|
|
{foreach from=$fahrer_array1 item=allfahrer}
|
|
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
|
|
{/foreach}
|
|
</td>
|
|
<!-- --------------------------- Fahrzeug -->
|
|
<td nowrap style="width:120px;font-size:12pt"><center>
|
|
<select name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:110px {if $tour.lock==1};color:#BEBEBE{/if}" onChange="save_car({$tour.id})" {if $tour.lock==1} disabled {/if}>
|
|
{foreach from=$auto_array item=allauto}
|
|
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
|
|
{/foreach}
|
|
</td>
|
|
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$rs_tour.id}"/>
|
|
<td style="width:70px;font-size:11pt">
|
|
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/>
|
|
<input type="hidden" name="list[{$tour.tid}][tourid]" value="{$tour.tourid}"/>
|
|
<div id="smsstatus{$tour.id}" style="text-align:center;">
|
|
{if $tour.smsstatus==0 && $tour.fahrer_id==0}
|
|
<button type='submit' name="smssenden" data-toggle="tooltip" title="SMS senden nicht möglich" ><i class='fa fa-times'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==0 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-commenting-o'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==1 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" data-toggle="tooltip" title="in Warteschleife" value="{$tour.id}"><i class='fa fa-caret-square-o-right'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==2 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" data-toggle="tooltip" data-placement="top" title="zugestellt am: {$test.smsstatusdate|date_format:"%d.%m.%Y-%H:%M"} Uhr" value="{$tour.id}"><i class='fa fa-check-square-o'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==5 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" data-toggle="tooltip" title="Versand fehlgeschlagen !!" value="{$tour.id}"><i class='fa fa-ban text-danger'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==8 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-share-square-o'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==4 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-question-circle-o'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==20 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-refresh fa-spin fa-fw'></i></button>
|
|
{/if}
|
|
</div>
|
|
{literal}
|
|
<script>
|
|
timer = 3000;
|
|
var refresh_EDV{/literal}{$tour.id}{literal} = setInterval(function() {
|
|
$.ajax({
|
|
type : "POST",
|
|
url : 'ajax.php?s=cmsstatus&tpl',
|
|
cache : false,
|
|
data : {
|
|
id:{/literal}{$tour.id}{literal},
|
|
},
|
|
dataType : "html",
|
|
success : function(data){
|
|
$("#smsstatus{/literal}{$tour.id}{literal}").html(data);
|
|
var matches = data.match("zugestellt am:"); // findet das erst 'zug'
|
|
|
|
if(matches == 'zugestellt am:') {
|
|
clearInterval(refresh_EDV{/literal}{$tour.id}{literal});
|
|
}
|
|
},
|
|
})
|
|
},timer);
|
|
timercount++;
|
|
</script>
|
|
{/literal}
|
|
</td>
|
|
{if $tour.lock==1}
|
|
<td align="right"><button type='submit' name="editfree" value="{$tour.id}" onclick="return confirm('Möchten sie wirklich stornieren ??? \n Der Fahrer erhält eine STORNO-SMS !!!!')">
|
|
<i class='fa fa-pencil-square-o'></i></button></td>
|
|
{/if}
|
|
</tbody> {/foreach}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
<!-- --------------------------- Werb-Stadt -->
|
|
|
|
<div class="col-md-12">
|
|
{if ($atyp2)>0}
|
|
<div class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title"><span style='font-size:14pt'>Werbung "Exxtra" Stadt - {$kw_aktuell}.KW {$datumstadt}</span></h2></header>
|
|
<div class="panel-body">
|
|
<table class="no style">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:90px;font-size:8pt" align="left">Tour</th>
|
|
<th style="width:80px;font-size:8pt" align="left">Zeit</th>
|
|
<th style="width:80px;font-size:8pt" align="right">G.-Gewicht</th>
|
|
<th style="width:80px;font-size:8pt" align="right">Rampe kg</th>
|
|
<th style="width:210px;font-size:8pt" >Fahrer</th>
|
|
<th style="width:120px;font-size:8pt" >Fahrzeug</th>
|
|
<th style="width:30px;font-size:8pt">SMS</th>
|
|
<th style="width:30px;font-size:8pt">edit</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody> {foreach from=$tour2 item=tour}
|
|
<td nowrap style="width:90px;font-size:12pt {if $tour.lock==1};color:#228B22{/if}"><strong>{$tour.tour}</strong></td>
|
|
<td nowrap style="width:80px;font-size:12pt {if $tour.lock==1};color:#BEBEBE{/if}"> <b>{$tour.time|date_format:"%H:%M"} Uhr</td>
|
|
<td nowrap style="width:80px;font-size:12pt {if $tour.lock==1};color:#BEBEBE{/if}" align="right"> <b>{$tour.gewicht} kg</td> </right>
|
|
<td nowrap style="width:80px;font-size:10pt {if $tour.lock==1};color:#BEBEBE{/if}" align="left"> <b> ({$tour.gewicht4} kg)</td> </right>
|
|
<!-- --------------------------- fahrer -->
|
|
<td nowrap style="width:210px;font-size:12pt"><center>
|
|
<select name="list[{$rs_tour1.tid}][Fahrer]" id="user_{$tour.id}"
|
|
{if $tour.fahrer_id==0} style="width:200px;border-color:#FC060A;"
|
|
{else} style="width:200px {if $tour.lock==1};color:#BEBEBE{/if}"
|
|
{/if}
|
|
onChange="save_user({$tour.id})" {if $tour.lock==1} disabled {/if}>
|
|
{foreach from=$fahrer_array2 item=allfahrer}
|
|
{html_options values=$allfahrer.id output=$allfahrer.name selected=$tour.fahrer_id}
|
|
{/foreach}
|
|
</td>
|
|
<!-- --------------------------- Fahrzeug -->
|
|
<td nowrap style="width:120px;font-size:12pt"><center>
|
|
<select disable name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:110px {if $tour.lock==1};color:#BEBEBE{/if}" onChange="save_car({$tour.id})" {if $tour.lock==1} disabled {/if}>
|
|
{foreach from=$auto_array item=allauto}
|
|
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
|
|
{/foreach}
|
|
|
|
</td>
|
|
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$rs_tour.id}"/>
|
|
<td style="width:70px;font-size:11pt">
|
|
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/>
|
|
<input type="hidden" name="list[{$tour.tid}][tourid]" value="{$tour.tourid}"/>
|
|
<div id="smsstatus{$tour.id}" style="text-align:center;">
|
|
{if $tour.smsstatus==0 && $tour.fahrer_id==0}
|
|
<button type='submit' name="smssenden" data-toggle="tooltip" title="SMS senden nicht möglich" ><i class='fa fa-times'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==0 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-commenting-o'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==1 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" data-toggle="tooltip" title="in Warteschleife" value="{$tour.id}"><i class='fa fa-caret-square-o-right'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==2 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" data-toggle="tooltip" data-placement="top" title="zugestellt am: {$test.smsstatusdate|date_format:"%d.%m.%Y-%H:%M"} Uhr" value="{$tour.id}"><i class='fa fa-check-square-o'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==5 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" data-toggle="tooltip" title="Versand fehlgeschlagen !!" value="{$tour.id}"><i class='fa fa-ban text-danger'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==8 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-share-square-o'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==4 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-question-circle-o'></i></button>
|
|
{/if}
|
|
{if $tour.smsstatus==20 && $tour.fahrer_id>0}
|
|
<button type='submit' name="smssenden" value="{$tour.id}"><i class='fa fa-refresh fa-spin fa-fw'></i></button>
|
|
{/if}
|
|
|
|
</div>
|
|
{literal}
|
|
<script>
|
|
timer = 3000;
|
|
var refresh_EDV{/literal}{$tour.id}{literal} = setInterval(function() {
|
|
$.ajax({
|
|
type : "POST",
|
|
url : 'ajax.php?s=cmsstatus&tpl',
|
|
cache : false,
|
|
data : {
|
|
id:{/literal}{$tour.id}{literal},
|
|
},
|
|
dataType : "html",
|
|
success : function(data){
|
|
$("#smsstatus{/literal}{$tour.id}{literal}").html(data);
|
|
var matches = data.match("zugestellt am:"); // findet das erst 'zug'
|
|
|
|
if(matches == 'zugestellt am:') {
|
|
clearInterval(refresh_EDV{/literal}{$tour.id}{literal});
|
|
}
|
|
},
|
|
})
|
|
},timer);
|
|
timercount++;
|
|
|
|
|
|
</script>
|
|
{/literal}
|
|
</td>
|
|
{if $tour.lock==1}
|
|
<td align="right"><button type='submit' name="editfree" value="{$tour.id}" onclick="return confirm('Möchten sie wirklich stornieren ??? \n Der Fahrer erhält eine STORNO-SMS !!!!')">
|
|
<i class='fa fa-pencil-square-o'></i></button></td>
|
|
{/if}
|
|
</tbody> {/foreach}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
|
|
</section>
|
|
<!-- -------------------------------------->
|
|
<!-- Sidebar -->
|
|
<aside class="col-md-4">
|
|
{if ($atyp1 && $kalanz)>0}
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title"><span style='font-size:12pt;line-height:100%; color:#4F81BD'>Kalender für {$datumland}</h2></header>
|
|
<section class="panel-body">
|
|
<table class="no-style full">
|
|
<tbody> {foreach from=$maf1 item=maf1 }
|
|
<td nowrap style="width:160px;height:10px;font-size:10pt"> {$maf1.fahrer}</td>
|
|
<td nowrap style= "width:30px;height:10px;font-size:10pt"> <img src="/template/images/icon/{$maf1.icon}" width="12" height="12"/></td>
|
|
<td nowrap style="width:150px;height:10px;font-size:10pt"> {$maf1.bez}</td>
|
|
</tbody> {/foreach}
|
|
</table>
|
|
</section>
|
|
</div>
|
|
{/if}
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title"><span style='font-size:12pt;line-height:100%; color:#4F81BD'>Kalender für {$datumstadt}</h2></header>
|
|
<section class="panel-body">
|
|
<table class="no-style full">
|
|
<tbody> {foreach from=$maf2 item=maf2 }
|
|
<td nowrap style="width:160px;height:10px;font-size:10pt"> {$maf2.fahrer}</td>
|
|
<td nowrap style= "width:30px;height:10px;font-size:10pt"> <img src="/template/images/icon/{$maf2.icon}" width="12" height="12"/></td>
|
|
<td nowrap style="width:150px;height:10px;font-size:10pt"> {$maf2.bez}</td>
|
|
</tbody> {/foreach}
|
|
</table>
|
|
</section>
|
|
</div>
|
|
|
|
<div id="rightmenu" class="panel panel-success">
|
|
<header class="panel-heading"><h2 class="panel-title">Freie Transporter {$datumstadt}</h2></header>
|
|
<section class="panel-body">
|
|
<section>
|
|
<table class="no-style full" id="trp" style="font-size:10pt">
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<!-- letzte Woche -->
|
|
<div id="rightmenu" class="panel panel-default">
|
|
<header class="panel-heading"><h2 class="panel-title"><span style='font-size:12pt;line-height:100%; color:#4F81BD'>Einsatzplanung letzte Woche</h2></header>
|
|
<div class="panel-body">
|
|
<div id="lastweek" style="text-align:center;"></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
<!-- Sidebar End -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script> var tagheute = '{$datum_unix|date_format:"%Y-%m-%d"}';</script>
|
|
{literal}
|
|
<script>
|
|
$.ajax({
|
|
type : "POST",
|
|
url : 'ajax.php?s=last_week_11&tpl',
|
|
cache : false,
|
|
data : {
|
|
},
|
|
dataType : "html",
|
|
success : function(data){
|
|
$("#lastweek").html(data);
|
|
},
|
|
});
|
|
|
|
function load_free_cars(tourID,date) {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=prundschau&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_car(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=prundschau&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)
|
|
load_free_cars(0,tagheute);
|
|
}
|
|
});
|
|
|
|
}
|
|
function save_user(tourID) {
|
|
//alert($("#car_"+tourID).val());
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "ajax.php?s=prundschau&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)
|
|
}
|
|
});
|
|
}
|
|
$(document).ready(function(){
|
|
$('[data-toggle="tooltip"]').tooltip();
|
|
});
|
|
load_free_cars(0,tagheute);
|
|
</script>
|
|
{/literal}
|