diff --git a/cis/private/mailverteiler.php b/cis/private/mailverteiler.php
index b2dd34925..d44112d25 100644
--- a/cis/private/mailverteiler.php
+++ b/cis/private/mailverteiler.php
@@ -216,6 +216,9 @@ if(!$is_lector)
$zeile=0;
foreach($grp_obj->result as $row1)
{
+ if(!$row1->aktiv)
+ continue;
+
$zeile++;
if ($zeile%2)
{
@@ -232,18 +235,17 @@ if(!$is_lector)
// display the open-link only when its a closed dispatcher and if the user has status lector
// if dispatcher has attribute aktiv=true no opening action is needed
echo "
";
- if(!$row1->aktiv && MAILVERTEILER_SPERRE)
+ if($row1->gesperrt && MAILVERTEILER_SPERRE)
{
//Studentenvertreter duerfen den Verteiler fuer alle Studenten oeffnen
if($is_lector || ($is_stdv && mb_strtolower($row1->gruppe_kurzbz)=='tw_std'))
{
/* open a popup containing the final dispatcher address */
- if(MAILVERTEILER_SPERRE)
- echo ' ';
+ echo ' ';
echo " ";
echo " ";
- echo "".strtolower($row1->gruppe_kurzbz)."@".DOMAIN." ";
+ echo "".strtolower($row1->gruppe_kurzbz)."@".DOMAIN." ";
echo " ";
}
else
@@ -379,10 +381,10 @@ if(!$is_lector)
echo "";
//Menue oeffnen wenn kurzbz uebergeben wird
- if(isset($_GET['kbzl']) AND $_GET['kbzl']!='')
+ if(isset($_GET['kbzl']) && $_GET['kbzl']!='')
{
echo "";
}
?>
diff --git a/cis/private/open_grp.php b/cis/private/open_grp.php
index d958365e9..f7df80f2e 100644
--- a/cis/private/open_grp.php
+++ b/cis/private/open_grp.php
@@ -22,11 +22,31 @@
require_once('../../config/cis.config.inc.php');
require_once('../../include/functions.inc.php');
require_once('../../include/phrasen.class.php');
+require_once('../../include/basis_db.class.php');
+require_once('../../include/gruppe.class.php');
$sprache = getSprache();
$p = new phrasen($sprache);
$uid = get_uid();
-
+$db = new basis_db();
+if(!isset($_REQUEST['grp']))
+ die('Falsche Parameter');
+
+if(mb_strlen($_REQUEST['grp'])>32)
+ die('Grp ungueltig');
+
+//Pruefen ob es eine gueltige Gruppe ist
+$gruppe = new gruppe();
+if(!$gruppe->exists($_REQUEST['grp']))
+{
+ //Wenn es keine Gruppe in der DB ist, kann es
+ //noch ein Studierendenverteiler sein
+ //bif_std
+ if(!preg_match('/^\D\D\D_std$/', $_REQUEST['grp']))
+ {
+ die('Ungueltige Gruppe');
+ }
+}
function mail_id_generator()
{
mt_srand((double)microtime()*1000000);
@@ -63,8 +83,7 @@ function mail_id_generator()
return $mail_id;
}
-echo '
-
+echo '
@@ -99,14 +118,14 @@ if(isset($_REQUEST['token']) && isset($_REQUEST['grp']))
// for the users
echo "
- ".$_REQUEST['desc']."
+ ".$db->convert_html_chars($_REQUEST['desc'])."
".$p->t('mailverteiler/geoeffnet')." (Code: ".$mail_id.")
".$p->t('mailverteiler/klickenZumSchicken')."
- ".$p->t('mailverteiler/infoBenutzung',array($_REQUEST['grp'].$mail_id."@technikum-wien.at"))."
+ ".$p->t('mailverteiler/infoBenutzung',array($_REQUEST['grp'].$mail_id."@".DOMAIN))."
@@ -120,7 +139,7 @@ else
}
else
{
- echo $p->t('mailverteiler/bestaetigeOeffnen',array($_REQUEST['grp']))." : ".$p->t('mailverteiler/bestaetige')." ";
+ echo $p->t('mailverteiler/bestaetigeOeffnen',array($_REQUEST['grp']))." : convert_html_chars($_REQUEST['desc'])."&token=1\">".$p->t('mailverteiler/bestaetige')." ";
}
}
diff --git a/include/gruppe.class.php b/include/gruppe.class.php
index 06b18598e..37aa578d3 100644
--- a/include/gruppe.class.php
+++ b/include/gruppe.class.php
@@ -44,6 +44,7 @@ class gruppe extends basis_db
public $insertamum; // timestamp
public $insertvon; // varchar(16)
public $orgform_kurzbz;
+ public $gesperrt=false; // boolean
/**
* Konstruktor - Laedt optional eine Gruppe
@@ -64,7 +65,7 @@ class gruppe extends basis_db
*/
public function delete($gruppe_kurzbz)
{
- $qry ="DELETE FROM public.tbl_gruppe WHERE gruppe_kurzbz='".addslashes($gruppe_kurzbz)."'";
+ $qry ="DELETE FROM public.tbl_gruppe WHERE gruppe_kurzbz=".$this->db_add_param($gruppe_kurzbz);
if($this->db_query($qry))
return true;
@@ -82,7 +83,7 @@ class gruppe extends basis_db
*/
public function exists($gruppe_kurzbz)
{
- $qry = "SELECT count(*) as anzahl FROM public.tbl_gruppe WHERE gruppe_kurzbz='".addslashes(mb_strtoupper($gruppe_kurzbz))."'";
+ $qry = "SELECT count(*) as anzahl FROM public.tbl_gruppe WHERE gruppe_kurzbz=".$this->db_add_param(mb_strtoupper($gruppe_kurzbz));
if($this->db_query($qry))
{
@@ -112,7 +113,7 @@ class gruppe extends basis_db
*/
public function load($gruppe_kurzbz)
{
- $qry = "SELECT * FROM public.tbl_gruppe WHERE gruppe_kurzbz='".addslashes($gruppe_kurzbz)."'";
+ $qry = "SELECT * FROM public.tbl_gruppe WHERE gruppe_kurzbz=".$this->db_add_param($gruppe_kurzbz);
if($this->db_query($qry))
{
@@ -123,18 +124,19 @@ class gruppe extends basis_db
$this->bezeichnung = $row->bezeichnung;
$this->semester = $row->semester;
$this->sort = $row->sort;
- $this->mailgrp = ($row->mailgrp=='t'?true:false);
- $this->lehre = ($row->lehre=='t'?true:false);
+ $this->mailgrp = $this->db_parse_bool($row->mailgrp);
+ $this->lehre = $this->db_parse_bool($row->lehre);
$this->beschreibung = $row->beschreibung;
- $this->sichtbar = ($row->sichtbar=='t'?true:false);
- $this->aktiv = ($row->aktiv=='t'?true:false);
- $this->content_visible = ($row->content_visible=='t'?true:false);
- $this->generiert = ($row->generiert=='t'?true:false);
+ $this->sichtbar = $this->db_parse_bool($row->sichtbar);
+ $this->aktiv = $this->db_parse_bool($row->aktiv);
+ $this->content_visible = $this->db_parse_bool($row->content_visible);
+ $this->generiert = $this->db_parse_bool($row->generiert);
$this->updateamum = $row->updateamum;
$this->updatevon = $row->updatevon;
$this->insertamum = $row->insertamum;
$this->insertvon = $row->insertvon;
$this->orgform_kurzbz = $row->orgform_kurzbz;
+ $this->gesperrt = $this->db_parse_bool($row->gesperrt);
return true;
}
else
@@ -170,18 +172,19 @@ class gruppe extends basis_db
$grp_obj->bezeichnung = $row->bezeichnung;
$grp_obj->semester = $row->semester;
$grp_obj->sort = $row->sort;
- $grp_obj->lehre = ($row->lehre=='t'?true:false);
- $grp_obj->mailgrp = ($row->mailgrp=='t'?true:false);
+ $grp_obj->lehre = $this->db_parse_bool($row->lehre);
+ $grp_obj->mailgrp = $this->db_parse_bool($row->mailgrp);
$grp_obj->beschreibung = $row->beschreibung;
- $grp_obj->sichtbar = ($row->sichtbar=='t'?true:false);
- $grp_obj->aktiv = ($row->aktiv=='t'?true:false);
- $grp_obj->content_visible = ($row->content_visible=='t'?true:false);
- $grp_obj->generiert = ($row->generiert=='t'?true:false);
+ $grp_obj->sichtbar = $this->db_parse_bool($row->sichtbar);
+ $grp_obj->aktiv = $this->db_parse_bool($row->aktiv);
+ $grp_obj->content_visible = $this->db_parse_bool($row->content_visible);
+ $grp_obj->generiert = $this->db_parse_bool($row->generiert);
$grp_obj->updateamum = $row->updateamum;
$grp_obj->updatevon = $row->updatevon;
$grp_obj->insertamum = $row->insertamum;
$grp_obj->insertvon = $row->insertvon;
$grp_obj->orgform_kurzbz = $row->orgform_kurzbz;
+ $grp_obj->gesperrt = $this->db_parse_bool($row->gesperrt);
$this->result[] = $grp_obj;
}
@@ -203,7 +206,7 @@ class gruppe extends basis_db
public function countStudenten($gruppe_kurzbz)
{
$qry = "SELECT count(*) as anzahl FROM public.tbl_benutzergruppe
- WHERE gruppe_kurzbz='".addslashes($gruppe_kurzbz)."'";
+ WHERE gruppe_kurzbz=".$this->db_add_param($gruppe_kurzbz);
if($this->db_query($qry))
{
@@ -235,15 +238,15 @@ class gruppe extends basis_db
{
$qry = 'SELECT * FROM public.tbl_gruppe WHERE 1=1';
if(!is_null($studiengang_kz) && $studiengang_kz!='')
- $qry .= " AND studiengang_kz='".addslashes($studiengang_kz)."'";
+ $qry .= " AND studiengang_kz=".$this->db_add_param($studiengang_kz);
if(!is_null($semester) && $semester!='')
- $qry .= " AND semester='".addslashes($semester)."'";
+ $qry .= " AND semester=".$this->db_add_param($semester);
if(!is_null($mailgrp) && $mailgrp!='')
- $qry .= " AND mailgrp=".($mailgrp?'true':'false');
+ $qry .= " AND mailgrp=".$this->db_add_param($mailgrp, FHC_BOOLEAN);
if(!is_null($sichtbar))
- $qry .= " AND sichtbar=".($sichtbar?'true':'false');
+ $qry .= " AND sichtbar=".$this->db_add_param($sichtbar, FHC_BOOLEAN);
if(!is_null($content_visible))
- $qry .= " AND content_visible=".($content_visible?'true':'false');
+ $qry .= " AND content_visible=".$this->db_add_param($content_visible, FHC_BOOLEAN);
$qry.=" ORDER BY beschreibung";
if($this->db_query($qry))
{
@@ -256,18 +259,19 @@ class gruppe extends basis_db
$grp_obj->bezeichnung = $row->bezeichnung;
$grp_obj->semester = $row->semester;
$grp_obj->sort = $row->sort;
- $grp_obj->mailgrp = ($row->mailgrp=='t'?true:false);
- $grp_obj->lehre = ($row->lehre=='t'?true:false);
+ $grp_obj->mailgrp = $this->db_parse_bool($row->mailgrp);
+ $grp_obj->lehre = $this->db_parse_bool($row->lehre);
$grp_obj->beschreibung = $row->beschreibung;
- $grp_obj->sichtbar = ($row->sichtbar=='t'?true:false);
- $grp_obj->aktiv = ($row->aktiv=='t'?true:false);
- $grp_obj->content_visible = ($row->content_visible=='t'?true:false);
- $grp_obj->generiert = ($row->generiert=='t'?true:false);
+ $grp_obj->sichtbar = $this->db_parse_bool($row->sichtbar);
+ $grp_obj->aktiv = $this->db_parse_bool($row->aktiv);
+ $grp_obj->content_visible = $this->db_parse_bool($row->content_visible);
+ $grp_obj->generiert = $this->db_parse_bool($row->generiert);
$grp_obj->updateamum = $row->updateamum;
$grp_obj->updatevon = $row->updatevon;
$grp_obj->insertamum = $row->insertamum;
$grp_obj->insertvon = $row->insertvon;
$grp_obj->orgform_kurzbz = $row->orgform_kurzbz;
+ $grp_obj->gesperrt = $this->db_parse_bool($row->gesperrt);
$this->result[] = $grp_obj;
}
@@ -275,7 +279,7 @@ class gruppe extends basis_db
}
else
{
- $this->errormsg = 'Fehler beim Laden der Gruppen'.$qry;
+ $this->errormsg = 'Fehler beim Laden der Gruppen';
return false;
}
}
@@ -375,43 +379,45 @@ class gruppe extends basis_db
$qry = 'INSERT INTO public.tbl_gruppe (gruppe_kurzbz, studiengang_kz, bezeichnung, semester, sort,
mailgrp, beschreibung, sichtbar, generiert, aktiv, lehre, content_visible,
- updateamum, updatevon, insertamum, insertvon, orgform_kurzbz)
- VALUES('.$this->addslashes($kurzbz).','.
- $this->addslashes($this->studiengang_kz).','.
- $this->addslashes($this->bezeichnung).','.
- $this->addslashes($this->semester).','.
- $this->addslashes($this->sort).','.
- ($this->mailgrp?'true':'false').','.
- $this->addslashes($this->beschreibung).','.
- ($this->sichtbar?'true':'false').','.
- ($this->generiert?'true':'false').','.
- ($this->aktiv?'true':'false').','.
- ($this->lehre?'true':'false').','.
- ($this->content_visible?'true':'false').','.
- $this->addslashes($this->updateamum).','.
- $this->addslashes($this->updatevon).','.
- $this->addslashes($this->insertamum).','.
- $this->addslashes($this->insertvon).','.
- $this->addslashes($this->orgform_kurzbz).');';
+ updateamum, updatevon, insertamum, insertvon, orgform_kurzbz, gesperrt)
+ VALUES('.$this->db_add_param($kurzbz).','.
+ $this->db_add_param($this->studiengang_kz).','.
+ $this->db_add_param($this->bezeichnung).','.
+ $this->db_add_param($this->semester).','.
+ $this->db_add_param($this->sort).','.
+ $this->db_add_param($this->mailgrp, FHC_BOOLEAN).','.
+ $this->db_add_param($this->beschreibung).','.
+ $this->db_add_param($this->sichtbar, FHC_BOOLEAN).','.
+ $this->db_add_param($this->generiert, FHC_BOOLEAN).','.
+ $this->db_add_param($this->aktiv, FHC_BOOLEAN).','.
+ $this->db_add_param($this->lehre, FHC_BOOLEAN).','.
+ $this->db_add_param($this->content_visible, FHC_BOOLEAN).','.
+ $this->db_add_param($this->updateamum).','.
+ $this->db_add_param($this->updatevon).','.
+ $this->db_add_param($this->insertamum).','.
+ $this->db_add_param($this->insertvon).','.
+ $this->db_add_param($this->orgform_kurzbz).','.
+ $this->db_add_param($this->gesperrt, FHC_BOOLEAN).');';
}
else
{
$qry = 'UPDATE public.tbl_gruppe SET'.
- ' studiengang_kz='.$this->addslashes($this->studiengang_kz).','.
- ' bezeichnung='.$this->addslashes($this->bezeichnung).','.
- ' semester='.$this->addslashes($this->semester).','.
- ' sort='.$this->addslashes($this->sort).','.
- ' mailgrp='.($this->mailgrp?'true':'false').','.
- ' beschreibung='.$this->addslashes($this->beschreibung).','.
- ' sichtbar='.($this->sichtbar?'true':'false').','.
- ' generiert='.($this->generiert?'true':'false').','.
- ' aktiv='.($this->aktiv?'true':'false').','.
- ' lehre='.($this->lehre?'true':'false').','.
- ' content_visible='.($this->content_visible?'true':'false').','.
- ' updateamum='.$this->addslashes($this->updateamum).','.
- ' updatevon='.$this->addslashes($this->updatevon).','.
- ' orgform_kurzbz='.$this->addslashes($this->orgform_kurzbz).
- " WHERE gruppe_kurzbz=".$this->addslashes($this->gruppe_kurzbz).";";
+ ' studiengang_kz='.$this->db_add_param($this->studiengang_kz).','.
+ ' bezeichnung='.$this->db_add_param($this->bezeichnung).','.
+ ' semester='.$this->db_add_param($this->semester).','.
+ ' sort='.$this->db_add_param($this->sort).','.
+ ' mailgrp='.$this->db_add_param($this->mailgrp, FHC_BOOLEAN).','.
+ ' beschreibung='.$this->db_add_param($this->beschreibung).','.
+ ' sichtbar='.$this->db_add_param($this->sichtbar, FHC_BOOLEAN).','.
+ ' generiert='.$this->db_add_param($this->generiert, FHC_BOOLEAN).','.
+ ' aktiv='.$this->db_add_param($this->aktiv, FHC_BOOLEAN).','.
+ ' lehre='.$this->db_add_param($this->lehre, FHC_BOOLEAN).','.
+ ' content_visible='.$this->db_add_param($this->content_visible, FHC_BOOLEAN).','.
+ ' updateamum='.$this->db_add_param($this->updateamum).','.
+ ' updatevon='.$this->db_add_param($this->updatevon).','.
+ ' orgform_kurzbz='.$this->db_add_param($this->orgform_kurzbz).', '.
+ ' gesperrt='.$this->db_add_param($this->gesperrt, FHC_BOOLEAN).' '.
+ " WHERE gruppe_kurzbz=".$this->db_add_param($this->gruppe_kurzbz).";";
}
if($this->db_query($qry))
@@ -421,7 +427,7 @@ class gruppe extends basis_db
}
else
{
- $this->errormsg = 'Fehler beim Speichern der Gruppe:'.$qry;
+ $this->errormsg = 'Fehler beim Speichern der Gruppe';
return false;
}
}
diff --git a/system/FH-Complete.txp b/system/FH-Complete.txp
index e784e2749..d14de9046 100644
--- a/system/FH-Complete.txp
+++ b/system/FH-Complete.txp
@@ -26800,7 +26800,7 @@
0
0
-28
- 1650
+ 1665
249
0
598
@@ -27515,7 +27515,7 @@
155
0
905
- 824
+ 863
0
1
1
@@ -29040,7 +29040,7 @@
{EAD621D5-0EBD-4125-AE53-DBB7C5736895}
884
- 1719
+ 1726
1361
@@ -29052,11 +29052,11 @@
878
- 1750
+ 1765
847
- 1750
+ 1765
@@ -29297,8 +29297,8 @@
{20CDAA08-460E-4DFC-BFA0-02CCFEC43F1D}
- 1113
- 1170
+ 1114
+ 1180
1361
@@ -29310,11 +29310,11 @@
1091
- 1207
+ 1226
1060
- 1207
+ 1226
@@ -49060,7 +49060,7 @@
Technikum Wien
2.0
2009-04-17T11:15:21.000+02:00
- 2012-06-05T16:21:25.633+02:00
+ 2012-06-11T17:23:22.384+02:00
FH-Complete 2.0
<?xml-stylesheet type="text/xsl" href="FHCompleteTDM3PG83.xsl"?>
@@ -98115,6 +98115,47 @@ art=tbl_benutzerrolle.art & tbl_rolleberechtigung.art
0
+
+ {7A011C4D-D9EF-4441-85DF-529E4E313A27}
+ gesperrt
+ 0
+ {723FF578-5D03-4B75-9DE4-D5B247DB0AE5}
+ 0
+ 0
+ 0
+ 0
+ 1
+
+
+
+
+
+
+ 0
+
+ 1
+ 0
+ gesperrt
+ 0
+
+
+
+
+
+
+
+
+
+ {D64069A5-B04A-490B-B0A2-5144DEA81A2E}
+
+
+
+
+
+
+
+ 0
+
@@ -109028,7 +109069,7 @@ ALTER TABLE tbl_mitarbeiter ALTER COLUMN personalnummer DROP NOT NULL;
{7EC34B37-9010-4C66-8563-DAA3AACE6162}
- zugangscode
+ freigeschaltet
0
{BCE7DB0D-E8EA-4378-96C1-6A4D8224B1E5}
0
@@ -109040,13 +109081,13 @@ ALTER TABLE tbl_mitarbeiter ALTER COLUMN personalnummer DROP NOT NULL;
- 16
+
0
- 0
+ 1
0
- zugangscode
+ freigeschaltet
0
@@ -109057,7 +109098,7 @@ ALTER TABLE tbl_mitarbeiter ALTER COLUMN personalnummer DROP NOT NULL;
- {ECB8F02F-B683-4252-8508-ED9D064C9AF3}
+ {D64069A5-B04A-490B-B0A2-5144DEA81A2E}
diff --git a/system/checksystem.php b/system/checksystem.php
index d4fb49ad0..e0bef1d29 100644
--- a/system/checksystem.php
+++ b/system/checksystem.php
@@ -3645,7 +3645,10 @@ if(!@$db->db_query("SELECT * FROM testtool.vw_auswertung_kategorie_semester LIMI
// Gesperrt Attribut fuer Tabelle Gruppe
if(!@$db->db_query("SELECT gesperrt FROM public.tbl_gruppe LIMIT 1"))
{
- $qry = "ALTER TABLE public.tbl_gruppe ADD COLUMN gesperrt boolean;";
+ $qry = "ALTER TABLE public.tbl_gruppe ADD COLUMN gesperrt boolean;
+ UPDATE public.tbl_gruppe SET gesperrt=true WHERE aktiv=false AND sichtbar=true AND semester is null;
+ UPDATE public.tbl_gruppe SET aktiv=true WHERE gesperrt=true;
+ ";
if(!$db->db_query($qry))
echo 'public.tbl_gruppe: '.$db->db_last_error().' ';
diff --git a/vilesci/lehre/einheit_menu.php b/vilesci/lehre/einheit_menu.php
index 76b8e66aa..d0383edcb 100644
--- a/vilesci/lehre/einheit_menu.php
+++ b/vilesci/lehre/einheit_menu.php
@@ -157,6 +157,7 @@ function doSave()
$e->sichtbar=isset($_POST['sichtbar']);
$e->generiert=isset($_POST['generiert']);
$e->aktiv=isset($_POST['aktiv']);
+ $e->gesperrt = isset($_POST['gesperrt']);
$e->sort=$_POST['sort'];
$e->content_visible=isset($_POST['content_visible']);
@@ -220,6 +221,7 @@ function doEdit($kurzbz,$new=false)
Generiert generiert?'checked':'');?>>
Aktiv aktiv?'checked':'');?>>
ContentVisible content_visible?'checked':'');?>>
+ Gesperrt gesperrt?'checked':'');?>>
Sort