This commit is contained in:
2018-02-13 16:58:54 +01:00
parent af97383e01
commit 1db31b9e56
6 changed files with 151 additions and 7 deletions

23
src/pvv/side/motd.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
namespace pvv\side;
use \PDO;
class MOTD{
private $pdo;
public function __construct($pdo){
$this->pdo = $pdo;
}
public function getMOTD(){
$query = 'SELECT * FROM motd LIMIT 1';
$statement = $this->pdo->prepare($query);
$statement->execute();
$data = $statement->fetch();
$motd = array("title" => $data[0], "content" => explode("\n", $data[1]));
return $motd;
}
}