init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
45
scripts/infop.php
Normal file
45
scripts/infop.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?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');
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue