mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-02 12:49:27 +00:00
12c6c7207d
- Review Button setzt Content jetzt sichtbar - Überarbeitung CMS Handbuch
119 lines
3.0 KiB
PHP
Executable File
119 lines
3.0 KiB
PHP
Executable File
<?php
|
|
/* Copyright (C) 2011 FH Technikum-Wien
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
|
*/
|
|
/**
|
|
* Basisklasse fuer Menue Addons
|
|
*
|
|
* Diese Klasse dient als Basisklasse fuer alle Menue Addons des CMS Systems
|
|
*/
|
|
|
|
require_once(dirname(__FILE__).'/../../include/basis_db.class.php');
|
|
|
|
class menu_addon extends basis_db
|
|
{
|
|
/**
|
|
* Konfigurationsarray fuer die Linkliste
|
|
* $items[0] = array ('title'=>'title des links',
|
|
* 'link'=>'url des links',
|
|
* 'target'=>'target des links',
|
|
* 'name'=>'Anzeigename des Links');
|
|
*/
|
|
protected $items=array();
|
|
|
|
/**
|
|
* HTML Code fuer direkte Ausgabe
|
|
*/
|
|
protected $block;
|
|
|
|
/**
|
|
* Wenn true, wird der HauptLink im Menue angezeigt, sonst nicht
|
|
*/
|
|
protected $link=true;
|
|
|
|
/**
|
|
* Konfigurationsarray fuer den HauptLink
|
|
* array ('name'=>'name des links',
|
|
* 'link'=>'url des links',
|
|
* 'target'=>'target des links',
|
|
* 'content_id'=>'content_id des submenues das aufklappen soll');
|
|
*/
|
|
protected $linkitem = array();
|
|
|
|
/**
|
|
* Konstruktor
|
|
*/
|
|
public function __construct()
|
|
{
|
|
global $includeparams;
|
|
|
|
$content = $includeparams['content'];
|
|
|
|
$this->linkitem = array('name'=>$content->titel,
|
|
'link'=>'#open',
|
|
'target'=>'_self',
|
|
'content_id'=>$content->content_id);
|
|
}
|
|
|
|
/**
|
|
* Ausgabe der Daten
|
|
*/
|
|
public function output()
|
|
{
|
|
global $includeparams;
|
|
$content = $includeparams['content'];
|
|
|
|
if($this->link)
|
|
DrawLink($this->linkitem['link'],$this->linkitem['target'],$this->linkitem['name'],$this->linkitem['content_id']);
|
|
echo '
|
|
<table class="tabcontent" id="Content'.$content->content_id.'" style="display: '.($content->menu_open?'visible':'none').'"><tr><td>';
|
|
|
|
$this->outputBlock();
|
|
$this->outputItems();
|
|
|
|
echo '</td></tr></table>';
|
|
}
|
|
|
|
/**
|
|
* Gibt alle Items als Linkliste aus
|
|
*
|
|
*/
|
|
public function outputItems()
|
|
{
|
|
if(count($this->items)>0)
|
|
{
|
|
echo '<ul style="margin-top: 0px; margin-bottom: 0px;">';
|
|
foreach($this->items as $row)
|
|
{
|
|
echo '<li>
|
|
<a class="Item2" title="'.$row['title'].'" href="'.$row['link'].'" target="'.$row['target'].'">'.$row['name'].'</a>
|
|
</li>';
|
|
}
|
|
echo '</ul>';
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Gibt einen CodeBlock aus
|
|
*/
|
|
public function outputBlock()
|
|
{
|
|
echo $this->block;
|
|
}
|
|
}
|
|
?>
|