mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
WaWi:
- Kostenstellenberechtigung - Grundgerüst - Login als anderer User - Überarbeitung Stylesheet
This commit is contained in:
@@ -25,6 +25,7 @@ require_once(dirname(__FILE__).'/organisationseinheit.class.php');
|
||||
require_once(dirname(__FILE__).'/studiengang.class.php');
|
||||
require_once(dirname(__FILE__).'/fachbereich.class.php');
|
||||
require_once(dirname(__FILE__).'/functions.inc.php');
|
||||
require_once(dirname(__FILE__).'/wawi_kostenstelle.class.php');
|
||||
|
||||
class benutzerberechtigung extends basis_db
|
||||
{
|
||||
@@ -47,7 +48,8 @@ class benutzerberechtigung extends basis_db
|
||||
public $updatevon;
|
||||
public $insertamum;
|
||||
public $insertvon;
|
||||
|
||||
public $kostenstelle_id;
|
||||
|
||||
public $starttimestamp;
|
||||
public $endetimestamp;
|
||||
|
||||
@@ -100,6 +102,7 @@ class benutzerberechtigung extends basis_db
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->kostenstelle_id = $row->kostenstelle_id;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -175,6 +178,19 @@ class benutzerberechtigung extends basis_db
|
||||
$this->errormsg = 'Art darf nicht leer sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->kostenstelle_id!='' && !is_numeric($this->kostenstelle_id))
|
||||
{
|
||||
$this->errormsg = 'Kostenstelle_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->kostenstelle_id!='' && $this->oe_kurzbz!='')
|
||||
{
|
||||
$this->errormsg = 'Wenn eine Kostenstelle angegeben wird, darf keine Organisationseinheit eingetragen sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -193,7 +209,8 @@ class benutzerberechtigung extends basis_db
|
||||
if($this->new)
|
||||
{
|
||||
$qry = 'INSERT INTO system.tbl_benutzerrolle (rolle_kurzbz, berechtigung_kurzbz, uid, funktion_kurzbz,
|
||||
oe_kurzbz, art, studiensemester_kurzbz, start, ende, negativ, updateamum, updatevon, insertamum, insertvon)
|
||||
oe_kurzbz, art, studiensemester_kurzbz, start, ende, negativ, updateamum, updatevon,
|
||||
insertamum, insertvon, kostenstelle_id)
|
||||
VALUES('.$this->addslashes($this->rolle_kurzbz).','.
|
||||
$this->addslashes($this->berechtigung_kurzbz).','.
|
||||
$this->addslashes($this->uid).','.
|
||||
@@ -207,7 +224,8 @@ class benutzerberechtigung extends basis_db
|
||||
$this->addslashes($this->updateamum).','.
|
||||
$this->addslashes($this->updatevon).','.
|
||||
$this->addslashes($this->insertamum).','.
|
||||
$this->addslashes($this->insertvon).');';
|
||||
$this->addslashes($this->insertvon).','.
|
||||
$this->addslashes($this->kostenstelle_id).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -222,6 +240,7 @@ class benutzerberechtigung extends basis_db
|
||||
' start='.$this->addslashes($this->start).','.
|
||||
' ende='.$this->addslashes($this->ende).','.
|
||||
' negativ='.($this->negativ?'true':'false').','.
|
||||
' kostenstelle_id='.$this->addslashes($this->kostenstelle_id).','.
|
||||
' updateamum='.$this->addslashes($this->updateamum).','.
|
||||
' updatevon='.$this->addslashes($this->updatevon).
|
||||
" WHERE benutzerberechtigung_id='".addslashes($this->benutzerberechtigung_id)."'";
|
||||
@@ -303,6 +322,7 @@ class benutzerberechtigung extends basis_db
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->kostenstelle_id = $row->kostenstelle_id;
|
||||
|
||||
$this->berechtigungen[] = $obj;
|
||||
}
|
||||
@@ -335,7 +355,7 @@ class benutzerberechtigung extends basis_db
|
||||
tbl_benutzerrolle.rolle_kurzbz, tbl_benutzerrolle.berechtigung_kurzbz, tbl_benutzerrolle.art, tbl_benutzerrolle.art art1,
|
||||
tbl_benutzerrolle.oe_kurzbz, tbl_benutzerrolle.studiensemester_kurzbz, tbl_benutzerrolle.start,
|
||||
tbl_benutzerrolle.ende, tbl_benutzerrolle.negativ, tbl_benutzerrolle.updateamum, tbl_benutzerrolle.updatevon,
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon,tbl_benutzerrolle.kostenstelle_id
|
||||
FROM
|
||||
system.tbl_benutzerrolle JOIN system.tbl_berechtigung USING(berechtigung_kurzbz)
|
||||
WHERE uid='".addslashes($uid)."'
|
||||
@@ -347,7 +367,7 @@ class benutzerberechtigung extends basis_db
|
||||
tbl_benutzerrolle.rolle_kurzbz, tbl_berechtigung.berechtigung_kurzbz, tbl_benutzerrolle.art, tbl_rolleberechtigung.art art1,
|
||||
tbl_benutzerrolle.oe_kurzbz, tbl_benutzerrolle.studiensemester_kurzbz, tbl_benutzerrolle.start,
|
||||
tbl_benutzerrolle.ende, tbl_benutzerrolle.negativ, tbl_benutzerrolle.updateamum, tbl_benutzerrolle.updatevon,
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon,tbl_benutzerrolle.kostenstelle_id
|
||||
FROM
|
||||
system.tbl_benutzerrolle JOIN system.tbl_rolle USING(rolle_kurzbz)
|
||||
JOIN system.tbl_rolleberechtigung USING(rolle_kurzbz)
|
||||
@@ -359,9 +379,9 @@ class benutzerberechtigung extends basis_db
|
||||
SELECT
|
||||
benutzerberechtigung_id, tbl_benutzerfunktion.uid, tbl_benutzerrolle.funktion_kurzbz,
|
||||
tbl_benutzerrolle.rolle_kurzbz, tbl_benutzerrolle.berechtigung_kurzbz, tbl_benutzerrolle.art, tbl_benutzerrolle.art art1,
|
||||
tbl_benutzerrolle.oe_kurzbz, tbl_benutzerrolle.studiensemester_kurzbz, tbl_benutzerrolle.start,
|
||||
tbl_benutzerfunktion.oe_kurzbz, tbl_benutzerrolle.studiensemester_kurzbz, tbl_benutzerrolle.start,
|
||||
tbl_benutzerrolle.ende, tbl_benutzerrolle.negativ, tbl_benutzerrolle.updateamum, tbl_benutzerrolle.updatevon,
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon,tbl_benutzerrolle.kostenstelle_id
|
||||
FROM
|
||||
system.tbl_benutzerrolle JOIN public.tbl_benutzerfunktion USING(funktion_kurzbz)
|
||||
WHERE tbl_benutzerfunktion.uid='".addslashes($uid)."'
|
||||
@@ -373,7 +393,7 @@ class benutzerberechtigung extends basis_db
|
||||
tbl_benutzerrolle.rolle_kurzbz, tbl_benutzerrolle.berechtigung_kurzbz, tbl_benutzerrolle.art, tbl_benutzerrolle.art art1,
|
||||
tbl_benutzerrolle.oe_kurzbz, tbl_benutzerrolle.studiensemester_kurzbz, tbl_benutzerrolle.start,
|
||||
tbl_benutzerrolle.ende, tbl_benutzerrolle.negativ, tbl_benutzerrolle.updateamum, tbl_benutzerrolle.updatevon,
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon,tbl_benutzerrolle.kostenstelle_id
|
||||
FROM
|
||||
system.tbl_benutzerrolle
|
||||
WHERE
|
||||
@@ -387,7 +407,7 @@ class benutzerberechtigung extends basis_db
|
||||
tbl_benutzerrolle.rolle_kurzbz, tbl_benutzerrolle.berechtigung_kurzbz, tbl_benutzerrolle.art, tbl_benutzerrolle.art art1,
|
||||
tbl_benutzerrolle.oe_kurzbz, tbl_benutzerrolle.studiensemester_kurzbz, tbl_benutzerrolle.start,
|
||||
tbl_benutzerrolle.ende, tbl_benutzerrolle.negativ, tbl_benutzerrolle.updateamum, tbl_benutzerrolle.updatevon,
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon
|
||||
tbl_benutzerrolle.insertamum, tbl_benutzerrolle.insertvon,tbl_benutzerrolle.kostenstelle_id
|
||||
FROM
|
||||
system.tbl_benutzerrolle
|
||||
WHERE
|
||||
@@ -428,6 +448,7 @@ class benutzerberechtigung extends basis_db
|
||||
$b->updatevon = $row->updatevon;
|
||||
$b->insertamum = $row->insertamum;
|
||||
$b->insertvon = $row->insertvon;
|
||||
$b->kostenstelle_id = $row->kostenstelle_id;
|
||||
|
||||
$this->berechtigungen[]=$b;
|
||||
}
|
||||
@@ -464,10 +485,10 @@ class benutzerberechtigung extends basis_db
|
||||
* derzeit kann hier noch die Studiengangskennzahl uebergeben werden,
|
||||
* dies wird in Zukunft aber nicht mehr moeglich sein
|
||||
* @param $art suid (select|update|insert|delete)
|
||||
* @param $fachbereich_kurzbz DEPRECATED
|
||||
* @param $kostenstelle_id ID der Kostenstelle
|
||||
* @return true wenn eine Berechtigung entspricht.
|
||||
*/
|
||||
public function isBerechtigt($berechtigung_kurzbz,$oe_kurzbz=null,$art=null, $fachbereich_kurzbz=null)
|
||||
public function isBerechtigt($berechtigung_kurzbz, $oe_kurzbz=null, $art=null, $kostenstelle_id=null)
|
||||
{
|
||||
$timestamp=time();
|
||||
|
||||
@@ -479,12 +500,12 @@ class benutzerberechtigung extends basis_db
|
||||
$oe_kurzbz = $stg->oe_kurzbz;
|
||||
}
|
||||
|
||||
//Fachbereich
|
||||
if(!is_null($fachbereich_kurzbz))
|
||||
if($kostenstelle_id!='' && !is_numeric($kostenstelle_id))
|
||||
{
|
||||
$fb = new fachbereich($fachbereich_kurzbz);
|
||||
$oe_kurzbz = $fb->oe_kurzbz;
|
||||
$this->errormsg = 'Kostenstelle_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$oe = new organisationseinheit();
|
||||
|
||||
foreach ($this->berechtigungen as $b)
|
||||
@@ -492,7 +513,8 @@ class benutzerberechtigung extends basis_db
|
||||
//Pruefen ob eine negativ-Berechtigung vorhanden ist
|
||||
if($b->berechtigung_kurzbz==$berechtigung_kurzbz
|
||||
&& $b->negativ
|
||||
&& (is_null($oe_kurzbz) || $oe_kurzbz==$b->oe_kurzbz || $oe->isChild($b->oe_kurzbz, $oe_kurzbz)))
|
||||
&& (is_null($oe_kurzbz) || ($b->kostenstelle_id=='' && ($b->oe_kurzbz=='' || $oe_kurzbz==$b->oe_kurzbz || $oe->isChild($b->oe_kurzbz, $oe_kurzbz))))
|
||||
&& (is_null($kostenstelle_id) || $kostenstelle_id==$b->kostenstelle_id))
|
||||
{
|
||||
if (($timestamp>$b->starttimestamp || $b->starttimestamp==null)
|
||||
&& ($timestamp<$b->endetimestamp || $b->endetimestamp==null))
|
||||
@@ -503,15 +525,34 @@ class benutzerberechtigung extends basis_db
|
||||
|
||||
if($b->berechtigung_kurzbz==$berechtigung_kurzbz
|
||||
&& (is_null($art) || mb_strstr($b->art, $art))
|
||||
&& (is_null($oe_kurzbz) || $oe_kurzbz==$b->oe_kurzbz || $oe->isChild($b->oe_kurzbz, $oe_kurzbz)))
|
||||
&& (is_null($oe_kurzbz) || ($b->kostenstelle_id=='' && ($b->oe_kurzbz=='' || $oe_kurzbz==$b->oe_kurzbz || $oe->isChild($b->oe_kurzbz, $oe_kurzbz))))
|
||||
&& (is_null($kostenstelle_id) || $kostenstelle_id==$b->kostenstelle_id))
|
||||
{
|
||||
if (($timestamp>$b->starttimestamp || $b->starttimestamp==null)
|
||||
&& ($timestamp<$b->endetimestamp || $b->endetimestamp==null))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Kostenstellenrecht ueber Organisationseinheit
|
||||
if($kostenstelle_id!='')
|
||||
{
|
||||
//Kostenstelle laden und schauen, ob auf die Organisationseinheit der Kostenstelle
|
||||
//die Berechtigung vorhanden ist
|
||||
$kostenstelle = new wawi_kostenstelle();
|
||||
if($kostenstelle->load($kostenstelle_id))
|
||||
{
|
||||
return $this->isBerechtigt($berechtigung_kurzbz, $kostenstelle->oe_kurzbz, $art);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg='Kostenstelle existiert nicht';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//wenn ein Doppelpunkt vorkommt, pruefen ob das Uebergeordnete vorhanden ist
|
||||
if($pos=mb_strpos($berechtigung_kurzbz,':')===false)
|
||||
@@ -520,7 +561,7 @@ class benutzerberechtigung extends basis_db
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->isBerechtigt(substr($berechtigung_kurzbz,0,$pos-1), $oe_kurzbz, $art, $fachbereich_kurzbz);
|
||||
return $this->isBerechtigt(substr($berechtigung_kurzbz,0,$pos-1), $oe_kurzbz, $art, $kostenstelle_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,23 @@ function get_uid()
|
||||
//return 'pam';
|
||||
}
|
||||
|
||||
function get_original_uid()
|
||||
{
|
||||
if(isset($_SERVER['REMOTE_USER']))
|
||||
return (isset($_SERVER['REMOTE_USER'])?mb_strtolower(trim($_SERVER['REMOTE_USER'])):'');
|
||||
else
|
||||
{
|
||||
if(isset($_SESSION['user_original']))
|
||||
return $_SESSION['user_original'];
|
||||
}
|
||||
}
|
||||
|
||||
function login_as_user($uid)
|
||||
{
|
||||
$_SESSION['user']=$uid;
|
||||
return true;
|
||||
}
|
||||
|
||||
function crlf()
|
||||
{
|
||||
// doing some DOS-CRLF magic...
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 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
|
||||
* Karl Burkhart <burkhart@technikum-wien.at
|
||||
*/
|
||||
/**
|
||||
* Enthaelt das Array fuer die Menuepunkt der WaWi-Seite
|
||||
*/
|
||||
$menu=array
|
||||
(
|
||||
'Administration'=> array
|
||||
(
|
||||
'name'=>'Administration', 'opener'=>'true', 'hide'=>'false', 'permissions'=>array('wawi/kostenstelle','wawi/konto'),
|
||||
|
||||
'Konto'=>array
|
||||
(
|
||||
'name'=>'Konto', 'permissions'=>array('wawi/konto'),'link'=>'kontouebersicht.php', 'target'=>'content',
|
||||
'KontoNeu'=>array('name'=>'Neu', 'link'=>'kontouebersicht.php?method=update', 'target'=>'content'),
|
||||
'KontoZusammenlegen'=>array('name'=>'Zusammenlegen', 'link'=>'kontouebersicht.php?method=merge', 'target'=>'content'),
|
||||
),
|
||||
'Kostenstelle'=>array
|
||||
(
|
||||
'name'=>'Kostenstelle', 'permissions'=>array('wawi/kostenstelle'),'link'=>'kostenstellenuebersicht.php', 'target'=>'content',
|
||||
'KostenstelleNeu'=>array('name'=>'Neu', 'link'=>'kostenstellenuebersicht.php?method=update', 'target'=>'content'),
|
||||
'KostenstelleZusammenlegen'=>array('name'=>'Zusammenlegen', 'link'=>'kostenstellenuebersicht.php?method=merge', 'target'=>'content'),
|
||||
),
|
||||
),
|
||||
'Benutzerbereich'=> array
|
||||
(
|
||||
'name'=>'Benutzerbereich', 'opener'=>'true', 'hide'=>'false','permissions'=>array('wawi/bestellung'),
|
||||
'Bestellung'=>array
|
||||
(
|
||||
'name'=>'Bestellung', 'permissions'=>array('wawi/bestellung'),'link'=>'bestellung.php', 'target'=>'content',
|
||||
'BestellungNeu'=>array('name'=>'Neu', 'link'=>'bestellung.php?mehtod=update', 'target'=>'content'),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
+73
-191
@@ -1,225 +1,107 @@
|
||||
/* Copyright (C) 2010 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
|
||||
* Karl Burkhart <burkhart@technikum-wien.at>.
|
||||
*/
|
||||
@charset "utf-8";
|
||||
|
||||
A:link {text-decoration: none;
|
||||
img
|
||||
{
|
||||
border:0;
|
||||
}
|
||||
|
||||
A:link
|
||||
{
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
A:visited {text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
A:active {text-decoration: underline;
|
||||
color: blue;
|
||||
}
|
||||
A:visited
|
||||
{
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
A.neutral:link {text-decoration: underline;
|
||||
A:active
|
||||
{
|
||||
text-decoration: underline;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
A:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
color: black;
|
||||
}
|
||||
|
||||
}
|
||||
A.neutral:visited {text-decoration: underline;
|
||||
color: black;
|
||||
}
|
||||
A.neutral:active {text-decoration: underline;
|
||||
color: black;
|
||||
}
|
||||
A img{text-decoration: none;
|
||||
border:none;
|
||||
|
||||
}
|
||||
|
||||
B {
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
}
|
||||
|
||||
BODY,H1,H2,H3,H4,H5,H6,P,I,TD,TH {
|
||||
BODY,H1,H2,H3,H4,H5,H6,P,I,TD,TH
|
||||
{
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
color:black;
|
||||
}
|
||||
}
|
||||
|
||||
BODY,TD,TH,P,I {
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
td.blue { font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 1pt;
|
||||
background:blue
|
||||
}
|
||||
|
||||
td.darkgray {
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 1pt;
|
||||
background:darkgray;
|
||||
}
|
||||
|
||||
td.grays{white-space:nowrap;
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 8pt;
|
||||
font-weight: normal;
|
||||
background:#EEEEEE;
|
||||
}
|
||||
|
||||
td.white{ width:170pt;
|
||||
text-align:right;
|
||||
white-space:nowrap;
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 10pt;
|
||||
font-weight: normal;
|
||||
background:#FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
td.yellow {
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 10pt;
|
||||
background:#E1DD00;
|
||||
}
|
||||
|
||||
th.yellow {
|
||||
white-space:nowrap;
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 9pt;
|
||||
font-weight: 900;
|
||||
background:#E1DD00;
|
||||
background:#DCE4EF;
|
||||
}
|
||||
|
||||
th.yellows {
|
||||
white-space:nowrap;
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 8pt;
|
||||
font-weight: 600;
|
||||
background:#E1DD00;
|
||||
background:#DCE4EF;
|
||||
}
|
||||
|
||||
|
||||
H1 {
|
||||
H1
|
||||
{
|
||||
font-size: 14pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
|
||||
H3,H2 {
|
||||
font-size: 12pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
div.firma {
|
||||
border-style:none;
|
||||
border-width:thin;
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 10pt;
|
||||
font-weight: 900;
|
||||
background-color:yellow;
|
||||
width:627;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
div.DCE4EF {
|
||||
border-style:none;
|
||||
border-width:thin;
|
||||
font-family: Verdana,Lucida,Helvetica,Arial;
|
||||
font-size: 10pt;
|
||||
font-weight: 900;
|
||||
background:#DCE4EF;
|
||||
width:627;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.liste {
|
||||
font-family: Arial,Lucida,Verdana,Helvetica;
|
||||
FONT-SIZE: 9pt;
|
||||
color:black;
|
||||
}
|
||||
|
||||
.mod {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
.del {
|
||||
color: #ee2222;
|
||||
}
|
||||
|
||||
.new {
|
||||
color: #22bb22;
|
||||
}
|
||||
body.menue
|
||||
{
|
||||
background-color: #D0DCE0;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
INPUT, SELECT {
|
||||
INPUT, SELECT
|
||||
{
|
||||
font-family: Courier New,Arial,TimesNewRoman;
|
||||
font-size: 9pt;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.number {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.button_gr {
|
||||
font-family: Arial,Helvetica;
|
||||
font-size: 9pt;
|
||||
background: #aaffaa;
|
||||
}
|
||||
|
||||
.button {
|
||||
font-family: Arial,Helvetica;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
TD.black {
|
||||
font-family: Lucida,Verdana,Helvetica,Arial;
|
||||
font-size: 9pt;
|
||||
color:black;
|
||||
}
|
||||
|
||||
TD.content {
|
||||
font-family: Lucida,Verdana,Helvetica,Arial;
|
||||
FONT-SIZE: 9pt;
|
||||
color:lightgreen;
|
||||
}
|
||||
|
||||
TD.small {
|
||||
text-align:left;
|
||||
font-family: Lucida,Verdana,Helvetica,Arial;
|
||||
font-size: 8pt;
|
||||
font-weight: normal;
|
||||
color:white;
|
||||
background:blue
|
||||
}
|
||||
|
||||
BODY { background-color:#F5F5F5;
|
||||
margin-left:5pt;
|
||||
}
|
||||
|
||||
BODY.v1 {
|
||||
BODY
|
||||
{
|
||||
background-color:#F5F5F5;
|
||||
padding:0pt;
|
||||
margin:0pt;
|
||||
margin-height=0pt;
|
||||
margin-width=0pt;
|
||||
}
|
||||
margin-left:5pt;
|
||||
}
|
||||
|
||||
ul {list-style-type:none}
|
||||
ul.disc {list-style-type:disc}
|
||||
|
||||
.frmField {background: #dedede;}
|
||||
|
||||
table.tablesorter tbody td {
|
||||
table.tablesorter tbody td
|
||||
{
|
||||
color: #3D3D3D;
|
||||
padding: 4px;
|
||||
background-color: #EEEEEE;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.tablesorter tbody tr.odd td {
|
||||
|
||||
table.tablesorter tbody tr.odd td
|
||||
{
|
||||
background-color:lightgray;
|
||||
}
|
||||
|
||||
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
|
||||
table.tablesorter thead tr th, table.tablesorter tfoot tr th
|
||||
{
|
||||
background:#E1DD00;
|
||||
background:#DCE4EF;
|
||||
border: 1px solid #FFF;
|
||||
font-size: 8pt;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
|
||||
ul
|
||||
{
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 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: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <karl.burkhart@technikum-wien.at>.
|
||||
*/
|
||||
require_once('../config/wawi.config.inc.php');
|
||||
require_once('auth.php');
|
||||
?>
|
||||
<!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">
|
||||
<title>WaWi Home</title>
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<br /><br /><br />
|
||||
<br /><br /><br />
|
||||
<br /><br /><br />
|
||||
<br /><br /><br />
|
||||
<br />
|
||||
|
||||
<center><img width="700px" src="../skin/images/wawi_logo_sz.png" ></center>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 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: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <karl.burkhart@technikum-wien.at>.
|
||||
*/
|
||||
require_once('../config/wawi.config.inc.php');
|
||||
require_once('auth.php');
|
||||
|
||||
$menu = isset($_GET['menu'])?$_GET['menu']:'menu.php';
|
||||
$content = isset($_GET['content'])?$_GET['content']:'home.php';
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>WaWi - Warenwirtschaft</title>
|
||||
</head>
|
||||
<frameset cols="200,*">
|
||||
<frame src="'.$menu.'" name="menu" />
|
||||
<frame src="'.$content.'" name="content" />
|
||||
<noframes>
|
||||
<body>
|
||||
<h1>Error</h1>
|
||||
<p>Ihr Browser unterstuetzt leider keine Frames</p>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
';
|
||||
?>
|
||||
@@ -65,7 +65,7 @@ require_once('../include/sprache.class.php');
|
||||
$id = '';
|
||||
$konto = new wawi_konto();
|
||||
$user=get_uid();
|
||||
echo 'USER: '.$user. '<br><br>';
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
@@ -81,9 +81,10 @@ if(isset($_GET['method']))
|
||||
{
|
||||
if(!$rechte->isBerechtigt('wawi/konto',null,'su'))
|
||||
die('Keine Berechtigung für Update');
|
||||
|
||||
|
||||
if(isset($_GET['id']))
|
||||
{
|
||||
echo '<h1>Konto - Bearbeiten</h1>';
|
||||
//Update Konto
|
||||
$id = $_GET['id'];
|
||||
if($konto->load($id))
|
||||
@@ -140,6 +141,7 @@ if(isset($_GET['method']))
|
||||
if(!$rechte->isBerechtigt('wawi/konto',null,'sui'))
|
||||
die('Keine Berechtigung für Insert');
|
||||
|
||||
echo '<h1>Konto - Neu</h1>';
|
||||
// neues Konto anlegen
|
||||
echo "<form action=\"kontouebersicht.php?method=save\" method=\"post\">";
|
||||
echo '<table border=0>';
|
||||
@@ -243,6 +245,7 @@ if(isset($_GET['method']))
|
||||
if(!$rechte->isBerechtigt('wawi/konto',null,'su'))
|
||||
die('Keine Berechtigung für Update');
|
||||
|
||||
echo '<h1>Konto - Zusammenlegen</h1>';
|
||||
$konto = new wawi_konto();
|
||||
|
||||
if(isset($_POST['radio_1']) && isset($_POST['radio_2']))
|
||||
@@ -393,8 +396,9 @@ else
|
||||
// Anzeige aller Konten
|
||||
if($konto->getAll(null, 'kontonr' ))
|
||||
{
|
||||
echo '<a href="kontouebersicht.php?method=update">neues Konto anlegen </a><br>';
|
||||
echo '<a href="kontouebersicht.php?method=merge">Konten zusammenlegen </a><br><br>';
|
||||
echo '<h1>Konto - Übersicht</h1>';
|
||||
//echo '<a href="kontouebersicht.php?method=update">neues Konto anlegen </a><br>';
|
||||
//echo '<a href="kontouebersicht.php?method=merge">Konten zusammenlegen </a><br><br>';
|
||||
|
||||
echo '<table id="myTable" class="tablesorter"> <thead>';
|
||||
echo '<tr>
|
||||
@@ -437,11 +441,7 @@ else
|
||||
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
echo '<a href="logout.php">abmelden</a><br>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -21,13 +21,12 @@
|
||||
*/
|
||||
|
||||
require_once('../config/wawi.config.inc.php');
|
||||
require_once ('../include/organisationseinheit.class.php');
|
||||
require_once('../include/organisationseinheit.class.php');
|
||||
require_once('auth.php');
|
||||
require_once('../include/wawi_kostenstelle.class.php');
|
||||
require_once('../include/wawi_konto.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@@ -63,7 +62,12 @@ require_once('../include/benutzerberechtigung.class.php');
|
||||
|
||||
$kostenstelle = new wawi_kostenstelle();
|
||||
$user=get_uid();
|
||||
echo 'USER: '.$user. '<br><br>';
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(!$rechte->isBerechtigt('wawi/kostenstelle'))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
if(isset($_GET['method']))
|
||||
{
|
||||
@@ -72,7 +76,10 @@ if(isset($_GET['method']))
|
||||
//wenn id gesetzt ist --> update ansonsten neue anlegen
|
||||
if(isset($_GET['id']))
|
||||
{
|
||||
echo '<h1>Kostenstelle - Bearbeiten</h1>';
|
||||
$id = $_GET['id'];
|
||||
if(!$rechte->isberechtigt('wawi/kostenstelle',null, 'su',$id))
|
||||
die('Sie haben keine Berechtigung für diese Kostenstelle');
|
||||
|
||||
//gültige ID
|
||||
if(is_numeric($id))
|
||||
@@ -158,6 +165,11 @@ if(isset($_GET['method']))
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<h1>Kostenstelle - Neu</h1>';
|
||||
|
||||
if(!$rechte->isberechtigt('wawi/kostenstelle',null, 'sui'))
|
||||
die('Sie haben keine Berechtigung zum Anlegen von Kostenstellen');
|
||||
|
||||
//neue Anlegen
|
||||
$oe = new organisationseinheit();
|
||||
$oe->getAll();
|
||||
@@ -214,6 +226,9 @@ if(isset($_GET['method']))
|
||||
{
|
||||
$id = (isset($_GET['id'])?$_GET['id']:null);
|
||||
|
||||
if(!$rechte->isberechtigt('wawi/kostenstelle',null, 'suid'))
|
||||
die('Sie haben keine Berechtigung zum Löschen von Kostenstellen');
|
||||
|
||||
if($kostenstelle->delete($id))
|
||||
{
|
||||
echo 'Kostenstelle erfolgreich gelöscht. <br>';
|
||||
@@ -231,9 +246,12 @@ if(isset($_GET['method']))
|
||||
$kostenstelle = new wawi_kostenstelle();
|
||||
$aktiv = '';
|
||||
$ausgabe ="Kostenstelle wurde erfolgreich upgedated!";
|
||||
|
||||
|
||||
if(isset($_GET['id']))
|
||||
{
|
||||
if(!$rechte->isberechtigt('wawi/kostenstelle',null, 'su',$_GET['id']))
|
||||
die('Sie haben keine Berechtigung zum Ändern der Kostenstelle');
|
||||
|
||||
//Update
|
||||
$kostenstelle->load($_GET['id']);
|
||||
$kostenstelle->kostenstelle_id = $_GET['id'];
|
||||
@@ -257,6 +275,9 @@ if(isset($_GET['method']))
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$rechte->isberechtigt('wawi/kostenstelle',null, 'suid'))
|
||||
die('Sie haben keine Berechtigung zum Anlegen von Kostenstellen');
|
||||
|
||||
// neue Kostenstelle
|
||||
$kostenstelle->new = true;
|
||||
$kostenstelle->aktiv = true;
|
||||
@@ -283,6 +304,10 @@ if(isset($_GET['method']))
|
||||
}
|
||||
else if ($_GET['method']=="allocate")
|
||||
{
|
||||
if(!$rechte->isberechtigt('wawi/kostenstelle',null, 'su',$_GET['id']))
|
||||
die('Sie haben keine Berechtigung zum Ändern der Kostenstelle');
|
||||
|
||||
echo '<h1>Kostenstelle - Konten zuordnen</h1>';
|
||||
$kostenstelle = new wawi_kostenstelle();
|
||||
$konto = new wawi_konto();
|
||||
|
||||
@@ -338,8 +363,12 @@ if(isset($_GET['method']))
|
||||
|
||||
echo '<tr><td> </td></tr></table> <input name ="submit" type="submit" value="Speichern"></form>';
|
||||
}
|
||||
else if ($_GET['method']=="merge")
|
||||
else if ($_GET['method']=="merge")
|
||||
{
|
||||
if(!$rechte->isberechtigt('wawi/kostenstelle',null, 'suid'))
|
||||
die('Sie haben keine Berechtigung zum Zusammenlegen von Kostenstellen');
|
||||
|
||||
echo '<h1>Kostenstelle - Zusammenlegen</h1>';
|
||||
//Kostenstellen zusammenlegen
|
||||
$kostenstelle = new wawi_kostenstelle();
|
||||
|
||||
@@ -467,11 +496,14 @@ if(isset($_GET['method']))
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<h1>Kostenstelle - Übersicht</h1>';
|
||||
if(!$rechte->isberechtigt('wawi/kostenstelle',null, 's'))
|
||||
die('Sie haben keine Berechtigung zum Anzeigen der Kostenstellen');
|
||||
|
||||
if($kostenstelle->getAll())
|
||||
{
|
||||
echo '<a href="kostenstellenuebersicht.php?method=update">neue Kostenstelle anlegen </a><br>';
|
||||
echo '<a href="kostenstellenuebersicht.php?method=merge">Konten zusammenlegen </a><br><br>';
|
||||
//echo '<a href="kostenstellenuebersicht.php?method=update">neue Kostenstelle anlegen </a><br>';
|
||||
//echo '<a href="kostenstellenuebersicht.php?method=merge">Konten zusammenlegen </a><br><br>';
|
||||
|
||||
echo '<table id="myTable" class="tablesorter"> <thead>';
|
||||
|
||||
@@ -501,9 +533,7 @@ else
|
||||
echo '</tr>';
|
||||
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
echo '<a href="logout.php">abmelden</a><br>';
|
||||
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+27
-9
@@ -1,4 +1,24 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 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: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <karl.burkhart@technikum-wien.at>.
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/../config/wawi.config.inc.php');
|
||||
require_once(dirname(__FILE__).'/../include/wawi_konto.class.php');
|
||||
require_once(dirname(__FILE__).'/../include/functions.inc.php');
|
||||
@@ -18,6 +38,7 @@ if (isset($_POST['username']))
|
||||
if (checkldapuser($username,$passwort))
|
||||
{
|
||||
$_SESSION['user'] = $username;
|
||||
$_SESSION['user_original'] = $username;
|
||||
if(isset($_SESSION['request_uri']))
|
||||
$path = $_SESSION['request_uri'];
|
||||
else
|
||||
@@ -37,16 +58,13 @@ if (isset($_POST['username']))
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
|
||||
<head>
|
||||
<title>Login - Bestellwesen Technikum Wien V 2.0.0</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body { font-family: Arial, Helvetica, sans-serif }
|
||||
td { font-family: Arial, Helvetica, sans-serif }
|
||||
-->
|
||||
</style>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Login - Bestellwesen Technikum Wien V 2.0.0</title>
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="#f5f5f5">
|
||||
<body>
|
||||
<br />
|
||||
<br />
|
||||
<form name="login" action="login.php" method=post>
|
||||
<table border=0 bgcolor="#eeeeee" align="center" cellspacing=0 cellpadding=4>
|
||||
<th colspan=2 bgcolor="#666666"><font color="white">Login</font></th>
|
||||
|
||||
+44
-18
@@ -1,26 +1,52 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
|
||||
$hostname = $_SERVER['HTTP_HOST'];
|
||||
$path = dirname($_SERVER['PHP_SELF']);
|
||||
|
||||
echo "Sie wurden erfolgreich ausgeloggt!!<br> Sie werden sofort weitergeleitet! ";
|
||||
|
||||
// header('Location: http://'.$hostname.($path == '/' ? '' : $path).'/login.php');
|
||||
/* Copyright (C) 2010 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: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <karl.burkhart@technikum-wien.at>.
|
||||
*/
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>logout</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Logout</title>
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css">
|
||||
<script type="text/javascript">
|
||||
function login()
|
||||
{
|
||||
document.location="login.php";
|
||||
}
|
||||
window.setTimeout("login()", 2500);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"></script>
|
||||
<script> function login() {
|
||||
document.location="login.php";
|
||||
|
||||
}
|
||||
window.setTimeout("login()", 3000);
|
||||
</script>
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
?>
|
||||
<center>
|
||||
<strong>
|
||||
<br />
|
||||
<br />
|
||||
Sie wurden erfolgreich ausgeloggt!!<br /> Sie werden sofort weitergeleitet!<br />
|
||||
</strong>
|
||||
<br />
|
||||
Sollten Sie nicht weitergeleitet werden klicken Sie bitte <a href="login.php">hier</a>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 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: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <karl.burkhart@technikum-wien.at>.
|
||||
*/
|
||||
require_once('../config/wawi.config.inc.php');
|
||||
require_once('auth.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/'.EXT_FKT_PATH.'/wawi_menu_main.inc.php');
|
||||
|
||||
$user_original = get_original_uid();
|
||||
|
||||
$berechtigung_orig = new benutzerberechtigung();
|
||||
$berechtigung_orig->getBerechtigungen($user_original);
|
||||
|
||||
if(isset($_GET['loginasuser']) && $berechtigung_orig->isBerechtigt('system/loginasuser'))
|
||||
{
|
||||
login_as_user($_GET['uid']);
|
||||
}
|
||||
|
||||
$user = get_uid();
|
||||
$berechtigung = new benutzerberechtigung();
|
||||
$berechtigung->getBerechtigungen($user);
|
||||
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>WaWi Menue</title>
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body class="menue">
|
||||
<h3><a href="home.php" target="content">WaWi Home</a></h3>
|
||||
|
||||
<hr>';
|
||||
|
||||
function checkpermission($permissions)
|
||||
{
|
||||
global $berechtigung;
|
||||
|
||||
$permission=false;
|
||||
foreach ($permissions as $perm)
|
||||
{
|
||||
if($berechtigung->isBerechtigt($perm))
|
||||
{
|
||||
$permission=true;
|
||||
}
|
||||
}
|
||||
return $permission;
|
||||
}
|
||||
|
||||
//Menue generieren aus wawi_menu_main.inc.php
|
||||
$umbruch=true;
|
||||
|
||||
foreach($menu AS $m1)
|
||||
{
|
||||
if (is_array($m1) && isset($m1['name']))
|
||||
{
|
||||
if (isset($m1['permissions']) && !checkpermission($m1['permissions']))
|
||||
continue;
|
||||
|
||||
if (isset($m1['link']))
|
||||
echo '<a href="'.$m1['link'].'" ';
|
||||
if (isset($m1['target']))
|
||||
echo 'target="'.$m1['target'].'" ';
|
||||
if (isset($m1['link']))
|
||||
echo '>';
|
||||
|
||||
if (isset($m1['name']) && !isset($m1['link']) )
|
||||
{
|
||||
if($umbruch)
|
||||
echo '<br />';
|
||||
echo '<strong>'.$m1['name'].'</strong><br />';
|
||||
}
|
||||
else
|
||||
echo $m1['name'];
|
||||
|
||||
if (isset($m1['link']))
|
||||
echo '</a>';
|
||||
echo '<br />';
|
||||
$umbruch=true;
|
||||
foreach($m1 AS $m2)
|
||||
{
|
||||
if (is_array($m2) && isset($m2['name']))
|
||||
{
|
||||
if (isset($m2['permissions']) && !checkpermission($m2['permissions']))
|
||||
continue;
|
||||
echo "\n\t\t".'<img title="'.$m2['name'].'" src="../skin/images/bullet_go.png" alt="page go" border="0"> ';
|
||||
if (isset($m2['link']))
|
||||
echo '<a href="'.$m2['link'].'" ';
|
||||
if (isset($m2['target']))
|
||||
echo 'target="'.$m2['target'].'" ';
|
||||
if (isset($m2['link']))
|
||||
echo '>';
|
||||
if (isset($m2['name']))
|
||||
echo $m2['name'];
|
||||
if (isset($m2['link']))
|
||||
echo '</a><br>';
|
||||
$umbruch=false;
|
||||
|
||||
foreach($m2 AS $m3)
|
||||
{
|
||||
if (is_array($m3) && isset($m3['name']))
|
||||
{
|
||||
if (isset($m3['permissions']) && !checkpermission($m3['permissions']))
|
||||
continue;
|
||||
echo "\n\t\t ".'<img title="'.$m3['name'].'" src="../skin/images/bullet_go.png" alt="page go" border="0"> ';
|
||||
if (isset($m3['link']))
|
||||
echo '<a href="'.$m3['link'].'" ';
|
||||
if (isset($m3['target']))
|
||||
echo 'target="'.$m3['target'].'" ';
|
||||
if (isset($m3['link']))
|
||||
echo '>';
|
||||
if (isset($m3['name']))
|
||||
echo $m3['name'];
|
||||
if (isset($m3['link']))
|
||||
echo '</a><br>';
|
||||
$umbruch=false;
|
||||
}
|
||||
}
|
||||
echo '<br />';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Logout Button
|
||||
echo '
|
||||
<hr>
|
||||
<a href="logout.php" target="_top"><b>Logout</b></a>
|
||||
<br />
|
||||
<p>
|
||||
<table cellpadding=2>
|
||||
<tr bgcolor="#c0cce0" >
|
||||
<th>Benutzer:</th>
|
||||
<td>'.$user.'</td>
|
||||
</tr>';
|
||||
|
||||
//Wenn der eingeloggte Benutzer nicht der original Benutzer ist, dann doe Original-UID anzeigen
|
||||
if($user!=$user_original)
|
||||
{
|
||||
echo '<tr bgcolor="#c0cce0" >
|
||||
<th>Benutzer Original:</th>
|
||||
<td><a href="'.$_SERVER['PHP_SELF'].'?loginasuser&uid='.$user_original.'">'.$user_original.'</a></td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
// Formular zum Wechseln des Benutzers anzeigen wenn berechtigt
|
||||
if($berechtigung_orig->isBerechtigt('system/loginasuser'))
|
||||
{
|
||||
echo '<tr bgcolor="#c0cce0" >
|
||||
<th>Login as:</th>
|
||||
<td nowrap>
|
||||
<form action="'.$_SERVER['PHP_SELF'].'" method="GET">
|
||||
<input type="text" name="uid" size="10">
|
||||
<input type="submit" name="loginasuser" value="Go">
|
||||
</form>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
';
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user