diff --git a/cis/private/lehre/pinboard.php b/cis/private/lehre/pinboard.php
index a7696e90d..a22dc6301 100644
--- a/cis/private/lehre/pinboard.php
+++ b/cis/private/lehre/pinboard.php
@@ -51,6 +51,7 @@
$datum = '';
$user = get_uid();
$stsemarr = array();
+ $PHP_SELF = $_SERVER['PHP_SELF'];
if(isset($_GET['studiensemester_kurzbz']))
$studiensemester_kurzbz = $_GET['studiensemester_kurzbz'];
diff --git a/cis/private/profile/lva_liste.php b/cis/private/profile/lva_liste.php
index 059694de9..9c57630b3 100644
--- a/cis/private/profile/lva_liste.php
+++ b/cis/private/profile/lva_liste.php
@@ -1,19 +1,20 @@
diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php
index b77940299..5c5a205c1 100644
--- a/content/student/studentDBDML.php
+++ b/content/student/studentDBDML.php
@@ -45,6 +45,7 @@ require_once('../../include/dokument.class.php');
require_once('../../include/studiensemester.class.php');
require_once('../../include/betriebsmittel.class.php');
require_once('../../include/betriebsmittelperson.class.php');
+require_once('../../include/bisio.class.php');
$user = get_uid();
@@ -1021,6 +1022,77 @@ if(!$error)
$return = false;
}
}
+ elseif(isset($_POST['type']) && $_POST['type']=='deletebisio')
+ {
+ //Loescht einen BisIO Eintrag
+ if(isset($_POST['bisio_id']) && is_numeric($_POST['bisio_id']))
+ {
+ $bisio = new bisio($conn);
+
+ if($bisio->delete($_POST['bisio_id']))
+ {
+ $return = true;
+ }
+ else
+ {
+ $errormsg = $bisio->errormsg;
+ $return = false;
+ }
+ }
+ else
+ {
+ $return = false;
+ $errormsg = 'Fehlerhafte Parameteruebergabe';
+ }
+ }
+ elseif(isset($_POST['type']) && $_POST['type']=='savebisio')
+ {
+ //Speichert einen BisIO Eintrag
+
+ $bisio = new bisio($conn);
+
+ if($_POST['neu']=='true')
+ {
+ $bisio->insertamum = date('Y-m-d H:i:s');
+ $bisio->insertvon = $user;
+ $bisio->new = true;
+ }
+ else
+ {
+ if($bisio->load($_POST['bisio_id']))
+ $bisio->new = false;
+ else
+ {
+ $error = true;
+ $errormsg = $bisio->errormsg;
+ $return = false;
+ }
+ }
+
+ $bisio->bisio_id = (isset($_POST['bisio_id'])?$_POST['bisio_id']:'');
+ $bisio->mobilitaetsprogramm_code = $_POST['mobilitaetsprogramm_code'];
+ $bisio->nation_code = $_POST['nation_code'];
+ $bisio->von = $_POST['von'];
+ $bisio->bis = $_POST['bis'];
+ $bisio->zweck_code = $_POST['zweck_code'];
+ $bisio->student_uid = $_POST['student_uid'];
+ $bisio->updateamum = date('Y-m-d H:i:s');
+ $bisio->updatevon = $user;
+
+ if(!$error)
+ {
+ if($bisio->save())
+ {
+ $return = true;
+ $data = $bisio->bisio_id;
+ }
+ else
+ {
+ $errormsg = $bisio->errormsg;
+ $return = false;
+ }
+ }
+ }
else
{
$return = false;
diff --git a/content/student/studentenoverlay.xul.php b/content/student/studentenoverlay.xul.php
index 1d05ef1f0..be5e4a571 100644
--- a/content/student/studentenoverlay.xul.php
+++ b/content/student/studentenoverlay.xul.php
@@ -181,7 +181,7 @@ echo '
-
+
diff --git a/content/student/studentiooverlay.xul.php b/content/student/studentiooverlay.xul.php
index 721da8be1..5ecb3ead3 100644
--- a/content/student/studentiooverlay.xul.php
+++ b/content/student/studentiooverlay.xul.php
@@ -49,18 +49,9 @@ echo '';
-
';
class="sortDirectionIndicator"
sortActive="true"
sortDirection="ascending"
- sort="rdf:http://www.technikum-wien.at/io/rdf#mobilitaetsprogramm_kurzbz"/>
+ sort="rdf:http://www.technikum-wien.at/bisio/rdf#mobilitaetsprogramm_kurzbz"/>
-
+ sort="rdf:http://www.technikum-wien.at/bisio/rdf#nation_code"/>
+ sort="rdf:http://www.technikum-wien.at/bisio/rdf#von" />
+ sort="rdf:http://www.technikum-wien.at/bisio/rdf#bis" />
-
+ sort="rdf:http://www.technikum-wien.at/bisio/rdf#zweck_bezeichnung" />
+ sort="rdf:http://www.technikum-wien.at/bisio/rdf#bisio_id" />
@@ -99,12 +90,12 @@ echo '';
-
-
-
-
-
-
+
+
+
+
+
+
@@ -117,7 +108,7 @@ echo '';
-
+
@@ -134,7 +125,7 @@ echo '';
-
+
@@ -153,7 +144,7 @@ echo '';
@@ -181,7 +172,7 @@ echo '';
diff --git a/content/student/studentoverlay.js.php b/content/student/studentoverlay.js.php
index 3a40138f8..d9df94945 100644
--- a/content/student/studentoverlay.js.php
+++ b/content/student/studentoverlay.js.php
@@ -36,6 +36,8 @@ var StudentTreeLoadDataOnSelect=true; //Gib an ob beim Selectieren im Tree die D
var StudentBetriebsmittelTreeDatasource; //Datasource des BetriebsmittelTrees
var StudentBetriebsmittelSelectBetriebsmittel_id=null; //Betriebsmittelzurodnung die nach dem Refresh markiert werden soll
var StudentBetriebsmittelSelectPerson_id=null; //Betriebsmittelzurodnung die nach dem Refresh markiert werden soll
+var StudentIOTreeDatasource; //Datasource des Incomming/Outgoing Trees
+var StudentIOSelectID=null; //BISIO Eintrag der nach dem Refresh markiert werden soll
// ********** Observer und Listener ************* //
@@ -141,6 +143,41 @@ var StudentBetriebsmittelTreeListener =
window.setTimeout(StudentBetriebsmittelTreeSelectZuordnung,10);
}
};
+
+
+// ****
+// * Observer fuer BISIO Tree
+// * startet Rebuild nachdem das Refresh
+// * der datasource fertig ist
+// ****
+var StudentIOTreeSinkObserver =
+{
+ onBeginLoad : function(pSink) {},
+ onInterrupt : function(pSink) {},
+ onResume : function(pSink) {},
+ onError : function(pSink, pStatus, pError) {},
+ onEndLoad : function(pSink)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ document.getElementById('student-io-tree').builder.rebuild();
+ }
+};
+
+// ****
+// * Nach dem Rebuild wird der Eintrag wieder
+// * markiert
+// ****
+var StudentIOTreeListener =
+{
+ willRebuild : function(builder) { },
+ didRebuild : function(builder)
+ {
+ //timeout nur bei Mozilla notwendig da sonst die rows
+ //noch keine values haben. Ab Seamonkey funktionierts auch
+ //ohne dem setTimeout
+ window.setTimeout(StudentIOTreeSelectID,10);
+ }
+};
// ***************** KEY Events ************************* //
// ****
@@ -592,6 +629,7 @@ function StudentAuswahl()
StudentPrestudentDisableFields(false);
StudentKontoDisableFields(false);
StudentBetriebsmittelDisableFields(false);
+ StudentIODisableFields(false);
document.getElementById('student-detail-button-save').disabled=false;
}
else
@@ -834,6 +872,28 @@ function StudentAuswahl()
betriebsmitteltree.database.AddDataSource(StudentBetriebsmittelTreeDatasource);
StudentBetriebsmittelTreeDatasource.addXMLSinkObserver(StudentBetriebsmittelTreeSinkObserver);
betriebsmitteltree.builder.addListener(StudentBetriebsmittelTreeListener);
+
+ // *** Incomming/Outgoing ***
+ bisiotree = document.getElementById('student-io-tree');
+
+ url='rdf/bisio.rdf.php?uid='+uid+"&"+gettimestamp();
+
+ //Alte DS entfernen
+ var oldDatasources = bisiotree.database.GetDataSources();
+ while(oldDatasources.hasMoreElements())
+ {
+ bisiotree.database.RemoveDataSource(oldDatasources.getNext());
+ }
+ //Refresh damit die entfernten DS auch wirklich entfernt werden
+ bisiotree.builder.rebuild();
+
+ var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
+ StudentIOTreeDatasource = rdfService.GetDataSource(url);
+ StudentIOTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
+ StudentIOTreeDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
+ bisiotree.database.AddDataSource(StudentIOTreeDatasource);
+ StudentIOTreeDatasource.addXMLSinkObserver(StudentIOTreeSinkObserver);
+ bisiotree.builder.addListener(StudentIOTreeListener);
}
// ****
@@ -1759,8 +1819,7 @@ function StudentIOAuswahl()
if (tree.currentIndex==-1) return;
StudentIODetailDisableFields(false);
- document.getElementById('student-io-checkbox-neu').checked=false;
-
+
//Ausgewaehlte Nr holen
var col = tree.columns ? tree.columns["student-io-tree-bisio_id"] : "student-io-tree-bisio_id";
var bisio_id=tree.view.getCellText(tree.currentIndex,col);
@@ -1785,13 +1844,15 @@ function StudentIOAuswahl()
bis = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bis" ));
zweck_code = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zweck_code" ));
student_uid = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#student_uid" ));
-
+
document.getElementById('student-io-menulist-mobilitaetsprogramm').value=mobilitaetsprogramm_code;
- document.getElementById('student-io-menulist-nation_code').value=nation_code;
+ document.getElementById('student-io-menulist-nation').value=nation_code;
document.getElementById('student-io-textbox-von').value=von;
document.getElementById('student-io-textbox-bis').value=bis;
document.getElementById('student-io-menulist-zweck').value=zweck_code;
- document.getElementById('student-io-textbox-uid').value=uid;
+ document.getElementById('student-io-detail-textbox-uid').value=student_uid;
+ document.getElementById('student-io-detail-checkbox-neu').checked=false;
+ document.getElementById('student-io-detail-textbox-bisio_id').value=bisio_id;
}
// ****
@@ -1812,8 +1873,8 @@ function StudentIODetailDisableFields(val)
document.getElementById('student-io-textbox-von').disabled=val;
document.getElementById('student-io-textbox-bis').disabled=val;
document.getElementById('student-io-menulist-mobilitaetsprogramm').disabled=val;
- document.getElementById('student-io-menulist-nation_code').disabled=val;
- document.getElementById('student-io-menulist-zweck_code').disabled=val;
+ document.getElementById('student-io-menulist-nation').disabled=val;
+ document.getElementById('student-io-menulist-zweck').disabled=val;
document.getElementById('student-io-button-speichern').disabled=val;
}
@@ -1822,10 +1883,10 @@ function StudentIODetailDisableFields(val)
// *****
function StudentIOResetFileds()
{
- document.getElementByID('student-io-textbox-von').value='';
+ document.getElementById('student-io-textbox-von').value='';
document.getElementById('student-io-textbox-bis').value='';
document.getElementById('student-io-menulist-mobilitaetsprogramm').value='6';
- document.getElementById('student-io-menulist-zweck').value='1';
+ document.getElementById('student-io-menulist-zweck').value='2';
document.getElementById('student-io-menulist-nation').value='A';
}
@@ -1841,25 +1902,25 @@ function StudentIODetailSpeichern()
mobilitaetsprogramm = document.getElementById('student-io-menulist-mobilitaetsprogramm').value;
nation_code = document.getElementById('student-io-menulist-nation').value;
zweck_code = document.getElementById('student-io-menulist-zweck').value;
- uid = document.getElementById('student-io-textbox-uid').value;
- neu = document.getElementById('student-io-checkbox-neu').checked;
- bisio_id = document.getElementById('student-io-textbox-bisio_id').value;
+ uid = document.getElementById('student-io-detail-textbox-uid').value;
+ neu = document.getElementById('student-io-detail-checkbox-neu').checked;
+ bisio_id = document.getElementById('student-io-detail-textbox-bisio_id').value;
var url = 'content/student/studentDBDML.php';
var req = new phpRequest(url,'','');
- req.add('type', 'saveio');
+ req.add('type', 'savebisio');
- if(neu)
+ if(neu==false)
req.add('bisio_id', bisio_id);
req.add('neu', neu);
req.add('von', von);
req.add('bis', bis);
- req.add('mobilitaetsprogramm', mobilitaetsprogramm);
+ req.add('mobilitaetsprogramm_code', mobilitaetsprogramm);
req.add('nation_code', nation_code);
req.add('zweck_code', zweck_code);
- req.add('uid', uid);
+ req.add('student_uid', uid);
var response = req.executePOST();
@@ -1874,7 +1935,10 @@ function StudentIODetailSpeichern()
}
else
{
- StudentIOSelectID=bisio_id;
+ if(neu)
+ StudentIOSelectID=val.dbdml_data;
+ else
+ StudentIOSelectID=bisio_id;
StudentIOTreeDatasource.Refresh(false); //non blocking
SetStatusBarText('Daten wurden gespeichert');
}
@@ -1901,7 +1965,7 @@ function StudentIODelete()
var url = 'content/student/studentDBDML.php';
var req = new phpRequest(url,'','');
- req.add('type', 'deleteio');
+ req.add('type', 'deletebisio');
req.add('bisio_id', bisio_id);
@@ -1921,6 +1985,8 @@ function StudentIODelete()
StudentIOSelectID=bisio_id;
StudentIOTreeDatasource.Refresh(false); //non blocking
SetStatusBarText('Daten wurden geloescht');
+ StudentIOResetFileds();
+ StudentIODetailDisableFields(true);
}
}
}
@@ -1934,7 +2000,55 @@ function StudentIONeu()
StudentIOResetFileds();
StudentIODetailDisableFields(false);
+ var now = new Date();
+ var jahr = now.getFullYear();
+
+ var monat = now.getMonth()+1;
+
+ if(monat<10)
+ monat='0'+monat;
+ var tag = now.getDate();
+ if(tag<10)
+ tag='0'+tag;
+
//UID ins Textfeld schreiben
- document.getElementById('student-io-textbox-uid').value=document.getElementById('student-detail-textbox-uid').value;
- document.getElementById('student-io-checkbox-neu').checked=true;
+ document.getElementById('student-io-detail-textbox-uid').value=document.getElementById('student-detail-textbox-uid').value;
+ document.getElementById('student-io-detail-checkbox-neu').checked=true;
+ document.getElementById('student-io-textbox-von').value=jahr+'-'+monat+'-'+tag;
+ document.getElementById('student-io-textbox-bis').value=jahr+'-'+monat+'-'+tag;
+}
+
+// ****
+// * Selectiert den Incomming/Outgoing Eintrag nachdem der Tree
+// * rebuildet wurde.
+// ****
+function StudentIOTreeSelectID()
+{
+ var tree=document.getElementById('student-io-tree');
+ if(tree.view)
+ var items = tree.view.rowCount; //Anzahl der Zeilen ermitteln
+ else
+ return false;
+
+ //In der globalen Variable ist die zu selektierende Eintrag gespeichert
+ if(StudentIOSelectID!=null)
+ {
+ for(var i=0;i,
+ * Andreas Oesterreicher and
+ * Rudolf Hangl .
+ */
+/**
+ * Klasse bisio - Incomming/Outgoing
+ * @create 2007-05-14
+ */
+
+class bisio
+{
+ var $conn; // resource DB-Handle
+ var $new; // boolean
+ var $errormsg; // string
+ var $result = array(); // adresse Objekt
+
+ //Tabellenspalten
+ var $bisio_id; // serial
+ var $mobilitaetsprogramm_code; // integer
+ var $mobilitaetsprogramm_kurzbz;
+ var $nation_code; // varchar(3)
+ var $von; // date
+ var $bis; // date
+ var $zweck_code; // varchar(20)
+ var $zweck_bezeichnung;
+ var $student_uid; // varchar(16)
+ var $updateamum; // timestamp
+ var $updatevon; // varchar(16)
+ var $insertamum; // timestamp
+ var $insertvon; // varchar(16)
+ var $ext_id; // bigint
+
+ // **************************************************************************
+ // * Konstruktor
+ // * @param $conn Connection
+ // * $bisio_id ID die geladen werden soll (Default=null)
+ // * $unicode Wenn true dann wird das Encoding auf Unicode gesetzt
+ // **************************************************************************
+ function bisio($conn, $bisio_id=null, $unicode=false)
+ {
+ $this->conn = $conn;
+ if($unicode!=null)
+ {
+ if ($unicode)
+ {
+ $qry = "SET CLIENT_ENCODING TO 'UNICODE';";
+ }
+ else
+ {
+ $qry="SET CLIENT_ENCODING TO 'LATIN9';";
+ }
+ if(!pg_query($conn,$qry))
+ {
+ $this->errormsg = "Encoding konnte nicht gesetzt werden";
+ return false;
+ }
+ }
+
+ if($bisio_id!=null)
+ $this->load($bisio_id);
+ }
+
+ // ************************************************
+ // * Laedt die Funktion mit der ID $buchungsnr
+ // * @param $buchungsnr ID der zu ladenden Email
+ // * @return true wenn ok, false im Fehlerfall
+ // ************************************************
+ function load($bisio_id)
+ {
+ if(!is_numeric($bisio_id))
+ {
+ $this->errormsg = 'ID muss eine gueltige Zahl sein';
+ return false;
+ }
+
+ $qry = "SELECT * FROM bis.tbl_bisio WHERE bisio_id='$bisio_id'";
+
+ if($result = pg_query($this->conn, $qry))
+ {
+ if($row = pg_fetch_object($result))
+ {
+ $this->bisio_id = $row->bisio_id;
+ $this->mobilitaetsprogramm_code = $row->mobilitaetsprogramm_code;
+ $this->nation_code = $row->nation_code;
+ $this->von = $row->von;
+ $this->bis = $row->bis;
+ $this->zweck_code = $row->zweck_code;
+ $this->student_uid = $row->student_uid;
+ $this->updateamum = $row->updateamum;
+ $this->updatevon = $row->updatevon;
+ $this->insertamum = $row->insertamum;
+ $this->insertvon = $row->insertvon;
+ $this->ext_id = $row->ext_id;
+
+ return true;
+ }
+ else
+ {
+ $this->errormsg = 'Datensatz wurde nicht gefunden';
+ return false;
+ }
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Laden der Daten';
+ return false;
+ }
+ }
+
+ // *******************************************
+ // * Prueft die Variablen auf Gueltigkeit
+ // * @return true wenn ok, false im Fehlerfall
+ // *******************************************
+ function validate()
+ {
+ if(!is_numeric($this->mobilitaetsprogramm_code))
+ {
+ $this->errormsg = 'Mobilitaetsprogramm ist ungueltig';
+ return false;
+ }
+
+ if(strlen($this->nation_code)>3)
+ {
+ $this->errormsg = 'Nation ist ungueltig';
+ return false;
+ }
+
+ if(strlen($this->zweck_code)>20)
+ {
+ $this->errormsg = 'Zweck ist ungueltig';
+ return false;
+ }
+
+ if(strlen($this->student_uid)>16)
+ {
+ $this->errormsg = 'Student_UID ist ungueltig';
+ return false;
+ }
+
+ if($this->von!='' && !ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->von))
+ {
+ $this->errormsg = 'VON-Datum hat ein ungueltiges Format';
+ return false;
+ }
+
+ if($this->bis!='' && !ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->bis))
+ {
+ $this->errormsg = 'BIS-Datum hat ein ungueltiges Format';
+ return false;
+ }
+
+ return true;
+ }
+
+ // ************************************************
+ // * wenn $var '' ist wird "null" zurueckgegeben
+ // * wenn $var !='' ist werden datenbankkritische
+ // * Zeichen mit backslash versehen und das Ergebnis
+ // * unter Hochkomma gesetzt.
+ // ************************************************
+ function addslashes($var)
+ {
+ return ($var!=''?"'".addslashes($var)."'":'null');
+ }
+
+ // ***********************************************************************
+ // * 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 $kontakt_id aktualisiert
+ // * @param $new true wenn insert false wenn update
+ // * @return true wenn ok, false im Fehlerfall
+ // ***********************************************************************
+ function save($new=null)
+ {
+ //Variablen pruefen
+ if(!$this->validate())
+ return false;
+
+ if($new==null)
+ $new = $this->new;
+
+ if($new)
+ {
+ //Neuen Datensatz einfuegen
+
+ $qry='BEGIN;INSERT INTO bis.tbl_bisio (mobilitaetsprogramm_code, nation_code, von, bis, zweck_code, student_uid, updateamum, updatevon, insertamum, insertvon, ext_id) VALUES('.
+ $this->addslashes($this->mobilitaetsprogramm_code).', '.
+ $this->addslashes($this->nation_code).', '.
+ $this->addslashes($this->von).', '.
+ $this->addslashes($this->bis).', '.
+ $this->addslashes($this->zweck_code).', '.
+ $this->addslashes($this->student_uid).', '.
+ $this->addslashes($this->updateamum).', '.
+ $this->addslashes($this->updatevon).', '.
+ $this->addslashes($this->insertamum).', '.
+ $this->addslashes($this->insertvon).', '.
+ $this->addslashes($this->ext_id).');';
+ }
+ else
+ {
+ //Updaten des bestehenden Datensatzes
+ $qry = 'UPDATE bis.tbl_bisio SET '.
+ ' mobilitaetsprogramm_code='.$this->addslashes($this->mobilitaetsprogramm_code).','.
+ ' nation_code='.$this->addslashes($this->nation_code).','.
+ ' von='.$this->addslashes($this->von).','.
+ ' bis='.$this->addslashes($this->bis).','.
+ ' zweck_code='.$this->addslashes($this->zweck_code).','.
+ ' student_uid='.$this->addslashes($this->student_uid).','.
+ ' updateamum='.$this->addslashes($this->updateamum).','.
+ ' updatevon='.$this->addslashes($this->updatevon).','.
+ ' ext_id='.$this->addslashes($this->ext_id).
+ " WHERE bisio_id='".addslashes($this->bisio_id)."';";
+ }
+ //echo $qry;
+
+ if(pg_query($this->conn, $qry))
+ {
+ if($new)
+ {
+ $qry = "SELECT currval('bis.tbl_bisio_bisio_id_seq') as id";
+ if($result = pg_query($this->conn, $qry))
+ {
+ if($row = pg_fetch_object($result))
+ {
+ $this->bisio_id = $row->id;
+ pg_query($this->conn, 'COMMIT;');
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Auslesen der Sequence';
+ pg_query($this->conn, 'ROLLBACK;');
+ return false;
+ }
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Auslesen der Sequence';
+ pg_query($this->conn, 'ROLLBACK;');
+ return false;
+ }
+ }
+ return true;
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Speichern der Daten';
+ return true;
+ }
+ }
+
+ // ********************************************************
+ // * Loescht den Datenensatz mit der ID die uebergeben wird
+ // * @param bisio_id ID die geloescht werden soll
+ // * @return true wenn ok, false im Fehlerfall
+ // ********************************************************
+ function delete($bisio_id)
+ {
+ if(!is_numeric($bisio_id))
+ {
+ $this->errormsg = 'ID ist ungueltig';
+ return false;
+ }
+
+ $qry = "DELETE FROM bis.tbl_bisio WHERE bisio_id='$bisio_id'";
+
+ if(pg_query($this->conn, $qry))
+ return true;
+ else
+ {
+ $this->errormsg = 'Fehler beim Loeschen des Datensatzes';
+ return false;
+ }
+ }
+
+ // *****************************************
+ // * Liefert alle Incomming/Outgoing
+ // * Eintraege eines Studenten
+ // * @param $uid
+ // * @return true wenn ok, false wenn fehler
+ // *****************************************
+ function getIO($uid)
+ {
+ $qry = "SELECT tbl_bisio.*,
+ tbl_mobilitaetsprogramm.kurzbz as mobilitaetsprogramm_kurzbz,
+ tbl_zweck.bezeichnung as zweck_bezeichnung
+ FROM
+ bis.tbl_bisio,
+ bis.tbl_zweck,
+ bis.tbl_mobilitaetsprogramm
+ WHERE
+ student_uid='".addslashes($uid)."' AND
+ tbl_zweck.zweck_code=tbl_bisio.zweck_code AND
+ tbl_mobilitaetsprogramm.mobilitaetsprogramm_code=tbl_bisio.mobilitaetsprogramm_code
+ ORDER BY bis";
+
+ if($result = pg_query($this->conn, $qry))
+ {
+ while($row = pg_fetch_object($result))
+ {
+ $io = new bisio($this->conn, null, null);
+
+ $io->bisio_id = $row->bisio_id;
+ $io->mobilitaetsprogramm_code = $row->mobilitaetsprogramm_code;
+ $io->mobilitaetsprogramm_kurzbz = $row->mobilitaetsprogramm_kurzbz;
+ $io->nation_code = $row->nation_code;
+ $io->von = $row->von;
+ $io->bis = $row->bis;
+ $io->zweck_code = $row->zweck_code;
+ $io->zweck_bezeichnung = $row->zweck_bezeichnung;
+ $io->student_uid = $row->student_uid;
+ $io->updateamum = $row->updateamum;
+ $io->udpatevon = $row->updatevon;
+ $io->insertamum = $row->insertamum;
+ $io->insertvon = $row->insertvon;
+ $io->ext_id = $row->ext_id;
+
+ $this->result[] = $io;
+ }
+ return true;
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Laden der Daten';
+ return false;
+ }
+ }
+
+}
+?>
\ No newline at end of file
diff --git a/rdf/bisio.rdf.php b/rdf/bisio.rdf.php
new file mode 100644
index 000000000..c150163b8
--- /dev/null
+++ b/rdf/bisio.rdf.php
@@ -0,0 +1,108 @@
+,
+ * Andreas Oesterreicher and
+ * Rudolf Hangl .
+ */
+
+// header für no cache
+header("Cache-Control: no-cache");
+header("Cache-Control: post-check=0, pre-check=0",false);
+header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
+header("Pragma: no-cache");
+// content type setzen
+header("Content-type: application/xhtml+xml");
+require_once('../vilesci/config.inc.php');
+require_once('../include/bisio.class.php');
+
+echo '';
+
+// Datenbank Verbindung
+if (!$conn = pg_pconnect(CONN_STRING))
+ $error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!';
+
+if(isset($_GET['uid']))
+ $uid = $_GET['uid'];
+else
+ $uid = null;
+
+if(isset($_GET['bisio_id']))
+ $bisio_id = $_GET['bisio_id'];
+else
+ $bisio_id = null;
+
+
+$rdf_url='http://www.technikum-wien.at/bisio';
+
+echo '
+
+
+';
+
+//Daten holen
+$ioobj = new bisio($conn);
+
+//Wenn die UID uebergeben wurde, dann werden alle
+//Eintraege dieser Person geladen
+if($uid)
+{
+ if($ioobj->getIO($uid))
+ {
+ foreach ($ioobj->result as $row)
+ draw_content($row);
+ }
+ else
+ die($ioobj->errormsg);
+}
+elseif($bisio_id)
+{
+ //Wenn nur die ID uebergeben wurde, dann wird nur
+ //dieser eine Datensatz geladen
+ if($ioobj->load($bisio_id))
+ draw_content($ioobj);
+ else
+ die($ioobj->errormsg);
+}
+else
+ die('Falsche Parameteruebergabe');
+
+function draw_content($row)
+{
+ global $rdf_url;
+
+ echo '
+
+
+ bisio_id.']]>
+ mobilitaetsprogramm_code.']]>
+ mobilitaetsprogramm_kurzbz.']]>
+ nation_code.']]>
+ von.']]>
+ bis.']]>
+ zweck_code.']]>
+ zweck_bezeichnung.']]>
+ student_uid.']]>
+
+ ';
+}
+?>
+
+
\ No newline at end of file
diff --git a/rdf/lehrstunde.rdf.php b/rdf/lehrstunde.rdf.php
index d86cf193b..31f1fc2ea 100644
--- a/rdf/lehrstunde.rdf.php
+++ b/rdf/lehrstunde.rdf.php
@@ -95,7 +95,7 @@ else
$error_msg='';
if (!$conn = pg_pconnect(CONN_STRING))
$error_msg.='Es konnte keine Verbindung zum Server aufgebaut werden!';
-$error_msg.=loadVariables($conn,$REMOTE_USER);
+$error_msg.=loadVariables($conn,$uid);
//if (!isset($datum_bis))
// $datum_bis=date('Y-m-d',(mktime(0,0,1,substr($datum,5,2),substr($datum,8),substr($datum,0,4))+86400));
diff --git a/rdf/mitarbeiter.rdf.php b/rdf/mitarbeiter.rdf.php
index 2080ad709..da005a31b 100644
--- a/rdf/mitarbeiter.rdf.php
+++ b/rdf/mitarbeiter.rdf.php
@@ -35,11 +35,11 @@ require_once('../include/benutzer.class.php');
require_once('../include/mitarbeiter.class.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/studiengang.class.php');
+require_once('../include/functions.inc.php');
if (!$conn = pg_pconnect(CONN_STRING))
$error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!';
-
if (isset($_GET['lektor']))
$lektor=$_GET['lektor'];
else
@@ -127,7 +127,7 @@ $seq= "
if ($user)
{
$bb=new benutzerberechtigung($conn);
- if($bb->getBerechtigungen($REMOTE_USER))
+ if($bb->getBerechtigungen(get_uid()))
{
$stge=$bb->getStgKz();
$ma=$mitarbeiter->getMitarbeiterStg($lektor,$fixangestellt,$stge, 'lkt');
diff --git a/rdf/mobilitaetsprogramm.rdf.php b/rdf/mobilitaetsprogramm.rdf.php
index 25336e761..e1f0b76f6 100644
--- a/rdf/mobilitaetsprogramm.rdf.php
+++ b/rdf/mobilitaetsprogramm.rdf.php
@@ -27,26 +27,25 @@ header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
// content type setzen
header("Content-type: application/xhtml+xml");
-// xml
-echo '';
-// DAO
require_once('../vilesci/config.inc.php');
+echo '';
+
// Datenbank Verbindung
-if (!$conn = @pg_pconnect(CONN_STRING))
- $error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!';
+if (!$conn = pg_pconnect(CONN_STRING))
+ die('Es konnte keine Verbindung zum Server aufgebaut werden!');
$rdf_url='http://www.technikum-wien.at/mobilitaetsprogramm';
-?>
+echo '
-
-';
+
+$qry = "SET CLIENT_ENCODING to 'UNICODE'; SELECT * FROM bis.tbl_mobilitaetsprogramm ORDER BY kurzbz";
if($result = pg_query($conn, $qry))
{
diff --git a/rdf/xxxstpl-lehrstunde.rdf.php b/rdf/xxxstpl-lehrstunde.rdf.php
index 078c14e53..48a3f9457 100644
--- a/rdf/xxxstpl-lehrstunde.rdf.php
+++ b/rdf/xxxstpl-lehrstunde.rdf.php
@@ -41,12 +41,12 @@ while ($i<100 && isset($_GET[$name_stpl_id]))
if (!$conn = @pg_pconnect(CONN_STRING))
$error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!';
-$error_msg.=loadVariables($conn,$REMOTE_USER);
+$error_msg.=loadVariables($conn,$uid);
// Authentifizierung
-if ($uid=check_student($REMOTE_USER, $conn))
+if ($uid=check_student($uid, $conn))
$user='student';
-elseif ($uid=check_lektor($REMOTE_USER, $conn))
+elseif ($uid=check_lektor($uid, $conn))
$user='lektor';
else
die("Cannot set usertype!");
diff --git a/rdf/zweck.rdf.php b/rdf/zweck.rdf.php
index 224350583..aef989de6 100644
--- a/rdf/zweck.rdf.php
+++ b/rdf/zweck.rdf.php
@@ -27,43 +27,39 @@ header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
// content type setzen
header("Content-type: application/xhtml+xml");
-// xml
-echo '';
-// DAO
require_once('../vilesci/config.inc.php');
+echo '';
+
// Datenbank Verbindung
-if (!$conn = @pg_pconnect(CONN_STRING))
+if (!$conn = pg_pconnect(CONN_STRING))
$error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!';
$rdf_url='http://www.technikum-wien.at/zweck';
-?>
-
+echo '
-
-';
+
+$qry = "SET CLIENT_ENCODING to 'UNICODE';SELECT * FROM bis.tbl_zweck ORDER BY kurzbz";
if($result = pg_query($conn, $qry))
{
while($row = pg_fetch_object($result))
- {
-
- ?>
-
-
- zweck_code ?>]]>
- kurzbz ?>]]>
- bezeichnung ?>]]>
-
-
-
+
+ zweck_code.']]>
+ kurzbz.']]>
+ bezeichnung.']]>
+
+ ';
}
}
?>
-
+
\ No newline at end of file