reszta plikow watermelona
[watermeloncms.git] / cms / wtrmln / modules / models / model_pages.php
blob8ffdc22860b72f7d2533fba000530b990a3eb863
1 <?php
2 /********************************************************************
4 Watermelon CMS
6 Copyright 2008 Radosław Pietruszewski
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 ********************************************************************/
23 class Model_Pages extends Model
25 public function Model_Pages()
27 parent::Model();
31 * public DBresult GetData(string $pagename)
33 * zwraca dane page'a
36 public function GetData($pagename)
38 $pagename = mysql_real_escape_string($pagename);
40 return $this->db->query("SELECT `content`, `title` FROM `__pages` WHERE `name` = '$pagename'");