version 1.1, 2007/11/02 20:55:00
|
version 1.1.1.1.2.1, 2007/11/13 07:36:19
|
Line 24
|
Line 24
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# SUCH DAMAGE. |
# SUCH DAMAGE. |
# |
# |
|
# $Paefchen$ |
# $MCom: portstools/tinderbox/webui/module/module.php,v 1.4 2005/12/26 22:41:41 marcus Exp $ |
# $MCom: portstools/tinderbox/webui/module/module.php,v 1.4 2005/12/26 22:41:41 marcus Exp $ |
# |
# |
|
|
require_once 'core/functions.php'; |
|
require_once 'core/TinderboxDS.php'; |
|
|
|
class module { |
class module { |
|
public $TinderboxDS = null; |
|
|
function module() { | public function __construct() { |
$this->TinderboxDS = new TinderboxDS(); | $this->TinderboxDS = new TinderboxDS; |
} |
} |
|
|
function template_parse( $template ) { | public function template_parse( $template ) { |
global $templatesdir; |
global $templatesdir; |
global $templatesuri; |
global $templatesuri; |
global $tinderbox_name; |
global $tinderbox_name; |
Line 51 class module {
|
Line 50 class module {
|
|
|
foreach( $this->TEMPLATE_VARS as $varname => $varcontent ) { |
foreach( $this->TEMPLATE_VARS as $varname => $varcontent ) { |
$varcontent = var_export( $varcontent, true ); |
$varcontent = var_export( $varcontent, true ); |
eval( '$'.$varname.' = '.$varcontent.';' ); | $$varname = $varcontent; |
} |
} |
ob_start(); |
ob_start(); |
require $templatesdir.'/'.$template; |
require $templatesdir.'/'.$template; |
Line 63 class module {
|
Line 62 class module {
|
return $parsed; |
return $parsed; |
} |
} |
|
|
function template_assign( $varname, $varcontent ) { | public function template_assign( $varname, $varcontent ) { |
$this->TEMPLATE_VARS[$varname] = $varcontent; |
$this->TEMPLATE_VARS[$varname] = $varcontent; |
} |
} |
|
|
function template_cleanup() { | public function template_cleanup() { |
return $this->TEMPLATE_VARS = array(); |
return $this->TEMPLATE_VARS = array(); |
} |
} |
} |
} |
|
|
?> |
?> |