Source for file CMS_PAGE_PRGPROLIST.phpclass

Documentation is available at CMS_PAGE_PRGPROLIST.phpclass

  1. <?php
  2. /**
  3.   * openCSP class file CMS_PAGE_PRODUCTLIST.phpclass
  4.   *
  5.   * @project Open CSP-Management
  6.   * @package default
  7.   *
  8.   * @author Peter Krebs <pitlinz@users.sourceforge.net>
  9.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10.   *
  11.   * @since pk-25.07.2008
  12.   * @version $Id: CMS_PAGE_PRGPROLIST.phpclass,v 1.1 2008/07/25 14:59:49 pitlinz Exp $
  13.   */
  14.  
  15.     // ---------------------------------------------------------
  16.     // requirements
  17.     // ---------------------------------------------------------
  18.  
  19.     pcf_require_class('CMS_PAGE',dirname(__FILE__"/");
  20.  
  21. /**
  22.   * openCSP class CMS_PAGE_PRODUCTLIST
  23.   *
  24.   * @project Open CSP-Management
  25.   * @package default
  26.   *
  27.   * @author Peter Krebs <pitlinz@users.sourceforge.net>
  28.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  29.   *
  30.   * @since pk-25.07.2008
  31.   * @version $Id: CMS_PAGE_PRGPROLIST.phpclass,v 1.1 2008/07/25 14:59:49 pitlinz Exp $
  32.   */
  33. {
  34.     // ---------------------------------------------------------------------------
  35.     // constants
  36.     // ---------------------------------------------------------------------------
  37.     
  38.     /**
  39.      * @constant string CLASS_SRC_FILE
  40.      */
  41.     const CLASS_SRC_FILE = __FILE__;
  42.  
  43.     // ---------------------------------------------------------------------------
  44.     // class (static)
  45.     // ---------------------------------------------------------------------------
  46.     
  47.     /*** class vars ------------------------------------------------------ */
  48.     
  49.     /*** class methods --------------------------------------------------- */
  50.     
  51.     // ---------------------------------------------------------------------------
  52.     // object vars
  53.     // ---------------------------------------------------------------------------
  54.     
  55.     /*** compostion --------------------------------------------------- */
  56.     
  57.     /*** attributes  -------------------------------------------------- */
  58.     
  59.     // ---------------------------------------------------------------------------
  60.     // factory / construct
  61.     // ---------------------------------------------------------------------------
  62.     
  63.     // ---------------------------------------------------------------------------
  64.     // getter / setter
  65.     // ---------------------------------------------------------------------------    
  66.  
  67.     /**
  68.       * returns a array of variables used by the page object
  69.       *
  70.       * array[varName]=array(
  71.       *     [TYPE]          datatype
  72.       *     [FLDCLASS]      name of DBMS_FIELD* class
  73.       *     [CLASSVALS]     array of values of [FLDCLASS]
  74.       *
  75.       * @return array 
  76.       *
  77.       */
  78.     protected function getObjVarDef(
  79.     {
  80.         $arr_ret=parent::getObjVarDef();
  81.  
  82.  
  83.          return $arr_ret;
  84.              
  85.     }
  86.     
  87.     
  88.     // ---------------------------------------------------------------------------
  89.     // rendering
  90.     // ---------------------------------------------------------------------------    
  91.     
  92.     /**
  93.      * renders the product list
  94.      *
  95.      * @param boolean $debug 
  96.      * 
  97.      * @return string (html)
  98.      */
  99.     protected function renderProductList($debug=False)
  100.     {
  101.         
  102.     }
  103.     
  104.     /**
  105.       * returns the content of the page
  106.       *
  107.       * @param int $chaShowMode 
  108.       * @param boolean $debug 
  109.       *
  110.       * @return string 
  111.       */
  112.     public function getContent($chaShowMode=0,$debug=False
  113.     {           
  114.         if ($debugechoDebugMethod(__FILE__,get_class($this),"CMS_PHPINC_PAGE::getContent($chaShowMode)","<pre>" print_r($this->getDBVal(),True"</pre>");
  115.  
  116.         if (($chaShowMode == 0))
  117.         {
  118.             if ($this->getContentCalled)
  119.             {
  120.                 throw new Exception('content called twice');
  121.             else {
  122.                 $this->getContentCalled True;
  123.             }
  124.         }        
  125.         
  126.         // <pk-07-10-15>
  127.         if (!empty($this->GLOBAL_VALUES)) {
  128.             if ($debugechoDebugLine(__FILE__,__LINE__,"<pre>--".$this->GLOBAL_VALUES."--</pre>");
  129.             if ($keyVals=explode("\n",$this->GLOBAL_VALUES."\n")) {
  130.                 foreach($keyVals as $kv{
  131.                     if (strstr($kv,'=')) {
  132.                         if ($debugechoDebugLine(__FILE__,__LINE__,"<pre>KV: ".$kv."</pre>");
  133.                         list($k,$v)=explode("=",$kv,2);
  134.                         if ($debugechoDebugLine(__FILE__,__LINE__,"<pre>Setting PAGVAR[".$k."] to ".$v."</pre>");
  135.                         $this->PAGVAR[$k]=$v;
  136.                     }
  137.                 }
  138.             }
  139.         }
  140.         // </pk-07-10-15 />        
  141.         
  142.         if (($chaShowMode != CHAPTER_SHOWMODE_PROGRAMM&& ($chaShowMode != 0))
  143.         {
  144.             return parent::getContent($chaShowMode,$debug);
  145.         else if(empty($this->PROGRAMM_INC)) {
  146.             return parent::getContent($chaShowMode,$debug);            
  147.         else {
  148.  
  149.             
  150.             $str_ret="";
  151.             if ($chaShowMode != CHAPTER_SHOWMODE_PROGRAMM)
  152.             {
  153.                 $str_ret .= $this->getContent(CHAPTER_SHOWMODE_ALLWAYS_TOP,$debug)
  154.             }
  155.             
  156.             ob_start();
  157.                if (file_exists(__OCSP_PROJECTPATH__.$this->includeRoot.$this->PROGRAMM_INC)) 
  158.                {                  
  159.                    if ($debugechoDebugLine(__FILE__,__LINE__,"<p>Programm Include: ".$this->PROGRAMM_INC."</p>");
  160.                 include __OCSP_PROJECTPATH__.$this->includeRoot.$this->PROGRAMM_INC;
  161.             else if (file_exists(__OCSP_PROJECTPATH__.$this->PROGRAMM_INC)) {
  162.                 if ($debugechoDebugLine(__FILE__,__LINE__,"<p>Programm Include: ".$this->PROGRAMM_INC."</p>");
  163.                 include __OCSP_PROJECTPATH__.$this->PROGRAMM_INC;
  164.             else {
  165.                 if ($debugecho "<p>Programm Include: <b>not found</b></b>";
  166.             }  
  167.             $this->pageIncludeOutput.=ob_get_contents();
  168.             ob_end_clean();                      
  169.             $str_ret.=$this->pageIncludeOutput;
  170.             
  171.             if ($chaShowMode != CHAPTER_SHOWMODE_PROGRAMM)
  172.             {
  173.                 $str_ret.=$this->getContent(CHAPTER_SHOWMODE_ALLWAYS_BOTTOM)
  174.             }            
  175.             
  176.             return $str_ret;            
  177.         }
  178.     }    
  179.     
  180. }
  181.  
  182. ?>

Documentation generated on Thu, 08 Jan 2009 17:39:36 +0100 by phpDocumentor 1.4.0a2