mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
- Anpassungen Menü Addons
- Review Button setzt Content jetzt sichtbar - Überarbeitung CMS Handbuch
This commit is contained in:
+152
-137
@@ -134,6 +134,7 @@ if(!is_null($method))
|
||||
switch($method)
|
||||
{
|
||||
case 'content_sperre':
|
||||
//Sperren und Freigeben von Content
|
||||
if(!isset($_GET['contentsprache_id']))
|
||||
die('Falsche Parameteruebergabe');
|
||||
|
||||
@@ -166,6 +167,7 @@ if(!is_null($method))
|
||||
}
|
||||
break;
|
||||
case 'add_new_content':
|
||||
//Anlegen von neuem Content
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'sui'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -214,6 +216,7 @@ if(!is_null($method))
|
||||
|
||||
break;
|
||||
case 'add_uebersetzung':
|
||||
//Anlegen von Uebersetzungen
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'sui'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -245,6 +248,7 @@ if(!is_null($method))
|
||||
|
||||
break;
|
||||
case 'add_newversion':
|
||||
//Neue Version anlegen
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'sui'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -277,6 +281,7 @@ if(!is_null($method))
|
||||
|
||||
break;
|
||||
case 'rights_add_group':
|
||||
//Gruppe fuer Berechtigung hinzufuegen
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'su'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -299,6 +304,7 @@ if(!is_null($method))
|
||||
|
||||
break;
|
||||
case 'rights_delete_group':
|
||||
//Gruppe fuer Berechtigung entfernen
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'su'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -316,6 +322,7 @@ if(!is_null($method))
|
||||
|
||||
break;
|
||||
case 'prefs_save':
|
||||
//Einstellungen speichern
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'su'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -355,160 +362,165 @@ if(!is_null($method))
|
||||
$message.='<span class="error">'.$content->errormsg.'</span>';
|
||||
break;
|
||||
case 'prefs_reviewed':
|
||||
$bf = new benutzerfunktion();
|
||||
if($bf->benutzerfunktion_exists($user, 'review'))
|
||||
{
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, $version);
|
||||
|
||||
$content->reviewamum = date('Y-m-d H:i:s');
|
||||
$content->reviewvon = $user;
|
||||
|
||||
if($content->saveContentSprache(false))
|
||||
$message.='<span class="ok">Erfolgreich reviewed</span>';
|
||||
else
|
||||
$message.='<span class="error">'.$content->errormsg.'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<span class="error">Sie dürfen kein Review durchführen</span>';
|
||||
}
|
||||
break;
|
||||
case 'prefs_requestreview':
|
||||
//Review und sichtbar schalten
|
||||
$bf = new benutzerfunktion();
|
||||
if($bf->benutzerfunktion_exists($user, 'review') || $rechte->isBerechtigt('basis/cms_review'))
|
||||
{
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, $version);
|
||||
|
||||
$content->reviewamum = date('Y-m-d H:i:s');
|
||||
$content->reviewvon = $user;
|
||||
$content->sichtbar = true;
|
||||
|
||||
if($content->saveContentSprache(false))
|
||||
$message.='<span class="ok">Erfolgreich reviewed</span>';
|
||||
else
|
||||
$message.='<span class="error">'.$content->errormsg.'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<span class="error">Sie dürfen kein Review durchführen</span>';
|
||||
}
|
||||
break;
|
||||
case 'prefs_requestreview':
|
||||
//Review beantragen
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, $version);
|
||||
|
||||
$oe = new organisationseinheit();
|
||||
$oe_arr = $oe->getParents($content->oe_kurzbz);
|
||||
|
||||
foreach($oe_arr as $organisationseinheit)
|
||||
{
|
||||
echo $organisationseinheit;
|
||||
$fkt = new benutzerfunktion();
|
||||
$fkt->getBenutzerFunktionen('review', $organisationseinheit);
|
||||
if(count($fkt->result)>0)
|
||||
break;
|
||||
}
|
||||
|
||||
if(count($fkt->result)==0)
|
||||
$fkt->getBenutzerFunktionen('review');
|
||||
$to='';
|
||||
foreach($fkt->result as $row)
|
||||
{
|
||||
if($to!='')
|
||||
$to.=',';
|
||||
$to .= $row->uid.'@'.DOMAIN;
|
||||
}
|
||||
$oe = new organisationseinheit();
|
||||
$oe_arr = $oe->getParents($content->oe_kurzbz);
|
||||
|
||||
foreach($oe_arr as $organisationseinheit)
|
||||
{
|
||||
echo $organisationseinheit;
|
||||
$fkt = new benutzerfunktion();
|
||||
$fkt->getBenutzerFunktionen('review', $organisationseinheit);
|
||||
if(count($fkt->result)>0)
|
||||
break;
|
||||
}
|
||||
|
||||
if(count($fkt->result)==0)
|
||||
$fkt->getBenutzerFunktionen('review');
|
||||
$to='';
|
||||
foreach($fkt->result as $row)
|
||||
{
|
||||
if($to!='')
|
||||
$to.=',';
|
||||
$to .= $row->uid.'@'.DOMAIN;
|
||||
}
|
||||
if($to!='')
|
||||
{
|
||||
$from = 'no-reply@'.DOMAIN;
|
||||
$subject = 'CMS Review Request';
|
||||
$text = "Dies ist eine automatisch generierte E-Mail.\n\n
|
||||
Es wurde ein Review für die Seite '$content->titel' ($sprache, Version $version) angefordert.\n
|
||||
\n
|
||||
(um den Link anzuzeigen müssen Sie in die HTML Ansicht wechseln)
|
||||
\n
|
||||
\n
|
||||
Mit freundlichen Grüßen\n
|
||||
\n
|
||||
FH Technikum Wien\n
|
||||
Hoechstaedtplatz 5, 1200 Wien, AUSTRIA";
|
||||
$texthtml = "Dies ist eine automatisch generierte E-Mail.<br><br>
|
||||
Es wurde ein Review für die Seite '$content->titel' ($sprache, Version $version) angefordert.<br>
|
||||
<br>
|
||||
<a href=\"".APP_ROOT."cms/admin.php?content_id=".$content->content_id."&sprache=$sprache&version=$version&action=content\">zum Artikel</a>
|
||||
<br>
|
||||
<br>
|
||||
Mit freundlichen Grüßen<br>
|
||||
<br>
|
||||
FH Technikum Wien<br>
|
||||
Hoechstaedtplatz 5, 1200 Wien, AUSTRIA
|
||||
";
|
||||
|
||||
$mail = new mail($to, $from, $subject, $text);
|
||||
$mail->setHTMLContent($texthtml);
|
||||
if($mail->send())
|
||||
{
|
||||
$from = 'no-reply@'.DOMAIN;
|
||||
$subject = 'CMS Review Request';
|
||||
$text = "Dies ist eine automatisch generierte E-Mail.\n\n
|
||||
Es wurde ein Review für die Seite '$content->titel' ($sprache, Version $version) angefordert.\n
|
||||
\n
|
||||
(um den Link anzuzeigen müssen Sie in die HTML Ansicht wechseln)
|
||||
\n
|
||||
\n
|
||||
Mit freundlichen Grüßen\n
|
||||
\n
|
||||
FH Technikum Wien\n
|
||||
Hoechstaedtplatz 5, 1200 Wien, AUSTRIA";
|
||||
$texthtml = "Dies ist eine automatisch generierte E-Mail.<br><br>
|
||||
Es wurde ein Review für die Seite '$content->titel' ($sprache, Version $version) angefordert.<br>
|
||||
<br>
|
||||
<a href=\"".APP_ROOT."cms/admin.php?content_id=".$content->content_id."&sprache=$sprache&version=$version&action=content\">zum Artikel</a>
|
||||
<br>
|
||||
<br>
|
||||
Mit freundlichen Grüßen<br>
|
||||
<br>
|
||||
FH Technikum Wien<br>
|
||||
Hoechstaedtplatz 5, 1200 Wien, AUSTRIA
|
||||
";
|
||||
|
||||
$mail = new mail($to, $from, $subject, $text);
|
||||
$mail->setHTMLContent($texthtml);
|
||||
if($mail->send())
|
||||
{
|
||||
$message.='<span class="ok">Review Anforderung wurde an '.$to.' versendet</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<span class="error">Fehler beim Senden des Mails an '.$to.'</span>';
|
||||
}
|
||||
$message.='<span class="ok">Review Anforderung wurde an '.$to.' versendet</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<span class="error">Es ist kein Review Team vorhanden</span>';
|
||||
$message.='<span class="error">Fehler beim Senden des Mails an '.$to.'</span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<span class="error">Es ist kein Review Team vorhanden</span>';
|
||||
}
|
||||
break;
|
||||
case 'prefs_requesttranslate':
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, $version);
|
||||
//Uebersetzer Informieren
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, $version);
|
||||
|
||||
$oe = new organisationseinheit();
|
||||
$oe_arr = $oe->getParents($content->oe_kurzbz);
|
||||
|
||||
foreach($oe_arr as $organisationseinheit)
|
||||
{
|
||||
echo $organisationseinheit;
|
||||
$fkt = new benutzerfunktion();
|
||||
$fkt->getBenutzerFunktionen('translate', $organisationseinheit);
|
||||
if(count($fkt->result)>0)
|
||||
break;
|
||||
}
|
||||
|
||||
if(count($fkt->result)==0)
|
||||
$fkt->getBenutzerFunktionen('translate');
|
||||
$to='';
|
||||
foreach($fkt->result as $row)
|
||||
{
|
||||
if($to!='')
|
||||
$to.=',';
|
||||
$to .= $row->uid.'@'.DOMAIN;
|
||||
}
|
||||
$oe = new organisationseinheit();
|
||||
$oe_arr = $oe->getParents($content->oe_kurzbz);
|
||||
|
||||
foreach($oe_arr as $organisationseinheit)
|
||||
{
|
||||
echo $organisationseinheit;
|
||||
$fkt = new benutzerfunktion();
|
||||
$fkt->getBenutzerFunktionen('translate', $organisationseinheit);
|
||||
if(count($fkt->result)>0)
|
||||
break;
|
||||
}
|
||||
|
||||
if(count($fkt->result)==0)
|
||||
$fkt->getBenutzerFunktionen('translate');
|
||||
$to='';
|
||||
foreach($fkt->result as $row)
|
||||
{
|
||||
if($to!='')
|
||||
$to.=',';
|
||||
$to .= $row->uid.'@'.DOMAIN;
|
||||
}
|
||||
if($to!='')
|
||||
{
|
||||
$from = 'no-reply@'.DOMAIN;
|
||||
$subject = 'CMS Review Request';
|
||||
$text = "Dies ist eine automatisch generierte E-Mail.\n\n
|
||||
Es wurde ein Artikel angelegt/bearbeitet. Dieser kann nun übersetzt werden: '$content->titel'.\n
|
||||
\n
|
||||
(um den Link anzuzeigen müssen Sie in die HTML Ansicht wechseln)
|
||||
\n
|
||||
\n
|
||||
Mit freundlichen Grüßen\n
|
||||
\n
|
||||
FH Technikum Wien\n
|
||||
Hoechstaedtplatz 5, 1200 Wien, AUSTRIA";
|
||||
$texthtml = "Dies ist eine automatisch generierte E-Mail.<br><br>
|
||||
Es wurde ein Artikel angelegt/bearbeitet. Dieser kann nun übersetzt werden: '$content->titel'<br>
|
||||
<br>
|
||||
<a href=\"".APP_ROOT."cms/admin.php?content_id=".$content->content_id."&sprache=$sprache&version=$version)&action=content\">zum Artikel</a>
|
||||
<br>
|
||||
<br>
|
||||
Mit freundlichen Grüßen<br>
|
||||
<br>
|
||||
FH Technikum Wien<br>
|
||||
Hoechstaedtplatz 5, 1200 Wien, AUSTRIA
|
||||
";
|
||||
|
||||
$mail = new mail($to, $from, $subject, $text);
|
||||
$mail->setHTMLContent($texthtml);
|
||||
if($mail->send())
|
||||
{
|
||||
$from = 'no-reply@'.DOMAIN;
|
||||
$subject = 'CMS Review Request';
|
||||
$text = "Dies ist eine automatisch generierte E-Mail.\n\n
|
||||
Es wurde ein Artikel angelegt/bearbeitet. Dieser kann nun übersetzt werden: '$content->titel'.\n
|
||||
\n
|
||||
(um den Link anzuzeigen müssen Sie in die HTML Ansicht wechseln)
|
||||
\n
|
||||
\n
|
||||
Mit freundlichen Grüßen\n
|
||||
\n
|
||||
FH Technikum Wien\n
|
||||
Hoechstaedtplatz 5, 1200 Wien, AUSTRIA";
|
||||
$texthtml = "Dies ist eine automatisch generierte E-Mail.<br><br>
|
||||
Es wurde ein Artikel angelegt/bearbeitet. Dieser kann nun übersetzt werden: '$content->titel'<br>
|
||||
<br>
|
||||
<a href=\"".APP_ROOT."cms/admin.php?content_id=".$content->content_id."&sprache=$sprache&version=$version)&action=content\">zum Artikel</a>
|
||||
<br>
|
||||
<br>
|
||||
Mit freundlichen Grüßen<br>
|
||||
<br>
|
||||
FH Technikum Wien<br>
|
||||
Hoechstaedtplatz 5, 1200 Wien, AUSTRIA
|
||||
";
|
||||
|
||||
$mail = new mail($to, $from, $subject, $text);
|
||||
$mail->setHTMLContent($texthtml);
|
||||
if($mail->send())
|
||||
{
|
||||
$message.='<span class="ok">Übersetzungsanforderung wurde an '.$to.' versendet</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<span class="error">Fehler beim Senden des Mails an '.$to.'</span>';
|
||||
}
|
||||
$message.='<span class="ok">Übersetzungsanforderung wurde an '.$to.' versendet</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<span class="error">Es ist kein Übersetzer eingetragen</span>';
|
||||
$message.='<span class="error">Fehler beim Senden des Mails an '.$to.'</span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message.='<span class="error">Es ist kein Übersetzer eingetragen</span>';
|
||||
}
|
||||
break;
|
||||
case 'childs_add':
|
||||
//Untereintraege zuordnen
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'su'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -528,6 +540,7 @@ if(!is_null($method))
|
||||
$message.='<span class="error">'.$content->errormsg.'</span>';
|
||||
break;
|
||||
case 'childs_delete':
|
||||
//Untereintraege entfernen
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'su'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -549,6 +562,7 @@ if(!is_null($method))
|
||||
}
|
||||
break;
|
||||
case 'childs_sort_up':
|
||||
//hochsortieren von Untereintraegen
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'su'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -570,6 +584,7 @@ if(!is_null($method))
|
||||
}
|
||||
break;
|
||||
case 'childs_sort_down':
|
||||
//runtersortieren von Untereintraegen
|
||||
if(!$rechte->isBerechtigt('basis/cms', null, 'su'))
|
||||
{
|
||||
$message.='<span class="error">Sie haben keine Berechtigung fuer diese Aktion</span>';
|
||||
@@ -935,7 +950,7 @@ function print_childs()
|
||||
*/
|
||||
function print_prefs()
|
||||
{
|
||||
global $content_id, $sprache, $version, $user;
|
||||
global $content_id, $sprache, $version, $user, $rechte;
|
||||
|
||||
$content = new content();
|
||||
if(!$content->getContent($content_id, $sprache, $version))
|
||||
@@ -1019,8 +1034,8 @@ function print_prefs()
|
||||
echo ' ';
|
||||
echo '<input type="submit" value="Review anfordern" onclick="document.form_pref.action=\''.$_SERVER['PHP_SELF'].'?content_id='.$content_id.'&sprache='.$sprache.'&version='.$version.'&action=prefs&method=prefs_requestreview\'">';
|
||||
$bf = new benutzerfunktion();
|
||||
if($bf->benutzerfunktion_exists($user, 'review'))
|
||||
echo '<input type="submit" value="Review OK" onclick="document.form_pref.action=\''.$_SERVER['PHP_SELF'].'?content_id='.$content_id.'&sprache='.$sprache.'&version='.$version.'&action=prefs&method=prefs_reviewed\'">';
|
||||
if($bf->benutzerfunktion_exists($user, 'review') || $rechte->isBerechtigt('basis/cms_review'))
|
||||
echo '<input type="submit" value="Review OK / Publish" onclick="document.form_pref.action=\''.$_SERVER['PHP_SELF'].'?content_id='.$content_id.'&sprache='.$sprache.'&version='.$version.'&action=prefs&method=prefs_reviewed\'">';
|
||||
|
||||
echo '<input type="submit" value="Übersetzer benachrichtigen" onclick="document.form_pref.action=\''.$_SERVER['PHP_SELF'].'?content_id='.$content_id.'&sprache='.$sprache.'&version='.$version.'&action=prefs&method=prefs_requesttranslate\'">';
|
||||
|
||||
|
||||
+14
-9
@@ -25,6 +25,14 @@
|
||||
require_once(dirname(__FILE__).'/../include/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/../include/content.class.php');
|
||||
|
||||
//Parameter fuer Redirect URLS
|
||||
$params = array();
|
||||
foreach($_REQUEST as $key=>$value)
|
||||
$params[$key]=$value;
|
||||
|
||||
//Parameter fuer Include Addons
|
||||
$includeparams = array();
|
||||
|
||||
/**
|
||||
* Zeichnet einen Menueeintrag aus dem CMS System
|
||||
*
|
||||
@@ -143,7 +151,8 @@ function DrawLink($link, $target, $name, $content_id=null)
|
||||
*/
|
||||
function Redirect($content_id, $name)
|
||||
{
|
||||
global $sprache;
|
||||
global $sprache, $params;
|
||||
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, null, true, true);
|
||||
|
||||
@@ -159,7 +168,7 @@ function Redirect($content_id, $name)
|
||||
$url='';
|
||||
|
||||
//Variablen Ersetzen
|
||||
foreach($_REQUEST as $key=>$value)
|
||||
foreach($params as $key=>$value)
|
||||
{
|
||||
$url = str_replace('$'.$key,addslashes($value),$url);
|
||||
}
|
||||
@@ -180,7 +189,7 @@ function Redirect($content_id, $name)
|
||||
*/
|
||||
function IncludeMenuAddon($content_id)
|
||||
{
|
||||
global $sprache;
|
||||
global $sprache, $includeparams;
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, null, true, true);
|
||||
|
||||
@@ -195,11 +204,7 @@ function IncludeMenuAddon($content_id)
|
||||
$url='';
|
||||
if($url!='')
|
||||
{
|
||||
DrawLink('#open','_self',$content->titel,$content_id);
|
||||
echo '
|
||||
<table class="tabcontent" id="Content'.$content_id.'" style="display: '.($content->menu_open?'visible':'none').'"><tr><td>';
|
||||
include(dirname(__FILE__).'/menu/'.$url);
|
||||
echo '</td></tr></table>';
|
||||
|
||||
$includeparams['content']=$content;
|
||||
include(dirname(__FILE__).'/menu/'.$url);
|
||||
}
|
||||
}
|
||||
@@ -17,35 +17,95 @@
|
||||
*
|
||||
* 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
|
||||
{
|
||||
protected $items=array(); //title, link, target, name
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
echo '<ul style="margin-top: 0px; margin-bottom: 0px;">';
|
||||
foreach($this->items as $row)
|
||||
if(count($this->items)>0)
|
||||
{
|
||||
echo '<li>
|
||||
<a class="Item2" title="'.$row['title'].'" href="'.$row['link'].'" target="'.$row['target'].'">'.$row['name'].'</a>
|
||||
</li>';
|
||||
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>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Executable
+73
@@ -0,0 +1,73 @@
|
||||
<?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>
|
||||
*/
|
||||
/**
|
||||
* Menue Addon fuer die Darstellung der Freifaecher
|
||||
*
|
||||
* Es wird eine Link-Liste mit allen aktuellen Freifaechern erstellt
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/menu_addon.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../include/lehrveranstaltung.class.php');
|
||||
|
||||
class menu_addon_freifaecher extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->link=false;
|
||||
|
||||
$sprache = getSprache();
|
||||
|
||||
$lv_obj = new lehrveranstaltung();
|
||||
if(!$lv_obj->load_lva('0',null, null,true,false,'bezeichnung'))
|
||||
echo "<tr><td>$lv_obj->errormsg</td></tr>";
|
||||
|
||||
foreach($lv_obj->lehrveranstaltungen AS $row)
|
||||
{
|
||||
$this->items[] = array('title'=>$row->bezeichnung,
|
||||
'target'=>'content',
|
||||
'link'=>'private/lehre/lesson.php?lvid='.$row->lehrveranstaltung_id,
|
||||
'name'=>'<span '.(!$row->aktiv?' style="color:gray;" ':' style=" font-weight: bold;"').'>'.$this->CutString($row->bezeichnung, 21).'</span>'
|
||||
);
|
||||
}
|
||||
|
||||
$this->block.= '<script language="JavaScript" type="text/javascript">';
|
||||
$this->block.= ' parent.content.location.href="../cms/news.php?studiengang_kz=0&semester=0"';
|
||||
$this->block.= '</script>';
|
||||
|
||||
$this->output();
|
||||
}
|
||||
|
||||
private function CutString($strVal, $limit)
|
||||
{
|
||||
if(mb_strlen($strVal) > $limit+3)
|
||||
{
|
||||
return mb_substr($strVal, 0, $limit) . "...";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $strVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new menu_addon_freifaecher();
|
||||
?>
|
||||
@@ -1,4 +1,32 @@
|
||||
<?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>
|
||||
*/
|
||||
/**
|
||||
* Menue Addon zur Auswahl von LVs
|
||||
*
|
||||
* Dieses Addon erstellt ein Formular zur Auswahl von Studiengang und Semester und zeigt die
|
||||
* zugehoerigen LVs an
|
||||
*
|
||||
* Parameter fuer das Params Array:
|
||||
* - studiengang_kz
|
||||
* - semester
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/menu_addon.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/studiengang.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/lehrveranstaltung.class.php');
|
||||
@@ -11,6 +39,12 @@ class menu_addon_lehrveranstaltungen extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
global $params;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->link=false;
|
||||
|
||||
$sprache = getSprache();
|
||||
$user = get_uid();
|
||||
$student = new student();
|
||||
@@ -45,11 +79,11 @@ class menu_addon_lehrveranstaltungen extends menu_addon
|
||||
$stg_obj = new studiengang();
|
||||
$stg_obj->getAll('typ, kurzbz');
|
||||
|
||||
if(isset($_GET['studiengang_kz']) && is_numeric($_GET['studiengang_kz']))
|
||||
$studiengang_kz=$_GET['studiengang_kz'];
|
||||
if(isset($params['studiengang_kz']) && is_numeric($_params['studiengang_kz']))
|
||||
$studiengang_kz=$params['studiengang_kz'];
|
||||
|
||||
if(isset($_GET['semester']) && is_numeric($_GET['semester']))
|
||||
$semester=$_GET['semester'];
|
||||
if(isset($params['semester']) && is_numeric($params['semester']))
|
||||
$semester=$params['semester'];
|
||||
else
|
||||
$semester=1;
|
||||
|
||||
@@ -73,7 +107,7 @@ class menu_addon_lehrveranstaltungen extends menu_addon
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->block.='
|
||||
</select>
|
||||
</td>
|
||||
@@ -95,6 +129,11 @@ class menu_addon_lehrveranstaltungen extends menu_addon
|
||||
}
|
||||
if($semester>$max)
|
||||
$semester=1;
|
||||
|
||||
$params['studiengang_kz'] = $studiengang_kz;
|
||||
$params['semester'] = $semester;
|
||||
$params['studiengang_kurzbz'] = $short;
|
||||
|
||||
for($i=0;$i<$max;$i++)
|
||||
{
|
||||
if(($i+1)==$semester)
|
||||
@@ -144,7 +183,7 @@ class menu_addon_lehrveranstaltungen extends menu_addon
|
||||
}
|
||||
}
|
||||
$this->block.='</table>';
|
||||
$this->outputBlock();
|
||||
$this->output();
|
||||
}
|
||||
|
||||
private function CutString($strVal, $limit)
|
||||
|
||||
@@ -1,13 +1,39 @@
|
||||
<?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>
|
||||
*/
|
||||
/**
|
||||
* Menue Addon zur Anzeige der zugeordneten LVs
|
||||
*
|
||||
* Zeigt eine Liste mit den LVs zu denen der Lektor oder Student zugeordnet ist.
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/menu_addon.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../include/phrasen.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/studiensemester.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/studiengang.class.php');
|
||||
|
||||
class menu_addon_meinelv extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$sprache = getSprache();
|
||||
$user = get_uid();
|
||||
|
||||
@@ -15,13 +41,17 @@ class menu_addon_meinelv extends menu_addon
|
||||
|
||||
$p = new phrasen($sprache);
|
||||
$cutlength=21;
|
||||
|
||||
//Meine LVs Student
|
||||
if(!$is_lector)
|
||||
{
|
||||
if ($stsemobj = new studiensemester())
|
||||
{
|
||||
$stsem = $stsemobj->getAktorNext();
|
||||
$qry = "SELECT distinct lehrveranstaltung_id, bezeichnung, studiengang_kz, semester, lehre, lehreverzeichnis from campus.vw_student_lehrveranstaltung WHERE uid='$user' AND studiensemester_kurzbz='$stsem' AND lehre=true AND lehreverzeichnis<>'' ORDER BY studiengang_kz, semester, bezeichnung";
|
||||
$qry = "SELECT distinct lehrveranstaltung_id, bezeichnung, studiengang_kz, semester, lehre,
|
||||
lehreverzeichnis from campus.vw_student_lehrveranstaltung
|
||||
WHERE uid='".addslashes($user)."' AND studiensemester_kurzbz='".addslashes($stsem)."'
|
||||
AND lehre=true AND lehreverzeichnis<>'' ORDER BY studiengang_kz, semester, bezeichnung";
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
@@ -62,7 +92,8 @@ class menu_addon_meinelv extends menu_addon
|
||||
$qry = "SELECT distinct bezeichnung, studiengang_kz, semester, lehreverzeichnis, tbl_lehrveranstaltung.lehrveranstaltung_id FROM lehre.tbl_lehrveranstaltung, lehre.tbl_lehreinheit, lehre.tbl_lehreinheitmitarbeiter
|
||||
WHERE tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_lehreinheit.lehrveranstaltung_id AND
|
||||
tbl_lehreinheit.lehreinheit_id=tbl_lehreinheitmitarbeiter.lehreinheit_id AND
|
||||
mitarbeiter_uid='$user' AND tbl_lehreinheit.studiensemester_kurzbz='$stsem'";
|
||||
mitarbeiter_uid='".addslashes($user)."' AND tbl_lehreinheit.studiensemester_kurzbz='".addslashes($stsem)."'";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
@@ -97,7 +128,7 @@ class menu_addon_meinelv extends menu_addon
|
||||
echo "Fehler Semester beim Auslesen der LV";
|
||||
}
|
||||
}
|
||||
$this->outputItems();
|
||||
$this->output();
|
||||
}
|
||||
|
||||
private function CutString($strVal, $limit)
|
||||
|
||||
@@ -1,10 +1,36 @@
|
||||
<?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>
|
||||
*/
|
||||
/**
|
||||
* Dies ist eine Vorlage fuer die Verwendung von Menue Addons
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/menu_addon.class.php');
|
||||
|
||||
class menu_addon_test extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//Link ausgeben oder nicht
|
||||
$this->link=true;
|
||||
|
||||
//Liste mit Links
|
||||
$this->items[]=array('title'=>'Testlink 1',
|
||||
'target'=>'content',
|
||||
@@ -18,8 +44,6 @@ class menu_addon_test extends menu_addon
|
||||
'target'=>'content',
|
||||
'link'=>'lesson.php',
|
||||
'name'=>'tl3');
|
||||
$this->outputItems();
|
||||
|
||||
|
||||
// Eigener Codeblock
|
||||
$this->block='
|
||||
@@ -34,7 +58,9 @@ class menu_addon_test extends menu_addon
|
||||
';
|
||||
if(isset($_POST['stg_kz']))
|
||||
$this->block.='KZ:'.$_POST['stg_kz'];
|
||||
$this->outputBlock();
|
||||
|
||||
|
||||
$this->output();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Executable
+91
@@ -0,0 +1,91 @@
|
||||
<?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>
|
||||
*/
|
||||
/**
|
||||
* Menu Addon fuer Urlaube
|
||||
*
|
||||
* Zeigt eine Liste der untergebenen Mitarbeiter mit deren Urlaube
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/menu_addon.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../include/phrasen.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/mitarbeiter.class.php');
|
||||
|
||||
class menu_addon_urlaub extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$sprache = getSprache();
|
||||
$user = get_uid();
|
||||
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
//Untergebene holen
|
||||
$mitarbeiter = new mitarbeiter();
|
||||
$mitarbeiter->getUntergebene($user);
|
||||
$untergebene = '';
|
||||
|
||||
foreach ($mitarbeiter->untergebene as $u_uid)
|
||||
{
|
||||
if($untergebene!='')
|
||||
$untergebene.=',';
|
||||
|
||||
$untergebene.="'".addslashes($u_uid)."'";
|
||||
}
|
||||
|
||||
if($untergebene!='')
|
||||
{
|
||||
$qry = "SELECT * FROM campus.vw_mitarbeiter WHERE uid in($untergebene) AND aktiv ORDER BY nachname, vorname";
|
||||
|
||||
$this->linkitem['link']='private/profile/urlaubsfreigabe.php';
|
||||
$this->linkitem['target']='content';
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
$this->items[] = array('title'=>$p->t('menu/urlaubAlle'),
|
||||
'target'=>'content',
|
||||
'link'=>'private/profile/urlaubsfreigabe.php',
|
||||
'name'=>$p->t('menu/urlaubAlle')
|
||||
);
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$name = $row->nachname.' '.$row->vorname.' '.$row->titelpre.' '.$row->titelpost;
|
||||
$title = $row->nachname.' '.$row->vorname.' '.$row->titelpre.' '.$row->titelpost;
|
||||
|
||||
if($row->fixangestellt=='f')
|
||||
$name = '<span style="color: gray;">'.$name.'</span>';
|
||||
|
||||
$this->items[] = array('title'=>$title,
|
||||
'target'=>'content',
|
||||
'link'=>'private/profile/urlaubsfreigabe.php?uid='.$row->uid,
|
||||
'name'=>$name
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->output();
|
||||
}
|
||||
}
|
||||
|
||||
new menu_addon_urlaub();
|
||||
?>
|
||||
@@ -1,4 +1,25 @@
|
||||
<?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>
|
||||
*/
|
||||
/**
|
||||
* Menu Addon fuer Zeitsperren
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/menu_addon.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../include/phrasen.class.php');
|
||||
@@ -9,6 +30,8 @@ class menu_addon_zeitsperren extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$sprache = getSprache();
|
||||
$user = get_uid();
|
||||
|
||||
@@ -67,10 +90,9 @@ class menu_addon_zeitsperren extends menu_addon
|
||||
'link' => 'private/profile/zeitsperre.php?funktion=lkt&stg_kz='.$row->studiengang_kz,
|
||||
'name' => $p->t('menu/lektoren').' '.$row->kurzbzlang
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
$this->outputItems();
|
||||
$this->output();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$this->phrasen['menu/zeitsperren']='Zeitsperren';
|
||||
$this->phrasen['menu/resturlaub']='Resturlaub';
|
||||
$this->phrasen['menu/fixangestellte']='Fixangestellte';
|
||||
$this->phrasen['menu/fixelektoren']='Fixe Lektoren';
|
||||
$this->phrasen['menu/organisationseinheit']='Organisationseinheit';
|
||||
$this->phrasen['menu/lektoren']='Lektoren';
|
||||
$this->phrasen['menu/urlaubAlle']='Alle';
|
||||
|
||||
?>
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$this->phrasen['menu/zeitsperren']='Absenteeism';
|
||||
$this->phrasen['menu/resturlaub']='Remaining leave';
|
||||
$this->phrasen['menu/fixangestellte']='Salaried';
|
||||
$this->phrasen['menu/fixelektoren']='salaried Lector';
|
||||
$this->phrasen['menu/organisationseinheit']='Organization Units';
|
||||
$this->phrasen['menu/lektoren']='Lector';
|
||||
$this->phrasen['menu/urlaubAlle']='All';
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user