19 lines
373 B
PHP
19 lines
373 B
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
require "../templates/config.php";
|
|
?>
|
|
{
|
|
"schemaVersion": 1,
|
|
"label": "current mood",
|
|
"color": "lightgrey",
|
|
<?php
|
|
require "../creds.php";
|
|
|
|
$result = mysqli_query($mysqli, "SELECT Mood FROM articles ORDER BY ID DESC LIMIT 1");
|
|
|
|
while($res = mysqli_fetch_array($result)) {
|
|
echo ' "message": "'.$res['Mood'].'"',"\n";
|
|
}
|
|
?>
|
|
}
|