[ Index ]
 

Code source de CMS made simple 1.0.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/classes/ -> class.stylesheet.inc.php (source)

   1  <?php
   2  #CMS - CMS Made Simple
   3  #(c)2004-6 by Ted Kulp (ted@cmsmadesimple.org)
   4  #This project's homepage is: http://cmsmadesimple.org
   5  #
   6  #This program is free software; you can redistribute it and/or modify
   7  #it under the terms of the GNU General Public License as published by
   8  #the Free Software Foundation; either version 2 of the License, or
   9  #(at your option) any later version.
  10  #
  11  #This program is distributed in the hope that it will be useful,
  12  #BUT withOUT ANY WARRANTY; without even the implied warranty of
  13  #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14  #GNU General Public License for more details.
  15  #You should have received a copy of the GNU General Public License
  16  #along with this program; if not, write to the Free Software
  17  #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18  #
  19  #$Id: class.stylesheet.inc.php 3365 2006-08-22 16:58:26Z wishy $
  20  
  21  /**
  22   * Generic stylesheet class. This can be used for any logged in stylesheet or stylesheet related function.
  23   *
  24   * @since        0.11
  25   * @package        CMS
  26   */
  27  class Stylesheet
  28  {
  29      var $id;
  30      var $name;
  31      var $value;
  32      var $media_type;
  33  
  34  	function Stylesheet()
  35      {
  36          $this->SetInitialValues();
  37      }
  38  
  39  	function SetInitialValues()
  40      {
  41          $this->id = -1;
  42          $this->name = '';
  43          $this->value = '';
  44          $this->media_type = '';
  45      }
  46      
  47      function Id()
  48      {
  49          return $this->id;
  50      }
  51  
  52  	function Name()
  53      {
  54          return $this->name;
  55      }
  56  
  57  	function Save()
  58      {
  59          $result = false;
  60          
  61          global $gCms;
  62          $styleops =& $gCms->GetStylesheetOperations();
  63          
  64          if ($this->id > -1)
  65          {
  66              $result = $styleops->UpdateStylesheet($this);
  67          }
  68          else
  69          {
  70              $newid = $styleops->InsertStylesheet($this);
  71              if ($newid > -1)
  72              {
  73                  $this->id = $newid;
  74                  $result = true;
  75              }
  76  
  77          }
  78  
  79          return $result;
  80      }
  81  
  82  	function Delete()
  83      {
  84          $result = false;
  85  
  86          if ($this->id > -1)
  87          {
  88              global $gCms;
  89              $styleops =& $gCms->GetStylesheetOperations();
  90              $result = $styleops->DeleteStylesheetByID($this->id);
  91              if ($result)
  92              {
  93                  $this->SetInitialValues();
  94              }
  95          }
  96  
  97          return $result;
  98      }
  99  }
 100  
 101  # vim:ts=4 sw=4 noet
 102  ?>


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7