Conflicts:
	content/pdfExport.php
This commit is contained in:
kindlm
2015-03-24 15:38:29 +01:00
46 changed files with 7468 additions and 7999 deletions
+19 -10
View File
@@ -181,16 +181,25 @@ if(isset($_POST['submitbild']))
// $akte->insertvon = $user;
$akte->uid = '';
$akte->dms_id = $dms_id;
$akte->new = true;
if(!$akte->save())
{
echo "<b>Fehler: $akte->errormsg</b>";
}
else
echo "<b>".$p->t('global/erfolgreichgespeichert')."</b>";
echo "<script>window.opener.location='bewerbung.php?active=4';</script>";
$akte->new = true;
if (!$akte->save()) {
echo "<b>Fehler: $akte->errormsg</b>";
} else {
echo "<b>" . $p->t('global/erfolgreichgespeichert') . "</b>";
}
echo "<script>
var loc = window.opener.location;
if(!/active/.test(loc.href)) {
window.opener.location = loc + '?active=dokumente';
} else {
window.opener.location.reload();
}
</script>";
}
}
+1 -1
View File
@@ -120,7 +120,7 @@ foreach($addon_obj->result as $addon)
<command id="menu-statistic-studentendetails:command" oncommand="StatistikPrintStudentExportExtended();"/>
<command id="menu-statistic-lektorenstatistik:command" oncommand="StatistikPrintLektorenstatistik();"/>
<command id="menu-statistic-stromanalyse:command" oncommand="StatistikPrintStromanalyse();"/>
<command id="menu-dokumente-inskriptionsbestaetigung:command" oncommand="StudentPrintInskriptionsbestaetigung();"/>
<command id="menu-dokumente-inskriptionsbestaetigung:command" oncommand="StudentPrintInskriptionsbestaetigung(event);"/>
<command id="menu-dokumente-zeugnis:command" oncommand="StudentCreateZeugnis('Zeugnis',event);"/>
<command id="menu-dokumente-zeugniseng:command" oncommand="StudentCreateZeugnis('ZeugnisEng',event);"/>
<!--<command id="menu-dokumente-sammelzeugnis:command" oncommand="StudentCreateSammelzeugnis('Sammelzeugnis');"/>-->
+1804 -1804
View File
File diff suppressed because it is too large Load Diff
@@ -240,7 +240,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/mitarbeiter/mitarbeitervertragover
<tabs orient="horizontal" id="mitarbeiter-tabs">
<tab id="mitarbeiter-tab-detail" label="Stammdaten" />
<tab id="mitarbeiter-tab-kontakt" label="Kontaktdaten" />
<tab id="mitarbeiter-tab-funktionen" label="BIS-Daten" />
<tab id="mitarbeiter-tab-bis" label="BIS-Daten" />
<tab id="mitarbeiter-tab-betriebsmittel" label="Betriebsmittel" />
<tab id="mitarbeiter-tab-funktionen" label="Funktionen" oncommand="MitarbeiterFunktionIFrameLoad()"/>
<?php
+1 -2
View File
@@ -198,8 +198,7 @@ elseif(in_array($xsl,array('Lehrveranstaltungszeugnis','Zertifikat','Diplomurkun
'Sammelzeugnis','PrProtDiplEng','PrProtBakkEng','BakkzeugnisEng','DiplomzeugnisEng','statusbericht',
'DiplSupplement','Zutrittskarte','Projektbeschr','Ausbildungsver','AusbildStatus','PrProtBA','PrProtMA',
'PrProtBAEng','PrProtMAEng','Studienordnung','Erfolgsnachweis','ErfolgsnwHead','Studienblatt','LV_Informationen',
'LVZeugnis','AnwListBarcode','Honorarvertrag','AusbVerEng','AusbVerEngHead','Zeugnis','ErfolgsnachweisE','ErfolgsnwHeadE','Magisterurkunde',
'Masterurkunde','Defensiourkunde','Laufzettel')))
'LVZeugnis','AnwListBarcode','Honorarvertrag','AusbVerEng','AusbVerEngHead','Zeugnis','ErfolgsnachweisE','ErfolgsnwHeadE','Magisterurkunde','Masterurkunde','Defensiourkunde','Magisterzeugnis','Laufzettel')))
{
if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('assistenz'))
{
File diff suppressed because it is too large Load Diff
+10 -5
View File
@@ -533,14 +533,14 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#status_kurzbz"/>
<splitter class="tree-splitter"/>
<treecol id="student-prestudent-tree-rolle-studiensemester_kurzbz" label="StSem" flex="5" hidden="false" persist="hidden, width, ordinal"
<treecol id="student-prestudent-tree-rolle-studiensemester_kurzbz" label="StSem" flex="3" hidden="false" persist="hidden, width, ordinal"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studiensemester_kurzbz"/>
<splitter class="tree-splitter"/>
<treecol id="student-prestudent-tree-rolle-ausbildungssemester" label="Semester" flex="2" hidden="false" persist="hidden, width, ordinal"
<treecol id="student-prestudent-tree-rolle-ausbildungssemester" label="Semester" flex="1" hidden="false" persist="hidden, width, ordinal"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#ausbildungssemester"
sorthints="integer"/>
sorthints="integer"/>
<splitter class="tree-splitter"/>
<treecol id="student-prestudent-tree-rolle-datum" label="Datum" flex="2" hidden="false" persist="hidden, width, ordinal"
class="sortDirectionIndicator"
@@ -562,11 +562,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_bezeichnung" />
<splitter class="tree-splitter"/>
<treecol id="student-prestudent-tree-rolle-bestaetigt_von" label="BestaetigtVon" flex="2" hidden="false" persist="hidden, width, ordinal"
<treecol id="student-prestudent-tree-rolle-anmerkung" label="Anmerkung" flex="2" hidden="false" persist="hidden, width, ordinal"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#anmerkung" />
<splitter class="tree-splitter"/>
<treecol id="student-prestudent-tree-rolle-bestaetigt_von" label="BestaetigtVon" flex="1" hidden="true" persist="hidden, width, ordinal"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_von" />
<splitter class="tree-splitter"/>
<treecol id="student-prestudent-tree-rolle-bestaetigt_am" label="BestaetigtAm" flex="2" hidden="false" persist="hidden, width, ordinal"
<treecol id="student-prestudent-tree-rolle-bestaetigt_am" label="BestaetigtAm" flex="1" hidden="false" persist="hidden, width, ordinal"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_Am" />
<splitter class="tree-splitter"/>
@@ -585,6 +589,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#prestudent_id"/>
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_id"/>
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#studienplan_bezeichnung"/>
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#anmerkung"/>
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_von"/>
<treecell label="rdf:http://www.technikum-wien.at/prestudentrolle/rdf#bestaetigt_am"/>
</treerow>
+5
View File
@@ -283,6 +283,10 @@ else
<treecol id="student-treecol-mentor" label="Mentor" flex="1" hidden="true" persist="hidden, width, ordinal"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/student/rdf#mentor" onclick="StudentTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="student-treecol-aktiv" label="Aktiv" flex="1" hidden="false" persist="hidden, width, ordinal"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/student/rdf#aktiv" onclick="StudentTreeSort()"/>
<splitter class="tree-splitter"/>
</treecols>
@@ -324,6 +328,7 @@ else
<treecell label="rdf:http://www.technikum-wien.at/student/rdf#matr_nr" />
<treecell label="rdf:http://www.technikum-wien.at/student/rdf#studienplan_bezeichnung" />
<treecell label="rdf:http://www.technikum-wien.at/student/rdf#mentor" />
<treecell label="rdf:http://www.technikum-wien.at/student/rdf#aktiv" />
</treerow>
</treeitem>
</treechildren>
+11 -2
View File
@@ -1833,6 +1833,7 @@ function StudentRolleSpeichern(dialog, studiensemester_old, ausbildungssemester_
datum = dialog.getElementById('student-rolle-datum-datum').value;
orgform_kurzbz = dialog.getElementById('student-rolle-menulist-orgform_kurzbz').value;
studienplan_id = dialog.getElementById('student-rolle-menulist-studienplan').value;
anmerkung = dialog.getElementById('student-rolle-textbox-anmerkung').value;
if(!CheckDatum(datum))
{
@@ -1854,6 +1855,7 @@ function StudentRolleSpeichern(dialog, studiensemester_old, ausbildungssemester_
req.add('datum', ConvertDateToISO(datum));
req.add('orgform_kurzbz', orgform_kurzbz);
req.add('studienplan_id', studienplan_id);
req.add('anmerkung', anmerkung);
var response = req.executePOST();
@@ -2066,7 +2068,7 @@ function StudentAddRolle(rolle, semester, studiensemester)
// ****
// * Druckt die Instkriptionsbestaetigung
// ****
function StudentPrintInskriptionsbestaetigung()
function StudentPrintInskriptionsbestaetigung(event)
{
tree = document.getElementById('student-tree');
//Alle markierten Studenten holen
@@ -2095,8 +2097,15 @@ function StudentPrintInskriptionsbestaetigung()
return false;
}
if (event.shiftKey)
var output='odt';
else if (event.ctrlKey)
var output='doc';
else
var output='pdf';
if(anzahl>0)
window.open('<?php echo APP_ROOT; ?>content/pdfExport.php?xml=student.rdf.php&xsl=Inskription&stg_kz='+stg_kz+'&uid='+paramList+'&ss='+stsem,'Inskriptionsbestaetigung', 'height=200,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes');
window.open('<?php echo APP_ROOT; ?>content/pdfExport.php?xml=student.rdf.php&xsl=Inskription&stg_kz='+stg_kz+'&uid='+paramList+'&ss='+stsem+'&output='+output,'Inskriptionsbestaetigung', 'height=200,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes');
else
alert('Bitte einen Studenten auswaehlen');
}
@@ -57,6 +57,7 @@ function StudentRolleInit(prestudent_id, status_kurzbz, studiensemester_kurzbz,
datum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#datum" ));
orgform_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#orgform_kurzbz" ));
studienplan_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studienplan_id" ));
anmerkung= getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anmerkung" ));
neu = false;
}
else
@@ -74,6 +75,7 @@ function StudentRolleInit(prestudent_id, status_kurzbz, studiensemester_kurzbz,
datum = '<?php echo date('d.m.Y') ?>';
orgform_kurzbz='';
studienplan_id='';
anmerkung='';
}
document.getElementById('student-rolle-textbox-prestudent_id').value=prestudent_id;
@@ -83,6 +85,7 @@ function StudentRolleInit(prestudent_id, status_kurzbz, studiensemester_kurzbz,
document.getElementById('student-rolle-datum-datum').value=datum;
document.getElementById('student-rolle-menulist-orgform_kurzbz').value=orgform_kurzbz;
MenulistSelectItemOnValue('student-rolle-menulist-studienplan', studienplan_id);
document.getElementById('student-rolle-textbox-anmerkung').value=anmerkung;
}
// ****
@@ -198,6 +198,10 @@ $db = new basis_db();
</menupopup>
</menulist>
</row>
<row>
<label value="Anmerkung"/>
<textbox id="student-rolle-textbox-anmerkung" multiline="true" />
</row>
</rows>
</grid>
<hbox>
+1 -1
View File
@@ -237,7 +237,7 @@ class anwesenheit extends basis_db
$qry = "SELECT
datum, a.einheiten,
(SELECT true FROM campus.tbl_anwesenheit
WHERE lehreinheit_id=".$this->db_add_param($lehreinheit_id)." AND datum=a.datum) as anwesend,
WHERE lehreinheit_id=".$this->db_add_param($lehreinheit_id)." AND datum=a.datum LIMIT 1) as anwesend,
(SELECT stundensatz FROM lehre.tbl_lehreinheitmitarbeiter WHERE lehreinheit_id=".$this->db_add_param($lehreinheit_id)."
AND mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid).") as stundensatz
FROM
+1 -1
View File
@@ -364,7 +364,7 @@ class cronjob extends basis_db
public function execute()
{
$return = true;
if($this->standalone && isJobRunning())
if($this->standalone && $this->isJobRunning())
{
$this->errormsg = 'Job kann nicht ausgefuehrt werden, da noch ein anderer Job laeuft';
return false;
+637 -630
View File
File diff suppressed because it is too large Load Diff
+458 -402
View File
@@ -1,402 +1,458 @@
<?php
/* Copyright (C) 2011 FH Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
class notiz extends basis_db
{
public $new;
public $result=array();
//Tabellenspalten
public $notiz_id;
public $titel;
public $text;
public $verfasser_uid;
public $bearbeiter_uid;
public $start;
public $ende;
public $erledigt;
public $insertamum;
public $insertvon;
public $updateamum;
public $updatevon;
/**
* Konstruktor
* @param $notiz_id
*/
public function __construct($notiz_id = null)
{
parent::__construct();
if($notiz_id != null)
$this->load($notiz_id);
}
/**
* Laedt eine Notiz
* @param $notiz_id
* @return true wenn ok, false im Fehlerfall
*/
public function load($notiz_id)
{
if(!is_numeric($notiz_id))
{
$this->errormsg = 'NotizID ist ungueltig';
return false;
}
$qry = "SELECT * FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if($this->db_query($qry))
{
if($row = $this->db_fetch_object())
{
$this->notiz_id=$row->notiz_id;
$this->titel=$row->titel;
$this->text=$row->text;
$this->verfasser_uid=$row->verfasser_uid;
$this->bearbeiter_uid=$row->bearbeiter_uid;
$this->start=$row->start;
$this->ende=$row->ende;
$this->erledigt=$this->db_parse_bool($row->erledigt);
$this->insertamum=$row->insertamum;
$this->insertvon=$row->insertvon;
$this->updateamum=$row->updateamum;
$this->updatevon=$row->updatevon;
return true;
}
else
{
$this->errormsg = 'Datensatz wurde nicht gefunden';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Löscht eine Notiz
* @param $notiz_id
* @return true wenn ok, false im Fehlerfall
*/
public function delete($notiz_id)
{
if(!is_numeric($notiz_id))
{
$this->errormsg = 'NotizID ist ungueltig';
return false;
}
$qry = "Delete FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if(!$this->db_query($qry))
{
$this->errormsg = 'Fehler beim Loeschen der Daten';
return false;
}
return true;
}
/**
* Prueft die Daten vor dem Speichern
* auf Gueltigkeit
*/
public function validate()
{
return true;
}
/**
* Speichert den aktuellen Datensatz in die Datenbank
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
* andernfalls wird der Datensatz mit der ID in $notiz_id aktualisiert
* @return true wenn ok, false im Fehlerfall
*/
public function save($new=null)
{
if($new==null)
$new=$this->new;
if(!$this->validate())
return false;
if($new)
{
//Neuen Datensatz einfuegen
$qry='BEGIN;INSERT INTO public.tbl_notiz (titel, text, verfasser_uid,
bearbeiter_uid, start, ende, erledigt, insertamum, insertvon,
updateamum, updatevon) VALUES('.
$this->db_add_param($this->titel).', '.
$this->db_add_param($this->text).', '.
$this->db_add_param($this->verfasser_uid).','.
$this->db_add_param($this->bearbeiter_uid).','.
$this->db_add_param($this->start).','.
$this->db_add_param($this->ende).','.
$this->db_add_param($this->erledigt,FHC_BOOLEAN).','.
$this->db_add_param($this->insertamum).','.
$this->db_add_param($this->insertvon).','.
$this->db_add_param($this->updateamum).','.
$this->db_add_param($this->updatevon).');';
}
else
{
$qry='UPDATE public.tbl_notiz SET '.
'titel='.$this->db_add_param($this->titel).', '.
'text='.$this->db_add_param($this->text).', '.
'verfasser_uid='.$this->db_add_param($this->verfasser_uid).', '.
'bearbeiter_uid='.$this->db_add_param($this->bearbeiter_uid).', '.
'start='.$this->db_add_param($this->start).', '.
'ende='.$this->db_add_param($this->ende).', '.
'erledigt='.$this->db_add_param($this->erledigt,FHC_BOOLEAN).', '.
'updateamum='.$this->db_add_param($this->updateamum).', '.
'updatevon='.$this->db_add_param($this->updatevon).' '.
'WHERE notiz_id='.$this->db_add_param($this->notiz_id,FHC_INTEGER).';';
}
if($this->db_query($qry))
{
if($new)
{
$qry="SELECT currval('seq_notiz_notiz_id') as id;";
if($result = $this->db_query($qry))
{
if($row = $this->db_fetch_object($result))
{
$this->notiz_id = $row->id;
$this->db_query('COMMIT;');
return true;
}
else
{
$this->errormsg = 'Fehler beim Lesen der Sequence';
$this->db_query('ROLLBACK');
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Lesen der Sequence';
$this->db_query('ROLLBACK');
return false;
}
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern des Datensatzes';
return false;
}
}
/**
* Speichert die Zuordnung einer Notiz
*
*/
public function saveZuordnung()
{
$qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id,
uid, person_id, prestudent_id, bestellung_id, lehreinheit_id, anrechnung_id) VALUES(".
$this->db_add_param($this->notiz_id, FHC_INTEGER).','.
$this->db_add_param($this->projekt_kurzbz).','.
$this->db_add_param($this->projektphase_id, FHC_INTEGER).','.
$this->db_add_param($this->projekttask_id, FHC_INTEGER).','.
$this->db_add_param($this->uid).','.
$this->db_add_param($this->person_id, FHC_INTEGER).','.
$this->db_add_param($this->prestudent_id, FHC_INTEGER).','.
$this->db_add_param($this->bestellung_id, FHC_INTEGER).','.
$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).','.
$this->db_add_param($this->anrechnung_id, FHC_INTEGER).');';
if($this->db_query($qry))
{
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern der Daten';
return false;
}
}
/**
*
* Laedt die Notizen
* @param $erledigt
* @param $projekt_kurzbz
* @param $projektphase_id
* @param $projekttask_id
* @param $uid
* @param $person_id
* @param $prestudent_id
* @param $bestellung_id
* @param $user
* @param $lehreinheit_id
* @param $anrechnung_id
* @return boolean
*/
public function getNotiz($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $stundenplandev_id=null, $anrechnung_id=null)
{
$qry = "SELECT
*
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE 1=1";
if(!is_null($erledigt))
{
if($erledigt)
$qry.=" AND erledigt=true";
else
$qry.=" AND erledigt=false";
}
if($projekt_kurzbz!='')
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
if($projektphase_id!='')
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($projekttask_id!='')
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
if($uid!='')
$qry.=" AND uid=".$this->db_add_param($uid);
if($person_id!='')
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
if($prestudent_id!='')
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
if($bestellung_id!='')
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
if($user!='')
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
if($lehreinheit_id!='')
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
$qry.=' ORDER BY start, ende, titel';
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new notiz();
$obj->notiz_id=$row->notiz_id;
$obj->titel=$row->titel;
$obj->text=$row->text;
$obj->verfasser_uid=$row->verfasser_uid;
$obj->bearbeiter_uid=$row->bearbeiter_uid;
$obj->start=$row->start;
$obj->ende=$row->ende;
$obj->erledigt=$this->db_parse_bool($row->erledigt);
$obj->insertamum=$row->insertamum;
$obj->insertvon=$row->insertvon;
$obj->updateamum=$row->updateamum;
$obj->updatevon=$row->updatevon;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
*
* Laedt die Notizen
* @param $erledigt
* @param $projekt_kurzbz
* @param $projektphase_id
* @param $projekttask_id
* @param $uid
* @param $person_id
* @param $prestudent_id
* @param $bestellung_id
* @param $user
* @param $lehreinheit_id
* @param $anrechnung_id
* @return boolean
*/
public function getAnzahlNotizen($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $anrechnung_id=null)
{
$qry = "SELECT
count(*) as anzahl
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE 1=1";
if(!is_null($erledigt))
{
if($erledigt)
$qry.=" AND erledigt=true";
else
$qry.=" AND erledigt=false";
}
if($projekt_kurzbz!='')
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
if($projektphase_id!='')
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($projekttask_id!='')
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
if($uid!='')
$qry.=" AND uid=".$this->db_add_param($uid);
if($person_id!='')
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
if($prestudent_id!='')
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
if($bestellung_id!='')
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
if($user!='')
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
if($lehreinheit_id!='')
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
if($result = $this->db_query($qry))
{
if($row = $this->db_fetch_object($result))
return $row->anzahl;
else
{
$this->errormsg='Fehler beim Laden der Daten';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
}
?>
<?php
/* Copyright (C) 2011 FH Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
class notiz extends basis_db
{
public $new;
public $result=array();
//Tabellenspalten
public $notiz_id;
public $titel;
public $text;
public $verfasser_uid;
public $bearbeiter_uid;
public $start;
public $ende;
public $erledigt;
public $insertamum;
public $insertvon;
public $updateamum;
public $updatevon;
public $projekt_kurzbz;
public $projektphase_id;
public $projekttask_id;
public $uid;
public $person_id;
public $prestudent_id;
public $bestellung_id;
public $lehreinheit_id;
public $anrechnung_id;
/**
* Konstruktor
* @param $notiz_id
*/
public function __construct($notiz_id = null)
{
parent::__construct();
if($notiz_id != null)
$this->load($notiz_id);
}
/**
* Laedt eine Notiz
* @param $notiz_id
* @return true wenn ok, false im Fehlerfall
*/
public function load($notiz_id)
{
if(!is_numeric($notiz_id))
{
$this->errormsg = 'NotizID ist ungueltig';
return false;
}
$qry = "SELECT * FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if($this->db_query($qry))
{
if($row = $this->db_fetch_object())
{
$this->notiz_id=$row->notiz_id;
$this->titel=$row->titel;
$this->text=$row->text;
$this->verfasser_uid=$row->verfasser_uid;
$this->bearbeiter_uid=$row->bearbeiter_uid;
$this->start=$row->start;
$this->ende=$row->ende;
$this->erledigt=$this->db_parse_bool($row->erledigt);
$this->insertamum=$row->insertamum;
$this->insertvon=$row->insertvon;
$this->updateamum=$row->updateamum;
$this->updatevon=$row->updatevon;
return true;
}
else
{
$this->errormsg = 'Datensatz wurde nicht gefunden';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
* Löscht eine Notiz
* @param $notiz_id
* @return true wenn ok, false im Fehlerfall
*/
public function delete($notiz_id)
{
if(!is_numeric($notiz_id))
{
$this->errormsg = 'NotizID ist ungueltig';
return false;
}
$qry = "Delete FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
if(!$this->db_query($qry))
{
$this->errormsg = 'Fehler beim Loeschen der Daten';
return false;
}
return true;
}
/**
* Prueft die Daten vor dem Speichern
* auf Gueltigkeit
*/
public function validate()
{
return true;
}
/**
* Speichert den aktuellen Datensatz in die Datenbank
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
* andernfalls wird der Datensatz mit der ID in $notiz_id aktualisiert
* @return true wenn ok, false im Fehlerfall
*/
public function save($new=null)
{
if($new==null)
$new=$this->new;
if(!$this->validate())
return false;
if($new)
{
//Neuen Datensatz einfuegen
$qry='BEGIN;INSERT INTO public.tbl_notiz (titel, text, verfasser_uid,
bearbeiter_uid, start, ende, erledigt, insertamum, insertvon,
updateamum, updatevon) VALUES('.
$this->db_add_param($this->titel).', '.
$this->db_add_param($this->text).', '.
$this->db_add_param($this->verfasser_uid).','.
$this->db_add_param($this->bearbeiter_uid).','.
$this->db_add_param($this->start).','.
$this->db_add_param($this->ende).','.
$this->db_add_param($this->erledigt,FHC_BOOLEAN).','.
$this->db_add_param($this->insertamum).','.
$this->db_add_param($this->insertvon).','.
$this->db_add_param($this->updateamum).','.
$this->db_add_param($this->updatevon).');';
}
else
{
$qry='UPDATE public.tbl_notiz SET '.
'titel='.$this->db_add_param($this->titel).', '.
'text='.$this->db_add_param($this->text).', '.
'verfasser_uid='.$this->db_add_param($this->verfasser_uid).', '.
'bearbeiter_uid='.$this->db_add_param($this->bearbeiter_uid).', '.
'start='.$this->db_add_param($this->start).', '.
'ende='.$this->db_add_param($this->ende).', '.
'erledigt='.$this->db_add_param($this->erledigt,FHC_BOOLEAN).', '.
'updateamum='.$this->db_add_param($this->updateamum).', '.
'updatevon='.$this->db_add_param($this->updatevon).' '.
'WHERE notiz_id='.$this->db_add_param($this->notiz_id,FHC_INTEGER).';';
}
if($this->db_query($qry))
{
if($new)
{
$qry="SELECT currval('seq_notiz_notiz_id') as id;";
if($result = $this->db_query($qry))
{
if($row = $this->db_fetch_object($result))
{
$this->notiz_id = $row->id;
$this->db_query('COMMIT;');
return true;
}
else
{
$this->errormsg = 'Fehler beim Lesen der Sequence';
$this->db_query('ROLLBACK');
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Lesen der Sequence';
$this->db_query('ROLLBACK');
return false;
}
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern des Datensatzes';
return false;
}
}
/**
* Speichert die Zuordnung einer Notiz
*
*/
public function saveZuordnung()
{
$qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id,
uid, person_id, prestudent_id, bestellung_id, lehreinheit_id, anrechnung_id) VALUES(".
$this->db_add_param($this->notiz_id, FHC_INTEGER).','.
$this->db_add_param($this->projekt_kurzbz).','.
$this->db_add_param($this->projektphase_id, FHC_INTEGER).','.
$this->db_add_param($this->projekttask_id, FHC_INTEGER).','.
$this->db_add_param($this->uid).','.
$this->db_add_param($this->person_id, FHC_INTEGER).','.
$this->db_add_param($this->prestudent_id, FHC_INTEGER).','.
$this->db_add_param($this->bestellung_id, FHC_INTEGER).','.
$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).','.
$this->db_add_param($this->anrechnung_id, FHC_INTEGER).');';
if($this->db_query($qry))
{
return true;
}
else
{
$this->errormsg = 'Fehler beim Speichern der Daten';
return false;
}
}
/**
*
* Laedt die Notizen
* @param $erledigt
* @param $projekt_kurzbz
* @param $projektphase_id
* @param $projekttask_id
* @param $uid
* @param $person_id
* @param $prestudent_id
* @param $bestellung_id
* @param $user
* @param $lehreinheit_id
* @param $anrechnung_id
* @return boolean
*/
public function getNotiz($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $stundenplandev_id=null, $anrechnung_id=null)
{
$qry = "SELECT
*
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE 1=1";
if(!is_null($erledigt))
{
if($erledigt)
$qry.=" AND erledigt=true";
else
$qry.=" AND erledigt=false";
}
if($projekt_kurzbz!='')
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
if($projektphase_id!='')
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($projekttask_id!='')
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
if($uid!='')
$qry.=" AND uid=".$this->db_add_param($uid);
if($person_id!='')
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
if($prestudent_id!='')
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
if($bestellung_id!='')
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
if($user!='')
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
if($lehreinheit_id!='')
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
$qry.=' ORDER BY start, ende, titel';
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new notiz();
$obj->notiz_id=$row->notiz_id;
$obj->titel=$row->titel;
$obj->text=$row->text;
$obj->verfasser_uid=$row->verfasser_uid;
$obj->bearbeiter_uid=$row->bearbeiter_uid;
$obj->start=$row->start;
$obj->ende=$row->ende;
$obj->erledigt=$this->db_parse_bool($row->erledigt);
$obj->insertamum=$row->insertamum;
$obj->insertvon=$row->insertvon;
$obj->updateamum=$row->updateamum;
$obj->updatevon=$row->updatevon;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
*
* Laedt die Notizen vom Bewerbungstool
* @param $person_id int
* @return boolean
*/
public function getBewerbungstoolNotizen($person_id)
{
$qry = 'SELECT
*
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE person_id = ' . $this->db_add_param($person_id, FHC_INTEGER) .
' AND insertvon = ' . $this->db_add_param('Bewerbungstool') .
' ORDER BY notiz_id';
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new notiz();
$obj->notiz_id=$row->notiz_id;
$obj->titel=$row->titel;
$obj->text=$row->text;
$obj->verfasser_uid=$row->verfasser_uid;
$obj->bearbeiter_uid=$row->bearbeiter_uid;
$obj->start=$row->start;
$obj->ende=$row->ende;
$obj->erledigt=$this->db_parse_bool($row->erledigt);
$obj->insertamum=$row->insertamum;
$obj->insertvon=$row->insertvon;
$obj->updateamum=$row->updateamum;
$obj->updatevon=$row->updatevon;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
/**
*
* Laedt die Notizen
* @param $erledigt
* @param $projekt_kurzbz
* @param $projektphase_id
* @param $projekttask_id
* @param $uid
* @param $person_id
* @param $prestudent_id
* @param $bestellung_id
* @param $user
* @param $lehreinheit_id
* @param $anrechnung_id
* @return boolean
*/
public function getAnzahlNotizen($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $anrechnung_id=null)
{
$qry = "SELECT
count(*) as anzahl
FROM
public.tbl_notiz
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
WHERE 1=1";
if(!is_null($erledigt))
{
if($erledigt)
$qry.=" AND erledigt=true";
else
$qry.=" AND erledigt=false";
}
if($projekt_kurzbz!='')
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
if($projektphase_id!='')
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
if($projekttask_id!='')
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
if($uid!='')
$qry.=" AND uid=".$this->db_add_param($uid);
if($person_id!='')
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
if($prestudent_id!='')
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
if($bestellung_id!='')
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
if($user!='')
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
if($lehreinheit_id!='')
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
if($anrechnung_id!='')
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
if($result = $this->db_query($qry))
{
if($row = $this->db_fetch_object($result))
return $row->anzahl;
else
{
$this->errormsg='Fehler beim Laden der Daten';
return false;
}
}
else
{
$this->errormsg = 'Fehler beim Laden der Daten';
return false;
}
}
}
+2 -2
View File
@@ -348,8 +348,8 @@ class preinteressent extends basis_db
public function loadFreigegebene($studiengang_kz, $studiensemester_kurzbz='')
{
$qry = "SELECT tbl_preinteressent.*, tbl_preinteressentstudiengang.* FROM public.tbl_preinteressent JOIN public.tbl_preinteressentstudiengang USING(preinteressent_id) JOIN public.tbl_person USING(person_id) WHERE
(studiengang_kz, person_id) NOT IN (SELECT studiengang_kz, person_id FROM public.tbl_prestudent WHERE person_id=tbl_person.person_id) AND freigabedatum is not null AND
tbl_preinteressentstudiengang.studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER);
(studiengang_kz, person_id) NOT IN (SELECT studiengang_kz, person_id FROM public.tbl_prestudent JOIN public.tbl_prestudentstatus USING(prestudent_id) WHERE status_kurzbz='Interessent' AND studiensemester_kurzbz=tbl_preinteressent.studiensemester_kurzbz AND person_id=tbl_person.person_id) AND freigabedatum is not null AND
tbl_preinteressentstudiengang.studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER)." AND tbl_preinteressentstudiengang.uebernahmedatum is null";
if($studiensemester_kurzbz!='')
$qry.=" AND tbl_preinteressent.studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
+48
View File
@@ -445,6 +445,7 @@ class prestudent extends person
$rolle->studienplan_bezeichnung = $row->studienplan_bezeichnung;
$rolle->bestaetigtam = $row->bestaetigtam;
$rolle->bestaetigtvon = $row->bestaetigtvon;
$rolle->anmerkung_status = $row->anmerkung;
$this->result[] = $rolle;
}
return true;
@@ -1079,6 +1080,53 @@ class prestudent extends person
}
}
/**
* Gibt die eingetragenen ZGV zurück
* @return array
*/
public function getZgv() {
$zgv = array(
'bachelor' => array(),
'master' => array(),
// 'doktor' => array(),
);
$attribute = array(
'art',
'ort',
'datum',
);
$db_attribute = array(
'zgv_code',
'zgvort',
'zgvdatum',
'zgvmas_code',
'zgvmaort',
'zgvmadatum',
'zgvdoktor_code',
'zgvdoktorort',
'zgvdoktordatum',
);
foreach($this->result as $prestudent) {
foreach($zgv as &$value) {
foreach($attribute as $attribut) {
$db_attribute_name = current($db_attribute);
if($prestudent->$db_attribute_name) {
$value[$attribut] = $prestudent->$db_attribute_name;
}
next($db_attribute);
}
}
reset($db_attribute);
}
return $zgv;
}
/**
* Liefert die Anzahl der Bewerber im ausgewaehlten Bereich
* @param $studiensemester_kurzbz Studiensemester
-214
View File
@@ -1,214 +0,0 @@
<?php
session_start(); // this MUST be called prior to any output including whitespaces and line breaks!
$GLOBALS['ct_recipient'] = 'YOU@EXAMPLE.COM'; // Change to your email address!
$GLOBALS['ct_msg_subject'] = 'Securimage Test Contact Form';
$GLOBALS['DEBUG_MODE'] = 1;
// CHANGE TO 0 TO TURN OFF DEBUG MODE
// IN DEBUG MODE, ONLY THE CAPTCHA CODE IS VALIDATED, AND NO EMAIL IS SENT
// Process the form, if it was submitted
process_si_contact_form();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Securimage Example Form</title>
<style type="text/css">
<!--
#success_message { border: 1px solid #000; width: 550px; text-align: left; padding: 10px 7px; background: #33ff33; color: #000; font-weight; bold; font-size: 1.2em; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; }
fieldset { width: 90%; }
legend { font-size: 24px; }
.note { font-size: 18px; }
-->
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script>
<script type="text/javascript">
function reloadCaptcha()
{
document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random();
}
function processForm()
{
new Ajax.Request('<?php echo $_SERVER['PHP_SELF'] ?>', {
method: 'post',
parameters: $('contact_form').serialize(),
onSuccess: function(transport) {
try {
var r = transport.responseText.evalJSON();
if (r.error == 0) {
$('success_message').show();
$('contact_form').reset();
reloadCaptcha();
setTimeout("$('success_message').hide()", 30000);
} else {
alert("There was an error with your submission.\n\n" + r.message);
}
} catch(ex) {
alert("There was an error parsing the json");
}
},
onFailure: function(err) {
alert("Ajax request failed");
}
});
return false;
}
</script>
</head>
<body>
<fieldset>
<legend>Example Form</legend>
<p class="note">
This is an example PHP form that processes user information, checks for errors, and validates the captcha code.<br />
This example form also demonstrates how to submit a form to itself to display error messages.
</p>
<div id="success_message" style="display: none">Your message has been sent!<br />We will contact you as soon as possible.</div>
<form method="post" action="" id="contact_form" onsubmit="return processForm()">
<input type="hidden" name="do" value="contact" />
<p>
<strong>Name*:</strong><br />
<input type="text" name="ct_name" size="35" value="" />
</p>
<p>
<strong>Email*:</strong><br />
<input type="text" name="ct_email" size="35" value="" />
</p>
<p>
<strong>URL:</strong><br />
<input type="text" name="ct_URL" size="35" value="" />
</p>
<p>
<strong>Message*:</strong><br />
<textarea name="ct_message" rows="12" cols="60"></textarea>
</p>
<p>
<img id="siimage" style="border: 1px solid #000; margin-right: 15px" src="./securimage_show.php?sid=<?php echo md5(uniqid()) ?>" alt="CAPTCHA Image" align="left" />
<object type="application/x-shockwave-flash" data="./securimage_play.swf?bgcol=#ffffff&amp;icon_file=./images/audio_icon.png&amp;audio_file=./securimage_play.php" height="32" width="32">
<param name="movie" value="./securimage_play.swf?bgcol=#ffffff&amp;icon_file=./images/audio_icon.png&amp;audio_file=./securimage_play.php" />
</object>
&nbsp;
<a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false"><img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0" /></a><br />
<strong>Enter Code*:</strong><br />
<input type="text" name="ct_captcha" size="12" maxlength="8" />
</p>
<p>
<br />
<input type="submit" value="Submit Message" />
</p>
</form>
</fieldset>
</body>
</html>
<?php
// The form processor PHP code
function process_si_contact_form()
{
if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['do'] == 'contact') {
// if the form has been submitted
foreach($_POST as $key => $value) {
if (!is_array($key)) {
// sanitize the input data
if ($key != 'ct_message') $value = strip_tags($value);
$_POST[$key] = htmlspecialchars(stripslashes(trim($value)));
}
}
$name = @$_POST['ct_name']; // name from the form
$email = @$_POST['ct_email']; // email from the form
$URL = @$_POST['ct_URL']; // url from the form
$message = @$_POST['ct_message']; // the message from the form
$captcha = @$_POST['ct_captcha']; // the user's entry for the captcha code
$name = substr($name, 0, 64); // limit name to 64 characters
$errors = array(); // initialize empty error array
if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) {
// only check for errors if the form is not in debug mode
if (strlen($name) < 3) {
// name too short, add error
$errors['name_error'] = 'Your name is required';
}
if (strlen($email) == 0) {
// no email address given
$errors['email_error'] = 'Email address is required';
} else if ( !preg_match('/^(?:[\w\d]+\.?)+@(?:(?:[\w\d]\-?)+\.)+\w{2,4}$/i', $email)) {
// invalid email format
$errors['email_error'] = 'Email address entered is invalid';
}
if (strlen($message) < 20) {
// message length too short
$errors['message_error'] = 'Please enter a message';
}
}
// Only try to validate the captcha if the form has no errors
// This is especially important for ajax calls
if (sizeof($errors) == 0) {
require_once dirname(__FILE__) . '/securimage.php';
$securimage = new Securimage();
if ($securimage->check($captcha) == false) {
$errors['captcha_error'] = 'Incorrect security code entered';
}
}
if (sizeof($errors) == 0) {
// no errors, send the form
$time = date('r');
$message = "A message was submitted from the contact form. The following information was provided.<br /><br />"
. "Name: $name<br />"
. "Email: $email<br />"
. "URL: $URL<br />"
. "Message:<br />"
. "<pre>$message</pre>"
. "<br /><br />IP Address: {$_SERVER['REMOTE_ADDR']}<br />"
. "Time: $time<br />"
. "Browser: {$_SERVER['HTTP_USER_AGENT']}<br />";
if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) {
// send the message with mail()
mail($GLOBALS['ct_recipient'], $GLOBALS['ct_msg_subject'], $message, "From: {$GLOBALS['ct_recipient']}\r\nReply-To: {$email}\r\nContent-type: text/html; charset=ISO-8859-1\r\nMIME-Version: 1.0");
}
$return = array('error' => 0, 'message' => 'OK');
die(json_encode($return));
} else {
$errmsg = '';
foreach($errors as $key => $error) {
// set up error messages to display with each field
$errmsg .= " - {$error}\n";
}
$return = array('error' => 1, 'message' => $errmsg);
die(json_encode($return));
}
} // POST
} // function process_si_contact_form()
-192
View File
@@ -1,192 +0,0 @@
<?php
session_start(); // this MUST be called prior to any output including whitespaces and line breaks!
$GLOBALS['DEBUG_MODE'] = 1;
// CHANGE TO 0 TO TURN OFF DEBUG MODE
// IN DEBUG MODE, ONLY THE CAPTCHA CODE IS VALIDATED, AND NO EMAIL IS SENT
$GLOBALS['ct_recipient'] = 'YOU@EXAMPLE.COM'; // Change to your email address!
$GLOBALS['ct_msg_subject'] = 'Securimage Test Contact Form';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Securimage Example Form</title>
<style type="text/css">
<!--
.error { color: #f00; font-weight: bold; font-size: 1.2em; }
.success { color: #00f; font-weight: bold; font-size: 1.2em; }
fieldset { width: 90%; }
legend { font-size: 24px; }
.note { font-size: 18px;
-->
</style>
</head>
<body>
<fieldset>
<legend>Example Form</legend>
<p class="note">
This is an example PHP form that processes user information, checks for errors, and validates the captcha code.<br />
This example form also demonstrates how to submit a form to itself to display error messages.
</p>
<?php
process_si_contact_form(); // Process the form, if it was submitted
if (isset($_SESSION['ctform']['error']) && $_SESSION['ctform']['error'] == true): /* The last form submission had 1 or more errors */ ?>
<span class="error">There was a problem with your submission. Errors are displayed below in red.</span><br /><br />
<?php elseif (isset($_SESSION['ctform']['success']) && $_SESSION['ctform']['success'] == true): /* form was processed successfully */ ?>
<span class="success">The captcha was correct and the message has been sent!</span><br /><br />
<?php endif; ?>
<form method="post" action="<?php echo $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING'] ?>" id="contact_form">
<input type="hidden" name="do" value="contact" />
<p>
<strong>Name*:</strong>&nbsp; &nbsp;<?php echo @$_SESSION['ctform']['name_error'] ?><br />
<input type="text" name="ct_name" size="35" value="<?php echo htmlspecialchars(@$_SESSION['ctform']['ct_name']) ?>" />
</p>
<p>
<strong>Email*:</strong>&nbsp; &nbsp;<?php echo @$_SESSION['ctform']['email_error'] ?><br />
<input type="text" name="ct_email" size="35" value="<?php echo htmlspecialchars(@$_SESSION['ctform']['ct_email']) ?>" />
</p>
<p>
<strong>URL:</strong>&nbsp; &nbsp;<?php echo @$_SESSION['ctform']['URL_error'] ?><br />
<input type="text" name="ct_URL" size="35" value="<?php echo htmlspecialchars(@$_SESSION['ctform']['ct_URL']) ?>" />
</p>
<p>
<strong>Message*:</strong>&nbsp; &nbsp;<?php echo @$_SESSION['ctform']['message_error'] ?><br />
<textarea name="ct_message" rows="12" cols="60"><?php echo htmlspecialchars(@$_SESSION['ctform']['ct_message']) ?></textarea>
</p>
<p>
<img id="siimage" style="border: 1px solid #000; margin-right: 15px" src="./securimage_show.php?sid=<?php echo md5(uniqid()) ?>" alt="CAPTCHA Image" align="left" />
<object type="application/x-shockwave-flash" data="./securimage_play.swf?bgcol=#ffffff&amp;icon_file=./images/audio_icon.png&amp;audio_file=./securimage_play.php" height="32" width="32">
<param name="movie" value="./securimage_play.swf?bgcol=#ffffff&amp;icon_file=./images/audio_icon.png&amp;audio_file=./securimage_play.php" />
</object>
&nbsp;
<a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false"><img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0" /></a><br />
<strong>Enter Code*:</strong><br />
<?php echo @$_SESSION['ctform']['captcha_error'] ?>
<input type="text" name="ct_captcha" size="12" maxlength="16" />
</p>
<p>
<br />
<input type="submit" value="Submit Message" />
</p>
</form>
</fieldset>
</body>
</html>
<?php
// The form processor PHP code
function process_si_contact_form()
{
$_SESSION['ctform'] = array(); // re-initialize the form session data
if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['do'] == 'contact') {
// if the form has been submitted
foreach($_POST as $key => $value) {
if (!is_array($key)) {
// sanitize the input data
if ($key != 'ct_message') $value = strip_tags($value);
$_POST[$key] = htmlspecialchars(stripslashes(trim($value)));
}
}
$name = @$_POST['ct_name']; // name from the form
$email = @$_POST['ct_email']; // email from the form
$URL = @$_POST['ct_URL']; // url from the form
$message = @$_POST['ct_message']; // the message from the form
$captcha = @$_POST['ct_captcha']; // the user's entry for the captcha code
$name = substr($name, 0, 64); // limit name to 64 characters
$errors = array(); // initialize empty error array
if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) {
// only check for errors if the form is not in debug mode
if (strlen($name) < 3) {
// name too short, add error
$errors['name_error'] = 'Your name is required';
}
if (strlen($email) == 0) {
// no email address given
$errors['email_error'] = 'Email address is required';
} else if ( !preg_match('/^(?:[\w\d]+\.?)+@(?:(?:[\w\d]\-?)+\.)+\w{2,4}$/i', $email)) {
// invalid email format
$errors['email_error'] = 'Email address entered is invalid';
}
if (strlen($message) < 20) {
// message length too short
$errors['message_error'] = 'Please enter a message';
}
}
// Only try to validate the captcha if the form has no errors
// This is especially important for ajax calls
if (sizeof($errors) == 0) {
require_once dirname(__FILE__) . '/securimage.php';
$securimage = new Securimage();
if ($securimage->check($captcha) == false) {
$errors['captcha_error'] = 'Incorrect security code entered<br />';
}
}
if (sizeof($errors) == 0) {
// no errors, send the form
$time = date('r');
$message = "A message was submitted from the contact form. The following information was provided.<br /><br />"
. "Name: $name<br />"
. "Email: $email<br />"
. "URL: $URL<br />"
. "Message:<br />"
. "<pre>$message</pre>"
. "<br /><br />IP Address: {$_SERVER['REMOTE_ADDR']}<br />"
. "Time: $time<br />"
. "Browser: {$_SERVER['HTTP_USER_AGENT']}<br />";
$message = wordwrap($message, 70);
if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) {
// send the message with mail()
mail($GLOBALS['ct_recipient'], $GLOBALS['ct_msg_subject'], $message, "From: {$GLOBALS['ct_recipient']}\r\nReply-To: {$email}\r\nContent-type: text/html; charset=ISO-8859-1\r\nMIME-Version: 1.0");
}
$_SESSION['ctform']['error'] = false; // no error with form
$_SESSION['ctform']['success'] = true; // message sent
} else {
// save the entries, this is to re-populate the form
$_SESSION['ctform']['ct_name'] = $name; // save name from the form submission
$_SESSION['ctform']['ct_email'] = $email; // save email
$_SESSION['ctform']['ct_URL'] = $URL; // save URL
$_SESSION['ctform']['ct_message'] = $message; // save message
foreach($errors as $key => $error) {
// set up error messages to display with each field
$_SESSION['ctform'][$key] = "<span style=\"font-weight: bold; color: #f00\">$error</span>";
}
$_SESSION['ctform']['error'] = true; // set error floag
}
} // POST
}
$_SESSION['ctform']['success'] = false; // clear success value after running
+29
View File
@@ -681,4 +681,33 @@ class studiengang extends basis_db
return false;
}
}
/**
* @param $studiengaenge array
* @return array|bool
*/
public function getTypes($studiengaenge) {
$qry = 'SELECT distinct typ ' .
'FROM public.tbl_studiengang ' .
'WHERE studiengang_kz IN (' . implode(',', $studiengaenge) . ')';
$types = array();
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result)) {
$types[] = $row->typ;
}
return $types;
}
else
{
$this->errormsg = "Fehler bei der Abfrage aufgetreten";
return false;
}
}
}
+13 -6
View File
@@ -1967,6 +1967,7 @@ class wochenplan extends basis_db
return false;
}
$num_orte=$this->db_num_rows();
$orte = array();
for ($i=0;$i<$num_orte;$i++)
{
$row = $this->db_fetch_object(null, $i);
@@ -2083,10 +2084,13 @@ class wochenplan extends basis_db
//Kollision mit Gruppe
if($raster[$t][$s]->kollision)
{
foreach ($this->std_plan[$t][$s][0]->frei_orte as $ort=>$value)
if(isset($this->std_plan[$t][$s][0]->frei_orte))
{
if(in_array($ort, $orte))
$this->std_plan[$t][$s][0]->frei_orte[$ort]=(isset($this->std_plan[$t][$s][0]->frei_orte[$ort])?$this->std_plan[$t][$s][0]->frei_orte[$ort]+1:1);
foreach ($this->std_plan[$t][$s][0]->frei_orte as $ort=>$value)
{
if(in_array($ort, $orte))
$this->std_plan[$t][$s][0]->frei_orte[$ort]=(isset($this->std_plan[$t][$s][0]->frei_orte[$ort])?$this->std_plan[$t][$s][0]->frei_orte[$ort]+1:1);
}
}
}
@@ -2104,9 +2108,12 @@ class wochenplan extends basis_db
}
else
{
// Bei Gruppenkollision den Wert bei allen Raumen erhoehen
foreach ($this->std_plan[$t][$s][0]->frei_orte as $ort=>$value)
$this->std_plan[$t][$s][0]->frei_orte[$ort]=(isset($this->std_plan[$t][$s][0]->frei_orte[$ort])?$this->std_plan[$t][$s][0]->frei_orte[$ort]+1:1);
if(isset($this->std_plan[$t][$s][0]->frei_orte))
{
// Bei Gruppenkollision den Wert bei allen Raumen erhoehen
foreach ($this->std_plan[$t][$s][0]->frei_orte as $ort=>$value)
$this->std_plan[$t][$s][0]->frei_orte[$ort]=(isset($this->std_plan[$t][$s][0]->frei_orte[$ort])?$this->std_plan[$t][$s][0]->frei_orte[$ort]+1:1);
}
}
}
}
+13 -3
View File
@@ -218,6 +218,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
if($row->typ=='d')
{
echo ' <niveau_code>UNESCO ISCED 5A</niveau_code>';
echo ' <zulassungsvoraussetzungen_deutsch><![CDATA[Allgemeine Universitätsreife (vgl. §4 Abs. 3 FHStG idgF), Berufsreifeprüfung bzw. Studienberechtigungsprüfung oder einschlägige berufliche Qualifikation (Lehrabschluss bzw. Abschluss einer berufsbildenden mittleren Schule mit Zusatzprüfungen). Die Aufnahme erfolgt auf Basis eines Auswahlverfahrens (Werdegang, Eignungstest, Bewerbungsgespräch).]]></zulassungsvoraussetzungen_deutsch>';
echo ' <zulassungsvoraussetzungen_englisch><![CDATA[Austrian or equivalent foreign school leaving certificate (Reifeprüfung), university entrance examination certificate (Studienberechtigungsprüfung), certificate or equivalent relevant professional qualification (Berufsreifeprüfung) plus entrance examination equal to the university entrance examination. Admission is on the basis of a selection process (including entrance exam and interview, professional background is considered).]]></zulassungsvoraussetzungen_englisch>';
echo ' <anforderungen_deutsch><![CDATA[Das Studium erfordert die positive Absolvierung von Lehrveranstaltungen (Vorlesungen, Übungen, Seminaren, Projekten, integrierten Lehrveranstaltungen) im Ausmaß von jeweils 30 ECTS pro Semester gemäß dem vorgeschriebenen Studienplan. Die Ausbildung integriert technische, wirtschaftliche, organisatorische und persönlichkeitsbildende Elemente. Das Studium beinhaltet ein facheinschlägiges Berufpraktikum. Im Rahmen des Studiums ist eine Diplomarbeit zu verfassen und eine abschließende Prüfung (Diplomprüfung) zu absolvieren. Der Studiengang (Kennzahl '.sprintf('%04s', $row->studiengang_kz).') ist von der AQ Austria akkreditiert.]]></anforderungen_deutsch>';
@@ -229,6 +230,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
elseif($row->typ=='m')
{
echo ' <niveau_code>UNESCO ISCED 5A</niveau_code>';
echo ' <zulassungsvoraussetzungen_deutsch><![CDATA[Die fachliche Zugangsvoraussetzung (vgl. §4 Abs. 2 FHStG idgF) zu einem FH-Masterstudiengang ist ein abgeschlossener facheinschlägiger FH-Bachelorstudiengang oder der Abschluss eines gleichwertigen Studiums an einer anerkannten inländischen oder ausländischen postsekundären Bildungseinrichtung. Die Aufnahme in den Studiengang erfolgt auf Basis eines Auswahlverfahrens.]]></zulassungsvoraussetzungen_deutsch>';
echo ' <zulassungsvoraussetzungen_englisch><![CDATA[ Admission to the master\'s degree program is granted on the basis of the successful completion of a relevant bachelor\'s degree program or a comparable Austrian or foreign post-secondary degree acknowledged to be its equivalent. Admission is on the basis of a selection process. ]]></zulassungsvoraussetzungen_englisch>';
echo ' <anforderungen_deutsch><![CDATA[Das Studium erfordert die positive Absolvierung von Lehrveranstaltungen (Vorlesungen, Übungen, Seminaren, Projekten, integrierten Lehrveranstaltungen) im Ausmaß von jeweils 30 ECTS pro Semester gemäß dem vorgeschriebenen Studienplan. Die Ausbildung integriert technische, wirtschaftliche, organisatorische und persönlichkeitsbildende Elemente. Im Rahmen des Studiums ist eine Master Thesis zu verfassen und eine abschließende Prüfung (Masterprüfung) zu absolvieren. Der Studiengang (Kennzahl '.sprintf('%04s', $row->studiengang_kz).') ist von der AQ Austria akkreditiert.]]></anforderungen_deutsch>';
@@ -240,6 +242,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
elseif($row->typ=='b')
{
echo ' <niveau_code>UNESCO ISCED 5A</niveau_code>';
echo ' <zulassungsvoraussetzungen_deutsch><![CDATA[Allgemeine Universitätsreife (vgl. §4 Abs. 3 FHStG idgF), Berufsreifeprüfung bzw. Studienberechtigungsprüfung oder einschlägige berufliche Qualifikation (Lehrabschluss bzw. Abschluss einer berufsbildenden mittleren Schule mit Zusatzprüfungen). Die Aufnahme erfolgt auf Basis eines Auswahlverfahrens (Werdegang, Eignungstest, Bewerbungsgespräch).]]></zulassungsvoraussetzungen_deutsch>';
echo ' <zulassungsvoraussetzungen_englisch><![CDATA[Austrian or equivalent foreign school leaving certificate (Reifeprüfung), university entrance examination certificate (Studienberechtigungsprüfung), certificate or equivalent relevant professional qualification (Berufsreifeprüfung) plus entrance examination equal to the university entrance examination. Admission is on the basis of a selection process. (including entrance exam and interview, professional background is considered).]]></zulassungsvoraussetzungen_englisch>';
echo ' <anforderungen_deutsch><![CDATA[Das Studium erfordert die positive Absolvierung von Lehrveranstaltungen (Vorlesungen, Übungen, Seminaren, Projekten, integrierten Lehrveranstaltungen) im Ausmaß von jeweils 30 ECTS pro Semester gemäß dem vorgeschriebenen Studienplan. Die Ausbildung integriert technische, wirtschaftliche, organisatorische und persönlichkeitsbildende Elemente. Das Studium beinhaltet ein facheinschlägiges Berufpraktikum. Im Rahmen des Studiums sind zwei Bachelorarbeiten zu verfassen und eine abschließende Prüfung (Bachelorprüfung) zu absolvieren. Der Studiengang (Kennzahl '.sprintf('%04s', $row->studiengang_kz).') ist von der AQ Austria akkreditiert.]]></anforderungen_deutsch>';
@@ -249,6 +252,13 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
echo ' <niveau_deutsch>Bachelorstudium (UNESCO ISCED 5A)</niveau_deutsch>';
echo ' <niveau_englisch>Bachelor degree program (UNESCO ISCED 5A)</niveau_englisch>';
}
elseif($row->typ=='r')
{
echo ' <niveau_code>UNESCO ISCED 6</niveau_code>';
echo ' <niveau_deutsch>Doktoratsstudium (UNESCO ISCED 6)</niveau_deutsch>';
echo ' <niveau_englisch>University doctoral studies (UNESCO ISCED 6)</niveau_englisch>';
}
$akadgrad_id='';
@@ -450,9 +460,9 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$noten_anzahl += $noteArrayPrev[7];
$noten_anzahl += $noteArrayPrev[12];
// Division durch 0 verhindern
if($noten_anzahl==0)
$noten_anzahl=1;
// Division durch 0 verhindern
if($noten_anzahl==0)
$noten_anzahl=1;
// Noten: 1-5, angerechnet, nicht beurteilt, erfolgreich absolviert anzeigen
echo " <gradePrevLastYear1>".sprintf("%01.1f",($noteArrayPrev[1]/$noten_anzahl*100))."</gradePrevLastYear1>";
+22 -5
View File
@@ -108,11 +108,28 @@ $lehrveranstaltungen = array();
$ausbildungssemester = $row_sem->semester;
}
}
if($ausbildungssemester/2==0)
$ausbildungssemester2=$ausbildungssemester-1;
else
$ausbildungssemester2=$ausbildungssemester+1;
$qry ="SELECT ausbildungssemester as semester FROM public.tbl_prestudentstatus
WHERE
prestudent_id=".$db->db_add_param($student->prestudent_id)." AND
studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz2)." AND
status_kurzbz not in('Incoming','Aufgenommener','Bewerber','Wartender', 'Interessent')
ORDER BY DATUM DESC LIMIT 1";
if($result_sem = $db->db_query($qry))
{
if($row_sem = $db->db_fetch_object($result_sem))
{
$ausbildungssemester2 = $row_sem->semester;
}
else
{
if($ausbildungssemester/2==0)
$ausbildungssemester2=$ausbildungssemester-1;
else
$ausbildungssemester2=$ausbildungssemester+1;
}
}
$student_studienjahr = round($ausbildungssemester/2);
$jahr1=mb_substr($studiensemester_kurzbz,2);
+164
View File
@@ -0,0 +1,164 @@
<?php
/* Copyright (C) 2015 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: Stefan Puraner <stefan.puraner@technikum-wien.at>,
*/
header("Content-type: application/xhtml+xml");
require_once('../config/vilesci.config.inc.php');
require_once('../include/rdf.class.php');
require_once('../include/functions.inc.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/datum.class.php');
require_once('../include/abschlusspruefung.class.php');
require_once('../include/student.class.php');
require_once('../include/studiengang.class.php');
require_once('../include/studienplan.class.php');
require_once('../include/prestudent.class.php');
require_once('../include/lehrveranstaltung.class.php');
require_once('../include/pruefung.class.php');
require_once('../include/projektarbeit.class.php');
require_once('../include/note.class.php');
require_once('../include/lehreinheit.class.php');
if(isset($_SERVER['REMOTE_USER']))
{
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('student/noten'))
die('Sie haben keine Berechtigung für diese Seite');
}
$datum = new datum();
$abschlusspruefung_id = filter_input(INPUT_GET, "abschlusspruefung_id");
$abschlusspruefung = new abschlusspruefung($abschlusspruefung_id);
$studiensemester_kurzbz = filter_input(INPUT_GET, "ss");
$student = new student($abschlusspruefung->student_uid);
$studiengang = new studiengang($student->studiengang_kz);
$prestudent = new prestudent();
$prestudent->getLastStatus($student->prestudent_id, $studiensemester_kurzbz, "Student");
$studienplan = new studienplan();
$studienplan_id = $studienplan->getStudienplan($studiengang->studiengang_kz, $studiensemester_kurzbz, $prestudent->ausbildungssemester, $studiengang->orgform_kurzbz);
$studienplan->loadStudienplan($studienplan_id);
$lehrveranstaltung = new lehrveranstaltung();
$tree = $lehrveranstaltung->getLvTree($studienplan_id);
$pruefung = new pruefung();
$pruefung->getPruefungen($student->uid, "fachpruefung");
$projektarbeit = new projektarbeit();
$projektarbeit->getProjektarbeit($student->uid);
echo "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n";
echo "<abschlusszeugnisse>";
echo "<abschlusszeugnis>";
$modul_temp = "";
echo "<akt_datum>".date('d.m.Y')."</akt_datum>";
echo "<uid>".$student->uid."</uid>";
echo "<vorname>".$student->vorname."</vorname>";
echo "<vornamen>".$student->vornamen."</vornamen>";
echo "<nachname>".$student->nachname."</nachname>";
echo "<geschlecht>".$student->geschlecht."</geschlecht>";
echo "<titelpost>".$student->titelpost."</titelpost>";
echo "<titelpre>".$student->titelpre."</titelpre>";
echo "<gebdatum>".$datum->formatDatum($student->gebdatum, "d.m.Y")."</gebdatum>";
echo "<studiengang_bezeichnung>".$studiengang->bezeichnung."</studiengang_bezeichnung>";
echo "<studienplan_bezeichnung>".$studienplan->bezeichnung."</studienplan_bezeichnung>";
echo "<gesamt_beurteilung>".strtoupper($abschlusspruefung->abschlussbeurteilung_kurzbz)."</gesamt_beurteilung>";
echo "<gesamt_datum>".$datum->formatDatum($abschlusspruefung->datum,"d.m.Y")."</gesamt_datum>";
$note = new note($abschlusspruefung->note);
echo "<gesamt_note>".$note->bezeichnung."</gesamt_note>";
if(!empty($projektarbeit->result))
{
$lehreinheit = new lehreinheit($projektarbeit->result[0]->lehreinheit_id);
$lehrveranstaltung = new lehrveranstaltung($lehreinheit->lehrveranstaltung_id);
$note = new note($projektarbeit->result[0]->note);
echo "<projektarbeit_titel>".$projektarbeit->result[0]->titel."</projektarbeit_titel>";
echo "<projektarbeit_note>".$note->bezeichnung."</projektarbeit_note>";
echo "<projektarbeit_lv>".$lehrveranstaltung->bezeichnung."</projektarbeit_lv>";
}
else
{
echo "<projektarbeit_titel></projektarbeit_titel>";
}
if(sizeof($tree) > 1)
{
foreach($tree as $modul)
{
if($modul_temp == "")
{
echo "<module>";
echo "<modul>";
$modul_temp = $modul->bezeichnung;
echo "<modul_bezeichnung>".$modul->bezeichnung."</modul_bezeichnung>";
echo "<lehrveranstaltungen>";
foreach($modul->children as $child)
{
echo "<lv_bezeichnung>".$child->bezeichnung."</lv_bezeichnung>";
echo "<lv_ects>".$child->ects."</lv_ects>";
}
}
if($modul_temp != $modul->bezeichnung && $modul_temp != '')
{
echo '</lehrveranstaltungen></modul><modul>';
$modul_temp = $modul->bezeichnung;
echo "<modul_bezeichnung>".$modul->bezeichnung."</modul_bezeichnung>";
echo "<lehrveranstaltungen>";
foreach($modul->children as $child)
{
echo "<lv_bezeichnung>".$child->bezeichnung."</lv_bezeichnung>";
echo "<lv_ects>".$child->ects."</lv_ects>";
}
}
else
{
foreach($modul->children as $child)
{
echo "<lv_bezeichnung>".$child->bezeichnung."</lv_bezeichnung>";
echo "<lv_ects>".$child->ects."</lv_ects>";
}
}
}
echo '</lehrveranstaltungen></modul></module>';
}
echo '<fachpruefungen>';
foreach($pruefung->result as $key => $prf)
{
echo '<pruefung_'.$key.'>';
echo '<prf_'.$key.'_bezeichnung>'.$prf->pruefungstyp_beschreibung.'</prf_'.$key.'_bezeichnung>';
echo '<prf_'.$key.'_datum>'.$datum->formatDatum($prf->datum,"d.m.Y").'</prf_'.$key.'_datum>';
echo '<prf_'.$key.'_note>'.$prf->note.'</prf_'.$key.'_note>';
echo '<prf_'.$key.'_note_bezeichnung>'.$prf->note_bezeichnung.'</prf_'.$key.'_note_bezeichnung>';
echo '<prf_'.$key.'_lv_bezeichnung>'.$prf->lehrveranstaltung_bezeichnung.'</prf_'.$key.'_lv_bezeichnung>';
echo '</pruefung_'.$key.'>';
}
echo '</fachpruefungen>';
echo "</abschlusszeugnis>";
echo "</abschlusszeugnisse>";
+186 -174
View File
@@ -1,175 +1,187 @@
<?php
/* Copyright (C) 2014 FH 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: Stefan Puraner <stefan.puraner@technikum-wien.at>
*/
header("Content-type: application/xhtml+xml");
require_once('../config/vilesci.config.inc.php');
require_once('../config/global.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/lehrveranstaltung.class.php');
require_once('../include/studiensemester.class.php');
require_once('../include/mitarbeiter.class.php');
require_once('../include/adresse.class.php');
require_once('../include/kontakt.class.php');
require_once('../include/bankverbindung.class.php');
require_once('../include/vertrag.class.php');
require_once('../include/lehreinheit.class.php');
require_once('../include/lehreinheitmitarbeiter.class.php');
require_once('../include/datum.class.php');
require_once('../include/nation.class.php');
$mitarbeiter_uid = isset($_GET["mitarbeiter_uid"]) ? $_GET["mitarbeiter_uid"] : NULL;
$vertrag_data = isset($_GET["vertrag_id"]) ? $_GET["vertrag_id"] : NULL;
echo "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n";
echo "<honorarvertraege>";
if($mitarbeiter_uid === NULL)
{
echo "<error>Mitarbeiter UID fehlt</error>";
}
else if($vertrag_data === NULL)
{
echo "<error>Vertrags-ID fehlt</error>";
}
else
{
$ma = new mitarbeiter($mitarbeiter_uid);
$adresse = new adresse();
$adresse->load_pers($ma->person_id);
$kontakt = new kontakt();
$bankverbindung = new bankverbindung();
$datum = new datum();
$nation = new nation($ma->staatsbuergerschaft);
echo "<honorarvertrag>";
echo "<person>";
echo "<vorname>".$ma->vorname."</vorname>";
echo "<nachname>".$ma->nachname."</nachname>";
foreach($adresse->result as $adr)
{
if($adr->heimatadresse)
{
echo "<strasse>".$adr->strasse."</strasse>";
echo "<plz>".$adr->plz."</plz>";
echo "<ort>".$adr->ort."</ort>";
}
}
echo "<gebdat>".$datum->formatDatum($ma->gebdatum,'d.m.Y')."</gebdat>";
echo "<svnr>".$ma->svnr."</svnr>";
echo "<staat>".$nation->kurztext."</staat>";
switch ($ma->familienstand) {
case "l":
$familienstand = "ledig";
break;
case "v":
$familienstand = "verheiratet";
break;
case "g":
$familienstand = "geschieden";
break;
case "w":
$familienstand = "verwitwet";
break;
default:
$familienstand = "";
break;
}
echo "<familienstand>".$familienstand."</familienstand>";
echo "<personalnr>".$ma->personalnummer."</personalnr>";
$kontakt->load_persKontakttyp($ma->person_id, "telefon");
if(!empty($kontakt->result))
{
echo "<tel>".$kontakt->result[0]->kontakt."</tel>";
unset($kontakt->result);
}
$kontakt->load_persKontakttyp($ma->person_id, "email");
if(!empty($kontakt->result))
{
echo "<email>".$kontakt->result[0]->kontakt."</email>";
unset($kontakt->result);
}
echo "</person>";
echo "<bankverbindung>";
$bankverbindung->load_pers($ma->person_id);
foreach($bankverbindung->result as $bank)
{
if($bank->verrechnung)
{
echo "<name>".$bank->name."</name>";
echo "<iban>".$bank->iban."</iban>";
echo "<bic>".$bank->bic."</bic>";
echo "<blz>".$bank->blz."</blz>";
echo "<kontonr>".$bank->kontonr."</kontonr>";
break;
}
}
echo "</bankverbindung>";
echo "<vertraege>";
// $vertrag->getAllStatus($vertrag_id);
$summe = 0;
foreach($vertrag_data as $vertrag_id)
{
$vertrag = new vertrag();
$vertrag->load($vertrag_id);
$vertrag->getAllStatus($vertrag_id);
$studiensemester = "";
foreach($vertrag->result as $status)
{
if($vertrag->vertragstyp_kurzbz == "lehre" && $status->vertragsstatus_kurzbz == "genehmigt")
{
$v_temp = new vertrag();
$v_temp->loadZugeordnet($vertrag_id);
$lehreinheit = new lehreinheitmitarbeiter($v_temp->result[0]->lehreinheit_id,$ma->uid);
$le = new lehreinheit($lehreinheit->lehreinheit_id);
$studiensemester = new studiensemester($le->studiensemester_kurzbz);
$summe += $v_temp->result[0]->betrag;
echo "<lehrvertrag>";
echo "<genehmigungs_datum>".$datum->formatDatum($status->datum,'d.m.Y')."</genehmigungs_datum>";
echo "<aufwandspunkte>".$lehreinheit->semesterstunden."</aufwandspunkte>";
echo "<stundensatz>".$lehreinheit->stundensatz."</stundensatz>";
echo "</lehrvertrag>";
}
if($vertrag->vertragstyp_kurzbz == "fahrtkosten" && $status->vertragsstatus_kurzbz == "genehmigt")
{
$anzahl_fahrten = explode(";", $vertrag->anmerkung);
$anzahl_fahrten = explode(" ", $anzahl_fahrten[0]);
echo "<fahrtkosten>";
echo "<genehmigungs_datum>".$datum->formatDatum($status->datum,'d.m.Y')."</genehmigungs_datum>";
echo "<summe>".$vertrag->betrag."</summe>";
echo "<anzahl_fahrten>".$anzahl_fahrten[0]."</anzahl_fahrten>";
echo "<preis_je_fahrt>".$anzahl_fahrten[5]."</preis_je_fahrt>";
echo "<abfahrt>";
for($i = 7; $i < count($anzahl_fahrten); $i++)
{
echo $anzahl_fahrten[$i]." ";
}
echo "</abfahrt>";
echo "</fahrtkosten>";
}
}
if($summe != 0)
echo "<lehrvertrag_summe>".$summe."</lehrvertrag_summe>";
$summe = 0;
}
echo "</vertraege>";
echo "<studiensemester>".$studiensemester->bezeichnung."</studiensemester>";
}
echo "</honorarvertrag>";
<?php
/* Copyright (C) 2014 FH 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: Stefan Puraner <stefan.puraner@technikum-wien.at>
*/
header("Content-type: application/xhtml+xml");
require_once('../config/vilesci.config.inc.php');
require_once('../config/global.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/lehrveranstaltung.class.php');
require_once('../include/studiensemester.class.php');
require_once('../include/mitarbeiter.class.php');
require_once('../include/adresse.class.php');
require_once('../include/kontakt.class.php');
require_once('../include/bankverbindung.class.php');
require_once('../include/vertrag.class.php');
require_once('../include/lehreinheit.class.php');
require_once('../include/lehreinheitmitarbeiter.class.php');
require_once('../include/datum.class.php');
require_once('../include/nation.class.php');
$mitarbeiter_uid = isset($_GET["mitarbeiter_uid"]) ? $_GET["mitarbeiter_uid"] : NULL;
$vertrag_data = isset($_GET["vertrag_id"]) ? $_GET["vertrag_id"] : NULL;
echo "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n";
echo "<honorarvertraege>";
if($mitarbeiter_uid === NULL)
{
echo "<error>Mitarbeiter UID fehlt</error>";
}
else if($vertrag_data === NULL)
{
echo "<error>Vertrags-ID fehlt</error>";
}
else
{
$ma = new mitarbeiter($mitarbeiter_uid);
$adresse = new adresse();
$adresse->load_pers($ma->person_id);
$kontakt = new kontakt();
$bankverbindung = new bankverbindung();
$datum = new datum();
$nation = new nation($ma->staatsbuergerschaft);
echo "<honorarvertrag>";
echo "<person>";
echo "<vorname>".$ma->vorname."</vorname>";
echo "<nachname>".$ma->nachname."</nachname>";
echo "<titelpre>".$ma->titelpre."</titelpre>";
echo "<titelpost>".$ma->titelpost."</titelpost>";
foreach($adresse->result as $adr)
{
if($adr->heimatadresse)
{
echo "<strasse>".$adr->strasse."</strasse>";
echo "<plz>".$adr->plz."</plz>";
echo "<ort>".$adr->ort."</ort>";
}
}
echo "<gebdat>".$datum->formatDatum($ma->gebdatum,'d.m.Y')."</gebdat>";
echo "<svnr>".$ma->svnr."</svnr>";
echo "<staat>".$nation->kurztext."</staat>";
switch ($ma->familienstand) {
case "l":
$familienstand = "ledig";
break;
case "v":
$familienstand = "verheiratet";
break;
case "g":
$familienstand = "geschieden";
break;
case "w":
$familienstand = "verwitwet";
break;
default:
$familienstand = "";
break;
}
echo "<familienstand>".$familienstand."</familienstand>";
echo "<personalnr>".$ma->personalnummer."</personalnr>";
$kontakt->load_persKontakttyp($ma->person_id, "telefon");
if(!empty($kontakt->result))
{
echo "<tel>".$kontakt->result[0]->kontakt."</tel>";
unset($kontakt->result);
}
$kontakt->load_persKontakttyp($ma->person_id, "email");
if(!empty($kontakt->result))
{
echo "<email>".$kontakt->result[0]->kontakt."</email>";
unset($kontakt->result);
}
echo "</person>";
echo "<bankverbindung>";
$bankverbindung->load_pers($ma->person_id);
foreach($bankverbindung->result as $bank)
{
if($bank->verrechnung)
{
echo "<name>".$bank->name."</name>";
echo "<iban>".$bank->iban."</iban>";
echo "<bic>".$bank->bic."</bic>";
echo "<blz>".$bank->blz."</blz>";
echo "<kontonr>".$bank->kontonr."</kontonr>";
break;
}
}
echo "</bankverbindung>";
echo "<vertraege>";
// $vertrag->getAllStatus($vertrag_id);
$summe = 0;
$studiensemester = "";
foreach($vertrag_data as $vertrag_id)
{
$vertrag = new vertrag();
$vertrag->load($vertrag_id);
$vertrag->getAllStatus($vertrag_id);
foreach($vertrag->result as $status)
{
if($vertrag->vertragstyp_kurzbz == "lehre" && $status->vertragsstatus_kurzbz == "genehmigt")
{
$v_temp = new vertrag();
$v_temp->loadZugeordnet($vertrag_id);
$lehreinheit = new lehreinheitmitarbeiter($v_temp->result[0]->lehreinheit_id,$ma->uid);
$le = new lehreinheit($lehreinheit->lehreinheit_id);
$studiensemester = new studiensemester($le->studiensemester_kurzbz);
$summe += $v_temp->result[0]->betrag;
echo "<lehrvertrag>";
echo "<genehmigungs_datum>".$datum->formatDatum($status->datum,'d.m.Y')."</genehmigungs_datum>";
echo "<aufwandspunkte>".$lehreinheit->semesterstunden."</aufwandspunkte>";
echo "<stundensatz>".$lehreinheit->stundensatz."</stundensatz>";
echo "</lehrvertrag>";
}
if($vertrag->vertragstyp_kurzbz == "fahrtkosten" && $status->vertragsstatus_kurzbz == "genehmigt")
{
$anzahl_fahrten = explode(";", $vertrag->anmerkung);
$anzahl_fahrten = explode(" ", $anzahl_fahrten[0]);
echo "<fahrtkosten>";
echo "<genehmigungs_datum>".$datum->formatDatum($status->datum,'d.m.Y')."</genehmigungs_datum>";
echo "<summe>".$vertrag->betrag."</summe>";
echo "<anzahl_fahrten>".$anzahl_fahrten[0]."</anzahl_fahrten>";
echo "<preis_je_fahrt>".$anzahl_fahrten[5]."</preis_je_fahrt>";
echo "<abfahrt>";
for($i = 7; $i < count($anzahl_fahrten); $i++)
{
echo $anzahl_fahrten[$i]." ";
}
echo "</abfahrt>";
echo "</fahrtkosten>";
}
}
if($summe != 0)
echo "<lehrvertrag_summe>".$summe."</lehrvertrag_summe>";
$summe = 0;
}
echo "</vertraege>";
echo "<studiensemester>".$studiensemester->bezeichnung."</studiensemester>";
switch(substr($studiensemester->studiensemester_kurzbz, 0,2))
{
case "WS":
echo "<zeitraum>von Semptember bis Februar</zeitraum>";
break;
case "SS":
echo "<zeitraum>von März bis August</zeitraum>";
break;
}
}
echo "</honorarvertrag>";
echo "</honorarvertraege>";
+1
View File
@@ -87,6 +87,7 @@ foreach($ps->result as $row)
<ROLLE:studienplan_bezeichnung><![CDATA['.$row->studienplan_bezeichnung.']]></ROLLE:studienplan_bezeichnung>
<ROLLE:bestaetigt_von><![CDATA['.$row->bestaetigtvon.']]></ROLLE:bestaetigt_von>
<ROLLE:bestaetigt_am><![CDATA['.$datum->convertISODate($row->bestaetigtam).']]></ROLLE:bestaetigt_am>
<ROLLE:anmerkung><![CDATA['.$row->anmerkung_status.']]></ROLLE:anmerkung>
</RDF:Description>
</RDF:li>
';
+22 -4
View File
@@ -146,7 +146,7 @@ function draw_content_liste($row)
$status = $prestudent->status_kurzbz;
$orgform = $prestudent->orgform_kurzbz;
$studienplan_bezeichnung=$prestudent->studienplan_bezeichnung;
echo '
<RDF:li>
<RDF:Description id="'.$row->prestudent_id.'" about="'.$rdf_url.'/'.$row->prestudent_id.'" >
@@ -185,6 +185,7 @@ function draw_content_liste($row)
<STUDENT:dual_bezeichnung><![CDATA['.($row->dual=='t'?'Ja':'Nein').']]></STUDENT:dual_bezeichnung>
<STUDENT:matr_nr><![CDATA['.$row->matr_nr.']]></STUDENT:matr_nr>
<STUDENT:mentor><![CDATA['.$row->mentor.']]></STUDENT:mentor>
<STUDENT:aktiv><![CDATA['.((isset($row->bnaktiv) && $row->bnaktiv=='t')?'true':'false').']]></STUDENT:aktiv>
</RDF:Description>
</RDF:li>';
}
@@ -204,6 +205,22 @@ function draw_content($row)
$mail_privat = $row_mail->kontakt;
}
}
$aktiv = "-";
if(isset($row->bnaktiv))
{
switch($row->bnaktiv)
{
case "t":
$aktiv = "true";
break;
case "f":
$aktiv = "false";
break;
default:
$aktiv = "-";
}
}
if($row->prestudent_id!='')
{
@@ -247,7 +264,7 @@ function draw_content($row)
<STUDENT:mail_privat><![CDATA['.$mail_privat.']]></STUDENT:mail_privat>
<STUDENT:mail_intern><![CDATA['.(isset($row->uid)?$row->uid.'@'.DOMAIN:'').']]></STUDENT:mail_intern>
<STUDENT:aktiv><![CDATA['.((isset($row->bnaktiv) && $row->bnaktiv)?'true':'false').']]></STUDENT:aktiv>
<STUDENT:aktiv><![CDATA['.$aktiv.']]></STUDENT:aktiv>
<STUDENT:uid><![CDATA['.(isset($row->uid)?$row->uid:'').']]></STUDENT:uid>
<STUDENT:matrikelnummer><![CDATA['.(isset($row->matrikelnr)?$row->matrikelnr:'').']]></STUDENT:matrikelnummer>
<STUDENT:alias><![CDATA['.(isset($row->alias)?$row->alias:'').']]></STUDENT:alias>
@@ -407,7 +424,7 @@ if($xmlformat=='rdf')
$sql_query="SELECT p.person_id, tbl_student.prestudent_id, tbl_benutzer.uid, titelpre, titelpost, vorname, vornamen, geschlecht,
nachname, gebdatum, tbl_prestudent.anmerkung,ersatzkennzeichen,svnr, tbl_student.matrikelnr, p.anmerkung as anmerkungen,
tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe,
tbl_student.studiengang_kz, aufmerksamdurch_kurzbz, mentor,
tbl_student.studiengang_kz, aufmerksamdurch_kurzbz, mentor, public.tbl_benutzer.aktiv AS bnaktiv,
( SELECT kontakt
FROM public.tbl_kontakt
WHERE kontakttyp='email' AND person_id=p.person_id AND zustellung
@@ -426,7 +443,7 @@ if($xmlformat=='rdf')
$sql_query.="LEFT JOIN public.tbl_studentlehrverband ON (tbl_studentlehrverband.student_uid=tbl_student.student_uid AND tbl_studentlehrverband.studiensemester_kurzbz='$studiensemester_kurzbz')";
$sql_query.="WHERE ".$where.' ORDER BY nachname, vorname';
if($db->db_query($sql_query))
{
while($row = $db->db_fetch_object())
@@ -749,6 +766,7 @@ else
<tagesdatum><![CDATA['.date('d.m.Y').']]></tagesdatum>
<max_semester><![CDATA['.$studiengang->max_semester.']]></max_semester>
<anmerkungpre><![CDATA['.$prestudent->anmerkung.']]></anmerkungpre>
<aktiv><![CDATA['.$student->aktiv.']]></aktiv>
</student>';
}
}
+115 -9
View File
@@ -2609,6 +2609,17 @@ if(!$result = @$db->db_query("SELECT anwesenheit FROM campus.tbl_lvinfo LIMIT 1"
echo 'campus.tbl_lvinfo: Spalte "anwesenheit" hinzugefuegt!<br>';
}
// Spalte pflicht in tbl_dokumentstudiengang
if(!$result = @$db->db_query("SELECT pflicht FROM public.tbl_dokumentstudiengang LIMIT 1"))
{
$qry = "ALTER TABLE public.tbl_dokumentstudiengang ADD COLUMN pflicht BOOLEAN NOT NULL DEFAULT FALSE";
if(!$db->db_query($qry))
echo '<strong>public.tbl_dokumentstudiengang '.$db->db_last_error().'</strong><br>';
else
echo 'public.tbl_dokumentstudiengang: Spalte "pflicht" hinzugefuegt!<br>';
}
// Anrechnungen
if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung LIMIT 1;"))
{
@@ -2707,6 +2718,101 @@ if(!$result = @$db->db_query("SELECT onlinebewerbung FROM public.tbl_studiengang
echo 'public.tbl_studiengang: Spalte "onlinebewerbung" hinzugefuegt!<br>';
}
// Spalte ext_id in wawi.tbl_buchung
if(!$result = @$db->db_query("SELECT ext_id FROM wawi.tbl_buchung LIMIT 1;"))
{
$qry = "ALTER TABLE wawi.tbl_buchung ADD COLUMN ext_id bigint;";
if(!$db->db_query($qry))
echo '<strong>wawi.tbl_buchung: '.$db->db_last_error().'</strong><br>';
else
echo ' wawi.tbl_buchung: Spalte ext_id hinzugefuegt!<br>';
}
// Spalte ext_id in public.tbl_preoutgoing_firma
if(!$result = @$db->db_query("SELECT ext_id FROM public.tbl_preoutgoing_firma LIMIT 1;"))
{
$qry = "ALTER TABLE public.tbl_preoutgoing_firma ADD COLUMN ext_id bigint;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_preoutgoing_firma: '.$db->db_last_error().'</strong><br>';
else
echo ' public.tbl_preoutgoing_firma: Spalte ext_id hinzugefuegt!<br>';
}
// Spalte ext_id in public.tbl_firma_mobilitaetsprogramm
if(!$result = @$db->db_query("SELECT ext_id FROM public.tbl_firma_mobilitaetsprogramm LIMIT 1;"))
{
$qry = "ALTER TABLE public.tbl_firma_mobilitaetsprogramm ADD COLUMN ext_id bigint;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_firma_mobilitaetsprogramm: '.$db->db_last_error().'</strong><br>';
else
echo ' public.tbl_firma_mobilitaetsprogramm: Spalte ext_id hinzugefuegt!<br>';
}
// Spalte ext_id in lehre.tbl_studienplatz
if(!$result = @$db->db_query("SELECT ext_id FROM lehre.tbl_studienplatz LIMIT 1;"))
{
$qry = "ALTER TABLE lehre.tbl_studienplatz ADD COLUMN ext_id bigint;";
if(!$db->db_query($qry))
echo '<strong>lehre.tbl_studienplatz: '.$db->db_last_error().'</strong><br>';
else
echo ' lehre.tbl_studienplatz: Spalte ext_id hinzugefuegt!<br>';
}
// Spalte ext_id in lehre.tbl_anrechnung
if(!$result = @$db->db_query("SELECT ext_id FROM lehre.tbl_anrechnung LIMIT 1;"))
{
$qry = "ALTER TABLE lehre.tbl_anrechnung ADD COLUMN ext_id bigint;";
if(!$db->db_query($qry))
echo '<strong>lehre.tbl_anrechnung: '.$db->db_last_error().'</strong><br>';
else
echo ' lehre.tbl_anrechnung: Spalte ext_id hinzugefuegt!<br>';
}
// Spalte ext_id in public.tbl_preincoming
if(!$result = @$db->db_query("SELECT ext_id FROM public.tbl_preincoming LIMIT 1;"))
{
$qry = "ALTER TABLE public.tbl_preincoming ADD COLUMN ext_id bigint;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_preincoming: '.$db->db_last_error().'</strong><br>';
else
echo ' public.tbl_preincoming: Spalte ext_id hinzugefuegt!<br>';
}
// Spalte ext_id in public.tbl_preoutgoing
if(!$result = @$db->db_query("SELECT ext_id FROM public.tbl_preoutgoing LIMIT 1;"))
{
$qry = "ALTER TABLE public.tbl_preoutgoing ADD COLUMN ext_id bigint;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_preoutgoing: '.$db->db_last_error().'</strong><br>';
else
echo ' public.tbl_preoutgoing: Spalte ext_id hinzugefuegt!<br>';
}
// Notizen Berechtigungen fuer web User erteilen
if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_notiz' AND table_schema='public' AND grantee='web' AND privilege_type='UPDATE'"))
{
if($db->db_num_rows($result)==0)
{
$qry = "GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_notiz TO web;
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_notizzuordnung TO web;
GRANT SELECT, UPDATE ON public.seq_notiz_notiz_id TO web;
GRANT SELECT, UPDATE ON public.seq_notizzuordnung_notizzuordnung_id TO web;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_notiz: '.$db->db_last_error().'</strong><br>';
else
echo 'public.tbl_notiz / public.tbl_notizzuordnung: Schreibrechte fuer User web erteilt';
}
}
echo '<br><br><br>';
$tabellen=array(
@@ -2804,7 +2910,7 @@ $tabellen=array(
"lehre.tbl_abschlussbeurteilung" => array("abschlussbeurteilung_kurzbz","bezeichnung","bezeichnung_english"),
"lehre.tbl_abschlusspruefung" => array("abschlusspruefung_id","student_uid","vorsitz","pruefer1","pruefer2","pruefer3","abschlussbeurteilung_kurzbz","akadgrad_id","pruefungstyp_kurzbz","datum","sponsion","anmerkung","updateamum","updatevon","insertamum","insertvon","ext_id","note"),
"lehre.tbl_akadgrad" => array("akadgrad_id","akadgrad_kurzbz","studiengang_kz","titel","geschlecht"),
"lehre.tbl_anrechnung" => array("anrechnung_id","prestudent_id","lehrveranstaltung_id","begruendung_id","lehrveranstaltung_id_kompatibel","genehmigt_von","insertamum","insertvon","updateamum","updatevon"),
"lehre.tbl_anrechnung" => array("anrechnung_id","prestudent_id","lehrveranstaltung_id","begruendung_id","lehrveranstaltung_id_kompatibel","genehmigt_von","insertamum","insertvon","updateamum","updatevon","ext_id"),
"lehre.tbl_anrechnung_begruendung" => array("begruendung_id","bezeichnung"),
"lehre.tbl_betreuerart" => array("betreuerart_kurzbz","beschreibung"),
"lehre.tbl_ferien" => array("bezeichnung","studiengang_kz","vondatum","bisdatum"),
@@ -2836,7 +2942,7 @@ $tabellen=array(
"lehre.tbl_studienordnung_semester" => array("studienordnung_semester_id","studienordnung_id","studiensemester_kurzbz","semester"),
"lehre.tbl_studienplan" => array("studienplan_id","studienordnung_id","orgform_kurzbz","version","regelstudiendauer","sprache","aktiv","bezeichnung","insertamum","insertvon","updateamum","updatevon","semesterwochen","testtool_sprachwahl","ext_id"),
"lehre.tbl_studienplan_lehrveranstaltung" => array("studienplan_lehrveranstaltung_id","studienplan_id","lehrveranstaltung_id","semester","studienplan_lehrveranstaltung_id_parent","pflicht","koordinator","insertamum","insertvon","updateamum","updatevon","sort","ext_id"),
"lehre.tbl_studienplatz" => array("studienplatz_id","studiengang_kz","studiensemester_kurzbz","orgform_kurzbz","ausbildungssemester","gpz","npz","insertamum","insertvon","updateamum","updatevon"),
"lehre.tbl_studienplatz" => array("studienplatz_id","studiengang_kz","studiensemester_kurzbz","orgform_kurzbz","ausbildungssemester","gpz","npz","insertamum","insertvon","updateamum","updatevon","ext_id"),
"lehre.tbl_stunde" => array("stunde","beginn","ende"),
"lehre.tbl_stundenplan" => array("stundenplan_id","unr","mitarbeiter_uid","datum","stunde","ort_kurzbz","gruppe_kurzbz","titel","anmerkung","lehreinheit_id","studiengang_kz","semester","verband","gruppe","fix","updateamum","updatevon","insertamum","insertvon"),
"lehre.tbl_stundenplandev" => array("stundenplandev_id","lehreinheit_id","unr","studiengang_kz","semester","verband","gruppe","gruppe_kurzbz","mitarbeiter_uid","ort_kurzbz","datum","stunde","titel","anmerkung","fix","updateamum","updatevon","insertamum","insertvon","ext_id"),
@@ -2862,12 +2968,12 @@ $tabellen=array(
"public.tbl_buchungstyp" => array("buchungstyp_kurzbz","beschreibung","standardbetrag","standardtext","aktiv","credit_points"),
"public.tbl_dokument" => array("dokument_kurzbz","bezeichnung","ext_id"),
"public.tbl_dokumentprestudent" => array("dokument_kurzbz","prestudent_id","mitarbeiter_uid","datum","updateamum","updatevon","insertamum","insertvon","ext_id"),
"public.tbl_dokumentstudiengang" => array("dokument_kurzbz","studiengang_kz","ext_id", "onlinebewerbung"),
"public.tbl_dokumentstudiengang" => array("dokument_kurzbz","studiengang_kz","ext_id", "onlinebewerbung", "pflicht"),
"public.tbl_erhalter" => array("erhalter_kz","kurzbz","bezeichnung","dvr","logo","zvr"),
"public.tbl_fachbereich" => array("fachbereich_kurzbz","bezeichnung","farbe","studiengang_kz","aktiv","ext_id","oe_kurzbz"),
"public.tbl_filter" => array("filter_id","kurzbz","sql","valuename","showvalue","insertamum","insertvon","updateamum","updatevon","type","htmlattr"),
"public.tbl_firma" => array("firma_id","name","anmerkung","firmentyp_kurzbz","updateamum","updatevon","insertamum","insertvon","ext_id","schule","finanzamt","steuernummer","gesperrt","aktiv"),
"public.tbl_firma_mobilitaetsprogramm" => array("firma_id","mobilitaetsprogramm_code"),
"public.tbl_firma_mobilitaetsprogramm" => array("firma_id","mobilitaetsprogramm_code","ext_id"),
"public.tbl_firma_organisationseinheit" => array("firma_organisationseinheit_id","firma_id","oe_kurzbz","bezeichnung","kundennummer","updateamum","updatevon","insertamum","insertvon","ext_id"),
"public.tbl_firmentyp" => array("firmentyp_kurzbz","beschreibung"),
"public.tbl_firmatag" => array("firma_id","tag","insertamum","insertvon"),
@@ -2883,7 +2989,7 @@ $tabellen=array(
"public.tbl_log" => array("log_id","executetime","mitarbeiter_uid","beschreibung","sql","sqlundo"),
"public.tbl_mitarbeiter" => array("mitarbeiter_uid","personalnummer","telefonklappe","kurzbz","lektor","fixangestellt","bismelden","stundensatz","ausbildungcode","ort_kurzbz","standort_id","anmerkung","insertamum","insertvon","updateamum","updatevon","ext_id","kleriker"),
"public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon","ext_id"),
"public.tbl_notizzuordnung" => array("notizzuordnung_id","notiz_id","projekt_kurzbz","projektphase_id","projekttask_id","uid","person_id","prestudent_id","bestellung_id","lehreinheit_id","ext_id"),
"public.tbl_notizzuordnung" => array("notizzuordnung_id","notiz_id","projekt_kurzbz","projektphase_id","projekttask_id","uid","person_id","prestudent_id","bestellung_id","lehreinheit_id","ext_id","anrechnung_id"),
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id","m2","gebteil","oe_kurzbz"),
"public.tbl_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"),
"public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen","lehre"),
@@ -2891,12 +2997,12 @@ $tabellen=array(
"public.tbl_person" => array("person_id","staatsbuergerschaft","geburtsnation","sprache","anrede","titelpost","titelpre","nachname","vorname","vornamen","gebdatum","gebort","gebzeit","foto","anmerkung","homepage","svnr","ersatzkennzeichen","familienstand","geschlecht","anzahlkinder","aktiv","insertamum","insertvon","updateamum","updatevon","ext_id","bundesland_code","kompetenzen","kurzbeschreibung","zugangscode", "foto_sperre","matr_nr"),
"public.tbl_person_fotostatus" => array("person_fotostatus_id","person_id","fotostatus_kurzbz","datum","insertamum","insertvon","updateamum","updatevon"),
"public.tbl_personfunktionstandort" => array("personfunktionstandort_id","funktion_kurzbz","person_id","standort_id","position","anrede"),
"public.tbl_preincoming" => array("preincoming_id","person_id","mobilitaetsprogramm_code","zweck_code","firma_id","universitaet","aktiv","bachelorthesis","masterthesis","von","bis","uebernommen","insertamum","insertvon","updateamum","updatevon","anmerkung","zgv","zgv_ort","zgv_datum","zgv_name","zgvmaster","zgvmaster_datum","zgvmaster_ort","zgvmaster_name","program_name","bachelor","master","jahre","person_id_emergency","person_id_coordinator_dep","person_id_coordinator_int","code","deutschkurs1","deutschkurs2","research_area","deutschkurs3"),
"public.tbl_preincoming" => array("preincoming_id","person_id","mobilitaetsprogramm_code","zweck_code","firma_id","universitaet","aktiv","bachelorthesis","masterthesis","von","bis","uebernommen","insertamum","insertvon","updateamum","updatevon","anmerkung","zgv","zgv_ort","zgv_datum","zgv_name","zgvmaster","zgvmaster_datum","zgvmaster_ort","zgvmaster_name","program_name","bachelor","master","jahre","person_id_emergency","person_id_coordinator_dep","person_id_coordinator_int","code","deutschkurs1","deutschkurs2","research_area","deutschkurs3","ext_id"),
"public.tbl_preincoming_lehrveranstaltung" => array("preincoming_id","lehrveranstaltung_id","insertamum","insertvon"),
"public.tbl_preinteressent" => array("preinteressent_id","person_id","studiensemester_kurzbz","firma_id","erfassungsdatum","einverstaendnis","absagedatum","anmerkung","maturajahr","infozusendung","aufmerksamdurch_kurzbz","kontaktmedium_kurzbz","insertamum","insertvon","updateamum","updatevon","ext_id"),
"public.tbl_preinteressentstudiengang" => array("studiengang_kz","preinteressent_id","freigabedatum","uebernahmedatum","prioritaet","insertamum","insertvon","updateamum","updatevon"),
"public.tbl_preoutgoing" => array("preoutgoing_id","uid","dauer_von","dauer_bis","ansprechperson","bachelorarbeit","masterarbeit","betreuer","sprachkurs","intensivsprachkurs","sprachkurs_von","sprachkurs_bis","praktikum","praktikum_von","praktikum_bis","behinderungszuschuss","studienbeihilfe","anmerkung_student", "anmerkung_admin", "studienrichtung_gastuniversitaet", "insertamum","insertvon","updateamum","updatevon","projektarbeittitel"),
"public.tbl_preoutgoing_firma" => array("preoutgoing_firma_id","preoutgoing_id","mobilitaetsprogramm_code","firma_id","name","auswahl"),
"public.tbl_preoutgoing" => array("preoutgoing_id","uid","dauer_von","dauer_bis","ansprechperson","bachelorarbeit","masterarbeit","betreuer","sprachkurs","intensivsprachkurs","sprachkurs_von","sprachkurs_bis","praktikum","praktikum_von","praktikum_bis","behinderungszuschuss","studienbeihilfe","anmerkung_student", "anmerkung_admin", "studienrichtung_gastuniversitaet", "insertamum","insertvon","updateamum","updatevon","projektarbeittitel","ext_id"),
"public.tbl_preoutgoing_firma" => array("preoutgoing_firma_id","preoutgoing_id","mobilitaetsprogramm_code","firma_id","name","auswahl","ext_id"),
"public.tbl_preoutgoing_lehrveranstaltung" => array("preoutgoing_lehrveranstaltung_id","preoutgoing_id","bezeichnung","ects","endversion","insertamum","insertvon","updateamum","updatevon","wochenstunden","unitcode"),
"public.tbl_preoutgoing_preoutgoing_status" => array("status_id","preoutgoing_status_kurzbz","preoutgoing_id","datum","insertamum","insertvon","updateamum","updatevon"),
"public.tbl_preoutgoing_status" => array("preoutgoing_status_kurzbz","bezeichnung"),
@@ -2958,7 +3064,7 @@ $tabellen=array(
"wawi.tbl_bestelldetail" => array("bestelldetail_id","bestellung_id","position","menge","verpackungseinheit","beschreibung","artikelnummer","preisprove","mwst","erhalten","sort","text","updateamum","updatevon","insertamum","insertvon"),
"wawi.tbl_bestellung_bestellstatus" => array("bestellung_bestellstatus_id","bestellung_id","bestellstatus_kurzbz","uid","oe_kurzbz","datum","insertamum","insertvon","updateamum","updatevon"),
"wawi.tbl_bestellstatus" => array("bestellstatus_kurzbz","beschreibung"),
"wawi.tbl_buchung" => array("buchung_id","konto_id","kostenstelle_id","buchungstyp_kurzbz","buchungsdatum","buchungstext","betrag","insertamum","insertvon","updateamum","updatevon"),
"wawi.tbl_buchung" => array("buchung_id","konto_id","kostenstelle_id","buchungstyp_kurzbz","buchungsdatum","buchungstext","betrag","insertamum","insertvon","updateamum","updatevon","ext_id"),
"wawi.tbl_buchungstyp" => array("buchungstyp_kurzbz","bezeichnung"),
"wawi.tbl_rechnungstyp" => array("rechnungstyp_kurzbz","beschreibung","berechtigung_kurzbz"),
"wawi.tbl_rechnung" => array("rechnung_id","bestellung_id","buchungsdatum","rechnungsnr","rechnungsdatum","transfer_datum","buchungstext","insertamum","insertvon","updateamum","updatevon","rechnungstyp_kurzbz","freigegeben","freigegebenvon","freigegebenamum"),
+20 -9
View File
@@ -20,12 +20,23 @@
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/functions.inc.php');
require_once('../../../include/benutzerberechtigung.class.php');
require_once('../../../include/basis_db.class.php');
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('lehre/lvplan',null,'suid'))
die('Sie haben keine Berechtigung für diese Seite');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
$cfgBorder=1;
$cfgBorder=0;
$cfgBgcolorOne='liste0';
$cfgBgcolorTwo='liste1';
?>
@@ -63,7 +74,7 @@ $cfgBgcolorTwo='liste1';
echo "<tr class='liste".($j%2)."'>";
for ($i=0; $i<$num_fields; $i++)
echo "<td>$row[$i]</td>";
echo "<td><a href=\"res_check_det.php?datum=$row[1]&stunde=$row[2]&ort_kurzbz=$row[3]\">Details</a></td>";
//echo "<td><a href=\"res_check_det.php?datum=$row[1]&stunde=$row[2]&ort_kurzbz=$row[3]\">Details</a></td>";
echo "</tr>\n";
$foo++;
}
@@ -87,7 +98,7 @@ $cfgBgcolorTwo='liste1';
for ($r=0;$r<$num_rows_res;$r++)
{
$row_res=$db->db_fetch_object($result_res,$r);
$sql_query="SELECT * FROM lehre.vw_stundenplan WHERE datum='$row_res->datum' AND stunde=$row_res->stunde AND ort_kurzbz='$row_res->ort_kurzbz'";
$sql_query="SELECT * FROM lehre.vw_stundenplan WHERE datum=".$db->db_add_param($row_res->datum)." AND stunde=".$db->db_add_param($row_res->stunde)." AND ort_kurzbz=".$db->db_add_param($row_res->ort_kurzbz);
//echo $sql_query."<br>";
$result=$db->db_query($sql_query);
$num_rows=$db->db_num_rows($result);
@@ -105,7 +116,7 @@ $cfgBgcolorTwo='liste1';
$row=$db->db_fetch_row($result,$j);
$rowo=$db->db_fetch_object($result,$j);
echo "<tr class='liste".($j%2)."'>";
echo "<td><a href=\"res_check_det.php?datum=$rowo->datum&stunde=$rowo->stunde&ort_kurzbz=$rowo->ort_kurzbz\">Reservierung</a></td>";
//echo "<td><a href=\"res_check_det.php?datum=$rowo->datum&stunde=$rowo->stunde&ort_kurzbz=$rowo->ort_kurzbz\">Reservierung</a></td>";
for ($i=0; $i<$num_fields; $i++)
echo "<td>$row[$i]</td>";
echo "</tr>\n";
@@ -128,4 +139,4 @@ $cfgBgcolorTwo='liste1';
?>
</body>
</html>
</html>
-59
View File
@@ -1,59 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
$id=(isset($_REQUEST['id']) ? $_REQUEST['id'] :0 );
//Stundenplandaten ermitteln welche mehrfach vorkommen
$sql_query="DELETE FROM campus.tbl_reservierung WHERE reservierung_id=$id";
//echo $sql_query."<br>";
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_affected_rows($result);
else
die($db->db_last_error().' <a href="javascript:history.back()">Zur&uuml;ck</a>');
?>
<html>
<head>
<title>Reservierung Check Delete</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
</head>
<body>
<H1>Mehrfachbelegungen in Reservierung l&ouml;schen</H1>
<?php
if ($num_rows)
echo "Datensatz wurde erfolgreich gel&ouml;scht!";
else
echo "Es ist ein Fehler aufgetreten! ".$db->db_last_error();
?><br>
<a href="res_check.php"><br>
<br>
Zur&uuml;ck zu &Uuml;bersicht</a>
</body>
</html>
-84
View File
@@ -1,84 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
$datum=(isset($_REQUEST['datum']) ? $_REQUEST['datum'] :'' );
$stunde=(isset($_REQUEST['stunde']) ? $_REQUEST['stunde'] :0 );
$ort_kurzbz=(isset($_REQUEST['ort_kurzbz']) ? $_REQUEST['ort_kurzbz'] :'' );
//Stundenplandaten ermitteln welche mehrfach vorkommen
$sql_query="SELECT * FROM lehre.vw_reservierung WHERE datum='$datum' AND stunde=$stunde AND ort_kurzbz='$ort_kurzbz'";
//echo $sql_query."<br>";
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
else
die($db->db_last_error().' <a href="javascript:history.back()">Zur&uuml;ck</a>');
$cfgBorder=1;
$cfgBgcolorOne='liste0';
$cfgBgcolorTwo='liste1';
?>
<html>
<head>
<title>Reservierung Check Details</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
</head>
<body>
<H1>Mehrfachbelegungen in Reservierungen Detailansicht</H1>
<table border="<?php echo $cfgBorder;?>">
<tr>
<?php
if ($num_rows>0)
{
$num_fields=$db->db_num_fields($result);
$foo = 0;
for ($i=0;$i<$num_fields; $i++)
echo "<th>".$db->db_field_name($result,$i)."</th>";
for ($j=0; $j<$num_rows;$j++)
{
$row=$db->db_fetch_row($result,$j);
$bgcolor = $cfgBgcolorOne;
$foo % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
echo '<tr class="'.$bgcolor.'">';
for ($i=0; $i<$num_fields; $i++)
echo "<td>$row[$i]&nbsp;</td>";
echo "<td><a href=\"res_check_delete.php?id=$row[0]\">Delete</a></td>";
echo "<td><a href=\"res_check_mail.php?id=$row[0]\">Mail&Delete</a></td>";
echo "</tr>\n";
$foo++;
}
}
else
echo "Kein Eintrag gefunden!";
?>
</table>
</body>
</html>
-87
View File
@@ -1,87 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
$id=(isset($_REQUEST['id']) ? $_REQUEST['id'] :0 );
$sql_query="SELECT tbl_reservierung.reservierung_id, tbl_reservierung.datum, tbl_reservierung.stunde, tbl_reservierung.ort_kurzbz AS ortkurzbz, tbl_mitarbeiter.kurzbz AS lektorkurzbz, tbl_reservierung.titel, tbl_reservierung.beschreibung, campus.tbl_reservierung.uid FROM campus.tbl_reservierung, public.tbl_ort, public.tbl_mitarbeiter WHERE campus.tbl_reservierung.reservierung_id=$id AND public.tbl_ort.ort_kurzbz=campus.tbl_reservierung.ort_kurzbz AND public.tbl_mitarbeiter.mitarbeiter_uid=campus.tbl_reservierung.uid";
//echo $sql_query."<br>";
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
else
die($db->db_last_error().' <a href="javascript:history.back()">Zur&uuml;ck</a>');
if ($num_rows==1)
{
$row=$db->db_fetch_object($result,0);
$text="Dies ist eine automatische eMail!\r\rAufgrund einer Stundenplankollision wurde folgende Reservierung gelöscht:\r\r";
$text.="Datum:\t$row->datum\rStunde:\t$row->stunde\rOrt:\t$row->ortkurzbz\rTitel:\t$row->titel\r\r";
$text.="Wir bitten um Verständnis.";
$adress=$row->uid.'@technikum-wien.at';
if (mail($adress,"Stundenplankollision",$text,"From: stpl@technikum-wien.at"))
$sendmail=true;
else
$sendmail=false;
}
else
$sendmail=false;
//Stundenplandaten ermitteln welche mehrfach vorkommen
$sql_query="DELETE FROM campus.tbl_reservierung WHERE id=$id";
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_affected_rows($result);
else
die($db->db_last_error().' <a href="javascript:history.back()">Zur&uuml;ck</a>');
?>
<html>
<head>
<title>Reservierung Check Delete</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
</head>
<body>
<H1>Mehrfachbelegungen in Reservierung l&ouml;schen</H1>
<?php
if ($sendmail)
echo 'Mail wurde verschickt an '.$adress.'!<br>';
else
echo "Mail konnte nicht verschickt werden!<br>";
if ($num_rows)
echo "Datensatz wurde erfolgreich gel&ouml;scht!";
else
echo "Es ist ein Fehler aufgetreten! ".$db->db_last_error();;
?><br>
<a href="res_check.php"><br>
<br>
Zur&uuml;ck zu &Uuml;bersicht</a>
</body>
</html>
+17 -8
View File
@@ -20,10 +20,20 @@
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
require_once('../../../include/functions.inc.php');
require_once('../../../include/benutzerberechtigung.class.php');
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('lehre/lvplan',null,'suid'))
die('Sie haben keine Berechtigung für diese Seite');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
//Stundenplandaten ermitteln welche mehrfach vorkommen
@@ -37,7 +47,7 @@
die($db->db_last_error().' <a href="javascript:history.back()">Zur&uuml;ck</a>');
$cfgBorder=1;
$cfgBorder=0;
$cfgBgcolorOne='liste0';
$cfgBgcolorTwo='liste1';
?>
@@ -66,8 +76,7 @@ if ($num_rows>0)
$foo % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
echo "<tr class='liste".($j%2)."'>";
for ($i=0; $i<$num_fields; $i++)
echo "<td>$row[$i]</td>";
echo "<td><a href=\"stdplan_check_det.php?datum=$row[1]&stunde_id=$row[2]&ort_id=$row[3]&studiengang_id=$row[4]&semester=$row[5]&verband=$row[6]&gruppe=$row[7]\">Details</a><td>";
echo "<td>$row[$i]</td>";
echo "</tr>\n";
$foo++;
}
@@ -77,4 +86,4 @@ else
?>
</table>
</body>
</html>
</html>
@@ -1,59 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
$id=(isset($_REQUEST['id']) ? $_REQUEST['id'] :0 );
//Stundenplandaten ermitteln welche mehrfach vorkommen
$sql_query="DELETE FROM lehre.tbl_stundenplan WHERE id=$id";
# echo $sql_query."<br>";
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_affected_rows($result);
else
die($db->db_last_error().' <a href="javascript:history.back()">Zur&uuml;ck</a>');
?>
<html>
<head>
<title>Stundenplan Check Details</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
</head>
<body>
<H1>Mehrfachbelegungen L&ouml;schen</H1>
<?php
if ($num_rows)
echo "Datensatz wurde erfolgreich gel&ouml;scht!";
else
echo "Es ist ein Fehler aufgetreten! ".$db->db_last_error();
?><br>
<a href="stdplan_check.php"><br>
<br>
Zur&uuml;ck zu &Uuml;bersicht</a>
</body>
</html>
-90
View File
@@ -1,90 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
$datum=(isset($_REQUEST['datum']) ? $_REQUEST['datum'] :'' );
$stunde=(isset($_REQUEST['stunde']) ? $_REQUEST['stunde'] :0 );
$ort_kurzbz=(isset($_REQUEST['ort_id']) ? $_REQUEST['ort_id'] :(isset($_REQUEST['ort_kurzbz']) ? $_REQUEST['ort_kurzbz'] :'' ));
$stunde=(isset($_REQUEST['stunde']) ? $_REQUEST['stunde'] :(isset($_REQUEST['stunde_id']) ? $_REQUEST['stunde_id'] :'' ) );
$studiengang_kz=(isset($_REQUEST['studiengang_kz']) ? $_REQUEST['studiengang_kz'] :(isset($_REQUEST['studiengang_id']) ? $_REQUEST['studiengang_id'] :'' ) );
$semester=(isset($_REQUEST['semester']) ? $_REQUEST['semester'] :1 );
$verband=(isset($_REQUEST['verband']) ? $_REQUEST['verband'] :'' );
$gruppe=(isset($_REQUEST['gruppe']) ? $_REQUEST['gruppe'] :'' );
//Stundenplandaten ermitteln welche mehrfach vorkommen
$sql_query="SELECT stundenplan_id, datum, stunde, semester, verband, gruppe, ort_kurzbz, stg_kurzbz,fachbereich_kurzbz, lehrfach, uid FROM lehre.vw_stundenplan WHERE datum='$datum' AND stunde=$stunde AND ort_kurzbz='$ort_kurzbz' AND studiengang_kz=$studiengang_kz AND semester='$semester' AND verband='$verband' AND gruppe='$gruppe'";
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
else
die($db->db_last_error().' <a href="javascript:history.back()">Zur&uuml;ck</a>');
$cfgBorder=1;
$cfgBgcolorOne='liste0';
$cfgBgcolorTwo='liste1';
?>
<html>
<head>
<title>Stundenplan Check Details</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
</head>
<body>
<H1>Mehrfachbelegungen Detailansicht</H1>
<table border="<?php echo $cfgBorder;?>">
<tr>
<?php
if ($num_rows>0)
{
$num_fields=$db->db_num_fields($result);
$foo = 0;
for ($i=0;$i<$num_fields; $i++)
echo "<th>".$db->db_field_name($result,$i)."</th>";
for ($j=0; $j<$num_rows;$j++)
{
$row=$db->db_fetch_row($result,$j);
$bgcolor = $cfgBgcolorOne;
$foo % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
echo "<tr class='liste".($j%2)."'>";
for ($i=0; $i<$num_fields; $i++)
echo "<td>$row[$i]</td>";
echo "<td><a href=\"stdplan_check_delete.php?id=$row[0]\">Delete</a><td>";
echo "</tr>\n";
$foo++;
}
}
else
echo "Kein Eintrag gefunden!";
?>
</table>
</body>
</html>
-23
View File
@@ -1,23 +0,0 @@
<HTML>
<HEAD>
<TITLE>Stundenplan Import</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../include/styles.css" type="text/css">
</HEAD>
<BODY class="background_main">
<form accept-charset="UTF-8" name="import" method="post" action="stdplan_import.php" enctype="multipart/form-data">
<p><b>Import von Untis </b>(lesson.txt)
<input type="file" name="userfile" size="20" maxlength="30">
<input type="submit" name="save" value="Go">
</p>
<hr>
</form>
<P><A href="stdplan_import_check_ID.php">Check IDs</A> (UPDATE untis SET ort='DUMMY'
WHERE ort='')</P>
<P><A href="stdplan_import_sendmail.php">Send Mails</A></P>
<P>Send Mails Modul</P>
<P><A href="stdplan_import_takeover.php">Take Over</A> (DELETE FROM tbl_stundenplan WHERE datum>='2005-02-14')</P>
<P><A href="stdplan_import_takeover_modul.php">Take Over Einheiten</A></P>
</BODY>
</HTML>
-82
View File
@@ -1,82 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
?>
<HTML>
<BODY>
<?php
$field=file($userfile);
$anz=count($field);
for ($i=0;$i<$anz;$i++)
{
//echo $field[$i].'<br>';
$endpos=strpos($field[$i],9);
$lektor=substr($field[$i],0,$endpos);
//echo $lektor.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$wochentag=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $wochentag.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$stunde_id=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $stunde_id.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$lehrfach=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $lehrfach.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$ort=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $ort.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$unr=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $unr.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$keineahnung=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $keineahnung.'<br>';
$beginpos=$endpos+1;
$endpos=strpos($field[$i],9,$beginpos);
$klassenbez=substr($field[$i],$beginpos,$endpos-$beginpos);
//echo $klassenbez.'<br>';
$beginpos=$endpos+1;
$endpos=strlen($field[$i]);
$jahreswochen=trim(substr($field[$i],$beginpos,$endpos-$beginpos));
//echo $jahreswochen.'<br>';
$sql_query="INSERT INTO untis (lektor,wochentag,stunde,lehrfach,ort,unr,jahreswochen,klassenbez) VALUES ('$lektor','$wochentag','$stunde_id','$lehrfach','$ort','$unr','$jahreswochen','$klassenbez')";
$result=$db->db_query($sql_query);
if(!$result)
die($db->db_last_error().'<BR>'.$i.'<BR>'.$sql_query);
}
?>
Finished <BR>
<A href="index.html">Zur&uuml;ck</A>
</BODY>
</HTML>
@@ -1,130 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
include('wochendatum.inc.php');
$tagsek=86400;
?>
<html>
<head>
<title>Send Mails</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../skin/vilesci.css" type="text/css">
</head>
<body class="background_main">
<H1>eMails werden verschickt</H1>
<?php
// Untis abfragen
$sql_query="SELECT id, unr, wochentag, stunde_id, ort_id, lehrfach_id, lektor_id, jahreswochen, studiengang_id, semester, verband, gruppe FROM untis WHERE checkmail='f' AND ort_id>0 AND lehrfach_id>0 AND lektor_id>0 AND studiengang_id>0 AND lehrfach NOT LIKE '\\\\_%' ORDER BY lektor";
//echo $sql_query;
$num_rows=0;
if($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
echo $num_rows.' Eintraege in der Tabelle Untis fuer den Stundenplan<BR><BR>Verarbeitung laeuft (0) ';
flush();
$lektor_id=0;
$text="";
$sendmail=0;
$stundenanzahl=0;
for ($i=0; $i<$num_rows; $i++)
{
if ($i%10==0)
{
echo '.';
flush();
}
$row=$db->db_fetch_object($result,$i);
if ($lektor_id!=$row->lektor_id)
{
if (($lektor_id!=0) && $sendmail)
{
$text.="\nhttp://cis.technikum-wien.at\n\nFehler und Feedback bitte an mailto:stpl@technikum-wien.at";
$sql_query="SELECT emailtw FROM lektor WHERE id=$lektor_id";
$result_sendto=$db->db_query($sql_query);
$row_sendto=$db->db_fetch_object($result_sendto,0);
$sendto=$row_sendto->emailtw;
if (!mail($sendto, "Stundenplan Aenderung ($stundenanzahl Stunden)", $text, "From: stpl@technikum-wien.at\r\n"."Reply-To: stpl@technikum-wien.at\r\n"."X-Mailer: PHP/".phpversion() ) )
die ("<BR>Mail an <b>$sendto</b> konnte nicht verschickt werden.<BR>");
echo '<BR>Mail verschickt an <b>'.$sendto.'</b><br>Verarbeitung laeuft ('.$i.') ';
flush();
$stundenanzahl=0;
$sendmail=0;
}
$lektor_id=$row->lektor_id;
$text="Dies ist eine automatische eMail!\nFolgende Aenderungen sind in ihrem Stundenplan vorgenommen worden\n\n";
$text.="Datum\t\tStunde\tVerband\n";
}
for ($w=1; $w<=53; $w++)
{
if (substr($row->jahreswochen,$w-1,1)=='1')
{
$date=$week_date[$w]+($tagsek*($row->wochentag-1));
$date=getdate($date);
$tag=$date[mday];
$monat=$date[mon];
$jahr=$date[year];
$date=$jahr.'-'.$monat.'-'.$tag;
$sql_query="SELECT * FROM stundenplan WHERE studiengang_id=$row->studiengang_id AND semester=$row->semester AND ";
$sql_query.="verband='$row->verband' AND gruppe='$row->gruppe' AND ort_id=$row->ort_id AND datum='$date' AND ";
$sql_query.="stunde_id=$row->stunde_id AND lehrfach_id=$row->lehrfach_id AND lektor_id=$row->lektor_id";
$num_checkmail=0;
if ($result_checkmail=$db->db_query($sql_query))
$num_checkmail=$db->db_num_rows($result_checkmail);
if ($num_checkmail==0)
{
$text.="$date\t$row->stunde_id\t$row->semester$row->verband$row->gruppe\r\n";
$stundenanzahl++;
$sendmail=1;
}
}
}
$sql_query="UPDATE untis SET checkmail='t' WHERE id=$row->id";
$result_insert=$db->db_query($sql_query);
}
if ($sendmail)
{
$text.="\nhttp://cis.technikum-wien.at\n\nFehler und Feedback bitte an mailto:stpl@technikum-wien.at";
$sql_query="SELECT emailtw FROM lektor WHERE id=$lektor_id";
$result_sendto=$db->db_query($sql_query);
$row_sendto=$db->db_fetch_object($result_sendto,0);
$sendto=$row_sendto->emailtw;
$sendto=$row_sendto->emailtw;
if (!mail($sendto, "Stundenplan Aenderung ($stundenanzahl Stunden)", $text, "From: stpl@technikum-wien.at\r\n"."Reply-To: stpl@technikum-wien.at\r\n"."X-Mailer: PHP/".phpversion() ) )
die ("<BR>Mail an <b>$sendto</b> konnte nicht verschickt werden.");
echo 'Mail verschickt an <b>'.$sendto.'</b><br>';
}
echo '<BR>Verarbeitung erfolgreich abgeschlossen!';
?>
</body>
</html>
@@ -1,83 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
include('wochendatum.inc.php');
$tagsek=86400;
?>
<html>
<head>
<title>Check ID</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../include/styles.css" type="text/css">
</head>
<body class="background_main">
<H1>Stundenplan wird übertragen</H1>
<?php
// Studiengänge abfragen
$sql_query="SELECT id, unr, wochentag, stunde, ort_kurzbz, lehrfach_nr, lektor_uid, jahreswochen, studiengang_kz, semester, verband, gruppe FROM untis
WHERE ort_kurzbz IS NOT NULL AND lehrfach_nr>0 AND lektor_uid IS NOT NULL AND studiengang_kz IS NOT NULL AND lehrfach NOT LIKE '\\\\_%'";
//echo $sql_query;
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
echo $num_rows.' Rows will be moved<BR>';
flush();
for ($i=0; $i<$num_rows; $i++)
{
if (($i%50)==0)
echo '<BR>'.$i;
echo '.';
flush();
$row=$db->db_fetch_object($result,$i);
for ($w=1; $w<=53; $w++)
{
if (substr($row->jahreswochen,$w-1,1)=='1')
{
$date=$week_date[$w]+($tagsek*($row->wochentag-1));
$date=getdate($date);
$tag=$date[mday];
$monat=$date[mon];
$jahr=$date[year];
$date=$jahr.'-'.$monat.'-'.$tag;
$sql_query="INSERT INTO tbl_stundenplan (unr, studiengang_kz, semester, verband, gruppe, ort_kurzbz, datum, stunde, lehrfach_nr, uid)
VALUES ('$row->unr',$row->studiengang_kz,$row->semester,'$row->verband','$row->gruppe', '$row->ort_kurzbz', '$date', $row->stunde, $row->lehrfach_nr, '$row->lektor_uid')";
$result_insert=$db->db_query($sql_query);
}
}
$sql_query="DELETE FROM untis WHERE id=$row->id";
$result_insert=$db->db_query($sql_query);
}
?>
<BR>Finished!
</body>
</html>
@@ -1,81 +0,0 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger < christian.paminger@technikum-wien.at >
* Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at >
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
*/
require_once('../../../config/vilesci.config.inc.php');
require_once('../../../include/basis_db.class.php');
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
include('wochendatum.inc.php');
$tagsek=86400;
?>
<html>
<head>
<title>Check ID</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK rel="stylesheet" href="../../../include/styles.css" type="text/css">
</head>
<body class="background_main">
<H1>Einheitenplan wird übertragen</H1>
<?php
// Studiengänge abfragen
$sql_query="SELECT id, unr, wochentag, stunde, ort_kurzbz, lehrfach_nr, lektor_uid, einheit_kurzbz, studiengang_kz, semester, jahreswochen FROM untis
WHERE ort_kurzbz IS NOT NULL AND lehrfach_nr IS NOT NULL AND lektor_uid IS NOT NULL AND studiengang_kz IS NOT NULL AND semester IS NOT NULL AND lehrfach LIKE '\\\\_%'";
$num_rows=0;
if ($result=$db->db_query($sql_query))
$num_rows=$db->db_num_rows($result);
echo $num_rows.' Rows will be moved<BR>';
flush();
for ($i=0; $i<$num_rows; $i++)
{
if (($i%50)==0)
echo '<BR>'.$i;
echo '.';
flush();
$row=$db->db_fetch_object($result,$i);
for ($w=1; $w<=53; $w++)
{
if (substr($row->jahreswochen,$w-1,1)=='1')
{
$date=$week_date[$w]+($tagsek*($row->wochentag-1));
$date=getdate($date);
$tag=$date[mday];
$monat=$date[mon];
$jahr=$date[year];
$date=$jahr.'-'.$monat.'-'.$tag;
$sql_query="INSERT INTO tbl_stundenplan (unr, ort_kurzbz, datum, stunde, lehrfach_nr, einheit_kurzbz, uid, studiengang_kz, semester, verband, gruppe) VALUES
('$row->unr', '$row->ort_kurzbz', '$date', $row->stunde, $row->lehrfach_nr,'$row->einheit_kurzbz','$row->lektor_uid',$row->studiengang_kz,$row->semester,NULL,NULL)";
$result_insert=$db->db_query($sql_query);
}
}
$sql_query="DELETE FROM untis WHERE id=$row->id";
$result_insert=$db->db_query($sql_query);
}
?>
<BR>Finished!
</body>
</html>
-46
View File
@@ -1,46 +0,0 @@
<?php
$week_date[36]=mktime(0,0,0,9,1,2003);
$week_date[37]=mktime(0,0,0,9,8,2003);
$week_date[38]=mktime(0,0,0,9,15,2003);
$week_date[39]=mktime(0,0,0,9,22,2003);
$week_date[40]=mktime(0,0,0,9,29,2003);
$week_date[41]=mktime(0,0,0,10,6,2003);
$week_date[42]=mktime(0,0,0,10,13,2003);
$week_date[43]=mktime(0,0,0,10,20,2003);
$week_date[44]=mktime(0,0,0,10,27,2003);
$week_date[45]=mktime(0,0,0,11,3,2003);
$week_date[46]=mktime(0,0,0,11,10,2003);
$week_date[47]=mktime(0,0,0,11,17,2003);
$week_date[48]=mktime(0,0,0,11,24,2003);
$week_date[49]=mktime(0,0,0,12,1,2003);
$week_date[50]=mktime(0,0,0,12,8,2003);
$week_date[51]=mktime(0,0,0,12,15,2003);
$week_date[52]=mktime(0,0,0,12,22,2003);
$week_date[1]=mktime(0,0,0,1,3,2005);
$week_date[2]=mktime(0,0,0,1,10,2005);
$week_date[3]=mktime(0,0,0,1,17,2005);
$week_date[4]=mktime(0,0,0,1,24,2005);
$week_date[5]=mktime(0,0,0,1,31,2005);
$week_date[6]=mktime(0,0,0,2,7,2005);
$week_date[7]=mktime(0,0,0,2,14,2005);
$week_date[8]=mktime(0,0,0,2,21,2005);
$week_date[9]=mktime(0,0,0,2,28,2005);
$week_date[10]=mktime(0,0,0,3,7,2005);
$week_date[11]=mktime(0,0,0,3,14,2005);
$week_date[12]=mktime(0,0,0,3,21,2005);
$week_date[13]=mktime(0,0,0,3,28,2005);
$week_date[14]=mktime(0,0,0,4,4,2005);
$week_date[15]=mktime(0,0,0,4,11,2005);
$week_date[16]=mktime(0,0,0,4,18,2005);
$week_date[17]=mktime(0,0,0,4,25,2005);
$week_date[18]=mktime(0,0,0,5,2,2005);
$week_date[19]=mktime(0,0,0,5,9,2005);
$week_date[20]=mktime(0,0,0,5,16,2005);
$week_date[21]=mktime(0,0,0,5,23,2005);
$week_date[22]=mktime(0,0,0,5,30,2005);
$week_date[23]=mktime(0,0,0,6,6,2005);
$week_date[24]=mktime(0,0,0,6,13,2005);
$week_date[25]=mktime(0,0,0,6,20,2005);
$week_date[26]=mktime(0,0,0,6,27,2005);
$week_date[27]=mktime(0,0,0,7,4,2005);
?>
+10 -4
View File
@@ -279,7 +279,9 @@ if(isset($_GET['type']) && ($_GET['type']=='edit' || $_GET['type']=='new'))
echo '
</SELECT>
</td>
<td><label for="file">Datei</a></td>
<td><label for="file">Datei
<img src="../../skin/images/information.png" title="absoluter Pfad im Filesystem zB /var/www/vilesci/job.php" />
</label></td>
<td colspan="8"><input type="text" size="80" id="file" name="file" value="'.htmlspecialchars($cj->file).'"></td>
</tr>
<tr>
@@ -289,7 +291,9 @@ if(isset($_GET['type']) && ($_GET['type']=='edit' || $_GET['type']=='new'))
<td><input type="text" name="monat" id="monat" maxlength="4" size="4" value="'.htmlspecialchars($cj->monat).'"></td>
<td><label for="tag">Tag</label></td>
<td><input type="text" name="tag" id="tag" maxlength="4" size="4" value="'.htmlspecialchars($cj->tag).'"></td>
<td><label for="wochentag">Wochentag</label></td>
<td><label for="wochentag">Wochentag
<img src="../../skin/images/information.png" title="Wenn Wochentag ausgewaehlt ist, wird Jahr, Monat und Tag nicht beruecksichtigt" />
</label></td>
<td>
<SELECT name="wochentag" id="wochentag">
<OPTION value="">-- keine Auswahl --</OPTION>';
@@ -307,7 +311,9 @@ if(isset($_GET['type']) && ($_GET['type']=='edit' || $_GET['type']=='new'))
echo '
</SELECT>
</td>
<td><label for="stunde">Stunde</label></td>
<td><label for="stunde">Stunde
<img src="../../skin/images/information.png" title="Beispiele: \'2\' im Feld Stunde für 2 Uhr. \'*/2\' im Feld Stunde für alle 2 Stunden. Kein Eintrag im Feld Stunde fuer jede Stunde " />
</label></td>
<td><input type="text" name="stunde" id="stunde" maxlength="4" size="4" value="'.htmlspecialchars($cj->stunde).'"></td>
<td><label for="minute">Minute</label></td>
<td><input type="text" name="minute" id="minute" maxlength="4" size="4" value="'.htmlspecialchars($cj->minute).'"></td>
@@ -398,4 +404,4 @@ if(isset($_GET['type']) && ($_GET['type']=='edit' || $_GET['type']=='new'))
echo '
</body>
</html>';
?>
?>
+41 -6
View File
@@ -16,7 +16,7 @@
*
* Authors: Stefan Puraner < puraner@technikum-wien.at >
*/
var loadTreeJumpAnchor='';
$(document).ready(function() {
var stdkz = $('select[name=studiengang_kz]').val();
@@ -54,6 +54,10 @@ function loadTree() {
$("#treeContainer").jstree({
plugins: ["themes", "html_data", "cookies"]
});
if(loadTreeJumpAnchor!='')
{
window.setTimeout(function(){ window.location.hash=loadTreeJumpAnchor}, 200);
}
});
}
;
@@ -103,8 +107,14 @@ function newGroup(id) {
url: "lvbgruppenverwaltungDetail.php",
data: {studiengang_kz: studiengang_kz, semester: semester, verband: verband, type: type, gruppe_neu: gruppe_neu}
}).done(function(data) {
obj = jQuery.parseJSON(data);
if(obj.status=='ok')
{
// Sprung zur neuen Gruppe
loadTreeJumpAnchor = obj.gruppe;
}
loadTree();
$("#ajaxData").html("<div class='detailsDiv'>"+data+"</div>");
$("#ajaxData").html("<div class='detailsDiv'>"+obj.message+"</div>");
});
}
;
@@ -119,8 +129,14 @@ function newVerband(id) {
url: "lvbgruppenverwaltungDetail.php",
data: {studiengang_kz: studiengang_kz, semester: semester, type: type, verband_neu: verband_neu}
}).done(function(data) {
obj = jQuery.parseJSON(data);
if(obj.status=='ok')
{
// Sprung zur neuen Gruppe
loadTreeJumpAnchor = obj.gruppe;
}
loadTree();
$("#ajaxData").html("<div class='detailsDiv'>"+data+"</div>");
$("#ajaxData").html("<div class='detailsDiv'>"+obj.message+"</div>");
});
}
;
@@ -134,8 +150,14 @@ function newSemester(id) {
url: "lvbgruppenverwaltungDetail.php",
data: {studiengang_kz: studiengang_kz, type: type, semester_neu: semester_neu}
}).done(function(data) {
obj = jQuery.parseJSON(data);
if(obj.status=='ok')
{
// Sprung zur neuen Gruppe
loadTreeJumpAnchor = obj.gruppe;
}
loadTree();
$("#ajaxData").html("<div class='detailsDiv'>"+data+"</div>");
$("#ajaxData").html("<div class='detailsDiv'>"+obj.message+"</div>");
});
}
;
@@ -149,8 +171,14 @@ function newSemesterForNewStudiengang(stdkz) {
url: "lvbgruppenverwaltungDetail.php",
data: {studiengang_kz: studiengang_kz, type: type, semester_neu: semester_neu}
}).done(function(data) {
obj = jQuery.parseJSON(data);
if(obj.status=='ok')
{
// Sprung zur neuen Gruppe
loadTreeJumpAnchor = obj.gruppe;
}
loadTree();
$("#ajaxData").html("<div class='detailsDiv'>"+data+"</div>");
$("#ajaxData").html("<div class='detailsDiv'>"+obj.message+"</div>");
});
}
;
@@ -165,8 +193,15 @@ function newSpezGroup(id) {
url: "lvbgruppenverwaltungDetail.php",
data: {studiengang_kz: studiengang_kz, type: type, semester: semester, spzgruppe_neu: spzgruppe_neu}
}).done(function(data) {
obj = jQuery.parseJSON(data);
if(obj.status=='ok')
{
// Sprung zur neuen Gruppe
loadTreeJumpAnchor = obj.gruppe_kurzbz;
}
loadTree();
$("#ajaxData").html("<div class='detailsDiv'>"+data+"</div>");
$("#ajaxData").html("<div class='detailsDiv'>"+obj.message+"</div>");
});
}
;
+155 -74
View File
@@ -60,33 +60,49 @@ $studiengang = new studiengang();
$studiengang->load($studiengang_kz);
//Aenderung des Aktiv Status
if ($changeState != '') {
if ($changeState != '')
{
if (!$admin)
die('Sie haben keine Berechtigung zum Speichern');
if ($gruppe_kurzbz != '') {
if ($gruppe_kurzbz != '')
{
$gruppe = new gruppe();
if ($gruppe->load($gruppe_kurzbz)) {
if ($gruppe->load($gruppe_kurzbz))
{
$gruppe->aktiv = !$gruppe->aktiv;
if ($gruppe->save(false)) {
if ($gruppe->save(false))
{
echo "erfolgreich";
} else {
}
else
{
echo "Fehler beim Aendern des Aktiv-Feldes: $gruppe->errormsg";
}
} else {
}
else
{
echo "Spezialgruppe wurde nicht gefunden";
}
} else {
}
else
{
$lvb = new lehrverband();
if ($lvb->load($studiengang_kz, $semester, $verband, $gruppe)) {
if ($lvb->load($studiengang_kz, $semester, $verband, $gruppe))
{
$lvb->aktiv = !$lvb->aktiv;
if ($lvb->save(false)) {
if ($lvb->save(false))
{
echo "erfolgreich";
} else {
}
else
{
echo "Fehler beim Aendern des Aktiv-Feldes: $lvb->errormsg";
}
} else {
}
else
{
echo "<span class='error'>Lehrverband wurde nicht gefunden</span>";
}
}
@@ -94,17 +110,21 @@ if ($changeState != '') {
//Anzeigen der Gruppen Details
if ($type == 'edit') {
if ($gruppe_kurzbz != '') {
if ($type == 'edit')
{
if ($gruppe_kurzbz != '')
{
$gruppe = new gruppe();
if ($gruppe->load($gruppe_kurzbz)) {
if ($gruppe->load($gruppe_kurzbz))
{
echo "<div class='detailsDiv'>Details von $gruppe_kurzbz<br><br>";
//echo "<form action='" . $_SERVER['PHP_SELF'] . "?type=save&studiengang_kz=$studiengang_kz&gruppe_kurzbz=$gruppe_kurzbz' method='POST'>
echo "<form id='formSpzSave' action='javascript:saveSpzGroup(\"".$gruppe->studiengang_kz."\",\"".$gruppe->gruppe_kurzbz."\",\"save\");' method='POST'>
<table>";
if ($admin) {
if ($admin)
{
echo "<tr>
<td><b>Kurzbezeichnung:</b></td>
<td><input id='spzKurzBz' type='text' name='kurzbezeichnung' size='30' maxlength='128' value='$gruppe->gruppe_kurzbz'/></td>
@@ -112,12 +132,13 @@ if ($type == 'edit') {
<tr>
<td>&nbsp;</td>
</tr>";
}
}
echo "<tr>
<td>Bezeichnung:</td>
<td><input id='spzBezeichnung' type='text' name='bezeichnung' size='30' maxlength='32' value='$gruppe->bezeichnung'/> (max. 32 Zeichen)</td>
</tr>";
if ($admin) {
if ($admin)
{
echo "
<tr>
<td>Beschreibung:</td>
@@ -140,7 +161,8 @@ if ($type == 'edit') {
<td><input id='spzSort' type='text' name='sort' size='2' maxlength='2' value='$gruppe->sort' /></td>
</tr>";
$stg_obj = new studiengang($studiengang_kz);
if ($stg_obj->mischform) {
if ($stg_obj->mischform)
{
echo "
<tr>
<td>OrgForm</td>
@@ -148,8 +170,10 @@ if ($type == 'edit') {
echo " <SELECT id='spzOrgform' name='orgform_kurzbz'>";
echo " <OPTION value=''>-- keine Auswahl --</OPTION>";
$qry_orgform = "SELECT * FROM bis.tbl_orgform WHERE orgform_kurzbz NOT IN ('VBB', 'ZGS') ORDER BY orgform_kurzbz";
if ($result_orgform = $db->db_query($qry_orgform)) {
while ($row_orgform = $db->db_fetch_object($result_orgform)) {
if ($result_orgform = $db->db_query($qry_orgform))
{
while ($row_orgform = $db->db_fetch_object($result_orgform))
{
if ($row_orgform->orgform_kurzbz == $gruppe->orgform_kurzbz)
$selected = 'selected';
else
@@ -184,9 +208,11 @@ if ($type == 'edit') {
</form></div>";
}
}
else {
else
{
$lvb = new lehrverband();
if ($lvb->load($studiengang_kz, $semester, $verband, $gruppe)) {
if ($lvb->load($studiengang_kz, $semester, $verband, $gruppe))
{
echo "<div class='detailsDiv'>Details von $studiengang->kuerzel - $semester$verband$gruppe<br><br>";
echo "<form id='formSave' action='javascript:saveGroup(\"".$lvb->studiengang_kz."\",\"".$lvb->semester."\",\"".$lvb->verband."\",\"".$lvb->gruppe."\",\"save\");' method='POST'>
@@ -204,14 +230,16 @@ if ($type == 'edit') {
<input type='hidden' name='type' value='save'/>
</td>
</tr>";
if ($admin) {
if ($admin)
{
echo "
<tr>
<td>Aktiv:</td>
<td><input id='aktiv' type='checkbox' name='aktiv' " . ($lvb->aktiv ? 'checked' : '') . " /></td>
</tr>";
$stg_obj = new studiengang($studiengang_kz);
if ($stg_obj->mischform) {
if ($stg_obj->mischform)
{
echo "
<tr>
<td>OrgForm</td>
@@ -219,8 +247,10 @@ if ($type == 'edit') {
echo " <SELECT name='orgform_kurzbz' id='orgform_kurzbz'>";
echo " <OPTION value=''>-- keine Auswahl --</OPTION>";
$qry_orgform = "SELECT * FROM bis.tbl_orgform WHERE orgform_kurzbz NOT IN ('VBB', 'ZGS') ORDER BY orgform_kurzbz";
if ($result_orgform = $db->db_query($qry_orgform)) {
while ($row_orgform = $db->db_fetch_object($result_orgform)) {
if ($result_orgform = $db->db_query($qry_orgform))
{
while ($row_orgform = $db->db_fetch_object($result_orgform))
{
if ($row_orgform->orgform_kurzbz == $lvb->orgform_kurzbz)
$selected = 'selected';
else
@@ -252,56 +282,84 @@ if ($type == 'edit') {
}
//Anlegen einer neuen Gruppe
if ($type == 'neu') {
if ($type == 'neu')
{
if (!$admin)
die('Sie haben keine Berechtigung zum Speichern');
if (isset($_POST['spzgruppe_neu'])) {
//neue Spezialgruppe anlegen
$gruppe_kurzbz = $studiengang->kuerzel . '-' . $semester . strtoupper($_POST['spzgruppe_neu']);
if (isset($_POST['spzgruppe_neu']))
{
if(preg_match('/^[A-Z0-9a-z\-\_]*$/', $_POST['spzgruppe_neu']))
{
//neue Spezialgruppe anlegen
$gruppe_kurzbz = $studiengang->kuerzel . '-' . $semester . strtoupper($_POST['spzgruppe_neu']);
$gruppe = new gruppe();
if (!$gruppe->exists($gruppe_kurzbz)) {
$gruppe->gruppe_kurzbz = $gruppe_kurzbz;
$gruppe->studiengang_kz = $studiengang_kz;
$gruppe->semester = $semester;
$gruppe->bezeichnung = "";
$gruppe->beschreibung = "";
$gruppe->aktiv = true;
$gruppe->sichtbar = true;
$gruppe->lehre = true;
$gruppe->sort = '';
$gruppe->mailgrp = true;
$gruppe->generiert = false;
$gruppe->insertamum = date('Y-m-d H:i:s');
$gruppe->insertvon = $user;
$gruppe = new gruppe();
if (!$gruppe->exists($gruppe_kurzbz))
{
$gruppe->gruppe_kurzbz = $gruppe_kurzbz;
$gruppe->studiengang_kz = $studiengang_kz;
$gruppe->semester = $semester;
$gruppe->bezeichnung = "";
$gruppe->beschreibung = "";
$gruppe->aktiv = true;
$gruppe->sichtbar = true;
$gruppe->lehre = true;
$gruppe->sort = '';
$gruppe->mailgrp = true;
$gruppe->generiert = false;
$gruppe->insertamum = date('Y-m-d H:i:s');
$gruppe->insertvon = $user;
if ($gruppe->save(true)) {
echo "Gruppe wurde angelegt";
} else {
echo "<span class='error'>Fehler beim anlegen der Gruppe:$gruppe->errormsg</span>";
if ($gruppe->save(true))
{
$returndata = array('status'=>'ok','gruppe_kurzbz'=>$gruppe->gruppe_kurzbz,'message'=>'Gruppe wurde angelegt');
echo json_encode($returndata);
}
else
{
$returndata = array('status'=>'failed','message'=>"<span class='error'>Fehler beim anlegen der Gruppe:$gruppe->errormsg</span>");
echo json_encode($returndata);
}
}
else
{
$returndata = array('status'=>'failed','message'=>"<span class='error'>Diese Gruppe Existiert bereits: $gruppe_kurzbz</span>");
echo json_encode($returndata);
}
} else {
echo "<span class='error'>Diese Gruppe Existiert bereits: $gruppe_kurzbz</span>";
}
} else {
else
{
$returndata = array('status'=>'failed','message'=>"<span class='error'>Bitte verwenden Sie für den Gruppennamen keine Sonderzeichen oder Umlaute</span>");
echo json_encode($returndata);
}
}
else
{
$lvb = new lehrverband();
if (isset($_POST['semester_neu'])) {
if (isset($_POST['semester_neu']))
{
//Neues Semester anlegen
$semester = $_POST['semester_neu'];
$verband = ' ';
$gruppe = ' ';
} elseif (isset($_POST['verband_neu'])) {
}
elseif (isset($_POST['verband_neu']))
{
//neuen Verband anlegen
$verband = $_POST['verband_neu'];
$gruppe = ' ';
} elseif (isset($_POST['gruppe_neu'])) {
}
elseif (isset($_POST['gruppe_neu']))
{
//neue Gruppe anlegen
$gruppe = $_POST['gruppe_neu'];
}
if (!$lvb->exists($studiengang_kz, $semester, $verband, $gruppe)) {
if (!$lvb->exists($studiengang_kz, $semester, $verband, $gruppe))
{
$lvb->studiengang_kz = $studiengang_kz;
$lvb->semester = $semester;
$lvb->verband = $verband;
@@ -309,25 +367,37 @@ if ($type == 'neu') {
$lvb->aktiv = true;
$lvb->bezeichnung = '';
if ($lvb->save(true)) {
echo 'Daten wurden erfolgreich angelegt';
} else {
echo "<span class='error'>Fehler beim Anlegen der Gruppe: $lvb->errormsg</span>";
if ($lvb->save(true))
{
$returndata = array('status'=>'ok','gruppe'=>trim($studiengang_kz.$semester.$verband.$gruppe),'message'=>"Daten wurden erfolgreich angelegt");
echo json_encode($returndata);
}
else
{
$returndata = array('status'=>'failed','gruppe'=>trim($studiengang_kz.$semester.$verband.$gruppe),'message'=>"<span class='error'>Fehler beim Anlegen der Gruppe: $lvb->errormsg</span>");
echo json_encode($returndata);
}
} else {
echo "<span class='error'>Diese Gruppe Existiert bereits</span>";
}
else
{
$returndata = array('status'=>'failed','gruppe'=>trim($studiengang_kz.$semester.$verband.$gruppe),'message'=>"<span class='error'>Diese Gruppe Existiert bereits</span>");
echo json_encode($returndata);
}
}
}
//Speichern der geaenderten Gruppendaten
if ($type == 'save') {
if ($type == 'save')
{
//Spezialgruppe speichern
if ($gruppe_kurzbz != '') {
if ($gruppe_kurzbz != '')
{
$gruppe = new gruppe();
if ($gruppe->load($gruppe_kurzbz)) {
if ($gruppe->load($gruppe_kurzbz))
{
$gruppe->bezeichnung = $_POST['bezeichnung'];
if ($admin) {
if ($admin)
{
$gruppe->gruppe_kurbzNeu = (isset($_POST['kurzBzNeu']) ? $_POST['kurzBzNeu'] : $gruppe_kurzbz);
$gruppe->beschreibung = $_POST['beschreibung'];
$gruppe->sichtbar = isset($_POST['sichtbar']);
@@ -341,9 +411,12 @@ if ($type == 'save') {
}
$gruppe->updateamum = date('Y-m-d H:i:s');
$gruppe->updatevon = $user;
if ($gruppe->save(false)) {
if ($gruppe->save(false))
{
echo 'Daten wurden erfolgreich geaendert';
} else {
}
else
{
echo "Fehler beim Speichern der Daten: $gruppe->errormsg";
}
@@ -352,25 +425,33 @@ if ($type == 'save') {
else
echo "Gruppe konnte nicht geladen werden";
}
else {
else
{
//Lehrverbandsgruppe speichern
$lvb = new lehrverband();
if ($lvb->load($studiengang_kz, $semester, $verband, $gruppe)) {
if ($lvb->load($studiengang_kz, $semester, $verband, $gruppe))
{
$lvb->bezeichnung = $_POST['bezeichnung'];
if ($admin) {
if ($admin)
{
$lvb->aktiv = isset($_POST['aktiv']);
if (isset($_POST['orgform_kurzbz']))
$lvb->orgform_kurzbz = $_POST['orgform_kurzbz'];
}
if ($lvb->save(false)) {
if ($lvb->save(false))
{
echo 'Daten wurden erfolgreich geaendert';
} else {
}
else
{
echo "Fehler beim Speichern der Daten: $lvb->errormsg";
}
} else {
}
else
{
echo "Gruppe konnte nicht geladen werden";
}
}
@@ -60,7 +60,7 @@ if ($semResult != false) {
<a href='javascript:void(0);' onclick='changeState(\"pic_".$studiengang_kz.$sem.$s["aktiv"]."\",$studiengang_kz,\"" . $sem . "\",\" \",\" \",\"" .$s["aktiv"]. "\")'>
<img id='pic_".$studiengang_kz.$sem.$s["aktiv"]."' src='../../skin/images/" . ($s["aktiv"] == 't' ? 'true.png' : 'false.png') . "' aktiv='".$s["aktiv"]."' height='20'>
</a>
<a href='javascript:void(0);' onclick='getGruppenDetails(\"edit\",\"\",$studiengang_kz,\"" . $sem . "\",\" \",\" \",\"".$s["aktiv"]."\")'>
<a name='$studiengang_kz$sem' href='javascript:void(0);' onclick='getGruppenDetails(\"edit\",\"\",$studiengang_kz,\"" . $sem . "\",\" \",\" \",\"".$s["aktiv"]."\")'>
Semester " . $s["semester"] . "
</a>";
@@ -75,7 +75,7 @@ if ($semResult != false) {
<a href='javascript:void(0);' onclick='changeState(\"pic_".$studiengang_kz.$sem.$verb."\",$studiengang_kz,\"" . $sem . "\",\"" . $verb . "\",\" \",\"" . $v["aktiv"] . "\")'>
<img id='pic_".$studiengang_kz.$sem.$verb."' src='../../skin/images/" . ($v["aktiv"] == 't' ? 'true.png' : 'false.png') . "' aktiv='".$v["aktiv"]."' height='20'>
</a>
<a href='javascript:void(0);' onclick='getGruppenDetails(\"edit\",\"\",$studiengang_kz,\"" . $sem . "\",\"" . $verb . "\",\" \",\"".$v["aktiv"]."\")'>
<a name='$studiengang_kz$sem$verb' href='javascript:void(0);' onclick='getGruppenDetails(\"edit\",\"\",$studiengang_kz,\"" . $sem . "\",\"" . $verb . "\",\" \",\"".$v["aktiv"]."\")'>
Verband " . $verb . ($v["bezeichnung"] != '' ? " (" . $v["bezeichnung"] . ")" : '' ) . "
</a>";
//Gruppen des Verbandes holen und ausgeben
@@ -91,7 +91,7 @@ if ($semResult != false) {
<a href='javascript:void(0);' onclick='changeState(\"pic_".$studiengang_kz.$sem.$verb.$grp."\",$studiengang_kz,\"" . $sem . "\",\"" . $verb . "\",\"" . $grp . "\",\"" . $g["aktiv"] . "\")'>
<img id='pic_".$studiengang_kz.$sem.$verb.$grp."' src='../../skin/images/" . ($g["aktiv"] == 't' ? 'true.png' : 'false.png') . "' aktiv='".$g["aktiv"]."' height='20'>
</a>
<a href='javascript:void(0);' onclick='getGruppenDetails(\"edit\",\"\",$studiengang_kz,\"" . $sem . "\",\"" . $verb . "\",\"" . $grp . "\",\"".$g["aktiv"]."\")'>
<a name='$studiengang_kz$sem$verb$grp' href='javascript:void(0);' onclick='getGruppenDetails(\"edit\",\"\",$studiengang_kz,\"" . $sem . "\",\"" . $verb . "\",\"" . $grp . "\",\"".$g["aktiv"]."\")'>
Gruppe " . $grp . ($grpBez != '' ? " (" . $grpBez . ")" : '' ) . "
</a>
</li>";
@@ -144,7 +144,7 @@ if ($semResult != false) {
<a href='javascript:void(0);' onclick='changeState(\"pic_".$studiengang_kz.$sem.$kurzBz."\",$studiengang_kz,\"" . $sem . "\",\" \",\" \",\"". $state."\",\"".$kurzBz."\")'>
<img id='pic_".$studiengang_kz.$sem.$kurzBz."' src='../../skin/images/" . ($spezGroup->aktiv == 't' ? 'true.png' : 'false.png') . "' aktiv='".$state."' height='20'>
</a>
<a href='javascript:void(0);' onclick='getGruppenDetails(\"edit\",\"" . $kurzBz . "\",$studiengang_kz,\"" . $sem . "\")'>
<a name='".$kurzBz."' href='javascript:void(0);' onclick='getGruppenDetails(\"edit\",\"" . $kurzBz . "\",$studiengang_kz,\"" . $sem . "\")'>
" . $kurzBz . ($spezGroup->bezeichnung != '' ? "(" . $spezGroup->bezeichnung . ")" : '')."
</a>
</li>";
+28 -5
View File
@@ -27,9 +27,9 @@ require_once('../../include/studiengang.class.php');
require_once('../../include/dokument.class.php');
require_once('../../include/benutzerberechtigung.class.php');
$stg_kz=isset($_REQUEST['stg_kz'])?$_REQUEST['stg_kz']:'0';
$dokument_kurzbz=isset($_REQUEST['dokument_kurzbz'])?$_REQUEST['dokument_kurzbz']:'';
$onlinebewerbung=isset($_REQUEST['onlinebewerbung']);
$stg_kz = isset($_REQUEST['stg_kz']) ? $_REQUEST['stg_kz'] : '0';
$dokument_kurzbz = isset($_REQUEST['dokument_kurzbz']) ? $_REQUEST['dokument_kurzbz'] : '';
$onlinebewerbung = isset($_REQUEST['onlinebewerbung']);
$action=isset($_GET['action'])?$_GET['action']:'';
if(isset($_POST['add']))
@@ -52,6 +52,7 @@ if($action=='add')
$dokument->dokument_kurzbz = $dokument_kurzbz;
$dokument->studiengang_kz = $stg_kz;
$dokument->onlinebewerbung = $onlinebewerbung;
$dokument->pflicht = filter_input(INPUT_POST, 'pflicht', FILTER_VALIDATE_BOOLEAN);
$dokument->saveDokumentStudiengang();
}
}
@@ -82,6 +83,21 @@ if($action =='toggleonline')
}
}
if($action === 'togglepflicht') {
if($dokument_kurzbz != '' && $stg_kz != '')
{
$dokument=new dokument();
if($dokument->loadDokumentStudiengang($dokument_kurzbz, $stg_kz))
{
$dokument->pflicht = !$dokument->pflicht;
if(!$dokument->saveDokumentStudiengang())
echo $dokument->errormsg;
}
else
echo 'Zuordnung ist nicht vorhanden';
}
}
if($action=='saveDoc')
{
$dokBezeichnung=isset($_POST['dokument_bezeichnung'])?$_POST['dokument_bezeichnung']:'';
@@ -262,6 +278,7 @@ else
<tr>
<th>Dokumentname</th>
<th>Online-Bewerbung</th>
<th>Pflicht</th>
<th></th>
</tr>
</thead>
@@ -272,10 +289,12 @@ else
foreach($dokStg->result as $dok)
{
$zugewieseneDokumente[]=$dok->dokument_kurzbz;
$checked=$dok->onlinebewerbung?'true':'false';
$checked_onlinebewerbung = $dok->onlinebewerbung ? 'true' : 'false';
$checked_pflicht = $dok->pflicht ? 'true' : 'false';
echo '<tr>
<td>'.$dok->bezeichnung.'</td>
<td><a href="'.$_SERVER['PHP_SELF'].'?action=toggleonline&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'"><img src="../../skin/images/'.$checked.'.png" /></a></td>
<td><a href="'.$_SERVER['PHP_SELF'].'?action=toggleonline&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'"><img src="../../skin/images/'.$checked_onlinebewerbung.'.png" /></a></td>
<td><a href="'.$_SERVER['PHP_SELF'].'?action=togglepflicht&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'"><img src="../../skin/images/'.$checked_pflicht.'.png" /></a></td>
<td><a href="'.$_SERVER['PHP_SELF'].'?action=delete&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'">Zuordnung löschen</a></td>
</td>
</tr>';
@@ -294,6 +313,10 @@ else
}
echo '</select></td>
<td><input type="checkbox" name="onlinebewerbung" checked></td>
<td>
<input type="hidden" name="pflicht" value="0">
<input type="checkbox" name="pflicht" value="1" checked>
</td>
<td><input type="submit" name="add" value="Hinzufügen"></td>
</tr>
</tfoot>