phpLens
 home  products examples manual  faq support forum  contact news  login store

More Examples:   View Source:   Advanced Filtering

Free Download

This uses a filter template to reformat the search form vertically. The phpLens search form is very flexible. Try the following:

- Search for all product id's greater than 30: >30
- All product id's between 10 to 30: 10 (to) 30
- All product names beginning with V: V

  (E)
(e)ProductID (e)ProductName (e)Supplier (e)Category (e)Qty/Unit
 
E Nxt End Excel
(e)ProductID (e)ProductName (e)Supplier (e)Category (e)Qty/Unit
1
LEOExotic LiquidsBeverages10 boxes x 20 bags
2
ChangieGrandma Kelly's HomeBeverages24 - 12 oz bottles
3
Producto, superExotic LiquidsCondiments12 - 550 ml bottles
4
Chef Anton's Cajun SeasoningNew Orleans Cajun DeCondiments48 - 6 oz jars
5
Chef Anton's Gumbo MixNew Orleans Cajun DeCondiments36 boxes
6
Grandma's Boysenberry SpreadGrandma Kelly's Home012 - 8 oz jars
7
Uncle Bob's Organic Dried PearsGrandma Kelly's HomeProduce12 - 1 lb pkgs.
8
Northwoods Cranberry SauceGrandma Kelly's HomeCondiments12 - 12 oz jars
9
Mishi Kobe NikuTokyo TradersMeat/Poultry18 - 500 g pkgs.
10
IkuraaTokyo TradersSeafood12 - 200 ml jars
11
Queso CabralesCooperativa de QuesoDairy Products1 kg pkg.
12
Queso Manchego La PastoraCooperativa de QuesoDairy Products10 - 500 g pkgs.
13
KonbuMayumi'sSeafood2 kg box
14
TofuMayumi'sProduce40 - 100 g pkgs.
15
Genen ShouyuMayumi'sCondiments24 - 250 ml bottles
16
PavlovaPavlova, Ltd.Confections32 - 500 g boxes
17
Alice MuttonsPavlova, Ltd.Meat/Poultry20 - 1 kg tins
18
Carnarvon TigersPavlova, Ltd.Seafood16 kg pkg.
19
Teatime Chocolate BiscuitsSpecialty Biscuits,Confections10 boxes x 12 pieces
20
Sir Rodney's MarmaladeSpecialty Biscuits,Confections30 gift boxes
21
Sir Rodney's SconesSpecialty Biscuits,Confections24 pkgs. x 4 pieces
22
Gustaf's KnäckebrödPB Knäckebröd ABGrains/Cereals24 - 500 g pkgs.
23
TunnbrödPB Knäckebröd ABGrains/Cereals12 - 250 g pkgs.
24
Guaraná FantásticaRefrescos AmericanasBeverages12 - 355 ml cans
25
NuNuCa Nuß-Nougat-CremeHeli Süßwaren GmbH &Confections20 - 450 g glasses
26
Gumbär GummibärchenHeli Süßwaren GmbH &Confections100 - 250 g bags
27
Schoggi SchokoladeHeli Süßwaren GmbH &Confections100 - 100 g pieces
28
Rössle SauerkrautPlutzer LebensmittelProduce25 - 825 g cans
29
Thüringer RostbratwurstPlutzer LebensmittelMeat/Poultry50 bags x 30 sausgs.
30
Nord-Ost MatjesheringNord-Ost-Fisch HandeSeafood10 - 200 g glasses
31
Gorgonzola TelinoFormaggi Fortini s.rDairy Products12 - 100 g pkgs
32
Mascarpone FabioliFormaggi Fortini s.rDairy Products24 - 200 g pkgs.
33
GeitostNorske MeierierDairy Products500 g
34
Sasquatch AleBigfoot BreweriesBeverages24 - 12 oz bottles
35
Steeleye StoutBigfoot BreweriesBeverages24 - 12 oz bottles
36
Inlagd SillSvensk Sjöföda ABSeafood24 - 250 g jars
37
Gravad laxSvensk Sjöföda ABSeafood12 - 500 g pkgs.
38
Côte de BlayeAux joyeux ecclésiasBeverages12 - 75 cl bottles
39
Chartreuse verteAux joyeux ecclésiasBeverages750 cc per bottle
40
Boston Crab MeatNew England SeafoodSeafood24 - 4 oz tins
41
Jack's New England Clam ChowderNew England SeafoodSeafood12 - 12 oz cans
42
Singaporean Hokkien Fried MeeLeka TradingGrains/Cereals32 - 1 kg pkgs.
43
Ipoh CoffeeLeka TradingBeverages16 - 500 g tins
44
Gula MalaccaLeka TradingCondiments20 - 2 kg bags
45
Røgede sildLyngbysildSeafood1k pkg.
46
SpegesildLyngbysildSeafood4 - 450 g glasses
47
Zaanse koekenZaanse SnoepfabriekConfections10 - 4 oz boxes
48
ChocoladeZaanse SnoepfabriekConfections10 pkgs.
49
MaxilakuKarkki OyConfections24 - 50 g pkgs.
50
Valkoinen suklaaKarkki OyConfections12 - 100 g bars
 
E Nxt End Excel

Notes

This example demonstrates using a template to change the search screen:
 $lens->templateFilter = 'ex311.tpl';

The contents of the template:

{$_FORMBEGIN_}
<table width="100%" border="1">
<tr bgcolor="#333333">
  <td colspan=5 align=right><font color="#FFFFFF">
{$_SUBMIT_}</font> {$_DYNEDIT_} &nbsp; </td>
</tr>
<tr bgcolor="#666666">
  <td><b><font color="#FFFFFF">{$PRODUCTID_T}</font></b></td>
  <td><b><font color="#FFFFFF">{$PRODUCTNAME_T} </font></b></td>
  <td><b><font color="#FFFFFF">{$SUPPLIERID_T}</font></b></td>
  <td><b><font color="#FFFFFF">{$CATEGORYID_T}</font></b></td>
  <td><b><font color="#FFFFFF">{$QUANTITYPERUNIT_T}</font></b></td>
</tr>
<tr>
  <td>{$PRODUCTID}</td>
  <td>{$PRODUCTNAME}</td>
  <td>{$SUPPLIERID}</td>
  <td>{$CATEGORYID}</td>
  <td>{$QUANTITYPERUNIT}
</td>
</tr>
</table>
{$_FORMEND_}

The template consists of the fields ,eg {$PRODUCTID}, and the captions {$PRODUCTID_T}. And we also have the buttons {$_SUBMIT_} and {$_CANCEL_}, though the cancel button has been removed. The {$_DYNEDIT_} tag holds the green "e" editor button. Finally we have the form management tags {$_FORMBEGIN_} and {$_FORMEND_}.

Other features include exporting to Excel [which requires the ob_start() call at the beginning of the page)] and setting the firstState to FILTERVIEW, so the search screen appears on startup.

$lens->exportLens = 'PRODUCTID;PRODUCTNAME;SUPPLIERID;CATEGORYID;QUANTITYPERUNIT';
$lens->firstState = 'FILTERVIEW';
email: contact#phplens.com (change # to @)     telephone (malaysia): 60-3-7947 2888     fax (malaysia): 60-3-7947 2800