~vcs-imports/squirrelmail/trunk

« back to all changes in this revision

Viewing changes to templates/default/paginator.tpl

  • Committer: stekkel
  • Date: 2005-04-14 20:34:30 UTC
  • Revision ID: svn-v4:7612ce4b-ef26-0410-bec9-ea0150e637f0:trunk/squirrelmail:9275
Templates

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * paginator.tpl
 
5
 *
 
6
 * Copyright (c) 1999-2004 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
 */
 
14
 
 
15
 
 
16
include_once(SM_PATH.'templates/util_paginator.php');
 
17
 
 
18
static $bScriptAdded;
 
19
 
 
20
extract($t);
 
21
 
 
22
if ($javascript_on && $compact_paginator &&!isset($bScriptAdded)) {
 
23
    $bScriptAdded = true;
 
24
?>
 
25
 
 
26
<!-- start of compact paginator javascript -->
 
27
<script language="JavaScript">
 
28
    function SubmitOnSelect(select, URL)
 
29
    {
 
30
        URL += select.options[select.selectedIndex].value;
 
31
        window.location.href = URL;
 
32
    }
 
33
</script>
 
34
<!-- end of compact paginator javascript -->
 
35
 
 
36
<?php
 
37
}
 
38
 
 
39
    if (isset($compact_paginator) && $compact_paginator) {
 
40
        $sPaginator = get_compact_paginator_str($mailbox, $pageOffset, $iNumberOfMessages, $messagesPerPage, $showall, $javascript_on, $page_selector);
 
41
    } else {
 
42
        $sPaginator = get_paginator_str($mailbox, $pageOffset, $iNumberOfMessages, $messagesPerPage, $showall, $page_selector, $page_selector_max);
 
43
    }
 
44
    // display the paginator string.
 
45
    echo $sPaginator;
 
46