Subversion-Projekte lars-tiefland.shop_ns

Revision

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

Revision 20 Revision 22
Zeile 19... Zeile 19...
19
        public $name;
19
        public $name;
20
        public $description;
20
        public $description;
21
        public $link;
21
        public $link;
22
        public $artikelstamm;
22
        public $artikelstamm;
23
        public $bilder;
23
        public $bilder;
-
 
24
        public $father;
Zeile 24... Zeile 25...
24
 
25
 
25
        public function __construct( $id = null )
26
        public function __construct( $id = null )
26
        {
27
        {
27
            $sql = "SELECT
28
            $sql = "SELECT
28
                    id,
29
                    id,
-
 
30
                    name,
29
                    name,
31
                    father,
30
                    beschreibung AS description,
32
                    beschreibung AS description,
31
		    artikelstamm
33
                    artikelstamm
32
                FROM
34
                FROM
33
                    directory
35
                    directory
34
                WHERE
36
                WHERE
35
                    id = $id                    
37
                    id = $id                    
Zeile 39... Zeile 41...
39
            $res = $GLOBALS["db"]->query( $sql );
41
            $res = $GLOBALS["db"]->query( $sql );
40
            $row = $res->fetchRow();
42
            $row = $res->fetchRow();
41
            $this->id = $row["id"];
43
            $this->id = $row["id"];
42
            $this->name = $row["name"];
44
            $this->name = $row["name"];
43
            $this->description = $row["description"];
45
            $this->description = $row["description"];
-
 
46
            $this->father = $row["father"];
-
 
47
            if ( $GLOBALS["INI"]["alias"] == 0 )
-
 
48
            {
44
            $this->link = "/index.php?navigation=" . $this->id;
49
                $this->link = "/index.php?navigation=" . $this->id;
-
 
50
            }
-
 
51
            else
-
 
52
            {
-
 
53
                $path = getPath( $this->father );
-
 
54
                foreach ( $path as $dir )
-
 
55
                {
-
 
56
                    $link[] = $dir->id . "-" . str2url( $dir->name );
-
 
57
                }
-
 
58
                $link[] = $this->id . "-" . Str2url( $this->name );
-
 
59
                $link = "/" . implode( "/", $link ) . "/";
-
 
60
                $this->link = $link;
-
 
61
            }
45
            $this->bilder = directory_bild::Liste( $this->id );
62
            $this->bilder = directory_bild::Liste( $this->id );
46
            $this->artikelstamm = $row["artikelstamm"];
63
            $this->artikelstamm = $row["artikelstamm"];
47
        }
64
        }
Zeile 48... Zeile 65...
48
 
65
 
49
        public static function Liste( $father, $order="kennung" )
66
        public static function Liste( $father, $order = "kennung" )
50
        {
67
        {
51
            $items = array();
68
            $items = array();
52
            $sql = "SELECT
69
            $sql = "SELECT
53
                    id
70
                    id