mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
- LV-Plan Link ohne Authentifizierung
- Gruppenverwaltung Attribut für Zutrittssystem hinzguefügt
This commit is contained in:
@@ -190,6 +190,7 @@ $(document).ready(function()
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="cmscontent" rowspan="3" valign="top">
|
<td class="cmscontent" rowspan="3" valign="top">
|
||||||
|
|
||||||
|
<table><tr><td valign="top" width="30%">
|
||||||
<?php
|
<?php
|
||||||
if (isset($uid))
|
if (isset($uid))
|
||||||
echo '<h2>'.$titelpre.' '.$vornamen." ".$nachname.' '.$titelpost.'</h2>';
|
echo '<h2>'.$titelpre.' '.$vornamen." ".$nachname.' '.$titelpost.'</h2>';
|
||||||
@@ -197,7 +198,23 @@ $(document).ready(function()
|
|||||||
echo $p->t('lvplan/nichtVorhanden').' '.$p->t('lvplan/bitteWendenSieSichAn').'<A href="mailto:'.MAIL_ADMIN.'">Admin</A>!';
|
echo $p->t('lvplan/nichtVorhanden').' '.$p->t('lvplan/bitteWendenSieSichAn').'<A href="mailto:'.MAIL_ADMIN.'">Admin</A>!';
|
||||||
?>
|
?>
|
||||||
<a class="Item" href="stpl_week.php?pers_uid=<?php echo $uid; ?>"><?php echo $p->t("lvplan/persoenlicherLvPlan");?></a>
|
<a class="Item" href="stpl_week.php?pers_uid=<?php echo $uid; ?>"><?php echo $p->t("lvplan/persoenlicherLvPlan");?></a>
|
||||||
<BR><BR>
|
</td><td> </td><td valign="top">
|
||||||
|
<?php
|
||||||
|
echo'
|
||||||
|
<h2>'.$p->t('lvplan/persoenlichenAbonnieren').'</h2>
|
||||||
|
<div>
|
||||||
|
<a class="Item" href="../../../cms/content.php?content_id='.$p->t('dms_link/lvplanSyncFAQ').'" target="_blank">'.$p->t('lvplan/anleitungLVPlanSync').'</a>
|
||||||
|
<br>';
|
||||||
|
|
||||||
|
echo '<ul>';
|
||||||
|
$caldavurl = APP_ROOT.'webdav/lvplan.php/calendars/'.$uid.'/LVPlan-'.$uid;
|
||||||
|
echo '<li><a class="Item" href="'.$caldavurl.'">'.$p->t('lvplan/caldavURL').'</a></li>';
|
||||||
|
echo '<li><a class="Item" href="'.APP_ROOT.'webdav/lvplan.php/principals/'.$uid.'">'.$p->t('lvplan/caldavURLMac').'</a></li>';
|
||||||
|
echo '<li><a class="Item" href="'.APP_ROOT.'webdav/google.php?cal='.encryptData($uid,LVPLAN_CYPHER_KEY).'">'.$p->t('lvplan/googleURL').'</a></li>';
|
||||||
|
echo '</ul>';
|
||||||
|
echo ' </div>';
|
||||||
|
?>
|
||||||
|
</td></tr></table>
|
||||||
<FORM name="Auswahl" action="stpl_week.php">
|
<FORM name="Auswahl" action="stpl_week.php">
|
||||||
<table class="tabcontent">
|
<table class="tabcontent">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -29,12 +29,12 @@
|
|||||||
* Update: 10.9.2005 von Christian Paminger
|
* Update: 10.9.2005 von Christian Paminger
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
require_once('../../../config/cis.config.inc.php');
|
require_once(dirname(__FILE__).'/../../../config/cis.config.inc.php');
|
||||||
require_once('../../../include/functions.inc.php');
|
require_once(dirname(__FILE__).'/../../../include/functions.inc.php');
|
||||||
require_once('../../../include/wochenplan.class.php');
|
require_once(dirname(__FILE__).'/../../../include/wochenplan.class.php');
|
||||||
require_once('../../../include/datum.class.php');
|
require_once(dirname(__FILE__).'/../../../include/datum.class.php');
|
||||||
require_once('../../../include/studiensemester.class.php');
|
require_once(dirname(__FILE__).'/../../../include/studiensemester.class.php');
|
||||||
require_once('../../../include/phrasen.class.php');
|
require_once(dirname(__FILE__).'/../../../include/phrasen.class.php');
|
||||||
|
|
||||||
if(!$db = new basis_db())
|
if(!$db = new basis_db())
|
||||||
die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung'));
|
die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung'));
|
||||||
@@ -74,8 +74,33 @@ $version=(isset($_GET['version'])?$_GET['version']:2);
|
|||||||
$target=(isset($_GET['target'])?$_GET['target']:null);
|
$target=(isset($_GET['target'])?$_GET['target']:null);
|
||||||
|
|
||||||
$stsem=(isset($_GET['stsem'])?$_GET['stsem']:'');
|
$stsem=(isset($_GET['stsem'])?$_GET['stsem']:'');
|
||||||
// UID bestimmen
|
|
||||||
$uid = get_uid();
|
|
||||||
|
if(isset($_GET["cal"]))
|
||||||
|
{
|
||||||
|
// Nicht authentifizierter Zugriff per Codierter UID
|
||||||
|
// fuer Abonnierung im Google ueber /webdav/google.php
|
||||||
|
$cal = $_GET["cal"];
|
||||||
|
$uid=decryptData($cal,LVPLAN_CYPHER_KEY);
|
||||||
|
//Wenn der Key manuell geaendert wird koennen Fehlerhaft kodierte Zeichen
|
||||||
|
//entstehen und fuehren zu DB fehlern deshalb werden falsch kodierte uids hier aussortiert
|
||||||
|
if(!check_utf8($uid))
|
||||||
|
die('Fehlerhafter Parameter');
|
||||||
|
|
||||||
|
//Pruefen ob dieser Benutzer auch wirklich existiert
|
||||||
|
$benutzer = new benutzer();
|
||||||
|
if(!$benutzer->load($uid))
|
||||||
|
die('Ungueltiger Benutzername');
|
||||||
|
|
||||||
|
//Output-Format wird auf ical geaendert
|
||||||
|
$target='ical';
|
||||||
|
$format='ical';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// UID bestimmen
|
||||||
|
$uid = get_uid();
|
||||||
|
}
|
||||||
|
|
||||||
// Beginn Ende setzen
|
// Beginn Ende setzen
|
||||||
if(!isset($begin))
|
if(!isset($begin))
|
||||||
|
|||||||
@@ -114,6 +114,9 @@ define('TAGE_PRO_WOCHE','7');
|
|||||||
// Kalenderkategorie beim Export des LVPlans
|
// Kalenderkategorie beim Export des LVPlans
|
||||||
define('LVPLAN_KATEGORIE', 'StundenplanTW');
|
define('LVPLAN_KATEGORIE', 'StundenplanTW');
|
||||||
|
|
||||||
|
// Key zum Verschluesseln des LV-Plan Google Links
|
||||||
|
define('LVPLAN_CYPHER_KEY',pack('H*', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'));
|
||||||
|
|
||||||
// Default Stylesheet
|
// Default Stylesheet
|
||||||
define('DEFAULT_STYLE','tw');
|
define('DEFAULT_STYLE','tw');
|
||||||
// Layout Wechsel im CIS moeglich?
|
// Layout Wechsel im CIS moeglich?
|
||||||
|
|||||||
@@ -837,5 +837,49 @@ function check_user($username, $passwort)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function safe_b64encode($string)
|
||||||
|
{
|
||||||
|
$data = base64_encode($string);
|
||||||
|
$data = str_replace(array('+','/','='),array('-','_',''),$data);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function safe_b64decode($string)
|
||||||
|
{
|
||||||
|
$data = str_replace(array('-','_'),array('+','/'),$string);
|
||||||
|
$mod4 = strlen($data) % 4;
|
||||||
|
if ($mod4)
|
||||||
|
{
|
||||||
|
$data .= substr('====', $mod4);
|
||||||
|
}
|
||||||
|
return base64_decode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function encryptData($value,$key)
|
||||||
|
{
|
||||||
|
if(!$value)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$text = $value;
|
||||||
|
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
|
||||||
|
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
|
||||||
|
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
|
||||||
|
return trim(safe_b64encode($crypttext));
|
||||||
|
}
|
||||||
|
|
||||||
|
function decryptData($value,$key)
|
||||||
|
{
|
||||||
|
if(!$value)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$crypttext = safe_b64decode($value);
|
||||||
|
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
|
||||||
|
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
|
||||||
|
$decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $crypttext, MCRYPT_MODE_ECB, $iv);
|
||||||
|
return trim($decrypttext);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
+101
-4
@@ -45,7 +45,8 @@ class gruppe extends basis_db
|
|||||||
public $insertamum; // timestamp
|
public $insertamum; // timestamp
|
||||||
public $insertvon; // varchar(16)
|
public $insertvon; // varchar(16)
|
||||||
public $orgform_kurzbz;
|
public $orgform_kurzbz;
|
||||||
public $gesperrt=false; // boolean
|
public $gesperrt=false; // boolean
|
||||||
|
public $zutrittssystem=false; // boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Konstruktor - Laedt optional eine Gruppe
|
* Konstruktor - Laedt optional eine Gruppe
|
||||||
@@ -138,6 +139,7 @@ class gruppe extends basis_db
|
|||||||
$this->insertvon = $row->insertvon;
|
$this->insertvon = $row->insertvon;
|
||||||
$this->orgform_kurzbz = $row->orgform_kurzbz;
|
$this->orgform_kurzbz = $row->orgform_kurzbz;
|
||||||
$this->gesperrt = $this->db_parse_bool($row->gesperrt);
|
$this->gesperrt = $this->db_parse_bool($row->gesperrt);
|
||||||
|
$this->zutrittssystem = $this->db_parse_bool($row->zutrittssystem);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -186,6 +188,7 @@ class gruppe extends basis_db
|
|||||||
$grp_obj->insertvon = $row->insertvon;
|
$grp_obj->insertvon = $row->insertvon;
|
||||||
$grp_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
$grp_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||||
$grp_obj->gesperrt = $this->db_parse_bool($row->gesperrt);
|
$grp_obj->gesperrt = $this->db_parse_bool($row->gesperrt);
|
||||||
|
$grp_obj->zutrittssystem = $this->db_parse_bool($row->zutrittssystem);
|
||||||
|
|
||||||
$this->result[] = $grp_obj;
|
$this->result[] = $grp_obj;
|
||||||
}
|
}
|
||||||
@@ -273,6 +276,7 @@ class gruppe extends basis_db
|
|||||||
$grp_obj->insertvon = $row->insertvon;
|
$grp_obj->insertvon = $row->insertvon;
|
||||||
$grp_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
$grp_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||||
$grp_obj->gesperrt = $this->db_parse_bool($row->gesperrt);
|
$grp_obj->gesperrt = $this->db_parse_bool($row->gesperrt);
|
||||||
|
$grp_obj->zutrittsssystem = $this->db_parse_bool($row->zutrittssystem);
|
||||||
|
|
||||||
$this->result[] = $grp_obj;
|
$this->result[] = $grp_obj;
|
||||||
}
|
}
|
||||||
@@ -380,7 +384,7 @@ class gruppe extends basis_db
|
|||||||
|
|
||||||
$qry = 'INSERT INTO public.tbl_gruppe (gruppe_kurzbz, studiengang_kz, bezeichnung, semester, sort,
|
$qry = 'INSERT INTO public.tbl_gruppe (gruppe_kurzbz, studiengang_kz, bezeichnung, semester, sort,
|
||||||
mailgrp, beschreibung, sichtbar, generiert, aktiv, lehre, content_visible,
|
mailgrp, beschreibung, sichtbar, generiert, aktiv, lehre, content_visible,
|
||||||
updateamum, updatevon, insertamum, insertvon, orgform_kurzbz, gesperrt)
|
updateamum, updatevon, insertamum, insertvon, orgform_kurzbz, gesperrt,zutrittssystem)
|
||||||
VALUES('.$this->db_add_param($kurzbz).','.
|
VALUES('.$this->db_add_param($kurzbz).','.
|
||||||
$this->db_add_param($this->studiengang_kz).','.
|
$this->db_add_param($this->studiengang_kz).','.
|
||||||
$this->db_add_param($this->bezeichnung).','.
|
$this->db_add_param($this->bezeichnung).','.
|
||||||
@@ -398,7 +402,8 @@ class gruppe extends basis_db
|
|||||||
$this->db_add_param($this->insertamum).','.
|
$this->db_add_param($this->insertamum).','.
|
||||||
$this->db_add_param($this->insertvon).','.
|
$this->db_add_param($this->insertvon).','.
|
||||||
$this->db_add_param($this->orgform_kurzbz).','.
|
$this->db_add_param($this->orgform_kurzbz).','.
|
||||||
$this->db_add_param($this->gesperrt, FHC_BOOLEAN).');';
|
$this->db_add_param($this->gesperrt, FHC_BOOLEAN).','.
|
||||||
|
$this->db_add_param($this->zutrittssystem, FHC_BOOLEAN).');';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -417,7 +422,8 @@ class gruppe extends basis_db
|
|||||||
' updateamum='.$this->db_add_param($this->updateamum).','.
|
' updateamum='.$this->db_add_param($this->updateamum).','.
|
||||||
' updatevon='.$this->db_add_param($this->updatevon).','.
|
' updatevon='.$this->db_add_param($this->updatevon).','.
|
||||||
' orgform_kurzbz='.$this->db_add_param($this->orgform_kurzbz).', '.
|
' orgform_kurzbz='.$this->db_add_param($this->orgform_kurzbz).', '.
|
||||||
' gesperrt='.$this->db_add_param($this->gesperrt, FHC_BOOLEAN).' ';
|
' gesperrt='.$this->db_add_param($this->gesperrt, FHC_BOOLEAN).', '.
|
||||||
|
' zutrittssystem='.$this->db_add_param($this->zutrittssystem, FHC_BOOLEAN).' ';
|
||||||
if($this->gruppe_kurbzNeu != null) {
|
if($this->gruppe_kurbzNeu != null) {
|
||||||
$qry.=', gruppe_kurzbz='.$this->db_add_param($this->gruppe_kurbzNeu).' ';
|
$qry.=', gruppe_kurzbz='.$this->db_add_param($this->gruppe_kurbzNeu).' ';
|
||||||
}
|
}
|
||||||
@@ -435,5 +441,96 @@ class gruppe extends basis_db
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Laedt die User dieser Gruppe
|
||||||
|
*
|
||||||
|
* @param $gruppe_kurzbz
|
||||||
|
*/
|
||||||
|
public function loadUser($gruppe_kurzbz)
|
||||||
|
{
|
||||||
|
$qry = "SELECT
|
||||||
|
tbl_benutzer.uid, tbl_person.vorname, tbl_person.nachname
|
||||||
|
FROM
|
||||||
|
public.tbl_benutzergruppe
|
||||||
|
JOIN public.tbl_benutzer USING(uid)
|
||||||
|
JOIN public.tbl_person USING(person_id)
|
||||||
|
WHERE
|
||||||
|
tbl_benutzergruppe.gruppe_kurzbz=".$this->db_add_param($gruppe_kurzbz)."
|
||||||
|
ORDER BY nachname, vorname";
|
||||||
|
|
||||||
|
if($result = $this->db_query($qry))
|
||||||
|
{
|
||||||
|
while($row = $this->db_fetch_object($result))
|
||||||
|
{
|
||||||
|
$obj = new gruppe();
|
||||||
|
|
||||||
|
$obj->uid = $row->uid;
|
||||||
|
$obj->vorname = $row->vorname;
|
||||||
|
$obj->nachname = $row->nachname;
|
||||||
|
|
||||||
|
$this->result[]=$obj;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Laedt alle Zutrittsgruppen in denen sich der Benutzer befindet
|
||||||
|
*
|
||||||
|
* @param $user UID des Benutzers
|
||||||
|
*/
|
||||||
|
public function loadZutrittsgruppen($user)
|
||||||
|
{
|
||||||
|
$qry = "SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
public.tbl_benutzergruppe
|
||||||
|
JOIN public.tbl_gruppe USING(gruppe_kurzbz)
|
||||||
|
WHERE
|
||||||
|
tbl_gruppe.zutrittssystem=true
|
||||||
|
AND tbl_benutzergruppe.uid=".$this->db_add_param($user);
|
||||||
|
|
||||||
|
if($result = $this->db_query($qry))
|
||||||
|
{
|
||||||
|
while($row = $this->db_fetch_object($result))
|
||||||
|
{
|
||||||
|
$grp_obj = new gruppe();
|
||||||
|
|
||||||
|
$grp_obj->gruppe_kurzbz = $row->gruppe_kurzbz;
|
||||||
|
$grp_obj->studiengang_kz = $row->studiengang_kz;
|
||||||
|
$grp_obj->bezeichnung = $row->bezeichnung;
|
||||||
|
$grp_obj->semester = $row->semester;
|
||||||
|
$grp_obj->sort = $row->sort;
|
||||||
|
$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 = $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);
|
||||||
|
$grp_obj->zutrittssystem = $this->db_parse_bool($row->zutrittssystem);
|
||||||
|
|
||||||
|
$this->result[] = $grp_obj;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -76,6 +76,11 @@ $this->phrasen['lvplan/bitteEinenLektorAuswaehlen']='Bitte eineN LektorIn/Studen
|
|||||||
$this->phrasen['lvplan/semesterplaene']='Semesterübersicht';
|
$this->phrasen['lvplan/semesterplaene']='Semesterübersicht';
|
||||||
$this->phrasen['lvplan/hauptmenue']='Hauptmenü';
|
$this->phrasen['lvplan/hauptmenue']='Hauptmenü';
|
||||||
$this->phrasen['lvplan/nameEingeben']='Name eingeben';
|
$this->phrasen['lvplan/nameEingeben']='Name eingeben';
|
||||||
|
$this->phrasen['lvplan/anleitungLVPlanSync']='Anleitung LV-Plan Synchronisation';
|
||||||
|
$this->phrasen['lvplan/caldavURL']='CalDAV URL (Android, Thunderbird)';
|
||||||
|
$this->phrasen['lvplan/caldavURLMac']='CalDAV Principal URL (MacOS, iOS)';
|
||||||
|
$this->phrasen['lvplan/googleURL']='iCAL URL (Google)';
|
||||||
|
$this->phrasen['lvplan/persoenlichenAbonnieren']='Persönlichen LV-Plan abonnieren';
|
||||||
$this->phrasen['lvplan/aktuelleKW']='Aktuelle Kalenderwoche';
|
$this->phrasen['lvplan/aktuelleKW']='Aktuelle Kalenderwoche';
|
||||||
$this->phrasen['lvplan/rauminformationenAnzeigen']='Rauminformationen anzeigen';
|
$this->phrasen['lvplan/rauminformationenAnzeigen']='Rauminformationen anzeigen';
|
||||||
$this->phrasen['lvplan/personen']='Personen';
|
$this->phrasen['lvplan/personen']='Personen';
|
||||||
|
|||||||
+889
-99
File diff suppressed because it is too large
Load Diff
+12
-1
@@ -564,6 +564,17 @@ if(!$result = @$db->db_query("SELECT zgvdoktor_code from public.tbl_prestudent L
|
|||||||
public.tbl_prestudent: Spalte zgvdoktordatum hinzugefuegt<br>';
|
public.tbl_prestudent: Spalte zgvdoktordatum hinzugefuegt<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// tbl_gruppe neues attribut zutrittssystem
|
||||||
|
if(!$result = @$db->db_query("SELECT zutrittssystem from public.tbl_gruppe LIMIT 1;"))
|
||||||
|
{
|
||||||
|
$qry = "ALTER TABLE public.tbl_gruppe ADD COLUMN zutrittssystem boolean NOT NULL DEFAULT false;";
|
||||||
|
|
||||||
|
if(!$db->db_query($qry))
|
||||||
|
echo '<strong>public.tbl_gruppe: '.$db->db_last_error().'</strong><br>';
|
||||||
|
else
|
||||||
|
echo 'public.tbl_gruppe: Spalte zutrittssystem hinzugefuegt';
|
||||||
|
}
|
||||||
|
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
|
|
||||||
$tabellen=array(
|
$tabellen=array(
|
||||||
@@ -710,7 +721,7 @@ $tabellen=array(
|
|||||||
"public.tbl_fotostatus" => array("fotostatus_kurzbz","beschreibung"),
|
"public.tbl_fotostatus" => array("fotostatus_kurzbz","beschreibung"),
|
||||||
"public.tbl_funktion" => array("funktion_kurzbz","beschreibung","aktiv","fachbereich","semester"),
|
"public.tbl_funktion" => array("funktion_kurzbz","beschreibung","aktiv","fachbereich","semester"),
|
||||||
"public.tbl_geschaeftsjahr" => array("geschaeftsjahr_kurzbz","start","ende","bezeichnung"),
|
"public.tbl_geschaeftsjahr" => array("geschaeftsjahr_kurzbz","start","ende","bezeichnung"),
|
||||||
"public.tbl_gruppe" => array("gruppe_kurzbz","studiengang_kz","semester","bezeichnung","beschreibung","sichtbar","lehre","aktiv","sort","mailgrp","generiert","updateamum","updatevon","insertamum","insertvon","ext_id","orgform_kurzbz","gid","content_visible","gesperrt"),
|
"public.tbl_gruppe" => array("gruppe_kurzbz","studiengang_kz","semester","bezeichnung","beschreibung","sichtbar","lehre","aktiv","sort","mailgrp","generiert","updateamum","updatevon","insertamum","insertvon","ext_id","orgform_kurzbz","gid","content_visible","gesperrt","zutrittssystem"),
|
||||||
"public.tbl_kontakt" => array("kontakt_id","person_id","kontakttyp","anmerkung","kontakt","zustellung","updateamum","updatevon","insertamum","insertvon","ext_id","standort_id"),
|
"public.tbl_kontakt" => array("kontakt_id","person_id","kontakttyp","anmerkung","kontakt","zustellung","updateamum","updatevon","insertamum","insertvon","ext_id","standort_id"),
|
||||||
"public.tbl_kontaktmedium" => array("kontaktmedium_kurzbz","beschreibung"),
|
"public.tbl_kontaktmedium" => array("kontaktmedium_kurzbz","beschreibung"),
|
||||||
"public.tbl_kontakttyp" => array("kontakttyp","beschreibung"),
|
"public.tbl_kontakttyp" => array("kontakttyp","beschreibung"),
|
||||||
|
|||||||
Executable
+72
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2013 fhcomplete.org
|
||||||
|
*
|
||||||
|
* 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 >
|
||||||
|
*/
|
||||||
|
header( 'Expires: -1' );
|
||||||
|
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
|
||||||
|
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
|
||||||
|
header( 'Pragma: no-cache' );
|
||||||
|
header('Content-Type: text/html;charset=UTF-8');
|
||||||
|
|
||||||
|
require_once('../../config/vilesci.config.inc.php');
|
||||||
|
require_once('../../include/functions.inc.php');
|
||||||
|
require_once('../../include/benutzerberechtigung.class.php');
|
||||||
|
require_once('../../include/benutzer.class.php');
|
||||||
|
require_once('../../include/person.class.php');
|
||||||
|
require_once('../../include/mitarbeiter.class.php');
|
||||||
|
|
||||||
|
if (!$uid = get_uid())
|
||||||
|
die('Username ungueltig');
|
||||||
|
|
||||||
|
$rechte = new benutzerberechtigung();
|
||||||
|
if(!$rechte->getBerechtigungen($uid))
|
||||||
|
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||||
|
|
||||||
|
if(!$rechte->isBerechtigt('lehre/gruppe:begrenzt', null, 's'))
|
||||||
|
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||||
|
|
||||||
|
|
||||||
|
$work=(isset($_REQUEST['work'])?$_REQUEST['work']:'');
|
||||||
|
|
||||||
|
switch ($work)
|
||||||
|
{
|
||||||
|
case 'searchUser':
|
||||||
|
$filter=trim((isset($_REQUEST['term']) ? $_REQUEST['term']:''));
|
||||||
|
if (is_null($filter) || $filter=='')
|
||||||
|
exit();
|
||||||
|
|
||||||
|
$benutzer = new benutzer();
|
||||||
|
$benutzer->search(array($filter));
|
||||||
|
|
||||||
|
$result=array();
|
||||||
|
foreach($benutzer->result as $row)
|
||||||
|
{
|
||||||
|
$item['uid']=html_entity_decode($row->uid);
|
||||||
|
$item['vorname']=html_entity_decode($row->vorname);
|
||||||
|
$item['nachname']=html_entity_decode($row->nachname);
|
||||||
|
$result[]=$item;
|
||||||
|
}
|
||||||
|
echo json_encode($result);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo " Funktion $work fehlt! ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
exit();
|
||||||
|
?>
|
||||||
@@ -28,18 +28,27 @@ require_once('../../include/person.class.php');
|
|||||||
require_once('../../include/benutzer.class.php');
|
require_once('../../include/benutzer.class.php');
|
||||||
require_once('../../include/student.class.php');
|
require_once('../../include/student.class.php');
|
||||||
require_once('../../include/gruppe.class.php');
|
require_once('../../include/gruppe.class.php');
|
||||||
|
require_once('../../include/benutzerberechtigung.class.php');
|
||||||
|
|
||||||
if (!$db = new basis_db())
|
if (!$db = new basis_db())
|
||||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||||
|
|
||||||
$user=get_uid();
|
$user=get_uid();
|
||||||
|
|
||||||
|
$rechte = new benutzerberechtigung();
|
||||||
|
$rechte->getBerechtigungen($user);
|
||||||
|
if(!$rechte->isBerechtigt('lehre/gruppe:begrenzt',null,'s'))
|
||||||
|
die('Sie haben keine Berechtigung für diese Seite');
|
||||||
|
|
||||||
$kurzbz=(isset($_GET['kurzbz'])?$_GET['kurzbz']:(isset($_POST['kurzbz'])?$_POST['kurzbz']:''));
|
$kurzbz=(isset($_GET['kurzbz'])?$_GET['kurzbz']:(isset($_POST['kurzbz'])?$_POST['kurzbz']:''));
|
||||||
if(empty($kurzbz))
|
if(empty($kurzbz))
|
||||||
die('Gruppe wurde nicht übergeben <a href="javascript:history.back()">Zurück</a>');
|
die('Gruppe wurde nicht übergeben <a href="javascript:history.back()">Zurück</a>');
|
||||||
|
|
||||||
if (isset($_POST['new']))
|
if (isset($_POST['new']))
|
||||||
{
|
{
|
||||||
|
if(!$rechte->isBerechtigt('lehre/gruppe',null,'sui'))
|
||||||
|
die('Sie haben keine Berechtigung für diese Seite');
|
||||||
|
|
||||||
$e=new benutzergruppe();
|
$e=new benutzergruppe();
|
||||||
$e->new=true;
|
$e->new=true;
|
||||||
$e->gruppe_kurzbz=$kurzbz;
|
$e->gruppe_kurzbz=$kurzbz;
|
||||||
@@ -53,6 +62,9 @@ if (isset($_POST['new']))
|
|||||||
}
|
}
|
||||||
else if (isset($_GET['type']) && $_GET['type']=='delete')
|
else if (isset($_GET['type']) && $_GET['type']=='delete')
|
||||||
{
|
{
|
||||||
|
if(!$rechte->isBerechtigt('lehre/gruppe',null,'suid'))
|
||||||
|
die('Sie haben keine Berechtigung für diese Seite');
|
||||||
|
|
||||||
$e=new benutzergruppe();
|
$e=new benutzergruppe();
|
||||||
$e->delete($_GET['uid'], $kurzbz);
|
$e->delete($_GET['uid'], $kurzbz);
|
||||||
}
|
}
|
||||||
@@ -62,13 +74,17 @@ if(!$gruppe->load($kurzbz))
|
|||||||
die('Gruppe wurde nicht gefunden:'+$kurzbz);
|
die('Gruppe wurde nicht gefunden:'+$kurzbz);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Gruppen Details</title>
|
<title>Gruppen Details</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<link rel="stylesheet" href="../../skin/fhcomplete.css" type="text/css">
|
||||||
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
|
||||||
<link rel="stylesheet" href="../../include/js/tablesort/table.css" type="text/css">
|
<link rel="stylesheet" href="../../skin/jquery.css" type="text/css">
|
||||||
<script src="../../include/js/tablesort/table.js" type="text/javascript"></script>
|
<link rel="stylesheet" href="../../skin/tablesort.css" type="text/css">
|
||||||
|
<link rel="stylesheet" href="../../skin/jquery-ui-1.9.2.custom.min.css" type="text/css">
|
||||||
|
<script type="text/javascript" src="../../include/js/jquery1.9.min.js" ></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<H2>Gruppe <?php echo $kurzbz ?></H2>
|
<H2>Gruppe <?php echo $kurzbz ?></H2>
|
||||||
@@ -77,48 +93,67 @@ if(!$gruppe->load($kurzbz))
|
|||||||
echo "<a href='einheit_menu.php?studiengang_kz=$gruppe->studiengang_kz'>Zurück zur Übersicht</a><br><br>";
|
echo "<a href='einheit_menu.php?studiengang_kz=$gruppe->studiengang_kz'>Zurück zur Übersicht</a><br><br>";
|
||||||
|
|
||||||
if(!$gruppe->generiert)
|
if(!$gruppe->generiert)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<FORM name="newpers" method="post" action="einheit_det.php">
|
<FORM name="newpers" method="post" action="einheit_det.php">
|
||||||
<INPUT type="hidden" name="type" value="new">
|
Name: <INPUT type="hidden" name="type" value="new">
|
||||||
|
<input type="text" name="uid" id="uid"/>
|
||||||
<SELECT name="uid">';
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function()
|
||||||
$qry = "SELECT * FROM campus.vw_benutzer ORDER BY nachname, vorname";
|
{
|
||||||
|
$("#uid").autocomplete({
|
||||||
$result = $db->db_query($qry);
|
source: "einheit_autocomplete.php?work=searchUser",
|
||||||
|
minLength:3,
|
||||||
for ($i=0;$row = $db->db_fetch_object($result);$i++)
|
response: function(event, ui)
|
||||||
{
|
{
|
||||||
echo "<option value=\"".$row->uid."\">".$row->nachname." ".$row->vorname." - ".$row->uid."</option>";
|
//Value und Label fuer die Anzeige setzen
|
||||||
}
|
for(i in ui.content)
|
||||||
|
{
|
||||||
echo '
|
ui.content[i].value=ui.content[i].uid;
|
||||||
</SELECT>
|
ui.content[i].label=ui.content[i].uid+" - "+ui.content[i].vorname+" "+ui.content[i].nachname;
|
||||||
<INPUT type="hidden" name="kurzbz" value="'.$kurzbz.'">
|
}
|
||||||
|
},
|
||||||
|
select: function(event, ui)
|
||||||
|
{
|
||||||
|
ui.item.value=ui.item.uid;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<INPUT type="hidden" name="kurzbz" value="'.$kurzbz.'">
|
||||||
<INPUT type="submit" name="new" value="Hinzufügen">
|
<INPUT type="submit" name="new" value="Hinzufügen">
|
||||||
</FORM>
|
</FORM>
|
||||||
<HR>';
|
<HR>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
$qry = "SELECT * FROM public.tbl_benutzergruppe JOIN public.tbl_benutzer USING(uid) JOIN public.tbl_person USING(person_id) WHERE".
|
|
||||||
" tbl_benutzergruppe.gruppe_kurzbz='".addslashes($kurzbz)."'".
|
|
||||||
" ORDER BY nachname, vorname";
|
|
||||||
|
|
||||||
if($result = $db->db_query($qry))
|
$gruppe = new gruppe();
|
||||||
|
|
||||||
|
if($gruppe->loadUser($kurzbz))
|
||||||
{
|
{
|
||||||
$num_rows=$db->db_num_rows($result);
|
$num_rows=count($gruppe->result);
|
||||||
echo "Anzahl: $num_rows";
|
echo "Anzahl: $num_rows";
|
||||||
echo "<table class='liste table-autosort:2 table-stripeclass:alternate table-autostripe'>
|
echo '<script>
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
$("#usertabelle").tablesorter(
|
||||||
|
{
|
||||||
|
sortList: [[2,0]],
|
||||||
|
widgets: ["zebra"]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
|
echo '<table id="usertabelle" class="tablesorter">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class='liste'>
|
<tr>
|
||||||
<th>UID</th>
|
<th>UID</th>
|
||||||
<th>Vornamen</th>
|
<th>Vornamen</th>
|
||||||
<th>Nachname</th>
|
<th>Nachname</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>";
|
<tbody>';
|
||||||
|
|
||||||
for ($j=0; $row = $db->db_fetch_object($result);$j++)
|
foreach($gruppe->result as $row)
|
||||||
{
|
{
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>".$row->uid."</td>";
|
echo "<td>".$row->uid."</td>";
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ if (isset($_GET['studiengang_kz']))
|
|||||||
else if(isset($_POST['studiengang_kz']))
|
else if(isset($_POST['studiengang_kz']))
|
||||||
$studiengang_kz = $_POST['studiengang_kz'];
|
$studiengang_kz = $_POST['studiengang_kz'];
|
||||||
else
|
else
|
||||||
$studiengang_kz='0';
|
$studiengang_kz='';
|
||||||
|
|
||||||
if (isset($_GET['sem']))
|
if (isset($_GET['sem']))
|
||||||
|
|
||||||
@@ -55,6 +55,9 @@ $uid = get_uid();
|
|||||||
|
|
||||||
$rechte = new benutzerberechtigung();
|
$rechte = new benutzerberechtigung();
|
||||||
$rechte->getBerechtigungen($uid);
|
$rechte->getBerechtigungen($uid);
|
||||||
|
if(!$rechte->isBerechtigt('lehre/gruppe'))
|
||||||
|
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -116,8 +119,7 @@ function printDropDown()
|
|||||||
|
|
||||||
foreach($stud->result as $row)
|
foreach($stud->result as $row)
|
||||||
{
|
{
|
||||||
if($rechte->isBerechtigt('admin', $row->studiengang_kz, 'suid') ||
|
if($rechte->isBerechtigt('lehre/gruppe', $row->oe_kurzbz, 'suid'))
|
||||||
$rechte->isBerechtigt('assistenz', $row->studiengang_kz, 'suid'))
|
|
||||||
{
|
{
|
||||||
if($studiengang_kz=='')
|
if($studiengang_kz=='')
|
||||||
$studiengang_kz=$row->studiengang_kz;
|
$studiengang_kz=$row->studiengang_kz;
|
||||||
@@ -126,7 +128,7 @@ function printDropDown()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</SELECT>';
|
echo '</SELECT><input type="submit" value="Anzeigen" />';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
}
|
}
|
||||||
function doSave()
|
function doSave()
|
||||||
@@ -158,6 +160,7 @@ function doSave()
|
|||||||
$e->generiert=isset($_POST['generiert']);
|
$e->generiert=isset($_POST['generiert']);
|
||||||
$e->aktiv=isset($_POST['aktiv']);
|
$e->aktiv=isset($_POST['aktiv']);
|
||||||
$e->gesperrt = isset($_POST['gesperrt']);
|
$e->gesperrt = isset($_POST['gesperrt']);
|
||||||
|
$e->zutrittssystem = isset($_POST['zutrittssystem']);
|
||||||
$e->sort=$_POST['sort'];
|
$e->sort=$_POST['sort'];
|
||||||
$e->content_visible=isset($_POST['content_visible']);
|
$e->content_visible=isset($_POST['content_visible']);
|
||||||
|
|
||||||
@@ -222,6 +225,7 @@ function doEdit($kurzbz,$new=false)
|
|||||||
<tr><td><i>Aktiv</i></td><td><input type='checkbox' name='aktiv' <?php echo ($e->aktiv?'checked':'');?>>
|
<tr><td><i>Aktiv</i></td><td><input type='checkbox' name='aktiv' <?php echo ($e->aktiv?'checked':'');?>>
|
||||||
<tr><td><i>ContentVisible</i></td><td><input type='checkbox' name='content_visible' <?php echo ($e->content_visible?'checked':'');?>>
|
<tr><td><i>ContentVisible</i></td><td><input type='checkbox' name='content_visible' <?php echo ($e->content_visible?'checked':'');?>>
|
||||||
<tr><td><i>Gesperrt</i></td><td><input type='checkbox' name='gesperrt' <?php echo ($e->gesperrt?'checked':'');?>>
|
<tr><td><i>Gesperrt</i></td><td><input type='checkbox' name='gesperrt' <?php echo ($e->gesperrt?'checked':'');?>>
|
||||||
|
<tr><td><i>Zutrittssystem</i></td><td><input type='checkbox' name='zutrittssystem' <?php echo ($e->zutrittssystem?'checked':'');?>>
|
||||||
<tr>
|
<tr>
|
||||||
<td><i>Sort</i></td><td><input type='text' name='sort' maxlength="4" value="<?php echo $e->sort;?>">
|
<td><i>Sort</i></td><td><input type='text' name='sort' maxlength="4" value="<?php echo $e->sort;?>">
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
Symlink anlegen um die offene LVPlan URL zu ermoeglichen:
|
||||||
|
|
||||||
|
ln -s ../cis/private/lvplan/stpl_kalender.php google.php
|
||||||
Reference in New Issue
Block a user