Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 26. august 2016
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Dokumentácia  »  HTML  »  Common options

3.3. Common options

Page name

The page name option defines the variable used for constructing page and form links. If not defined, the default value $PHP_SELF will be used.

Example 3-5. Setting up the page name

$opts['page_name'] = 'index.php';

Displayed records

This option controls the number of records displayed on the screen. Change the argument for $opts['inc'] in order to specify the maximum number of rows to display at one time. The default is 15 rows. To display all found records, specify a value of -1 (negative 1).

Example 3-6. Displayed records

$opts['inc'] = 20; // list 20 records per page

$opts['inc'] = -1; // list all found records

Multiple selections

This option affects the display of <SELECT MULTIPLE> boxes. If the MySQL column type is "set", the number of lines displayed on multiple selection filters is specified as:

Example 3-7. Multiple selections option

$opts['multiple'] = '4'; // default is 4

Setting $opts['multiple'] to a large number may adversely affect the appearance of your form. Four (4) is the default.

Special page elements

There are some special page elements, that may be turned on or off by changing $opts['display'] array.

Setting the query or sort values to true will display the current query or sort order near the top of the table. To display the execution time of the query below the table, change the time value from false to true. Setting sort to true is very helpful in understanding how cumulative sorting takes place. Setting num_pages or num_records to false will stop displaying corresponding values next to buttons. These values can be displayed also using $opts['buttons'] configuration array.

To display these three page elements use:

Example 3-8. Special page elements

$opts['display'] = array(
	'query' => true,
	'sort'  => true,
	'time'  => true
);

There is also one special $opts['display']['tabs'] variable, which generally controls the TABs feature. For more information see TABs feature section.

Another special variable is $opts['display']['form'], which controls displaying <FORM> and </FORM> HTML tags. If this variable is not defined, its value is considered as true. By default, form tags are displayed.

Images URL

If graphic links are selected with navigation (for example by setting $opts['navigation'] to 'GD') then $opts['url'] can be used to specify the folder containing images. The default image location is normally one folder (or directory level) below the location of the phpMyEdit.class.php file.

Example 3-9. Images URL

$opts['url'] = array('images' => 'images/'); 

Other URLs for another elements may be added into this array in future.

Code execution

Since version 4.0, phpMyEdit automatically starts its execution. You can turn this feature off by setting:

Example 3-10. Turning off default execution

$opts['execute'] = 0; 

If variable $opts['execute'] is not defined, its value is considered as 1.


Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov