Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
    /**
4
     * @package   Content-management
5
     * @author    Lars Tiefland <tiefland@weban.de>
6
     * @copyright 2009 Webagentur Niewerth
7
     * @license   propietary http://www.weban.de
8
     * @version   $Rev: 3933 $
9
     * @filesource
10
     *
11
     */
12
 
13
    /**
14
     *
15
     * neue Version der Bestellungsübersicht
16
     *
17
     * @package   Content-management
18
     * @author    Lars Tiefland <tiefland@weban.de>
19
     * @copyright 2009 Webagentur Niewerth
20
     */
21
 
22
    // SVN: $Id: pagination.php 3933 2011-09-16 08:31:26Z tiefland $
23
 
24
    require_once  "libs/SmartyPaginate.class.php";
25
 
26
    function pagination( $count )
27
    {
28
        SmartyPaginate::setTotal( $count );
29
        //SmartyPaginate::setPrevText( "<img src='/images/webelemente/pfeil_links1.jpg' alt='zur&uuml;ck' title='zur&uuml;ck'>" );
30
        //SmartyPaginate::setNextText( "<img src='/images/webelemente/pfeil_rechts1.jpg' alt='weiter' title='weiter'>" );
31
        //SmartyPaginate::setLastText( "<img src='/images/webelemente/pfeil_rechts2.jpg' alt='letzte Seite' title='letzte Seite'>" );
32
        //SmartyPaginate::setFirstText( "<img src='/images/webelemente/pfeil_links2.jpg' alt='erste Seite' title='erste Seite'>" );
33
        SmartyPaginate::setPrevText( "&#171; zur&uuml;ck" );
34
        SmartyPaginate::setNextText( "weiter &#187;" );
35
        SmartyPaginate::setLastText( "letzte Seite &#187;&#187;" );
36
        SmartyPaginate::setFirstText( "&#171;&#171; erste Seite" );
37
        SmartyPaginate::assign( $GLOBALS["ui"] );
38
        $paginate = $GLOBALS["ui"]->fetch( "common/pagination.tpl" );
39
        return array( "paginate" => $paginate );
40
    }
41
 
42
    if ( !$_GET["start"] )
43
    {
44
        SmartyPaginate::reset();
45
    }
46
    $extra = "";
47
    SmartyPaginate::setURLVar( 'start' );
48
    SmartyPaginate::setLimit( Range );
49
    $qs = $_SERVER["QUERY_STRING"];
50
    $pos = strpos( $qs, "&start=" );
51
    if ( $pos !== false )
52
    {
53
        $qs = substr( $qs, 0, $pos );
54
    }
55
    else
56
    {
57
        $pos = strpos( $qs, "start=" );
58
        if ( $pos !== false )
59
        {
60
            $qs = substr( $qs, 0, $pos );
61
        }
62
    }
63
    if ( $qs )
64
    {
65
        $extra = "?" . $qs;
66
    }
67
    SmartyPaginate::setURL( $_SERVER['PHP_SELF'] . $extra );
68
    SmartyPaginate::connect();
69
?>