function pagination($url = null) { $sql = "SELECT id, first_name, last_name, role, email, active, gender, profile_image,fb_id, created_on FROM user ORDER BY created_on DESC"; $table_page = PATH_ADMIN_VIEWS . "user/paginator/row.php"; $paginator = new \Paginator(); $paginator->execute($sql, $table_page, $url); }
function pagination($url = null) { $sql = "SELECT c.id AS id, comment, u.first_name AS commented_by, u.id AS user_id, commented_at, p.title AS post_title, c.active AS active \n FROM comment c \n LEFT JOIN user u ON c.commented_by = u.id\n LEFT JOIN post p ON c.post_id = p.id"; $table_page = PATH_ADMIN_VIEWS . "comment/paginator/row.php"; $paginator = new \Paginator(); $paginator->execute($sql, $table_page, $url); }
function pagination($url = null) { $sql = "SELECT id,`name`, `from`, `to`, cc, `subject`, content, `read`, sent_at FROM email"; $table_page = PATH_ADMIN_VIEWS . "email/paginator/row.php"; $paginator = new \Paginator(); $paginator->execute($sql, $table_page, $url); }
function pagination($url = null) { $sql = "SELECT p.id AS id, p.title AS title, c.type AS type , c.name AS category_name, NULL AS comments, \n p.posted_at AS posted_at, p.publish AS publish, u.first_name AS posted_by,\n img.thumb_small as thumb_small, img.original as original \n FROM post p \n LEFT JOIN post_category c ON p.post_category_id = c.id\n LEFT JOIN user u ON p.user_id = u.id\n LEFT JOIN image img ON img.id = p.banner_image"; if (!\SKS\LIB\Session::isSuperAdmin()) { $sql .= " WHERE u.id = " . \SKS\LIB\Session::getLoggedInUser()->getId(); } $table_page = PATH_ADMIN_VIEWS . "publish/paginator/row.php"; $paginator = new \Paginator(); $paginator->execute($sql, $table_page, $url); }
function pagination($url = null) { $sql = "SELECT i.id AS id, `name`, size, `from`,`date`, original, thumb_small, thumb_medium, thumb_big, u.id AS user_id, u.first_name AS uploaded_by, i.active as active " . " FROM image i LEFT JOIN user u ON u.id = i.user_id "; if (\SKS\LIB\Session::isAuthor()) { $sql .= " WHERE u.id = " . \SKS\LIB\Session::getLoggedInUser()->getId(); } $sql .= " ORDER BY date DESC "; $table_page = PATH_ADMIN_VIEWS . "gallery/paginator/row.php"; $paginator = new \Paginator(); $paginator->execute($sql, $table_page, $url); }