[Linpha-cvs] SF.net SVN: linpha: [4393] trunk/linpha2/lib
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-03-04 10:42:43
|
Revision: 4393 Author: fangehrn Date: 2006-03-04 02:42:36 -0800 (Sat, 04 Mar 2006) ViewCVS: http://svn.sourceforge.net/linpha/?rev=4393&view=rev Log Message: ----------- * working on basket Added Paths: ----------- trunk/linpha2/lib/classes/linpha.template_new.class.php trunk/linpha2/lib/modules/ Added: trunk/linpha2/lib/classes/linpha.template_new.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template_new.class.php (rev 0) +++ trunk/linpha2/lib/classes/linpha.template_new.class.php 2006-03-04 10:42:36 UTC (rev 4393) @@ -0,0 +1,65 @@ +<?php + +class linTemplate +{ + public $template_name; + + private $body_name; + private $head_name; + private $css_name; + + function __construct() + { + $this->template_name = 'main'; + } + + /** + * include the file requested, take care of css, its not included! + */ + function includeFile($what) + { + switch($what) + { + case 'body': + $filename = LINPHA_DIR.'/templates/'.$this->template_name.'_html/'.$this->body_name.'.html.php'; + break; + case 'head': + $filename = LINPHA_DIR.'/templates/'.$this->template_name.'_html/'.$this->head_name.'.head.php'; + break; + case 'css': + echo LINPHA_DIR.'/templates/'.$this->template_name.'_css/'.$this->css_name.'.css'; + break; + } + + if($what != 'css' && file_exists($filename)) + { + include_once( $filename ); + } + } + + function setModuleName($name) + { + $this->body_name = $name; + $this->head_name = $name; + $this->css_name = $name; + } + + function overrideModule($what,$name) + { + switch($what) + { + case 'body': + $this->body_name = $name; + break; + case 'head': + $this->head_name = $name; + break; + case 'css': + $this->css_name = $name; + break; + } + } + +} // end class linTemplate + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |