openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

Insert.class.php (644B)


      1 <?php
      2 
      3 namespace template_engine\components;
      4 
      5 class InsertComponent extends Component
      6 {
      7 	public $name= '';
      8 	public $url;
      9 	public $function;
     10 	
     11 	public function begin()
     12 	{
     13 		if	( !empty($this->function))
     14 		{
     15 			// JS-Function einbinden
     16 			echo '<script type="text/javascript" name="JavaScript">'.$this->htmlvalue($this->function).'();</script>';
     17 		}
     18 		elseif	( !empty($this->url))
     19 		{
     20 			// IFrame
     21 			echo '<iframe';
     22 			if	( !empty($this->name))
     23 				echo ' name="'.$this->htmlvalue($this->name).'"';
     24 			if	( !empty($this->url))
     25 				echo ' src="'.$this->htmlvalue($this->url).'"';
     26 			echo '></iframe>';
     27 		}
     28 	}
     29 	
     30 	public function end()
     31 	{
     32 	}
     33 }
     34 
     35 
     36 ?>