Source for file Installer_Template.php
Documentation is available at Installer_Template.php 
 * @package linea21.externals  
 * @subpackage Class Installer  
 * @author Vadim V. Gabriel <vadimg88@gmail.com>  
 * @link http://www.vadimg.co.il/  
 * @license GNU Lesser General Public License  
/** load installer class **/  
require_once(INSTALLER_PATH .  '/Installer.php');  
 * Installer Template class  
   * @param string $template_name   
  public function render($template_name)  
    $path =  TMPL_PATH .  DIRECTORY_SEPARATOR .  $template_name .  '.phtml';  
    $this->html .=  $contents;  
   * Print the error screen with the error page  
   * @param string $error_string   
  public function error($error_string)  
    $template_name =  'error';  
    $path =  TMPL_PATH .  DIRECTORY_SEPARATOR .  $template_name .  '.phtml';  
    $contents =  str_replace("{#ERROR#}", $error_string, $contents);  
    $this->html .=  $contents;  
   * Print out the entire page  
    $template_name =  'layout';  
    $path =  TMPL_PATH .  DIRECTORY_SEPARATOR .  $template_name .  '.phtml';  
   * Replace vars with there values  
    foreach ($this->vars as $key =>  $value)  
      $contents =  preg_replace("/{#{$key}#}/i", $value, $contents);  
      foreach($this->lang as $key =>  $value)  
        $contents =  preg_replace("/{#{$key}#}/i", $value, $contents);  
    $links =  array(1 =>  'index', 2 =>  'db', 3 =>  'cfg', 4 =>  'finish');  
    foreach ($links as $key =>  $value)  
      if($_POST['step'] ==  $value)  
        $contents =  preg_replace("/{#LINK{$key}#}/i", "class='current'", $contents);  
        $contents =  preg_replace("/{#LINK{$key}#}/i", '', $contents);  
    # We will load a CSS just for RTL languages  
    if($this->lang['direction'] ==  'rtl')  
      $rtl_css =  '<link rel="stylesheet" type="text/css" href="installer/data/templates/rtl.css" />';  
      $contents =  str_replace("<!--RTL-->", $rtl_css, $contents);  
 
 
        
       |