|
<?php
include_once('../admin.php');
include_once(PHPLENS_DIR.'/phplens.inc.php');
session_start();
//----------------------------------------
// The following lines are for formatting
// the page and not needed by phplens
$gTitle = "Simple Category Table Demo";
include_once('./header.php');
?>
<p>This is the simplest PHPLens code possible. This demo is set up in <b>less
than 2 minutes</b>. You just have to define where the data comes from using
the Grid Builder. See an animated <a href="../gridbuilder/" target="gb">Grid
Builder</a> demo.</p>
<p>To find out how easy it is to set up phpLens, check out our <b>dynamic editing</b>
features. If you click on the red <a href="/lens/ex/ex100.php?lens_e_ex100=nav"><img border=0 src="/php/phplens/img/editbtn.gif" width="14" height="13"></a>
icon you can configure and change colours dynamically. Here is an <a href="anim1.php">animated
tutorial</a> showing how it is done.</p>
<p>
<?php
//----------------------------------------------------
// setup lens and render it with persistent connection
$lens = &PHPLensConnect (
'ex100', // id to uniquely identify this phplens setup
"select * from categories",
'mysql', // database server type, eg. pgsql, odbc, mssql, oci8
$gEX_server, // eg. localhost or ODBC DSN
$gEX_userid,
$gEX_password,
$gEX_db); // optional, name of database to connect to
if ($lens) {
$lens->Render();
$lens->Close();
}
?>
</p>
<p>Once you are in the dynamic editor, you will find the parameters that you can
configure for displaying the data below the place where you configure the colors.
The most basic and primary thing you have to configure here is where the data
is coming from. E.g. You will find in the SQL field: "<i>select * from
categories</i>". Once you have configured that, you are all set to go.
If you are not familiar with SQL commands, click on <i>List Tables</i> just
below the SQL field. A list of tables will be displayed with corresponding SQL
commands. </p>
<p>(Note: For security reasons, we have disabled updating of the phpLens setting
for our demos on this site. However, these features are available in our free
downloads). </p>
<p>That's as simple as it gets. You can display data and pictures. PhpLens handles
the display for you. This includes how many records you want to display in one
page. This includes also the navigation from page to page. You can even search
the records by clicking on the binoculars <a href="/lens/ex/ex100.php?lens_ex100=filter"><img src=/php/phplens/img/filter.gif border="0"></a>
icon . All that set is set up for you by phpLens. </p>
<p>To configure different parts of phpLens, click on the red <img border=0 src="/php/phplens/img/editbtn.gif" width="14" height="13">,
gray <img src="/php/phplens/img/editcol.gif" width="14" height="13">, and green
<img src="/php/phplens/img/edittab.gif" width="14" height="13"> icons.</p>
<p>To look at another demo that allows you to edit or update records, try <a href=ex300.php>example
300</a>. </p>
<p>
<h4>Notes</h4>
<p>Some categories do not have pictures currently. </p>
<p>Don't forget to setup the session variables by calling session_start() after
you include the <i>phplens.inc.php</i> file.</p>
<p>You can click on the <img src=/php/phplens/img/filter.gif> icon in the top-right
to perform a search.</p>
<p> </p>
<?php
include ('./footer.php');
?>
|
|