CoolFace
Apppublic

kenken999/php

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
notifications.php28 linesDownload Raw Back to public
1<?php2// return new notifications3 4@ini_set("display_errors","1");5//	don't read permissions from the database, use version saved in session6$gReadPermissions = false;7require_once( "include/dbcommon.php" );8require_once( getabspath( "classes/notifications.php" ) );9 10$lastId = postvalue_number("lastId");11$lastRead = postvalue_number("lastRead");12 13$noti = new RunnerNotifications( getNotificationSettings() );14if( !$noti->enabled ) {15	exit();16}17 18if( $lastRead ) {19	$noti->updateLastRead( $lastRead );20}21 22$messages = $noti->getUpdates( $lastId );23echo runner_json_encode( array(24	"messages" => $messages,25	"time" => now()26) );27exit();28?>