45 lines
No EOL
1.3 KiB
PHP
45 lines
No EOL
1.3 KiB
PHP
<?php
|
|
$_SESSION['m1']=0; $_SESSION['m2']=8;
|
|
error_reporting(E_ALL); ini_set('display_errors',0);
|
|
|
|
$tmptime=time()-31536000;
|
|
//$infop = $GLOBALS['mysql']->query_array("SELECT * FROM infop WHERE zeit>'".$tmptime."'");
|
|
|
|
|
|
|
|
|
|
|
|
if(isset($_POST['infoplus'])) {
|
|
$wichtig=0;
|
|
$GLOBALS['mysql']->insert("INSERT INTO infop (info,zeit,mid,wichtig)
|
|
VALUES('".$_POST['text']."',
|
|
'".time()."',
|
|
'".$_SESSION['benutzer']."',
|
|
'".$wichtig."')
|
|
");
|
|
}
|
|
if(isset($_POST['infowichtig'])) {
|
|
$wichtig=1;
|
|
$GLOBALS['mysql']->insert("INSERT INTO infop (info,zeit,mid,wichtig)
|
|
VALUES('".$_POST['text']."',
|
|
'".time()."',
|
|
'".$_SESSION['benutzer']."',
|
|
'".$wichtig."')
|
|
");
|
|
}
|
|
|
|
//---------- auslesen last 30 tage
|
|
$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);
|
|
$template->assign('content', 'tpl/infop.tpl');
|
|
?>
|