Just fiddling. Give credit where credit is due. Template class header() function...
[squirrelmail.git] / templates / default / paginator.tpl
CommitLineData
49db257d 1<?php
2
3/**
4 * paginator.tpl
5 *
0074f4e1 6 * Template to create a message list paginator
49db257d 7 *
8409c786 8 * The following variables are available in this template:
9//FIXME: need to clean (and document) this list, it is just a dump of the array keys of $t
10 * $sTemplateID
11 * $icon_theme_path
12 * $javascript_on
13 * $delayed_errors
14 * $frames
15 * $lang
16 * $page_title
17 * $header_tags
18 * $plugin_output
19 * $header_sent
20 * $body_tag_js
21 * $shortBoxName
22 * $sm_attribute_str
23 * $frame_top
24 * $urlMailbox
25 * $startMessage
26 * $hide_sm_attributions
27 * $uri
28 * $text
29 * $onclick
30 * $class
31 * $id
32 * $target
33 * $color
34 * $form_name
35 * $form_id
36 * $page_selector
37 * $page_selector_max
38 * $messagesPerPage
39 * $showall
40 * $end_msg
41 * $align
42 * $iNumberOfMessages
43 * $aOrder
44 * $aFormElements
45 * $sort
46 * $pageOffset
47 * $baseurl
48 * $aMessages
49 * $trash_folder
50 * $sent_folder
51 * $draft_folder
52 * $thread_link_str
53 * $php_self
54 * $mailbox
55 * $enablesort
56 * $icon_theme
57 * $use_icons
58 * $alt_index_colors
59 * $fancy_index_highlite
60 * $aSortSupported
61 * $show_label_columns
62 * $compact_paginator
63 * $aErrors
64 *
47ccfad4 65 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
4b4abf93 66 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
49db257d 67 * @version $Id$
68 * @package squirrelmail
57d06b39 69 * @subpackage templates
49db257d 70 */
71
57d06b39 72/** include functions */
8409c786 73include_once(SM_PATH . 'functions/template/paginator_util.php');
49db257d 74
75static $bScriptAdded;
76
77extract($t);
78
8409c786 79if ($javascript_on && $compact_paginator && !isset($bScriptAdded)) {
49db257d 80 $bScriptAdded = true;
81?>
82
83<!-- start of compact paginator javascript -->
2c92ea9d 84<script type="text/javascript">
49db257d 85 function SubmitOnSelect(select, URL)
86 {
87 URL += select.options[select.selectedIndex].value;
88 window.location.href = URL;
89 }
90</script>
91<!-- end of compact paginator javascript -->
92
93<?php
94}
95
96 if (isset($compact_paginator) && $compact_paginator) {
97 $sPaginator = get_compact_paginator_str($mailbox, $pageOffset, $iNumberOfMessages, $messagesPerPage, $showall, $javascript_on, $page_selector);
98 } else {
99 $sPaginator = get_paginator_str($mailbox, $pageOffset, $iNumberOfMessages, $messagesPerPage, $showall, $page_selector, $page_selector_max);
100 }
101 // display the paginator string.
102 echo $sPaginator;