Source for file exampletables.php
Documentation is available at exampletables.php
<?php // $Id: exampletables.php,v 1.2 2006/03/15 14:34:45 pcool Exp $
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2004 Dokeos S.A.
Copyright (c) 2003 Ghent University (UGent)
Copyright (c) 2001 Universite catholique de Louvain (UCL)
Copyright (c) Vrije Universiteit Brussel (VUB)
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
==============================================================================
==============================================================================
* This file is a code template;
* copy the code and paste it in a new file to begin your own work.
==============================================================================
==============================================================================
==============================================================================
// global settings initialisation
// also provides access to main api (inc/lib/main_api.lib.php)
include("../inc/global.inc.php");
-----------------------------------------------------------
-----------------------------------------------------------
//main_api.lib.php by default included
//also the display and database libraries are loaded by default
-----------------------------------------------------------
-----------------------------------------------------------
$nameTools = "Table examples (for developers)"; // title of the page (should come from the language file)
-----------------------------------------------------------
-----------------------------------------------------------
==============================================================================
==============================================================================
==============================================================================
==============================================================================
$column_header[$row++ ] = "Column 1";
$column_header[$row++ ] = "Column 2";
$column_header[$row++ ] = "Column 3";
An important parameter for display_complex_table_header
is $properties, an array with elements, all of which have defaults
"width" - the table width, e.g. "85%"
"class" - the class to use for the table, e.g. "class=\"data_table\""
by default class is "class=\"data_table\""
"cellpadding" - the extra border in each cell, e.g. "8"
-----------------------------------------------------------
-----------------------------------------------------------
$table_row[$row++ ] = "First";
$table_row[$row++ ] = "Second";
$table_row[$row++ ] = "Third";
-----------------------------------------------------------
Table that alternates row colours
-----------------------------------------------------------
$properties["class"] = ""; //no hilite
$table_row[$row++ ] = "First";
$table_row[$row++ ] = "Second";
$table_row[$row++ ] = "Third";
==============================================================================
==============================================================================
|