PHP Classes

File: example2.php

Recommend this page to a friend!
  Classes of Anderson A. Meggiolaro   Paginator Iterator   example2.php   Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Example 2
Class: Paginator Iterator
Iterate over listings split in page using Smarty
Author: By
Last change:
Date: 16 years ago
Size: 398 bytes
 

 

Contents

Class file image Download
<?php

   
include('pi_lib/PaginatorIterator.php');
   
    include(
'models/MenuModel.php');
   
$db=new PDO('mysql:dbname=j15;host=127.0.0.1', 'root', '123456');
   
$menu=new MenuModel($db);
   
    include(
'Smarty-2.6.19/Smarty.class.php');
   
$smarty=new Smarty;
   
$smarty->plugins_dir[]="./plugins";
   
$smarty->assign('paginator', $menu->getItems($_GET['pageno']));
   
$smarty->display("example2.tpl");
?>