$host, "user"=>$userConnection, "pass"=>$passwordConnection, "dbname"=>$dataBase, "devel"=>1) ); include("Pagination.php"); $page = 1; // how many records per page $size = 9; // we get the current page from $_GET if (isset($_GET['page']) && !empty($_GET['page'])){ $page = (int) $_GET['page']; }else{ header("Location:index.html"); } // create the pagination class $pagination = new Pagination(); $pagination->setLink("RamadanSMS1.php?page=%s"); $pagination->setPage($page); $pagination->setSize($size); $products = $sql->execute_query(array( "op" => "sql", "sql" => "select id,`content` FROM `sms` WHERE view='1' " ) ); $numFetchData = $sql->num_rows($products); $pagination->setTotalRecords($numFetchData); $sql->execute_query(array( "op" => "sql", "sql" => "select id,`content` FROM `sms` WHERE view='1' ".$pagination->getLimitSql() ) ); ?>
|
|||||||||||||||||||||||||||||||||||||