Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
    //$Id: button.php 754 2011-10-12 07:53:03Z tiefland $
4
 
5
    /**
6
     * @author Lars Tiefland <tiefland@weban.de>
7
     * @copyright 2009 Webagentur Niewerth
8
     * @package neu.pick2pay.nl
9
     * @version $Rev: 754 $
10
     * @license propietary
11
     * @filesource
12
     *
13
     */
14
 
15
    /**
16
     *
17
     * @author Lars Tiefland <tiefland@weban.de>
18
     * @copyright 2009 Webagentur Niewerth
19
     * @package neu.pick2pay.nl
20
     */
21
 
22
    function button( $Feld, $button_name )
23
    {
24
 
25
        global $user_rechte;
26
        $self = "tree.php";
27
 
28
        if ( isset( $user_rechte[modul_name][tool_name][$Feld] ) )
29
        {
30
            // init
31
            if ( !isset( $_SESSION[$self]["options"][$Feld] ) )
32
            {
33
                $_SESSION[$self]["options"][$Feld] = false;
34
            }
35
            if ( $_GET[$Feld] )
36
            {
37
                $_SESSION[$self]["options"][$Feld] = $_GET[$Feld];
38
            }
39
?><td><a href="javascript:switcher('<?php echo $Feld
40
?>','<?php if ( $_SESSION[$self]["options"][$Feld] )
41
            {
42
?>0<?php }
43
            else
44
            {
45
?>1<?php }
46
?>')"><img src="../images/Online-Shop/directory/bt_<?php echo $button_name
47
?><?php if ( $_SESSION[$self]["options"][$Feld] )
48
            {
49
?>_f2<?php }
50
?>.gif" border="0"></a></td><?php
51
        }
52
        else
53
        {
54
            $_SESSION[$self]["options"]["artikel_kein_preis1_anzeigen"] =
55
                "true";
56
        }
57
 
58
    }
59
 
60
    $Feld = array( "gesperrt_zeigen" => "x", "sortierfunktion" => "horu",
61
        "zubehoer_anzeigen_artikel" => "la", "artikel_kein_preis1_anzeigen" =>
62
        "l0", );
63
    foreach ( array_keys( $Feld ) as $Feld_value )
64
    {
65
        if ( !isset( $user_rechte[modul_name][tool_name][$Feld_value] ) )
66
        {
67
            unset( $Feld[$Feld_value] );
68
        }
69
    }
70
    if ( $Feld )
71
    {
72
        $text =
73
            '<div id="control" style="position:absolute;left:0px;top:0px;width:100%;height:27px;z-index:1;background-color:#CCCCCC;">
74
<table border="1" cellspacing="4" cellpadding="0" style="bordercolor:#CCCCCC" bgcolor="#CCCCCC">
75
  <tr>';
76
        foreach ( $Feld as $Feld_value )
77
        {
78
            $text .= button( $Feld_value, $Feld[$Feld_value] );
79
        }
80
        $text .= '</tr>
81
</table>
82
</div>
83
<br>
84
<br>';
85
    }
86
    echo $text;
87
?>