mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
On passe au nouveau système de framework !
This commit is contained in:
parent
acdbb0a407
commit
000ee8f2f2
13 changed files with 408 additions and 432 deletions
|
@ -24,21 +24,22 @@
|
|||
|
||||
/**
|
||||
* Cette fonction retourne tous les SMS envoyés, sous forme d'un tableau
|
||||
* @param int $page : La page à consulter. Par défaut 0
|
||||
* @return void;
|
||||
*/
|
||||
public function showAll()
|
||||
public function showAll($page = 0)
|
||||
{
|
||||
//Creation de l'object de base de données
|
||||
global $db;
|
||||
|
||||
|
||||
$page = (int)(isset($_GET['page']) ? $_GET['page'] : 0);
|
||||
$page = (int)($page < 0 ? $page = 0 : $page);
|
||||
$limit = 25;
|
||||
$offset = $limit * $page;
|
||||
|
||||
|
||||
//Récupération des SMS envoyés triés par date, du plus récent au plus ancien, par paquets de $limit, en ignorant les $offset premiers
|
||||
$sendeds = $db->getAll('sendeds', 'at', true, $limit, $offset);
|
||||
$sendeds = $db->getFromTableWhere('sendeds', [], 'at', true, $limit, $offset);
|
||||
|
||||
$this->render('sendeds', array(
|
||||
'sendeds' => $sendeds,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue