mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
This commit is contained in:
@@ -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'];
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
<?php
|
||||
include('../../config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
|
||||
$adress='pam@technikum-wien.at';
|
||||
if (!isset($REMOTE_USER))
|
||||
$REMOTE_USER='pam';
|
||||
$uid=$REMOTE_USER;
|
||||
|
||||
$user=get_uid();
|
||||
|
||||
if (isset($_GET['uid']))
|
||||
$uid=$_GET['uid'];
|
||||
if (isset($_GET['stdsem']))
|
||||
$stdsem=$_GET['stdsem'];
|
||||
|
||||
if ($uid!=$REMOTE_USER)
|
||||
if ($uid!=$user)
|
||||
{
|
||||
mail($adress,"Unerlaubter Zugriff auf Lehrveranstaltungen",
|
||||
"User $REMOTE_USER hat versucht die LVAs von User $uid zu betrachten!",
|
||||
"User $user hat versucht die LVAs von User $uid zu betrachten!",
|
||||
"From: vilesci@technikum-wien.at");
|
||||
die("Keine Berechtigung!");
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
$uid = get_uid();
|
||||
|
||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||
|
||||
if(isset($_GET['type']))
|
||||
$type=$_GET['type'];
|
||||
|
||||
|
||||
@@ -30,6 +30,21 @@
|
||||
//Connection Herstellen
|
||||
if(!$conn = pg_pconnect(CONN_STRING))
|
||||
die("Fehler beim öffnen der Datenbankverbindung");
|
||||
|
||||
if(isset($_POST['cmbChoice']))
|
||||
$cmbChoice = $_POST['cmbChoice'];
|
||||
else
|
||||
$cmbChoice=null;
|
||||
|
||||
if(isset($_POST['txtSearchQuery']))
|
||||
$txtSearchQuery = $_POST['txtSearchQuery'];
|
||||
else
|
||||
$txtSearchQuery=null;
|
||||
|
||||
if(isset($_POST['do_search']))
|
||||
$do_search = $_POST['do_search'];
|
||||
else
|
||||
$do_search = null;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -181,7 +181,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/student/studentiooverlay.xul.php"?
|
||||
<tab id="student-tab-konto" label="Konto" />
|
||||
<tab id="student-tab-zeugnis" label="Zeugnis" />
|
||||
<tab id="student-tab-betriebsmittel" label="Betriebsmittel" />
|
||||
<tab id="student-tab-io" label="Incomming/Outgoing" />
|
||||
<tab id="student-tab-io" label="Incoming/Outgoing" />
|
||||
</tabs>
|
||||
<tabpanels id="student-tabpanels-main" flex="1">
|
||||
<vbox id="student-detail" style="margin-top:10px;" />
|
||||
|
||||
@@ -49,18 +49,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<!--
|
||||
<row>
|
||||
<hbox>
|
||||
<spacer flex="1" />
|
||||
<button id="student-io-button-filter" value="alle" oncommand="StudentIOFilter()" label="offene" disabled="true"/>
|
||||
</hbox>
|
||||
<spacer />
|
||||
</row>
|
||||
-->
|
||||
<row>
|
||||
<tree id="student-io-tree" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/io/liste"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/bisio/liste"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;margin-top: 10px;" height="100px" enableColumnDrag="true"
|
||||
onselect="StudentIOAuswahl()"
|
||||
context="student-io-tree-popup"
|
||||
@@ -71,27 +62,27 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
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"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-io-tree-nation_code" label="Gastnation" flex="5" hidden="false"
|
||||
<treecol id="student-io-tree-nation_code" label="Nation" flex="1" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/io/rdf#nation_code"/>
|
||||
sort="rdf:http://www.technikum-wien.at/bisio/rdf#nation_code"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-io-tree-von" label="Von" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/io/rdf#von" />
|
||||
sort="rdf:http://www.technikum-wien.at/bisio/rdf#von" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-io-tree-bis" label="Bis" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/io/rdf#bis" />
|
||||
sort="rdf:http://www.technikum-wien.at/bisio/rdf#bis" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-io-tree-zweck_kurzbz" label="Zweck" flex="2" hidden="true"
|
||||
<treecol id="student-io-tree-zweck_kurzbz" label="Zweck" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/io/rdf#zweck_bezeichnung" />
|
||||
sort="rdf:http://www.technikum-wien.at/bisio/rdf#zweck_bezeichnung" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-io-tree-bisio_id" label="bisio_id" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/io/rdf#bisio_id" />
|
||||
sort="rdf:http://www.technikum-wien.at/bisio/rdf#bisio_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
@@ -99,12 +90,12 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<treechildren flex="1" >
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/io/rdf#mobilitaetsprogramm_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/io/rdf#nation_code"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/io/rdf#von"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/io/rdf#bis"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/io/rdf#zweck_bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/io/rdf#bisio_id"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bisio/rdf#mobilitaetsprogramm_kurzbz"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bisio/rdf#nation_code"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bisio/rdf#von"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bisio/rdf#bis"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bisio/rdf#zweck_bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/bisio/rdf#bisio_id"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
@@ -117,7 +108,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
<label value="Neu"/>
|
||||
<checkbox id="student-io-detail-checkbox-new" checked="true" />
|
||||
<checkbox id="student-io-detail-checkbox-neu" checked="true" />
|
||||
<label value="Uid"/>
|
||||
<textbox id="student-io-detail-textbox-uid" disabled="true"/>
|
||||
<label value="BisIO ID"/>
|
||||
@@ -134,7 +125,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<row>
|
||||
<label value="Von" control="student-io-textbox-von"/>
|
||||
<hbox>
|
||||
<textbox id="student-io-textbox-von" disabled="true" maxlength="9" size="9"/>
|
||||
<textbox id="student-io-textbox-von" disabled="true" maxlength="10" size="10"/>
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
</row>
|
||||
@@ -153,7 +144,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/mobilitaetsprogramm/rdf#mobilitaetsprogramm_code"
|
||||
label="rdf:http://www.technikum-wien.at/mobilitaetsprogramm/rdf#mobilitaetsprogramm_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/mobilitaetsprogramm/rdf#kurzbz"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
@@ -181,7 +172,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/zweck/rdf#zweck_code"
|
||||
label="rdf:http://www.technikum-wien.at/zweck/rdf#kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/zweck/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
|
||||
@@ -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='<?php echo APP_ROOT;?>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 = '<?php echo APP_ROOT ?>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 = '<?php echo APP_ROOT ?>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<items;i++)
|
||||
{
|
||||
//ID der row holen
|
||||
col = tree.columns ? tree.columns["student-io-tree-bisio_id"] : "student-io-tree-bisio_id";
|
||||
var bisio_id=tree.view.getCellText(i,col);
|
||||
|
||||
//wenn dies die zu selektierende Zeile
|
||||
if(bisio_id == StudentIOSelectID)
|
||||
{
|
||||
//Zeile markieren
|
||||
tree.view.selection.select(i);
|
||||
//Sicherstellen, dass die Zeile im sichtbaren Bereich liegt
|
||||
tree.treeBoxObject.ensureRowIsVisible(i);
|
||||
StudentIOSelectID=null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,346 @@
|
||||
<?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> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,108 @@
|
||||
<?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> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
// 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 '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
|
||||
// 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 '
|
||||
<RDF:RDF
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:IO="'.$rdf_url.'/rdf#"
|
||||
>
|
||||
<RDF:Seq about="'.$rdf_url.'/liste">
|
||||
';
|
||||
|
||||
//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 '
|
||||
<RDF:li>
|
||||
<RDF:Description id="'.$row->bisio_id.'" about="'.$rdf_url.'/'.$row->bisio_id.'" >
|
||||
<IO:bisio_id><![CDATA['.$row->bisio_id.']]></IO:bisio_id>
|
||||
<IO:mobilitaetsprogramm_code><![CDATA['.$row->mobilitaetsprogramm_code.']]></IO:mobilitaetsprogramm_code>
|
||||
<IO:mobilitaetsprogramm_kurzbz><![CDATA['.$row->mobilitaetsprogramm_kurzbz.']]></IO:mobilitaetsprogramm_kurzbz>
|
||||
<IO:nation_code><![CDATA['.$row->nation_code.']]></IO:nation_code>
|
||||
<IO:von><![CDATA['.$row->von.']]></IO:von>
|
||||
<IO:bis><![CDATA['.$row->bis.']]></IO:bis>
|
||||
<IO:zweck_code><![CDATA['.$row->zweck_code.']]></IO:zweck_code>
|
||||
<IO:zweck_bezeichnung><![CDATA['.$row->zweck_bezeichnung.']]></IO:zweck_bezeichnung>
|
||||
<IO:student_uid><![CDATA['.$row->student_uid.']]></IO:student_uid>
|
||||
</RDF:Description>
|
||||
</RDF:li>';
|
||||
}
|
||||
?>
|
||||
</RDF:Seq>
|
||||
</RDF:RDF>
|
||||
@@ -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));
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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 '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
// DAO
|
||||
require_once('../vilesci/config.inc.php');
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
|
||||
// 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 '
|
||||
<RDF:RDF
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:MOB="<?php echo $rdf_url; ?>/rdf#"
|
||||
xmlns:MOB="'.$rdf_url.'/rdf#"
|
||||
>
|
||||
<RDF:Seq about="<?php echo $rdf_url ?>/liste">
|
||||
<?php
|
||||
$qry = "SELECT * FROM bis.tbl_mobilitaetsprogramm ORDER BY kurzbz";
|
||||
<RDF:Seq about="'.$rdf_url.'/liste">';
|
||||
|
||||
$qry = "SET CLIENT_ENCODING to 'UNICODE'; SELECT * FROM bis.tbl_mobilitaetsprogramm ORDER BY kurzbz";
|
||||
|
||||
if($result = pg_query($conn, $qry))
|
||||
{
|
||||
|
||||
@@ -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!");
|
||||
|
||||
+18
-22
@@ -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 '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
// DAO
|
||||
require_once('../vilesci/config.inc.php');
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
|
||||
// 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 '
|
||||
<RDF:RDF
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:ZWECK="<?php echo $rdf_url; ?>/rdf#"
|
||||
xmlns:ZWECK="'.$rdf_url.'/rdf#"
|
||||
>
|
||||
<RDF:Seq about="<?php echo $rdf_url ?>/liste">
|
||||
<?php
|
||||
$qry = "SELECT * FROM bis.tbl_zweck ORDER BY kurzbz";
|
||||
<RDF:Seq about="'.$rdf_url.'/liste">';
|
||||
|
||||
$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))
|
||||
{
|
||||
|
||||
?>
|
||||
<RDF:li>
|
||||
<RDF:Description id="<?php echo $row->zweck_code; ?>" about="<?php echo $rdf_url.'/'.$row->zweck_code; ?>" >
|
||||
<ZWECK:zweck_code><![CDATA[<?php echo $row->zweck_code ?>]]></ZWECK:zweck_code>
|
||||
<ZWECK:kurzbz><![CDATA[<?php echo $row->kurzbz ?>]]></ZWECK:kurzbz>
|
||||
<ZWECK:bezeichnung><![CDATA[<?php echo $row->bezeichnung ?>]]></ZWECK:bezeichnung>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
<?php
|
||||
{
|
||||
echo '
|
||||
<RDF:li>
|
||||
<RDF:Description id="'.$row->zweck_code.'" about="'.$rdf_url.'/'.$row->zweck_code.'" >
|
||||
<ZWECK:zweck_code><![CDATA['.$row->zweck_code.']]></ZWECK:zweck_code>
|
||||
<ZWECK:kurzbz><![CDATA['.$row->kurzbz.']]></ZWECK:kurzbz>
|
||||
<ZWECK:bezeichnung><![CDATA['.$row->bezeichnung.']]></ZWECK:bezeichnung>
|
||||
</RDF:Description>
|
||||
</RDF:li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</RDF:Seq>
|
||||
</RDF:RDF>
|
||||
</RDF:RDF>
|
||||
Reference in New Issue
Block a user