Subversion-Projekte lars-tiefland.shop_ns

Revision

Revision 22 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 22 Revision 46
Zeile 42... Zeile 42...
42
                AND
42
                AND
43
                    language='" . $GLOBALS["INI"]["language"] . "'
43
                    language='" . $GLOBALS["INI"]["language"] . "'
44
            ";
44
            ";
45
            $res = $GLOBALS["db"]->query( $sql );
45
            $res = $GLOBALS["db"]->query( $sql );
46
            $row = $res->fetchRow();
46
            $row = $res->fetchRow();
47
            $this->id = $row["id"];
47
            if ( $row["id"] )
48
            $this->name = $row["name"];
-
 
49
            $this->beschreibung = $row["beschreibung"];
-
 
50
            $this->father = $row["father"];
-
 
51
            $this->kennung = $row["kennung"];
-
 
52
            $this->ean = $row["ean"];
-
 
53
            if ( $GLOBALS["INI"]["alias"] == 0 )
-
 
54
            {
48
            {
55
                $this->link = "/index.php?item=" . $this->id;
49
                $this->id = $row["id"];
56
            }
50
                $this->name = $row["name"];
-
 
51
                $this->beschreibung = $row["beschreibung"];
57
            else
52
                $this->father = $row["father"];
58
            {
53
                $this->kennung = $row["kennung"];
59
                $path = getPath( $this->father );
54
                $this->ean = $row["ean"];
60
                foreach ( $path as $dir )
55
                if ( $GLOBALS["INI"]["alias"] == 0 )
61
                {
56
                {
62
                    $link[] = $dir->id . "-" . str2url( $dir->name );
57
                    $this->link = "/index.php?item=" . $this->id;
63
                }
58
                }
-
 
59
                else
-
 
60
                {
-
 
61
                    $path = getPath( $this->father );
-
 
62
                    foreach ( $path as $dir )
-
 
63
                    {
-
 
64
                        $link[] = $dir->id . "-" . str2url( $dir->name );
-
 
65
                    }
64
                $link[] = $this->id . "-" . str2url( $this->name ) . ".html";
66
                    $link[] = $this->id . "-" . str2url( $this->name ) . ".html";
65
                $link = "/" . implode( "/", $link );
67
                    $link = "/" . implode( "/", $link );
66
                $this->link = $link;
68
                    $this->link = $link;
67
            }
69
                }
68
            $fd = new directory( $this->father );
70
                $fd = new directory( $this->father );
69
            $this->artikelstamm = $fd->artikelstamm;
71
                $this->artikelstamm = $fd->artikelstamm;
70
            $this->hersteller = new hersteller( $row["hersteller"] );
72
                $this->hersteller = new hersteller( $row["hersteller"] );
71
            $this->bilder = artikel_bild::Liste( $this->id );
73
                $this->bilder = artikel_bild::Liste( $this->id );
72
            $staffeln = preise::Liste( $this->id );
74
                $staffeln = preise::Liste( $this->id );
73
            foreach ( $staffeln as $p_index => $staffel )
75
                foreach ( $staffeln as $p_index => $staffel )
74
            {
76
                {
75
                $preis = $staffel["preis"][0];
77
                    $preis = $staffel["preis"][0];
76
                unset( $staffel["preis"][0] );
78
                    unset( $staffel["preis"][0] );
77
                unset( $staffel["menge"][0] );
79
                    unset( $staffel["menge"][0] );
78
                $this->preis[$p_index]["preis"] = $preis;
80
                    $this->preis[$p_index]["preis"] = $preis;
79
                $this->preis[$p_index]["staffel"] = $staffel;
81
                    $this->preis[$p_index]["staffel"] = $staffel;
80
            }
82
                }
81
            if ( count( $this->bilder ) > 1 )
83
                if ( count( $this->bilder ) > 1 )
82
            {
-
 
83
                $thumbs = "";
-
 
84
                foreach ( $this->bilder as $bild )
-
 
85
                {
84
                {
-
 
85
                    $thumbs = "";
86
                    if ( $bild["typ"] == "Bild" )
86
                    foreach ( $this->bilder as $bild )
87
                    {
87
                    {
-
 
88
                        if ( $bild["typ"] == "Bild" )
-
 
89
                        {
88
                        $thumbs .= "
90
                            $thumbs .= "
89
                            <li>
91
                            <li>
90
                                <a href=\"javascript:void(0);\" rel=\"{gallery: 'gal1', smallimage: '/images/Bild_" .
92
                                <a href=\"javascript:void(0);\" rel=\"{gallery: 'gal1', smallimage: '/images/Bild_" .
91
                            $bild["bild_index"] . "/kl/" . $bild["url"] .
93
                                $bild["bild_index"] . "/kl/" . $bild["url"] .
92
                            "', largeimage: '/images/Bild_" . $bild["bild_index"] .
94
                                "', largeimage: '/images/Bild_" . $bild["bild_index"] .
93
                            "/" . $bild["url"] . "'}\">
95
                                "/" . $bild["url"] . "'}\">
94
                                <img src=\"/images/Bild_" . $bild["bild_index"] .
96
                                <img src=\"/images/Bild_" . $bild["bild_index"] .
95
                            "/mini/" . $bild["url"] . "\" />
97
                                "/mini/" . $bild["url"] . "\" />
96
                                </a>
98
                                </a>
97
                            </li>
99
                            </li>
98
                        ";
100
                        ";
-
 
101
                        }
99
                    }
102
                    }
-
 
103
                    $this->thumbs = $thumbs;
100
                }
104
                }
101
                $this->thumbs = $thumbs;
105
                $this->instantConfirm = "/index.php?basket=true&item=$this->id&menge=1";
102
            }
106
            }
103
            $this->instantConfirm = "/index.php?basket=true&item=$this->id&menge=1";
-
 
104
        }
107
        }
Zeile 105... Zeile 108...
105
 
108
 
106
        public static function Liste( $father )
109
        public static function Liste( $father )
107
        {
110
        {