init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
81
scripts/ajax/ue_infop.php
Normal file
81
scripts/ajax/ue_infop.php
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
//echo'<pre>'; print_r($anlage); echo'</pre>';
|
||||
$testzeit=time()-(600);
|
||||
|
||||
$tfarbe1=time()-(180);
|
||||
$tfarbe2=time()-(360);
|
||||
$tfarbe3=time()-(600);
|
||||
|
||||
$anzeige1=0;
|
||||
$anlage = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog ORDER BY logID DESC LIMIT 0,1");
|
||||
if($anlage['num_rows']!=0) {
|
||||
if($anlage['zeit']>$testzeit) {
|
||||
$anzeige1=3;
|
||||
if($anlage['zeit']>$tfarbe2) { $anzeige1=2; }
|
||||
if($anlage['zeit']>$tfarbe1) { $anzeige1=1; }
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$anlage['user']."'");
|
||||
if ($anlage['pinghp']==0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE kartenlog SET pinghp=1 WHERE logID='".$anlage['logID']."'");
|
||||
$tstatus1['ton']=1;
|
||||
} else {
|
||||
$tstatus1['ton']=0;
|
||||
}
|
||||
$tstatus1['fahrer']=$row_fahrer['name'];
|
||||
$tstatus1['zeit']=$anlage['zeit'];
|
||||
$template->assign('tstatus1', $tstatus1);
|
||||
$template->assign('anz1', $anzeige1);
|
||||
}
|
||||
}
|
||||
//--------------------------------- 2. Zeile Türkontrolle -------------------------------------------------------------
|
||||
$anzeige2=0;
|
||||
$anlage = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog ORDER BY logID DESC LIMIT 1,1");
|
||||
if($anlage['num_rows']!=0) {
|
||||
if($anlage['zeit']>$testzeit) {
|
||||
$anzeige2=3;
|
||||
if($anlage['zeit']>$tfarbe1) { $anzeige2=1; }
|
||||
if($anlage['zeit']>$tfarbe2) { $anzeige2=2; }
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$anlage['user']."'");
|
||||
if ($anlage['pinghp']==0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE kartenlog SET pinghp=1 WHERE logID='".$anlage['logID']."'");
|
||||
$tstatus2['ton']=1;
|
||||
} else {
|
||||
$tstatus2['ton']=0;
|
||||
}
|
||||
$tstatus2['fahrer']=$row_fahrer['name'];
|
||||
$tstatus2['zeit']=$anlage['zeit'];
|
||||
$template->assign('tstatus2', $tstatus2);
|
||||
$template->assign('anz2', $anzeige2);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------- interne JB- Nachrichten -------------------------------------------------------------
|
||||
if($anzeige1==0) {
|
||||
$tmptime=time()-2678400;
|
||||
//$infop = $GLOBALS['mysql']->query_array("SELECT * FROM infop WHERE zeit>'".$tmptime."'");
|
||||
|
||||
$testdata = $GLOBALS['mysql']->query_single("SELECT * FROM infop WHERE zeit>'".$tmptime."'");
|
||||
if ($testdata['num_rows']!=0) {
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM infop WHERE zeit>'".$tmptime."' ORDER BY zeit DESC");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$infop[$key]['von']=$row_fahrerx['name'];
|
||||
$infop[$key]['info']=$row['info'];
|
||||
$infop[$key]['zeit']=$row['zeit'];
|
||||
$infop[$key]['wichtig']=$row['wichtig'];
|
||||
// $infop[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
$template->assign('infop', $infop);
|
||||
}
|
||||
}
|
||||
//--------------------------------- auslesen ungelesene SMS Nachrichten -------------------------------------------------------------
|
||||
if($anzeige2==0) {
|
||||
$smsnotread = $GLOBALS['mysql']->query_single("SELECT * FROM log_sms WHERE gelesen = 0 and incoming = 1 ORDER BY senddate DESC");
|
||||
if ($smsnotread['num_rows']!=0) {
|
||||
$template->assign('smsnotread', $smsnotread);
|
||||
$template->assign('notread', array_values($smsnotread));
|
||||
}
|
||||
}
|
||||
$template->assign('content', 'tpl/ajax/ue_infop.tpl');
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue