From 39a54d41f349286b6627b1da3ebfea7ad1a2c2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Thu, 6 Mar 2008 15:44:04 +0000 Subject: [PATCH] --- content/fas.xul.php | 12 ++++++------ content/statistik/bewerberstatistik.php | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/content/fas.xul.php b/content/fas.xul.php index 55dd563d1..9eb4f72f7 100644 --- a/content/fas.xul.php +++ b/content/fas.xul.php @@ -252,12 +252,6 @@ echo ''; label = "&menu-statistic-abschlusspruefung.label;" command = "menu-statistic-abschlusspruefung:command" accesskey = "&menu-statistic-abschlusspruefung.accesskey;"/> - '; '; } ?> + diff --git a/content/statistik/bewerberstatistik.php b/content/statistik/bewerberstatistik.php index 476c01aa2..23124b0e7 100644 --- a/content/statistik/bewerberstatistik.php +++ b/content/statistik/bewerberstatistik.php @@ -22,6 +22,8 @@ require_once('../../vilesci/config.inc.php'); require_once('../../include/studiensemester.class.php'); +require_once('../../include/benutzerberechtigung.class.php'); +require_once('../../include/functions.inc.php'); if(!$conn = pg_pconnect(CONN_STRING)) die('Fehler beim Connecten zur DB'); @@ -30,6 +32,9 @@ if(isset($_GET['stsem'])) $stsem = $_GET['stsem']; else $stsem = ''; + +$rechte = new benutzerberechtigung($conn); +$rechte->getBerechtigungen(get_uid()); echo ' @@ -58,6 +63,19 @@ if($stsem=='') } else { + $stgs = $rechte->getStgKz(); + + if($stgs[0]=='') + $stgwhere=''; + else + { + $stgwhere=' AND studiengang_kz in('; + foreach ($stgs as $stg) + $stgwhere.="'$stg',"; + $stgwhere = substr($stgwhere,0, strlen($stgwhere)-1); + $stgwhere.=' )'; + } + // SELECT count(*) FROM public.tbl_prestudent WHERE studiengang_kz=stg.studiengang_kz) AS prestd, $qry = "SELECT studiengang_kz, kurzbz, typ, kurzbzlang, bezeichnung, @@ -88,7 +106,7 @@ else FROM public.tbl_studiengang stg WHERE - studiengang_kz>0 AND studiengang_kz<10000 AND aktiv + studiengang_kz>0 AND studiengang_kz<10000 AND aktiv $stgwhere ORDER BY kurzbzlang; "; if($result = pg_query($conn, $qry))