Adding more index.php files
[squirrelmail.git] / templates / default / paginator.tpl
1 <?php
2
3 /**
4 * paginator.tpl
5 *
6 * Copyright (c) 1999-2005 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Template and utility functions to create a paginator
10 *
11 * @version $Id$
12 * @package squirrelmail
13 * @subpackage templates
14 */
15
16 /** include functions */
17 include_once(SM_PATH.'templates/util_paginator.php');
18
19 static $bScriptAdded;
20
21 extract($t);
22
23 if ($javascript_on && $compact_paginator &&!isset($bScriptAdded)) {
24 $bScriptAdded = true;
25 ?>
26
27 <!-- start of compact paginator javascript -->
28 <script language="JavaScript">
29 function SubmitOnSelect(select, URL)
30 {
31 URL += select.options[select.selectedIndex].value;
32 window.location.href = URL;
33 }
34 </script>
35 <!-- end of compact paginator javascript -->
36
37 <?php
38 }
39
40 if (isset($compact_paginator) && $compact_paginator) {
41 $sPaginator = get_compact_paginator_str($mailbox, $pageOffset, $iNumberOfMessages, $messagesPerPage, $showall, $javascript_on, $page_selector);
42 } else {
43 $sPaginator = get_paginator_str($mailbox, $pageOffset, $iNumberOfMessages, $messagesPerPage, $showall, $page_selector, $page_selector_max);
44 }
45 // display the paginator string.
46 echo $sPaginator;
47 ?>