source: branches/rsr.v5.1/web/app/data/modules/contenus/dc_pages.php @ 1

Last change on this file since 1 was 1, checked in by dj3c1t, 12 years ago

import initial

File size: 1.4 KB
Line 
1<?php
2
3  class dc_pages extends data
4  {
5
6    function pages($start = 0, $public = null)
7    { return $this->contenus
8      ( array("root", "pages"),
9        $start,
10        null,
11        isset($public) ? " AND public=".($public ? "1" : "0") : "",
12        null,
13        true,
14        true
15      );
16    }
17
18    function page($id)
19    { if
20      ( ( $contenus = $this->contenus
21          ( array("root", "pages"),
22            0,
23            1,
24            " AND #--contenus.id=".$this->eq($id)
25          )
26        ) !== false
27      )
28      { $page = (($page = current($contenus["list"])) !== false ? $page : (isset($id) ? false : array()));
29        return $page;
30      }
31      return false;
32    }
33
34    function add_page($titre, $fichier, $contenu, $public, $user)
35    { if(($id_categorie = $this->id_categorie(array("root", "pages"))) !== false)
36      { if(isset($id_categorie))
37        { return $this->add_contenu($fichier, $id_categorie, $titre, "", $contenu, $user, "", $public);
38        }
39      }
40      return false;
41    }
42
43    function set_page($id, $titre, $fichier, $contenu, $public, $user)
44    { if(($id_categorie = $this->id_categorie(array("root", "pages"))) !== false)
45      { if(isset($id_categorie))
46        { return $this->set_contenu($id, $fichier, $id_categorie, $titre, "", $contenu, $user, "", $public);
47        }
48      }
49      return false;
50    }
51
52    function del_page($id)
53    { return $this->del_contenu($id);
54    }
55
56  }
57
58?>
Note: See TracBrowser for help on using the repository browser.