' . gmdate('d/m/Y H:i:s', round($row['Microtime'])) . ': ' . $row['Notification'] . ''; } echo(json_encode($buf)); } elseif (array_key_exists('act',$_GET) && $_GET['act']=='loadnew' && array_key_exists('lmt',$_GET) && preg_match('/^[0-9]+(\.[0-9]+)?$/',$_GET['lmt'])===1) { $_GET['lmt']+=0; $newlmt=$_GET['lmt']; $newunread=false; $res=mysqli_query($link,'SELECT * FROM Notifications WHERE Microtime > '.$_GET['lmt'].' AND Deleted = 0 ORDER BY Microtime DESC') or muoribene(mysqli_error($link),true); $buf=array(); while ($row=mysqli_fetch_assoc($res)) { if ($row['Seen']==0) { $notifclass='notifunseen'; $newunread=true; } else { $notifclass='notifseen'; } $buf[]='
'. gmdate('d/m/Y H:i:s', round($row['Microtime'])).': '.$row['Notification'].'
'; if ($row['Microtime']+0>$newlmt) $newlmt=$row['Microtime']; } $buf=array('newlmt'=>$newlmt,'newunread'=>$newunread,'buf'=>$buf); echo(json_encode($buf)); } mysqli_close($link); exit(0); ?>