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: 3950 $
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 3950 2011-09-19 14:30:54Z tiefland $
23
 
24
    require_once  "libs/SmartyPaginate.class.php";
25
 
26
    function pagination( $count )
27
    {
28
        if ( !$_GET["start"] )
29
        {
30
            SmartyPaginate::reset();
31
        }
32
        SmartyPaginate::setURLVar( 'start' );
33
        SmartyPaginate::setLimit( 100 );
34
        $qs = $_SERVER["QUERY_STRING"];
35
        $pos = strpos( $qs, "&start=" );
36
        if ( $pos !== false )
37
        {
38
            $qs = substr( $qs, 0, $pos );
39
        }
40
        else
41
        {
42
            $pos = strpos( $qs, "start=" );
43
            if ( $pos !== false )
44
            {
45
                $qs = substr( $qs, 0, $pos );
46
            }
47
        }
48
        if ( $qs )
49
        {
50
            $extra = "?" . $qs;
51
        }
52
        SmartyPaginate::setURL( $_SERVER['PHP_SELF'] . $extra );
53
        SmartyPaginate::setTotal( $count );
54
        //SmartyPaginate::setPrevText( "<img src='/images/webelemente/pfeil_links1.jpg' alt='zur&uuml;ck' title='zur&uuml;ck'>" );
55
        //SmartyPaginate::setNextText( "<img src='/images/webelemente/pfeil_rechts1.jpg' alt='weiter' title='weiter'>" );
56
        //SmartyPaginate::setLastText( "<img src='/images/webelemente/pfeil_rechts2.jpg' alt='letzte Seite' title='letzte Seite'>" );
57
        //SmartyPaginate::setFirstText( "<img src='/images/webelemente/pfeil_links2.jpg' alt='erste Seite' title='erste Seite'>" );
58
        SmartyPaginate::setPrevText( "&#171; zur&uuml;ck" );
59
        SmartyPaginate::setNextText( "weiter &#187;" );
60
        SmartyPaginate::setLastText( "letzte Seite &#187;&#187;" );
61
        SmartyPaginate::setFirstText( "&#171;&#171; erste Seite" );
62
        SmartyPaginate::assign( $GLOBALS["ui"] );
63
        $paginate = $GLOBALS["ui"]->fetch( "pagination.tpl" );
64
        return array( "paginate" => $paginate );
65
    }
66
 
67
    if ( !array_key_exists( "start", $_GET ) || !$_GET["start"] )
68
    {
69
        SmartyPaginate::reset();
70
    }
71
    SmartyPaginate::setURLVar( 'start' );
72
    SmartyPaginate::setLimit( 100 );
73
    SmartyPaginate::connect();
74
?>