5 * Template for rendering main option page blocks
7 * @copyright © 2006 The SquirrelMail Project Team
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @package squirrelmail
11 * @subpackage templates
15 * This function prints out an option page row.
16 * FIXME: remove function from template
18 function print_optionpages_row($leftopt, $rightopt = false) {
22 $rightopt_name = html_tag( 'td', '<a href="' . $rightopt['url'] . '">' . $rightopt['name'] . '</a>', 'left', $color[9], 'valign="top" width="49%"' );
23 $rightopt_desc = html_tag( 'td', $rightopt['desc'], 'left', $color[0], 'valign="top" width="49%"' );
25 $rightopt_name = html_tag( 'td', ' ', 'left', $color[4], 'valign="top" width="49%"' );
26 $rightopt_desc = html_tag( 'td', ' ', 'left', $color[4], 'valign="top" width="49%"' );
30 html_tag( 'table', "\n" .
31 html_tag( 'tr', "\n" .
32 html_tag( 'td', "\n" .
33 html_tag( 'table', "\n" .
34 html_tag( 'tr', "\n" .
36 '<a href="' . $leftopt['url'] . '">' . $leftopt['name'] . '</a>' ,
37 'left', $color[9], 'valign="top" width="49%"' ) .
40 'left', $color[4], 'valign="top" width="2%"' ) . "\n" .
43 html_tag( 'tr', "\n" .
46 'left', $color[0], 'valign="top" width="49%"' ) .
49 'left', $color[4], 'valign="top" width="2%"' ) . "\n" .
52 '', '', 'width="100%" cellpadding="2" cellspacing="0" border="0"' ) ,
53 'left', '', 'valign="top"' )
55 '', $color[4], 'width="100%" cellpadding="0" cellspacing="5" border="0"' );
58 /** extract variables */
62 * Display error notices and other messages
63 * Maybe formating should be moved from src/options.php
67 /********************************************/
68 /* Now, print out each option page section. */
69 /********************************************/
70 $first_optpage = false;
71 echo html_tag( 'table', '', '', $color[4], 'width="100%" cellpadding="0" cellspacing="5" border="0"' ) . "\n" .
72 html_tag( 'tr' ) . "\n" .
73 html_tag( 'td', '', 'left', '', 'valign="top"' ) .
74 html_tag( 'table', '', '', $color[4], 'width="100%" cellpadding="3" cellspacing="0" border="0"' ) . "\n" .
75 html_tag( 'tr' ) . "\n" .
76 html_tag( 'td', '', 'left' );
78 foreach ($optpage_blocks as $next_optpage) {
79 if ($first_optpage == false) {
80 $first_optpage = $next_optpage;
82 print_optionpages_row($first_optpage, $next_optpage);
83 $first_optpage = false;
87 if ($first_optpage != false) {
88 print_optionpages_row($first_optpage);
90 echo "</td></tr></table></td></tr></table>\n";