mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 00:42:15 +00:00
- Include Templates für Menu Addons
- Variablen für Redirect Templates - diverse Menü Addons
This commit is contained in:
Executable
+89
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 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: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*
|
||||
*/
|
||||
|
||||
require_once('../config/cis.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/sprache.class.php');
|
||||
|
||||
if(isset($_GET['sprache']))
|
||||
{
|
||||
$sprache = new sprache();
|
||||
if($sprache->load($_GET['sprache']))
|
||||
setSprache($_GET['sprache']);
|
||||
else
|
||||
die('Sprache invalid');
|
||||
}
|
||||
if(isset($_GET['content_id']))
|
||||
$id = $_GET['content_id'];
|
||||
else
|
||||
$id = 28;
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>CIS - <?php echo CAMPUS_NAME; ?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<table class="tabcontent">
|
||||
|
||||
<tr>
|
||||
<td width="170" class="tdwrap" onclick="self.location.href='indextest.php'">
|
||||
<div class="home_logo"> </div>
|
||||
</td>
|
||||
<td id="header" width="100%">
|
||||
<div class="header_line" ></div>
|
||||
</td>
|
||||
<td nowrap class="tdwrap">
|
||||
<div style="font-size: 10px;"><i>Powered by <a href="http://fhcomplete.technikum-wien.at/" target="blank">FH Complete 2.0</a></i></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="right">
|
||||
<?php
|
||||
$sprache = new sprache();
|
||||
$sprache->getAll(true);
|
||||
foreach($sprache->result as $row)
|
||||
{
|
||||
echo ' <a href="indextest.php?sprache='.$row->sprache.'&content_id='.$id.'" title="'.$row->sprache.'"><img src="../cms/image.php?src=flag&sprache='.$row->sprache.'" alt="'.$row->sprache.'"></a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td nowrap><?php require_once('../include/'.EXT_FKT_PATH.'/cis_menu_global.inc.php'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<iframe id="menue" src="menutest.php?content_id=<?php echo $id; ?>" name="menu" frameborder="0">
|
||||
No iFrames
|
||||
</iframe>
|
||||
<!-- <iframe id="content" src="public/news.php" name="content" frameborder="0"> -->
|
||||
<iframe id="content" src="public/news.php" name="content" frameborder="0">
|
||||
No iFrames
|
||||
</iframe>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+111
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 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: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
*
|
||||
*/
|
||||
|
||||
require_once('../config/cis.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../cms/menu.inc.php');
|
||||
$sprache = getSprache();
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<title>Menu</title>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
var __js_page_array = new Array();
|
||||
function js_toggle_container(conid)
|
||||
{
|
||||
if (document.getElementById)
|
||||
{
|
||||
var block = "table-row";
|
||||
if (navigator.appName.indexOf('Microsoft') > -1)
|
||||
block = 'block';
|
||||
|
||||
// Aktueller Anzeigemode ermitteln
|
||||
var status = __js_page_array[conid];
|
||||
if (status == null)
|
||||
{
|
||||
if (document.getElementById && document.getElementById(conid))
|
||||
{
|
||||
status=document.getElementById(conid).style.display;
|
||||
} else if (document.all && document.all[conid]) {
|
||||
status=document.all[conid].style.display;
|
||||
} else if (document.layers && document.layers[conid]) {
|
||||
status=document.layers[conid].style.display;
|
||||
}
|
||||
}
|
||||
|
||||
// Anzeigen oder Ausblenden
|
||||
if (status == 'none')
|
||||
{
|
||||
if (document.getElementById && document.getElementById(conid))
|
||||
{
|
||||
document.getElementById(conid).style.display = 'block';
|
||||
} else if (document.all && document.all[conid]) {
|
||||
document.all[conid].style.display='block';
|
||||
} else if (document.layers && document.layers[conid]) {
|
||||
document.layers[conid].style.display='block';
|
||||
}
|
||||
__js_page_array[conid] = 'block';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (document.getElementById && document.getElementById(conid))
|
||||
{
|
||||
document.getElementById(conid).style.display = 'none';
|
||||
} else if (document.all && document.all[conid]) {
|
||||
document.all[conid].style.display='none';
|
||||
} else if (document.layers && document.layers[conid]) {
|
||||
document.layers[conid].style.display='none';
|
||||
}
|
||||
__js_page_array[conid] = 'none';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table class="tabcontent">
|
||||
<tr>
|
||||
<td width="159" valign="top" class="tdwrap">
|
||||
<table class="tabcontent">
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php
|
||||
$content_id=$_GET['content_id'];
|
||||
require_once('../cms/menu.inc.php');
|
||||
drawSubmenu($content_id);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+205
@@ -0,0 +1,205 @@
|
||||
<?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>
|
||||
*/
|
||||
/**
|
||||
* Dieses File enthaelt Hilfsklassen zur Anzeige des CMS-Menues
|
||||
*
|
||||
* mit drawSubmenu($id) wird das enstprechende Menue gezeichnet.
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/../include/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/../include/content.class.php');
|
||||
|
||||
/**
|
||||
* Zeichnet einen Menueeintrag aus dem CMS System
|
||||
*
|
||||
* @param $content_id
|
||||
*/
|
||||
function drawSubmenu($content_id)
|
||||
{
|
||||
global $sprache;
|
||||
$content = new content();
|
||||
$sprache = getSprache();
|
||||
|
||||
$arr = $content->getMenueArray($content_id, $sprache, true);
|
||||
foreach ($arr as $row)
|
||||
{
|
||||
drawEntry($row);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prueft ob der Menueeintrag Submenues hat
|
||||
*
|
||||
* @param $item Menue Array
|
||||
* @return boolean
|
||||
*/
|
||||
function EntryHasChilds($item)
|
||||
{
|
||||
foreach($item as $row)
|
||||
{
|
||||
if(is_array($row) && isset($row['name']))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Zeichnet den Menueeintrag samt Untermenues
|
||||
* @param $item Menue Array
|
||||
*/
|
||||
function drawEntry($item)
|
||||
{
|
||||
if(EntryHasChilds($item))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td class="tdwidth10" nowrap> </td>
|
||||
<td class="tdwrap">';
|
||||
if($item['template']=='include')
|
||||
IncludeMenuAddon($item['content_id']);
|
||||
elseif($item['template']=='redirect')
|
||||
Redirect($item['content_id'], $item['name']);
|
||||
else
|
||||
DrawLink($item['link'], 'content', $item['name'], $item['content_id']);
|
||||
|
||||
echo '
|
||||
<table class="tabcontent" id="Content'.$item['content_id'].'" style="display: '.($item['open']=='true'?'visible':'none').'">';
|
||||
foreach($item as $row)
|
||||
{
|
||||
if(is_array($row) && isset($row['name']))
|
||||
{
|
||||
drawEntry($row);
|
||||
}
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td class="tdwidth10" nowrap> </td>
|
||||
<td class="tdwrap">';
|
||||
if($item['template']=='include')
|
||||
IncludeMenuAddon($item['content_id']);
|
||||
elseif($item['template']=='redirect')
|
||||
Redirect($item['content_id'], $item['name']);
|
||||
else
|
||||
DrawLink($item['link'],'content',$item['name']);
|
||||
|
||||
echo '
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Zeichnet einen normalen Menue Link
|
||||
* @param $link URL
|
||||
* @param $target Target
|
||||
* @param $name Anzeigename
|
||||
* @param $content_id Wenn die Content_id uebergeben wird, oeffnet der Klick das Submenu
|
||||
*/
|
||||
function DrawLink($link, $target, $name, $content_id=null)
|
||||
{
|
||||
if($target=='')
|
||||
$target='content';
|
||||
|
||||
if(!is_null($content_id))
|
||||
$class = 'class="MenuItem" onClick="js_toggle_container(\'Content'.$content_id.'\');"';
|
||||
else
|
||||
$class='class="Item"';
|
||||
|
||||
echo '<a '.$class.' href="'.$link.'" target="'.$target.'"><img src="../skin/images/menu_item.gif" alt="menu item" width="7" height="9"> '.$name.'</a>';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirects sind Links Seiten ausserhalb des CMS
|
||||
* die URL kann Variablen enthalten. Diese werden hier ersetzt.
|
||||
* Danach wird der Link angezeigt.
|
||||
*
|
||||
* @param $content_id ContentID des Redirects
|
||||
* @param $name Anzeigename des Links
|
||||
*/
|
||||
function Redirect($content_id, $name)
|
||||
{
|
||||
global $sprache;
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, null, true, true);
|
||||
|
||||
$xml = new DOMDocument();
|
||||
if($content->content!='')
|
||||
{
|
||||
$xml->loadXML($content->content);
|
||||
}
|
||||
|
||||
if($xml->getElementsByTagName('url')->item(0))
|
||||
$url = $xml->getElementsByTagName('url')->item(0)->nodeValue;
|
||||
else
|
||||
$url='';
|
||||
|
||||
//Variablen Ersetzen
|
||||
foreach($_REQUEST as $key=>$value)
|
||||
{
|
||||
$url = str_replace('$'.$key,addslashes($value),$url);
|
||||
}
|
||||
|
||||
if($xml->getElementsByTagName('target')->item(0))
|
||||
$target = $xml->getElementsByTagName('target')->item(0)->nodeValue;
|
||||
else
|
||||
$target='';
|
||||
|
||||
DrawLink($url, $target, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bei Content mit Include Templates wird
|
||||
* das entsprechende Menu-Addon geladen und inkludiert
|
||||
*
|
||||
* @param $content_id
|
||||
*/
|
||||
function IncludeMenuAddon($content_id)
|
||||
{
|
||||
global $sprache;
|
||||
$content = new content();
|
||||
$content->getContent($content_id, $sprache, null, true, true);
|
||||
|
||||
$xml = new DOMDocument();
|
||||
if($content->content!='')
|
||||
{
|
||||
$xml->loadXML($content->content);
|
||||
}
|
||||
if($xml->getElementsByTagName('url')->item(0))
|
||||
$url = $xml->getElementsByTagName('url')->item(0)->nodeValue;
|
||||
else
|
||||
$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>';
|
||||
|
||||
}
|
||||
}
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
<?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>
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/../../include/basis_db.class.php');
|
||||
|
||||
class menu_addon extends basis_db
|
||||
{
|
||||
protected $items=array(); //title, link, target, name
|
||||
protected $block;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Gibt alle Items als Linkliste aus
|
||||
*
|
||||
*/
|
||||
public function outputItems()
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/menu_addon.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/studiengang.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/lehrveranstaltung.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/organisationsform.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../include/phrasen.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/student.class.php');
|
||||
|
||||
class menu_addon_lehrveranstaltungen extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$sprache = getSprache();
|
||||
$user = get_uid();
|
||||
$student = new student();
|
||||
if($student->load($user))
|
||||
$studiengang_kz=$student->studiengang_kz;
|
||||
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
|
||||
$this->block.='
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function MM_jumpMenu(targ, selObj, restore)
|
||||
{
|
||||
eval(targ + ".location=\'" + selObj.options[selObj.selectedIndex].value + "\'");
|
||||
|
||||
if(restore)
|
||||
{
|
||||
selObj.selectedIndex = 0;
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</script>';
|
||||
|
||||
$this->block.='
|
||||
<table class="tabcontent">
|
||||
<tr>
|
||||
<td width="81" class="tdwrap">'.$p->t('global/studiengang').': </td>
|
||||
<td class="tdwrap">
|
||||
<select name="course" onChange="MM_jumpMenu(\'self\',this,0)">';
|
||||
|
||||
$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($_GET['semester']) && is_numeric($_GET['semester']))
|
||||
$semester=$_GET['semester'];
|
||||
else
|
||||
$semester=1;
|
||||
|
||||
$sel_kurzbzlang='';
|
||||
foreach($stg_obj->result as $row)
|
||||
{
|
||||
if($row->studiengang_kz!=0)
|
||||
{
|
||||
if(isset($studiengang_kz) AND $studiengang_kz == $row->studiengang_kz)
|
||||
{
|
||||
$this->block.= '<option value="?content_id='.$_GET['content_id'].'&studiengang_kz='.$row->studiengang_kz.'&semester='.$semester.'" selected>'.$row->kuerzel .' ('.$row->kurzbzlang.')</option>';
|
||||
$sel_kurzbzlang=$row->kurzbzlang;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->block.='<option value="?content_id='.$_GET['content_id'].'&studiengang_kz='.$row->studiengang_kz.'&semester='.$semester.'">'.$row->kuerzel .' ('.$row->kurzbzlang.')</option>';
|
||||
}
|
||||
if(!isset($studiengang_kz))
|
||||
{
|
||||
$studiengang_kz=$row->studiengang_kz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->block.='
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tdwrap"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tdwrap">'.$p->t('global/semester').': </td>
|
||||
<td class="tdwrap">
|
||||
<select name="term" onChange="MM_jumpMenu(\'self\',this,0)">';
|
||||
|
||||
$short = 'Fehler Stg.Kz '.$studiengang_kz;
|
||||
$max = 1;
|
||||
if ($stg_obj=new studiengang($studiengang_kz))
|
||||
{
|
||||
$short = $stg_obj->kuerzel;
|
||||
$max = $stg_obj->max_semester;
|
||||
}
|
||||
if($semester>$max)
|
||||
$semester=1;
|
||||
for($i=0;$i<$max;$i++)
|
||||
{
|
||||
if(($i+1)==$semester)
|
||||
$this->block.= '<option value="?content_id='.$_GET['content_id'].'&studiengang_kz='.$studiengang_kz.'&semester='.($i+1).'" selected >'.($i+1).'. Semester</option>';
|
||||
else
|
||||
$this->block.= '<option value="?content_id='.$_GET['content_id'].'&studiengang_kz='.$studiengang_kz.'&semester='.($i+1).'">'.($i+1).'. Semester</option>';
|
||||
}
|
||||
|
||||
$this->block.='
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>';
|
||||
$this->block.= '<script language="JavaScript" type="text/javascript">';
|
||||
$this->block.= ' parent.content.location.href="../cms/news.php?studiengang_kz='.$studiengang_kz.'&semester='.$semester.'"';
|
||||
$this->block.= '</script>';
|
||||
$this->block.='
|
||||
<tr>
|
||||
<td class="tdwrap"> </td>
|
||||
</tr>';
|
||||
|
||||
|
||||
if (!$lv_obj = new lehrveranstaltung())
|
||||
die('Fehler beim Oeffnen der Lehrveranstaltung');
|
||||
|
||||
$lv_obj->lehrveranstaltungen=array();
|
||||
if ($lv_obj->load_lva($studiengang_kz,$semester,null,TRUE,TRUE,'orgform_kurzbz DESC, bezeichnung'))
|
||||
{
|
||||
$lastform=null;
|
||||
foreach ($lv_obj->lehrveranstaltungen as $row)
|
||||
{
|
||||
if($row->orgform_kurzbz!=$lastform)
|
||||
{
|
||||
$orgform = new organisationsform();
|
||||
$orgform->load($row->orgform_kurzbz);
|
||||
|
||||
$this->block.= "<tr><td><b>$orgform->bezeichnung</b></td></tr>";
|
||||
|
||||
$lastform=$row->orgform_kurzbz;
|
||||
}
|
||||
$this->block.= '<tr>';
|
||||
$this->block.= ' <td class="tdwrap"><ul style="margin: 0px; padding: 0px; padding-left: 20px;">';
|
||||
$this->block.= "<li><a class=\"Item2\" title=\"".$row->bezeichnung."\" href=\"private/lehre/lesson.php?lvid=$row->lehrveranstaltung_id\" target=\"content\">".$this->CutString($row->bezeichnung, 21).' '.$row->lehrform_kurzbz."</a></li>";
|
||||
$this->block.= ' </ul></td>';
|
||||
$this->block.= '</tr>';
|
||||
}
|
||||
}
|
||||
$this->block.='</table>';
|
||||
$this->outputBlock();
|
||||
}
|
||||
|
||||
private function CutString($strVal, $limit)
|
||||
{
|
||||
if(mb_strlen($strVal) > $limit+3)
|
||||
{
|
||||
return mb_substr($strVal, 0, $limit) . "...";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $strVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new menu_addon_lehrveranstaltungen();
|
||||
?>
|
||||
Executable
+117
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
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');
|
||||
|
||||
class menu_addon_meinelv extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$sprache = getSprache();
|
||||
$user = get_uid();
|
||||
|
||||
$is_lector=check_lektor($user);
|
||||
|
||||
$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";
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
if($row->studiengang_kz==0 && $row->semester==0) // Freifach
|
||||
{
|
||||
$this->items[] = array('title'=>$row->bezeichnung,
|
||||
'target'=>'content',
|
||||
'link'=>'private/freifaecher/lesson.php?lvid='.$row->lehrveranstaltung_id,
|
||||
'name'=>'FF '.$this->CutString($row->bezeichnung, $cutlength)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->items[] = array('title'=>$row->bezeichnung,
|
||||
'target'=>'content',
|
||||
'link'=>'private/lehre/lesson.php?lvid='.$row->lehrveranstaltung_id,
|
||||
'name'=>$stg[$row->studiengang_kz].$row->semester.' '.$this->CutString($row->bezeichnung, $cutlength)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "Fehler beim Auslesen der LV";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Fehler Semester beim Auslesen der LV";
|
||||
}
|
||||
}
|
||||
|
||||
//Eigenen LV des eingeloggten Lektors anzeigen
|
||||
if($is_lector)
|
||||
{
|
||||
if ($stsemobj = new studiensemester())
|
||||
{
|
||||
$stsem = $stsemobj->getAktorNext();
|
||||
$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'";
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
if($row->studiengang_kz==0 AND $row->semester==0)
|
||||
{
|
||||
$this->items[] = array('title'=>$row->bezeichnung,
|
||||
'target'=>'content',
|
||||
'link'=>'private/freifaecher/lesson.php?lvid='.$row->lehrveranstaltung_id,
|
||||
'name'=>'FF '.$this->CutString($row->lehreverzeichnis, $cutlength)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$stg_obj = new studiengang();
|
||||
$stg_obj->load($row->studiengang_kz);
|
||||
$kurzbz = $stg_obj->kuerzel.'-'.$row->semester;
|
||||
|
||||
$this->items[] = array('title'=>$row->bezeichnung,
|
||||
'target'=>'content',
|
||||
'link'=>'private/lehre/lesson.php?lvid='.$row->lehrveranstaltung_id,
|
||||
'name'=>$kurzbz.' '.$this->CutString($row->bezeichnung, $cutlength)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "Fehler beim Auslesen des Lehrfaches";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Fehler Semester beim Auslesen der LV";
|
||||
}
|
||||
}
|
||||
$this->outputItems();
|
||||
}
|
||||
|
||||
private function CutString($strVal, $limit)
|
||||
{
|
||||
if(mb_strlen($strVal) > $limit+3)
|
||||
{
|
||||
return mb_substr($strVal, 0, $limit) . "...";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $strVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new menu_addon_meinelv();
|
||||
?>
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/menu_addon.class.php');
|
||||
|
||||
class menu_addon_test extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
//Liste mit Links
|
||||
$this->items[]=array('title'=>'Testlink 1',
|
||||
'target'=>'content',
|
||||
'link'=>'lesson.php',
|
||||
'name'=>'tl1');
|
||||
$this->items[]=array('title'=>'Testlink 2',
|
||||
'target'=>'content',
|
||||
'link'=>'lesson.php',
|
||||
'name'=>'tl2');
|
||||
$this->items[]=array('title'=>'Testlink 3',
|
||||
'target'=>'content',
|
||||
'link'=>'lesson.php',
|
||||
'name'=>'tl3');
|
||||
$this->outputItems();
|
||||
|
||||
|
||||
// Eigener Codeblock
|
||||
$this->block='
|
||||
<form method="POST">
|
||||
<select name="stg_kz">
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
</select>
|
||||
<input type="submit" value="ok">
|
||||
</form>
|
||||
';
|
||||
if(isset($_POST['stg_kz']))
|
||||
$this->block.='KZ:'.$_POST['stg_kz'];
|
||||
$this->outputBlock();
|
||||
}
|
||||
}
|
||||
|
||||
new menu_addon_test();
|
||||
?>
|
||||
Executable
+78
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
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/benutzerberechtigung.class.php');
|
||||
require_once(dirname(__FILE__).'/../../include/funktion.class.php');
|
||||
|
||||
class menu_addon_zeitsperren extends menu_addon
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$sprache = getSprache();
|
||||
$user = get_uid();
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
$p = new phrasen($sprache);
|
||||
|
||||
$fkt=new funktion();
|
||||
$fkt->getAll($user);
|
||||
|
||||
if ($rechte->isFix() || $rechte->isBerechtigt('mitarbeiter/zeitsperre'))
|
||||
{
|
||||
$this->items[] = array('title' => $p->t('menu/zeitsperren'),
|
||||
'target'=> 'content',
|
||||
'link' => 'private/profile/zeitsperre_days.php?days=12',
|
||||
'name' => $p->t('menu/zeitsperren')
|
||||
);
|
||||
|
||||
if ($rechte->isBerechtigt('admin',0) || $rechte->isBerechtigt('mitarbeiter'))
|
||||
{
|
||||
$this->items[] = array('title' => $p->t('menu/resturlaub'),
|
||||
'target'=> 'content',
|
||||
'link' => 'private/profile/resturlaub.php',
|
||||
'name' => $p->t('menu/resturlaub')
|
||||
);
|
||||
}
|
||||
|
||||
if ($rechte->isBerechtigt('admin',0) || $rechte->isBerechtigt('mitarbeiter')
|
||||
|| $fkt->checkFunktion('stvLtg')|| $fkt->checkFunktion('gLtg')
|
||||
|| $fkt->checkFunktion('Leitung') || $fkt->checkFunktion('ass'))
|
||||
{
|
||||
$this->items[] = array('title' => $p->t('menu/fixangestellte'),
|
||||
'target'=> 'content',
|
||||
'link' => 'private/profile/zeitsperre.php?fix=true',
|
||||
'name' => $p->t('menu/fixangestellte')
|
||||
);
|
||||
$this->items[] = array('title' => $p->t('menu/fixelektoren'),
|
||||
'target'=> 'content',
|
||||
'link' => 'private/profile/zeitsperre.php?fix=true&lektor=true',
|
||||
'name' => $p->t('menu/fixelektoren')
|
||||
);
|
||||
$this->items[] = array('title' => $p->t('menu/organisationseinheit'),
|
||||
'target'=> 'content',
|
||||
'link' => 'private/profile/zeitsperre.php?organisationseinheit=',
|
||||
'name' => $p->t('menu/organisationseinheit')
|
||||
);
|
||||
}
|
||||
|
||||
$stg_obj = new studiengang();
|
||||
$stg_obj->loadArray($rechte->getStgKz('admin'), 'typ, kurzbz', true);
|
||||
foreach($stg_obj->result as $row)
|
||||
{
|
||||
$this->items[] = array('title' => 'Lektoren '.$row->kurzbzlang,
|
||||
'target'=> 'content',
|
||||
'link' => 'private/profile/zeitsperre.php?funktion=lkt&stg_kz='.$row->studiengang_kz,
|
||||
'name' => $p->t('menu/lektoren').' '.$row->kurzbzlang
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
$this->outputItems();
|
||||
}
|
||||
}
|
||||
|
||||
new menu_addon_zeitsperren();
|
||||
?>
|
||||
@@ -19,7 +19,7 @@
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <karl.burkhart@technikum-wien.at>.
|
||||
*/
|
||||
require_once('basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class content extends basis_db
|
||||
{
|
||||
|
||||
@@ -42,6 +42,35 @@ class organisationsform extends basis_db
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt eine Organisationsform
|
||||
* @param $orgform_kurzbz
|
||||
*/
|
||||
public function load($orgform_kurzbz)
|
||||
{
|
||||
$qry = "SELECT * FROM bis.tbl_orgform WHERE orgform_kurzbz='".addslashes($orgform_kurzbz)."'";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$orgform = new organisationsform();
|
||||
|
||||
$this->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$this->code = $row->code;
|
||||
$this->bezeichnung = $row->bezeichnung;
|
||||
$this->rolle = $row->rolle;
|
||||
|
||||
$result[] = $orgform;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg ="Fehler bei der Abfrage aufgetreten";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Liefert alle Organisationsformen zurück
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="content">
|
||||
<xs:element name="url" type="xs:string"/>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="content">
|
||||
<html>
|
||||
<body>
|
||||
Diese Seite sollte nicht direkt aufgerufen werden!
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet >
|
||||
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="content">
|
||||
<xs:element name="url" type="xs:string"/>
|
||||
<xs:element name="target" type="xs:string"/>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
||||
Reference in New Issue
Block a user