<?php
/**
 * Open Source - Content Managment System
 * Next Generation v2
 * @Coder:  Mutzii
 * @copyright  Copyright (c) 2012-2013 by Mutzii
 * File: changeTemplate.modul.php
 */


class changeTemplate extends Modul
{

   public function onEnable()
   {
        $LoginStatus = $this->getInstance()->LoginStatus();
	    switch($LoginStatus)
		 {  
		    case 1:
			   $this->getInstance()->setTemplateDir('templates/Admin/');
			   $username = $this->getInstance()->getLogin()->PrintUser();
			   $user_status = "Administrator ";
			break;
			
			case 2:
			   $this->getInstance()->setTemplateDir('templates/Mod/');
			   $username = $this->getInstance()->getLogin()->PrintUser();
			   $user_status = "Moderator";
			break;
		 
		 
		    case 3:
			   $this->getInstance()->setTemplateDir('templates/Member/');
			   $username = $this->getInstance()->getLogin()->PrintUser();
			   $user_status = "Member";
			break;			
		 
		    case 4:
			   $this->getInstance()->setTemplateDir('templates/Kunden/');
			   $username = $this->getInstance()->getLogin()->PrintUser();
			   $user_status = "Kunde";
			break;
		 	 
		    case 5:
			   $username    = "Gast";
			   $user_status = "Gast";
			break;
		 
		 
		 }
	   
   
      $array = array( 
	     "{username}" =>  $username,
		 "{status}" =>    $user_status
		 );
		 
	  $this->getPlaceHolder()->fill($array);
   }
   
   public function onDisable()
   {
      /* diese Methode wird ausgeführt, wenn das Modul Deaktiviert wird. */
   }
   

   
   
   

}




?>