jb-data.de/compile/a56cbcf219bde4f4d93df80f752fe394d12cac65_0.file.paktuell.tpl.php
2025-08-11 22:23:30 +02:00

643 lines
26 KiB
PHP
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.

<?php
/* Smarty version 4.3.0, created on 2024-04-01 11:37:15
from '/var/www/vhosts/jb-data.de/httpdocs/template/tpl/paktuell.tpl' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '4.3.0',
'unifunc' => 'content_660a804bbd92c9_14900350',
'has_nocache_code' => false,
'file_dependency' =>
array (
'a56cbcf219bde4f4d93df80f752fe394d12cac65' =>
array (
0 => '/var/www/vhosts/jb-data.de/httpdocs/template/tpl/paktuell.tpl',
1 => 1704563114,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_660a804bbd92c9_14900350 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/var/www/vhosts/jb-data.de/httpdocs/lib/plugins/function.html_options.php','function'=>'smarty_function_html_options',),1=>array('file'=>'/var/www/vhosts/jb-data.de/httpdocs/lib/plugins/modifier.date_format.php','function'=>'smarty_modifier_date_format',),));
?>
<div class="row sortable">
<div class="col-md-1">
<div class="panel panel-warning">
<header class="panel-heading"><h2 class="panel-title">Tag</span></h2></header>
<table class="table-hover" style="font-size:11pt">
<thead>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['tagex']->value, 'tage');
$_smarty_tpl->tpl_vars['tage']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['tage']->value) {
$_smarty_tpl->tpl_vars['tage']->do_else = false;
?>
<tr>
<?php if ($_smarty_tpl->tpl_vars['tage']->value['tagt'] == 1) {?> <td><h4><font color="#A8A5A5">-<?php echo $_smarty_tpl->tpl_vars['tage']->value['kw'];?>
.KW-</td></tr><tr> <?php }?>
<?php if ($_smarty_tpl->tpl_vars['tage']->value['aktiv'] > 0) {?>
<td style="background:#FF0"><a href="?s=paktuell&jahr=<?php echo $_smarty_tpl->tpl_vars['jahr']->value;?>
&monat=<?php echo $_smarty_tpl->tpl_vars['monat']->value;?>
&tag=<?php echo $_smarty_tpl->tpl_vars['tage']->value['tag'];?>
" title="Kicke zum ausw&auml;len"><?php echo $_smarty_tpl->tpl_vars['tage']->value['datum'];?>
</td>
<?php } elseif ($_smarty_tpl->tpl_vars['tage']->value['ft'] > 0) {?>
<td style="background:#F5A50D"><a href="?s=paktuell&jahr=<?php echo $_smarty_tpl->tpl_vars['jahr']->value;?>
&monat=<?php echo $_smarty_tpl->tpl_vars['monat']->value;?>
&tag=<?php echo $_smarty_tpl->tpl_vars['tage']->value['tag'];?>
" title="Kicke zum ausw&auml;len"><?php echo $_smarty_tpl->tpl_vars['tage']->value['datum'];?>
</td>
<?php } else { ?>
<td><a href="?s=paktuell&jahr=<?php echo $_smarty_tpl->tpl_vars['jahr']->value;?>
&monat=<?php echo $_smarty_tpl->tpl_vars['monat']->value;?>
&tag=<?php echo $_smarty_tpl->tpl_vars['tage']->value['tag'];?>
" title="Kicke zum ausw&auml;len" ><?php echo $_smarty_tpl->tpl_vars['tage']->value['datum'];?>
</td>
<?php }?>
</tr>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
</thead>
</table>
</div>
</div>
<!-- mitte seite -->
<div class="col-md-7">
<?php if ($_smarty_tpl->tpl_vars['fttest']->value != 0) {?>
<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><?php echo $_smarty_tpl->tpl_vars['ftrow']->value['tag'];?>
</strong></td>
<td nowrap style="width:500px;line-height:120%;font-size:14pt"> <strong><?php echo $_smarty_tpl->tpl_vars['ftrow']->value['bez'];?>
</strong></td>
</tbody>
</table>
</div>
<?php }?>
<div class="panel panel-default">
<header class="panel-heading"><h2 class="panel-title">alle Touren f&uuml;r den <?php echo $_smarty_tpl->tpl_vars['tag']->value;?>
.<?php echo $_smarty_tpl->tpl_vars['monat']->value;?>
.<?php echo $_smarty_tpl->tpl_vars['jahr']->value;?>
</span></h2></header>
<section class="panel-body">
<table class="table-full">
<thead>
<tr>
<th style=font-size:10pt;>Tour</th>
<th style=font-size:10pt;>Fahrer</th>
<th style=font-size:10pt;>Fahrzeug</th>
<th style=font-size:10pt;>Bemerkung</th>
<th style=font-size:10pt;> </th>
<th style=font-size:10pt;>SMS</th>
</tr>
</thead>
<tbody>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['tag_tour2']->value, 'tour');
$_smarty_tpl->tpl_vars['tour']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['tour']->value) {
$_smarty_tpl->tpl_vars['tour']->do_else = false;
?>
<form action="" method="post">
<?php if ($_smarty_tpl->tpl_vars['tour']->value['tour'] == 99999999) {?>
<tr>
<td><hr style="color: red; height: 1px;" /></td>
<td><hr style="color: red; height: 1px;" /></td>
<td><hr style="color: red; height: 1px;" /></td>
<td><hr style="color: red; height: 1px;" /></td>
<td><hr style="color: red; height: 1px;" /></td>
</tr>
<?php } else { ?>
<tr>
<td nowrap style="width:100px;font-size:11pt"><b> <?php echo $_smarty_tpl->tpl_vars['tour']->value['tour'];?>
</td>
<!-- --------------------------- fahrer -->
<td nowrap style="width:170px;font-size:11pt">
<select name="list[<?php echo $_smarty_tpl->tpl_vars['tour']->value['tid'];?>
][Fahrer]" id="user_<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
" style="width:160px;" onChange="save_user(<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
)" >
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['tour']->value['fahrer_array'], 'allfahrer');
$_smarty_tpl->tpl_vars['allfahrer']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['allfahrer']->value) {
$_smarty_tpl->tpl_vars['allfahrer']->do_else = false;
?>
<?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['allfahrer']->value['id'],'output'=>$_smarty_tpl->tpl_vars['allfahrer']->value['name'],'selected'=>$_smarty_tpl->tpl_vars['tour']->value['fahrer_id']),$_smarty_tpl);?>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
</select>
</td>
<!-- --------------------------- Fahrzeug -->
<td nowrap style="width:105px;font-size:11pt">
<select name="list[<?php echo $_smarty_tpl->tpl_vars['tour']->value['tid'];?>
][Fahrzeug]" id="car_<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
" style="width:100px;" onChange="save_car(<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
)" >
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['auto_array']->value, 'allauto');
$_smarty_tpl->tpl_vars['allauto']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['allauto']->value) {
$_smarty_tpl->tpl_vars['allauto']->do_else = false;
?>
<?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['allauto']->value['id'],'output'=>$_smarty_tpl->tpl_vars['allauto']->value['kz'],'selected'=>$_smarty_tpl->tpl_vars['tour']->value['auto_id']),$_smarty_tpl);?>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
</select>
</td>
<td><input type="text" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['infotext'];?>
" id="info_<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
" style="width:210px;font-size:10pt" name="list[<?php echo $_smarty_tpl->tpl_vars['tour']->value['tid'];?>
][infotext]" onChange="save_info(<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
)"></center></td>
<td><center> <input type="image" name="savetour" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
" src="template/images/icon/l.png" /> </center></td> <!-- erzwingen -->
<td>
<center>
<?php if ($_smarty_tpl->tpl_vars['tour']->value['smsid'] == 0 && $_smarty_tpl->tpl_vars['tour']->value['fahrer_id'] > 0 && $_smarty_tpl->tpl_vars['tour']->value['fahrer_id'] != 1009) {?>
<!-- <input type="image" name="smssenden" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
" src="template/images/icon/sms2.png"/> -->
<button type='submit' name="smssenden" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
"><i class='fa fa-comment-o'></i></button>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['tour']->value['smsid'] > 0 && $_smarty_tpl->tpl_vars['tour']->value['fahrer_id'] > 0) {?>
<button type='submit' name="smssenden" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
"><i class='fa fa-check-square-o'></i></button>
<!-- <input type="image" name="smssenden" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
" src="template/images/icon/okay.png"/> -->
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['tour']->value['fahrer_id'] == 0 || $_smarty_tpl->tpl_vars['tour']->value['fahrer_id'] == 1009) {?>
<!-- <input type="image" name="smssenden" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
" src="template/images/icon/nosms.png"/> -->
<button type='submit' disabled name="smssenden" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
"><i class='fa fa-times'></i></button>
<?php }?>
</center>
</td>
<input type="hidden" name="list[<?php echo $_smarty_tpl->tpl_vars['tour']->value['tid'];?>
][tid]" value="<?php echo $_smarty_tpl->tpl_vars['tour']->value['id'];?>
"/>
<td nowrap align="center" style="width:30px">
<?php if ($_smarty_tpl->tpl_vars['tour']->value['m_update'] > 0) {?>
<a class="btn btn-xs" target="_last" onClick="javascript:open('', '_last', 'height=800,width=600,resizable=yes')"
href="?s=phistory&tour=<?php echo $_smarty_tpl->tpl_vars['tour']->value['tourid'];?>
" onmouseout="hideTooltip()" onmouseover="showTooltip(event,'geändert: <?php echo $_smarty_tpl->tpl_vars['tour']->value['n_update'];?>
- <?php echo $_smarty_tpl->tpl_vars['tour']->value['t_update'];?>
');return false" aria-label="danger" >
<i class="fa fa-info"style="color:orange;"></i>
<?php } else { ?>
<a class="btn btn-xs" target="_last" onClick="javascript:open('', '_last', 'height=800,width=600,resizable=yes')"
href="?s=phistory&tour=<?php echo $_smarty_tpl->tpl_vars['tour']->value['tourid'];?>
" aria-label="Settings">
<i color:#4F81BD; class="fa fa-info"></i>
<?php }?>
</td>
</tr>
<?php }?>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
<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></td>
<td><input type="submit" id="notifyBtn" name="testsave" value="kompl. Liste Speichern"></td>
</form>
</tr>
</form>
</tbody>
</table>
</div>
</div>
<!-- rechte seite -->
<!-- -------------------------------------->
<!-- Sidebar -->
<aside class="col-md-4">
<div id="rightmenu" class="panel panel-default">
<header class="panel-heading">
<table class="no-style full">
<tbody>
<td nowrap style="align:center;width:320px;font-size:14pt">
<a class="fa fa-arrow-left" href="?s=paktuell&wahl=1&jahr=<?php echo $_smarty_tpl->tpl_vars['jahr']->value;?>
&monat=<?php echo $_smarty_tpl->tpl_vars['monat']->value;?>
"></a>
<strong><?php echo $_smarty_tpl->tpl_vars['monat']->value;?>
/<?php echo $_smarty_tpl->tpl_vars['jahr']->value;?>
</strong>
<a class="fa fa-arrow-right" href="?s=paktuell&wahl=2&jahr=<?php echo $_smarty_tpl->tpl_vars['jahr']->value;?>
&monat=<?php echo $_smarty_tpl->tpl_vars['monat']->value;?>
"></a></td>
</tbody>
</table>
</header>
</div>
<!-- -------------------------------- fehlende Mitarbeiter heute
<div id="kal_1" style="text-align:center;"></div>
-->
<div id="rightmenu" class="panel panel-warning">
<header class="panel-heading"><span class="fa fa-calendar fa-fw pull-left"></span><h2 class="panel-title">Kalender - <?php echo $_smarty_tpl->tpl_vars['tag']->value;?>
.<?php echo $_smarty_tpl->tpl_vars['monat']->value;?>
.<?php echo $_smarty_tpl->tpl_vars['jahr']->value;?>
</h2></header>
<div class="panel-body">
<table class="no-style full">
<tbody>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['maf']->value, 'maf1');
$_smarty_tpl->tpl_vars['maf1']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['maf1']->value) {
$_smarty_tpl->tpl_vars['maf1']->do_else = false;
?>
<tr>
<td nowrap style="width:135px;font-size:10pt"> <?php echo $_smarty_tpl->tpl_vars['maf1']->value['fahrer'];?>
</td>
<td nowrap style="width:25px;font-size:11pt"> <img src="/template/images/icon/<?php echo $_smarty_tpl->tpl_vars['maf1']->value['icon'];?>
" width="16" height="16"/></td>
<td nowrap style="width:150px;font-size:10pt"> <?php echo $_smarty_tpl->tpl_vars['maf1']->value['bez'];?>
</td>
</tr>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
</tbody>
</table>
</div>
</div>
<div id="rightmenu" class="panel panel-info">
<header class="panel-heading"><span class="fa fa-moon-o fa-fw pull-left"></span><h2 class="panel-title"> verfügbare Caddy</h2></header>
<div class="panel-body">
<table class="no-style full" id="caddy" style="font-size:10pt"></table>
</div>
</div>
<div id="rightmenu" class="panel panel-info">
<header class="panel-heading"><span class="fa fa-moon-o fa-fw pull-left"></span><h2 class="panel-title"> verfügbare Transporter</h2></header>
<div class="panel-body">
<table class="no-style full" id="trp" style="font-size:10pt"></table>
</div>
</div>
<div id="rightmenu" class="panel panel-warning">
<header class="panel-heading"><spawn class="fa fa-sun-o fa-fw pull-left fa-spin fa-fw"></spawn><h2 class="panel-title"> verfügbare PKW´s</h2></header>
<div class="panel-body">
<table class="no-style full" id="pkw" style="font-size:10pt"></table>
</div>
</div>
<div id="rightmenu" class="panel panel-warning">
<header class="panel-heading"><spawn class="fa fa-sun-o fa-fw pull-left fa-spin fa-fw"></spawn><h2 class="panel-title"> verfügbare Caddy</h2></header>
<div class="panel-body">
<table class="no-style full" id="caddytag" style="font-size:10pt"></table>
</div>
</div>
<div id="rightmenu" class="panel panel-warning">
<header class="panel-heading"><spawn class="fa fa-sun-o fa-fw pull-left fa-spin fa-fw"></spawn><h2 class="panel-title"> verfügbare Transporter</h2></header>
<div class="panel-body">
<table class="no-style full" id="trptag" style="font-size:10pt"></table>
</div>
</div>
</aside>
<!-- Sidebar End -->
<?php echo '<script'; ?>
> var tagheute = '<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['datum_unix']->value,"%Y-%m-%d");?>
';<?php echo '</script'; ?>
>
<?php echo '<script'; ?>
>
function load_free_cars(tourID,date) {
$.ajax({
type: 'POST',
url: "ajax.php?s=paktuell&a=load_free_cars",
dataType: 'json',
data: 'tourID=' + tourID + "&date=" + date,
success: function (data) {
console.log(data)
$("#pkw").html("");
$("#trp").html("");
$("#caddy").html("");
$("#trptag").html("");
$("#caddytag").html("");
$.each( data.pkwtag, function( key, value ) {
$("#pkwtag").append(value+"<br>");
});
$.each( data.caddy, function( key, value ) {
$("#caddy").append(value+"<br>");
});
$.each( data.trp, function( key, value ) {
$("#trp").append(value+"<br>");
});
$.each( data.caddytag, function( key, value ) {
$("#caddytag").append(value+"<br>");
});
$.each( data.trptag, function( key, value ) {
$("#trptag").append(value+"<br>");
});
}
});
}
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(tourID,tagheute)
}
console.log(data)
}
});
}
load_free_cars(0,tagheute);
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'
}
});
console.log(data)
}
});
}
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'
}
});
}
console.log(data)
}
});
}
$(document).ready(function(){
$('[data-toggle="popover"]').popover();
});
<?php echo '</script'; ?>
>
<style type="text/css">
#dhtmlgoodies_tooltip{
background-color:#EEE;
border:1px solid #000;
position:absolute;
display:none;
z-index:20000;
padding:2px;
font-size:0.9em;
-moz-border-radius:6px; /* Rounded edges in Firefox */
font-family: "Trebuchet MS", "Lucida Sans Unicode", Arial, sans-serif;
}
#dhtmlgoodies_tooltipShadow{
position:absolute;
background-color:#555;
display:none;
z-index:10000;
opacity:0.7;
filter:alpha(opacity=70);
-khtml-opacity: 0.7;
-moz-opacity: 0.7;
-moz-border-radius:6px; /* Rounded edges in Firefox */
}
</style>
<SCRIPT type="text/javascript">
/************************************************************************************************************
(C) www.dhtmlgoodies.com, October 2005
This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
Updated:
March, 11th, 2006 - Fixed positioning of tooltip when displayed near the right edge of the browser.
April, 6th 2006, Using iframe in IE in order to make the tooltip cover select boxes.
Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.
Thank you!
www.dhtmlgoodies.com
Alf Magne Kalleland
************************************************************************************************************/
var dhtmlgoodies_tooltip = false;
var dhtmlgoodies_tooltipShadow = false;
var dhtmlgoodies_shadowSize = 4;
var dhtmlgoodies_tooltipMaxWidth = 200;
var dhtmlgoodies_tooltipMinWidth = 100;
var dhtmlgoodies_iframe = false;
var tooltip_is_msie = (navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('opera')==-1 && document.all)?true:false;
function showTooltip(e,tooltipTxt)
{
var bodyWidth = Math.max(document.body.clientWidth,document.documentElement.clientWidth) - 20;
if(!dhtmlgoodies_tooltip){
dhtmlgoodies_tooltip = document.createElement('DIV');
dhtmlgoodies_tooltip.id = 'dhtmlgoodies_tooltip';
dhtmlgoodies_tooltipShadow = document.createElement('DIV');
dhtmlgoodies_tooltipShadow.id = 'dhtmlgoodies_tooltipShadow';
document.body.appendChild(dhtmlgoodies_tooltip);
document.body.appendChild(dhtmlgoodies_tooltipShadow);
if(tooltip_is_msie){
dhtmlgoodies_iframe = document.createElement('IFRAME');
dhtmlgoodies_iframe.frameborder='5';
dhtmlgoodies_iframe.style.backgroundColor='#FFFFFF';
dhtmlgoodies_iframe.src = '#';
dhtmlgoodies_iframe.style.zIndex = 100;
dhtmlgoodies_iframe.style.position = 'absolute';
document.body.appendChild(dhtmlgoodies_iframe);
}
}
dhtmlgoodies_tooltip.style.display='block';
dhtmlgoodies_tooltipShadow.style.display='block';
if(tooltip_is_msie)dhtmlgoodies_iframe.style.display='block';
var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;
var leftPos = e.clientX + 10;
dhtmlgoodies_tooltip.style.width = null; // Reset style width if it's set
dhtmlgoodies_tooltip.innerHTML = tooltipTxt;
dhtmlgoodies_tooltip.style.left = leftPos + 'px';
dhtmlgoodies_tooltip.style.top = e.clientY + 10 + st + 'px';
dhtmlgoodies_tooltipShadow.style.left = leftPos + dhtmlgoodies_shadowSize + 'px';
dhtmlgoodies_tooltipShadow.style.top = e.clientY + 10 + st + dhtmlgoodies_shadowSize + 'px';
if(dhtmlgoodies_tooltip.offsetWidth>dhtmlgoodies_tooltipMaxWidth){ /* Exceeding max width of tooltip ? */
dhtmlgoodies_tooltip.style.width = dhtmlgoodies_tooltipMaxWidth + 'px';
}
var tooltipWidth = dhtmlgoodies_tooltip.offsetWidth;
if(tooltipWidth<dhtmlgoodies_tooltipMinWidth)tooltipWidth = dhtmlgoodies_tooltipMinWidth;
dhtmlgoodies_tooltip.style.width = tooltipWidth + 'px';
dhtmlgoodies_tooltipShadow.style.width = dhtmlgoodies_tooltip.offsetWidth + 'px';
dhtmlgoodies_tooltipShadow.style.height = dhtmlgoodies_tooltip.offsetHeight + 'px';
if((leftPos + tooltipWidth)>bodyWidth){
dhtmlgoodies_tooltip.style.left = (dhtmlgoodies_tooltipShadow.style.left.replace('px','') - ((leftPos + tooltipWidth)-bodyWidth)) + 'px';
dhtmlgoodies_tooltipShadow.style.left = (dhtmlgoodies_tooltipShadow.style.left.replace('px','') - ((leftPos + tooltipWidth)-bodyWidth) + dhtmlgoodies_shadowSize) + 'px';
}
if(tooltip_is_msie){
dhtmlgoodies_iframe.style.left = dhtmlgoodies_tooltip.style.left;
dhtmlgoodies_iframe.style.top = dhtmlgoodies_tooltip.style.top;
dhtmlgoodies_iframe.style.width = dhtmlgoodies_tooltip.offsetWidth + 'px';
dhtmlgoodies_iframe.style.height = dhtmlgoodies_tooltip.offsetHeight + 'px';
}
}
function hideTooltip()
{
dhtmlgoodies_tooltip.style.display='none';
dhtmlgoodies_tooltipShadow.style.display='none';
if(tooltip_is_msie)dhtmlgoodies_iframe.style.display='none';
}
<?php echo '</script'; ?>
>
<?php }
}