23 lines
No EOL
836 B
PHP
23 lines
No EOL
836 B
PHP
<?php
|
|
error_reporting(E_ALL); ini_set('display_errors',0);
|
|
|
|
$anlage = $GLOBALS['mysql']->query("SELECT * FROM kartenlog ORDER BY logID DESC LIMIT 0,10"); $key=0; $anz=0;
|
|
while($row_anlage = $anlage->fetch_assoc()) {
|
|
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row_anlage['user']."'");
|
|
if ($row_anlage['pinghp']==0) {
|
|
$GLOBALS['mysql']->insert("UPDATE kartenlog SET pinghp=1 WHERE logID='".$row_anlage['logID']."'");
|
|
$tstatus[$key]['ton']=1;
|
|
} else {
|
|
$tstatus[$key]['ton']=0;
|
|
}
|
|
$tstatus[$key]['fahrer']=$row_fahrer['name'];
|
|
$tstatus[$key]['zeit']=$row_anlage['zeit'];
|
|
$key++;
|
|
}
|
|
|
|
$template->assign('tstatus', $tstatus);
|
|
$template->assign('zeit_online',time()-(1800));
|
|
$template->assign('zeit_live',time()-(300));
|
|
|
|
$template->assign('content', 'tpl/ajax/tuerlog2.tpl');
|
|
?>
|