index.php
<?php include ("db_config.php"); include ("includes/functions.php"); $template = new template (); $template-> add_file("header.tpl"); $template-> add_file("index.tpl"); $template-> add_file("footer.tpl"); @include ("language/polish/main.php"); "LANG_POWERED_INFO" => $lang['powered_info'], "LANG_WELCOME" => $lang['welcome'], "LANG_KEYPORTAL_VERSION" => $lang['keyportal_version'], "LANG_DOWNLOAD_KEYPORTAL" => $lang['download_keyportal'], )); ?>
language.php
<?php $lang['powered_info'] = 'Portal oparty o skrypt KeyPortal'; $lang['welcome'] = 'Witamy na stronie'; $lang['keyportal_version'] = 'v1.0.0'; $lang['download_keyportal'] = 'Pobierz KeyPortal'; ?>
functions.php
<?php class template { var $theme = 'Default'; var $template_content = ''; function __construct() {} function error ($message) { } function add_file ($template_file) { $template_path = "templates/$this->theme/$template_file"; { } else { error ("Szablon $template_file nie może zostać odnaleziony"); } } function set_template () { foreach ( $this->assigned_vars as $key => $value ) { } } function __destruct () { foreach ( $this->assigned_vars as $key => $value ) { } exit; } } ?>
I mam z tym taki problem, że gdy wchodzę na stronę nie wyświetla mi templatek zainicjowanych w pliku index.php. Co mam źle?