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

342 lines
No EOL
14 KiB
Smarty

{if $anzeige==0}
<div class="row sortable">
<div class="col-md-8">
<div class="panel panel-warning">
<header class="panel-heading"><h2 class="panel-title">Info</span></h2></header>
<section class="panel-body">
<span style='font-size:10pt;line-height:115%; color:#4F81BD'>
Bitte die Tour auw&auml;hlen die Sie bearbeiten m&ouml;chten.
</span>
</section>
</div>
</div>
<!-- ///////////////// rechte seite -->
{else}
<div class="row sortable">
<div class="col-md-8">
<div class="panel panel-warning">
<header class="panel-heading"><h2 class="panel-title">PIN-{$tourname} f&uuml;r {$monat}/{$jahr}</span></h2></header>
<section class="panel-body">
<table class="no-style full">
<thead>
<tr>
<th style="width:20px" align="left">Tour</th>
<th style="width:45px" align="left">Zeit</th>
<th style="width:160px" align="left">Fahrer</th>
<th style="width:10px" align="left"> </th>
<th style="width:99px" align="left">Fahrzeug</th>
<th style="width:10px" align="left"> </th>
<th style="width:300px" align="left">z.Info</th>
</tr>
</thead>
<tbody>
<form action="" method="post">
{foreach from=$pin_tour1 item=tour}
<!-- {if $tour.tagnr==1}<td><hr style="color: red; height: 1px;" />{/if}</td> -->
<tr>
<td style="width:20px"><b>{$tour.tag}.{$tour.monat}.{$tour.jahr}</td>
<td style="width:55px"><input type="text" value="{$tour.zeit}" id="time_{$tour.id}" style="width:45px;" name="list[{$tour.tid}][zeit]" onChange="save_time({$tour.id})"></td>
<td><center>
<select name="list[{$tour.tid}][Fahrer]" id="user_{$tour.id}"
{if $tour.fahrer_na==1} style="border-color:red;width:180px;" onChange="save_user({$tour.id})"
{elseif $tour.fahrer_na==2} style="border-color:red;width:180px;" onChange="save_user({$tour.id})"
{elseif $tour.fahrer_na==3} style="border-color:blue;width:180px;" onChange="save_user({$tour.id})"
{elseif $tour.fahrer_na==4} style="border-color:orange;width:180px;" onChange="save_user({$tour.id})"
{else} style="width:180px;"onChange="save_user({$tour.id})"{/if}>
{foreach from=$tour.fahrer_array item=allfahrer}
<option value="{$allfahrer.id}" {if $tour.fahrer_id==$allfahrer.id} selected="selected"{/if} ><strong>{$allfahrer.name}</strong></option>
{/foreach}
</select>
</td>
<td> </td>
<!-- --------------------------- Fahrzeug -->
<td><center>
<select name="list[{$tour.tid}][Fahrzeug]" id="car_{$tour.id}" style="width:100px;" onChange="save_car({$tour.id})"/>
{foreach from=$tour.auto_array item=allauto}
{html_options values=$allauto.id output=$allauto.kz selected=$tour.auto_id}
{/foreach}
</select>
</td>
<td> </td>
<td>
<input type="text" value="{$tour.infotext}" id="info_{$tour.id}" style="width:90%;" name="list[{$tour.tid}][infotext]" onChange="save_info({$tour.id})"/>
</td>
<input type="hidden" name="list[{$tour.tid}][tid]" value="{$tour.id}"/><input type="hidden" name="testsave" value="{$tour.id}" >
<td>
<input type="image" name="speichern" value="{$tour.id}" src="template/images/icon/l.png"/></td>
<td> <center>
{if $tour.smsid==0 && $tour.fahrer_id>0}<input type="image" name="smssenden" value="{$tour.id}" src="template/images/icon/sms2.png"/>{/if}
{if $tour.smsid>0 && $tour.fahrer_id>0}<input type="image" name="smssenden" value="{$tour.id}" src="template/images/icon/okay.png"/>{/if}
{if $tour.fahrer_id==0}<input type="image" name="smssenden" value="{$tour.id}" src="template/images/icon/nosms.png"/>{/if}
</center>
</td>
</tr>
{/foreach}
</tbody>
<tbody>
<td>
<input type="submit" name="testsave" value="Speichern" >
</td>
</tbody>
</table>
</form>
</section>
</div>
</div>
{/if}
<!-- -------------------------------------->
<!-- Sidebar -->
<aside class="col-md-4">
<div id="rightmenu" class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title">Auswahl anzeigen</h2></header>
<div class="panel-body">
<table class="no-style full">
<tbody>
<tr>
<td><a class="btn btn-primary btn-block" href="?s=rpin1">K.Woche</a></td>
<td>&nbsp;&nbsp;&nbsp;</td>
<td><a class="btn btn-primary btn-block" href="?s=rpin2">kompl. Monat</a></td>
<td>&nbsp;&nbsp;&nbsp;</td>
{if $anzeige>0} <td><a class="btn btn-warning btn-block" href="?s=list_rpin2&jahr={$jahr}&monat={$monat}">PDF/Monat</a></td> {/if}
</tr>
<tr>
</tbody>
</table>
</br>
<table class="no-style full">
<tbody>
<tr>
<td style="font-size:16pt" align="center">
<div class="btn-group">
<h9><a class="btn btn-primary" href="?s=rpin2&wahl=1&jahr={$jahr}&monat={$monat}" aria-label="z">
<i class="fa fa-arrow-left fa-lg" aria-hidden="true"></i>
</a>
<button type="button" class="btn btn-default">{$monat}/{$jahr}</button>
<a class="btn btn-primary" href="?s=rpin2&wahl=2&jahr={$jahr}&monat={$monat}" aria-label="v">
<i class="fa fa-arrow-right fa-lg" aria-hidden="true"></i>
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="rightmenu" class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title">Auswahl anzeigen</h2></header>
<section class="panel-body">
<dl>
<section>
<table class="no-style full">
<thead>
{foreach from=$tourenlist item=tourenlist}
<tr>
<td><a href="?s=rpin2&id={$tourenlist.id}&jahr={$jahr}&monat={$monat}" title="Kicke zum ausw&auml;len" >{$tourenlist.tour}</a></td>
<td>{$tourenlist.infotitel}</td>
</tr>
{/foreach}
</thead>
</table>
</dl>
</div>
{if $anzeige>0}
<div id="rightmenu" class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title">kompletter Monat kopieren</h2></header>
<section class="panel-body">
<dl>
<form action="" method="post">
<table class="no-style full">
<thead>
<tr><!-- --------------------------- fahrer -->
<td><left>
<select name="list[{$tour.tid}][Fahrer]" style="width:160px;" >
{foreach from=$tour.fahrer_array item=allfahrer}
{html_options values=$allfahrer.id output=$allfahrer.name selected=$s_fahrer}
{/foreach}
</select>
</td>
</tr>
<tr>
<!-- --------------------------- Fahrzeug -->
<td><left>
<select name="list[{$tour.tid}][Fahrzeug]" style="width:160px;" >
{foreach from=$tour.auto_array item=allauto}
{html_options values=$allauto.id output=$allauto.kz selected=$s_auto}
{/foreach}
</select>
</td>
<tr></tr>
<td><input type="text" value="{$tour.zeit}" style="width:50px;" name="list[{$tour.tid}][zeit]" placeholder="14:30"><strong>&#160;&#160;&#160;Startzeit</strong></td>
</tr>
</thead>
</table>
<input type="submit" name="savetoursubmit" value="Speichern" ></form>
</dl>
</div>
{/if}
</aside>
<!-- Sidebar End -->
</div></div></div>
<script> var tagheute ='{$datum_unix|date_format:"%Y-%m-%d"}';</script>
{literal}
<script>
function save_info(tourID) {
$.ajax({
type: 'POST',
url: "ajax.php?s=paktuell2&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'
}
});
console.log(data)
}
});
}
function save_time(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=paktuell2&a=time_save",
dataType: 'json',
data: 'tourID=' + tourID + "&time=" + $("#time_"+tourID).val(),
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_car(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=paktuell2&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(tourID,tagheute)
}
console.log(data)
}
});
}
load_free_cars(0,tagheute);
function save_user(tourID) {
//alert($("#car_"+tourID).val());
$.ajax({
type: 'POST',
url: "ajax.php?s=paktuell2&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)
}
});
}
</script>
{/literal}