/legacy/code/include/classes/BASE/content.php
https://github.com/brettjamin/appleseed · PHP · 341 lines · 241 code · 53 blank · 47 comment · 0 complexity · cc0d31a11772cc14b9c7ae90f3930b67 MD5 · raw file
- <?php
- // +-------------------------------------------------------------------+
- // | Appleseed Web Community Management Software |
- // | http://appleseed.sourceforge.net |
- // +-------------------------------------------------------------------+
- // | FILE: content.php CREATED: 09-04-2006 +
- // | LOCATION: /code/include/classes/BASE/ MODIFIED: 09-05-2006 +
- // +-------------------------------------------------------------------+
- // | Copyright (c) 2004-2008 Appleseed Project |
- // +-------------------------------------------------------------------+
- // | This program is free software; you can redistribute it and/or |
- // | modify it under the terms of the GNU General Public License |
- // | as published by the Free Software Foundation; either version 2 |
- // | of the License, or (at your option) any later version. |
- // | |
- // | This program is distributed in the hope that it will be useful, |
- // | but WITHOUT ANY WARRANTY; without even the implied warranty of |
- // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
- // | GNU General Public License for more details. |
- // | |
- // | You should have received a copy of the GNU General Public License |
- // | along with this program; if not, write to: |
- // | |
- // | The Free Software Foundation, Inc. |
- // | 59 Temple Place - Suite 330, |
- // | Boston, MA 02111-1307, USA. |
- // | |
- // | http://www.gnu.org/copyleft/gpl.html |
- // +-------------------------------------------------------------------+
- // | AUTHORS: Michael Chisari <michael.chisari@gmail.com> |
- // +-------------------------------------------------------------------+
- // | Part of the Appleseed BASE API |
- // | VERSION: 0.7.7 |
- // | DESCRIPTION: Content class definitions. Reusable functions not |
- // | specifically tied to Appleseed. |
- // +-------------------------------------------------------------------+
- // Content pages class.
- class cCONTENTPAGES extends cBASEDATACLASS {
- var $tID, $Title, $Output, $Formatting, $Location, $Language;
- function cCONTENTPAGES ($pDEFAULTCONTEXT = '') {
- global $gTABLEPREFIX;
- $this->TableName = $gTABLEPREFIX . 'contentPages';
- $this->tID = '';
- $this->Title = '';
- $this->Output = '';
- $this->Location = '';
- $this->Formatting = 0;
- $this->Language = '';
- $this->PageContext = '';
- $this->Error = 0;
- $this->Message = '';
- $this->Result = '';
- $this->FieldNames = '';
- $this->PrimaryKey = 'tID';
-
- // Create extended field definitions
- $this->FieldDefinitions = array (
- 'tID' => array ('max' => '',
- 'min' => '',
- 'illegal' => '',
- 'required' => '',
- 'relation' => 'unique',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'INTEGER'),
- 'Title' => array ('max' => '64',
- 'min' => '3',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Output' => array ('max' => '65536',
- 'min' => '2',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Style' => array ('max' => '4096',
- 'min' => '2',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => '',
- 'sanitize' => NO,
- 'datatype' => 'STRING'),
- 'Location' => array ('max' => '64',
- 'min' => '2',
- 'illegal' => '/ * \ < > ( ) [ ] & ^ $ # @ ! ? ; \' " { } | ~ + =',
- 'required' => '',
- 'relation' => 'unique',
- 'null' => '',
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Template' => array ('max' => '32',
- 'min' => '4',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => NO,
- 'datatype' => 'STRING'),
- 'Formatting' => array ('max' => '',
- 'min' => '',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => '',
- 'sanitize' => NO,
- 'datatype' => 'INTEGER'),
- 'Language' => array ('max' => '2',
- 'min' => '0',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => NO,
- 'datatype' => 'STRING'),
- );
- // Assign context from paramater.
- $this->PageContext = $pDEFAULTCONTEXT;
- // Grab the fields from the database.
- $this->Fields();
-
- } // Constructor
- } // cCONTENTPAGES
- // Content articles class.
- class cCONTENTARTICLES extends cBASEDATACLASS {
- var $tID, $Title, $Output, $Formatting, $Language;
- var $Submitted_Username, $Submitted_Domain;
- var $Verification;
- function cCONTENTARTICLES ($pDEFAULTCONTEXT = '') {
- global $gTABLEPREFIX;
- $this->TableName = $gTABLEPREFIX . 'contentArticles';
- $this->tID = '';
- $this->Title = '';
- $this->Output = '';
- $this->Formatting = 0;
- $this->Language = '';
- $this->Submitted_Username = '';
- $this->Submitted_Domain = '';
- $this->Verification = '';
- $this->PageContext = '';
- $this->Error = 0;
- $this->Message = '';
- $this->Result = '';
- $this->FieldNames = '';
- $this->PrimaryKey = 'tID';
-
- // Create extended field definitions
- $this->FieldDefinitions = array (
- 'tID' => array ('max' => '',
- 'min' => '',
- 'illegal' => '',
- 'required' => '',
- 'relation' => 'unique',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'INTEGER'),
- 'Title' => array ('max' => '64',
- 'min' => '3',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Full' => array ('max' => '65536',
- 'min' => '2',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Submitted_Username' => array ('max' => '64',
- 'min' => '2',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => '',
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Submitted_Domain' => array ('max' => '64',
- 'min' => '2',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => '',
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Verification' => array ('max' => '32',
- 'min' => '4',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => NO,
- 'datatype' => 'STRING'),
- 'Formatting' => array ('max' => '',
- 'min' => '',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => '',
- 'sanitize' => NO,
- 'datatype' => 'INTEGER'),
- 'Language' => array ('max' => '2',
- 'min' => '0',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => NO,
- 'datatype' => 'STRING'),
- );
- // Assign context from paramater.
- $this->PageContext = $pDEFAULTCONTEXT;
- // Grab the fields from the database.
- $this->Fields();
-
- } // Constructor
- } // cCONTENTARTICLES
- // Content nodes class.
- class cBASECONTENTNODES extends cBASEDATACLASS {
- var $tID, $Domain, $Summary, $Stamp, $Users;
- function cBASECONTENTNODES ($pDEFAULTCONTEXT = '') {
- global $gTABLEPREFIX;
- $this->TableName = $gTABLEPREFIX . 'contentNodes';
- $this->tID = '';
- $this->Summary = '';
- $this->Domain = '';
- $this->Stamp = '';
- $this->Users = 0;
- $this->PageContext = '';
- $this->Error = 0;
- $this->Message = '';
- $this->Result = '';
- $this->FieldNames = '';
- $this->PrimaryKey = 'tID';
-
- // Create extended field definitions
- $this->FieldDefinitions = array (
- 'tID' => array ('max' => '',
- 'min' => '',
- 'illegal' => '',
- 'required' => '',
- 'relation' => 'unique',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'INTEGER'),
- 'Domain' => array ('max' => '128',
- 'min' => '0',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Summary' => array ('max' => '128',
- 'min' => '0',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => YES,
- 'datatype' => 'STRING'),
- 'Stamp' => array ('max' => '',
- 'min' => '',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => NO,
- 'datatype' => 'DATETIME'),
- 'Users' => array ('max' => '',
- 'min' => '',
- 'illegal' => '',
- 'required' => '',
- 'relation' => '',
- 'null' => NO,
- 'sanitize' => NO,
- 'datatype' => 'INTEGER'),
- );
- // Assign context from paramater.
- $this->PageContext = $pDEFAULTCONTEXT;
- // Grab the fields from the database.
- $this->Fields();
-
- } // Constructor
- } // cBASECONTENTNODES