mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 17:32:18 +00:00
Studenten-Modul Erweiterungen
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
<?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>.
|
||||
*/
|
||||
|
||||
// Oberflaeche zur Aenderung von Beispielen und Upload von Bildern
|
||||
require_once('../vilesci/config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/person.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
|
||||
echo "<html><body>";
|
||||
//wandelt einen String in HEX-Werte um
|
||||
function strhex($string)
|
||||
{
|
||||
$hex="";
|
||||
for ($i=0;$i<strlen($string);$i++)
|
||||
$hex.=(strlen(dechex(ord($string[$i])))<2)? "0".dechex(ord($string[$i])): dechex(ord($string[$i]));
|
||||
return $hex;
|
||||
}
|
||||
|
||||
//Connection Herstellen
|
||||
if(!$conn = pg_pconnect(CONN_STRING))
|
||||
die('Fehler beim oeffnen der Datenbankverbindung');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
$rechte = new benutzerberechtigung($conn);
|
||||
$rechte->getBerechtigungen($user);
|
||||
if(!$rechte->isBerechtigt('admin'))
|
||||
die('Keine Berechtigung');
|
||||
//Bei Upload des Bildes
|
||||
if(isset($_POST['submitbild']))
|
||||
{
|
||||
if(isset($_FILES['bild']['tmp_name']))
|
||||
{
|
||||
//Extension herausfiltern
|
||||
$ext = explode('.',$_FILES['bild']['name']);
|
||||
$ext = strtolower($ext[count($ext)-1]);
|
||||
|
||||
//--check that it's a jpeg or gif or png
|
||||
if ($ext=='gif' || $ext=='png' || $ext=='jpg' || $ext=='jpeg')
|
||||
{
|
||||
$filename = $_FILES['bild']['tmp_name'];
|
||||
//File oeffnen
|
||||
$fp = fopen($filename,'r');
|
||||
//auslesen
|
||||
$content = fread($fp, filesize($filename));
|
||||
fclose($fp);
|
||||
//in HEX-Werte umrechnen
|
||||
$content = strhex($content);
|
||||
|
||||
$person = new person($conn);
|
||||
if($person->load($_GET['person_id']))
|
||||
{
|
||||
//HEX Wert in die Datenbank speichern
|
||||
$person->foto = $content;
|
||||
$person->new = false;
|
||||
if($person->save())
|
||||
echo "<b>Bild wurde erfolgreich gespeichert</b><script language='Javascript'>opener.StudentAuswahl(); window.close();</script><br />";
|
||||
else
|
||||
echo '<b>'.$person->errormsg.'</b><br />';
|
||||
}
|
||||
else
|
||||
echo '<b>'.$person->errormsg.'</b><br />';
|
||||
}
|
||||
else
|
||||
echo "<b>File ist kein gueltiges Bild</b><br />";
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_GET['person_id']))
|
||||
{
|
||||
echo " <form method='POST' enctype='multipart/form-data' action='$PHP_SELF?person_id=".$_GET['person_id']."'>
|
||||
Bild: <input type='file' name='bild' />
|
||||
<input type='submit' name='submitbild' value='Upload' />
|
||||
</form>
|
||||
</td></tr>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Es wurde keine Person_id angegeben";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,152 @@
|
||||
<?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>.
|
||||
*/
|
||||
|
||||
// ****************************************
|
||||
// * Insert/Update/Delete
|
||||
// * der Studenten
|
||||
// *
|
||||
// * Script sorgt fuer den Datenbanzugriff
|
||||
// * fuer das XUL - Studenten-Modul
|
||||
// *
|
||||
// ****************************************
|
||||
|
||||
require_once('../../vilesci/config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/log.class.php');
|
||||
require_once('../../include/person.class.php');
|
||||
require_once('../../include/benutzer.class.php');
|
||||
require_once('../../include/student.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
// Datenbank Verbindung
|
||||
if (!$conn = @pg_pconnect(CONN_STRING))
|
||||
$error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!';
|
||||
|
||||
$return = false;
|
||||
$errormsg = 'unknown';
|
||||
$data = '';
|
||||
$error = false;
|
||||
|
||||
//Berechtigungen laden
|
||||
$rechte = new benutzerberechtigung($conn);
|
||||
$rechte->getBerechtigungen($user);
|
||||
if(!$rechte->isBerechtigt('admin'))
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = 'Keine Berechtigung';
|
||||
$data = '';
|
||||
$error = true;
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
|
||||
if(isset($_POST['type']) && $_POST['type']=='savestudent')
|
||||
{
|
||||
//Studentendaten Speichern
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
$student = new student($conn, null, true);
|
||||
|
||||
if(!$student->load($_POST['uid']))
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = 'Fehler beim laden:'.$student->errormsg;
|
||||
$error = true;
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
$student->uid = $_POST['uid'];
|
||||
$student->anrede = $_POST['anrede'];
|
||||
$student->titelpre = $_POST['titelpre'];
|
||||
$student->titelpost = $_POST['titelpost'];
|
||||
$student->vorname = $_POST['vorname'];
|
||||
$student->vornamen = $_POST['vornamen'];
|
||||
$student->nachname = $_POST['nachname'];
|
||||
$student->gebdatum = $_POST['geburtsdatum'];
|
||||
$student->gebort = $_POST['geburtsort'];
|
||||
$student->gebzeit = $_POST['geburtszeit'];
|
||||
$student->anmerkung = $_POST['anmerkung'];
|
||||
$student->homepage = $_POST['homepage'];
|
||||
$student->svnr = $_POST['svnr'];
|
||||
$student->ersatzkennzeichen = $_POST['ersatzkennzeichen'];
|
||||
$student->familienstand = $_POST['familienstand'];
|
||||
$student->geschlecht = $_POST['geschlecht'];
|
||||
$student->aktiv = ($_POST['aktiv']=='true'?true:false);
|
||||
$student->anzahlderkinder = $_POST['anzahlderkinder'];
|
||||
$student->staatsbuergerschaft = $_POST['staatsbuergerschaft'];
|
||||
$student->geburtsnation = $_POST['geburtsnation'];
|
||||
$student->sprache = $_POST['sprache'];
|
||||
$student->matrikelnr = $_POST['matrikelnummer'];
|
||||
$student->studiengang_kz = $_POST['studiengang_kz'];
|
||||
$student->semester = $_POST['semester'];
|
||||
$student->verband = $_POST['verband'];
|
||||
$student->gruppe = $_POST['gruppe'];
|
||||
|
||||
$student->new=false;
|
||||
|
||||
if(!$error)
|
||||
{
|
||||
if($student->save())
|
||||
{
|
||||
$return = true;
|
||||
$error=false;
|
||||
$data = $student->uid;
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = $student->errormsg;
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = 'Unkown type: '.$_POST['type'];
|
||||
$data = '';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<RDF:RDF
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:NC="http://home.netscape.com/NC-rdf#"
|
||||
xmlns:DBDML="http://www.technikum-wien.at/dbdml/rdf#"
|
||||
>
|
||||
<RDF:Seq RDF:about="http://www.technikum-wien.at/dbdml/msg">
|
||||
<RDF:li>
|
||||
<RDF:Description RDF:about="http://www.technikum-wien.at/dbdml/0" >
|
||||
<DBDML:return><?php echo ($return?'true':'false'); ?></DBDML:return>
|
||||
<DBDML:errormsg><![CDATA[<?php echo $errormsg; ?>]]></DBDML:errormsg>
|
||||
<DBDML:data><![CDATA[<?php echo $data ?>]]></DBDML:data>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
</RDF:Seq>
|
||||
</RDF:RDF>
|
||||
@@ -34,12 +34,19 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
>
|
||||
<!-- Student DETAILS -->
|
||||
<vbox id="student-detail" style="margin:0px;">
|
||||
<hbox style="background:#eeeeee;margin:0px;padding:2px">
|
||||
<label value="Details" style="font-size:12pt;font-weight:bold;margin-top:5px;" flex="1" />
|
||||
<spacer flex="1" />
|
||||
<button id="student-detail-button-save" label="Speichern" oncommand="StudentDetailSave();" disabled="true"/>
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
<label value="Neu"/>
|
||||
<checkbox id="student-detail-checkbox-new" checked="true" />
|
||||
<label value="Person_id"/>
|
||||
<textbox id="student-detail-textbox-person_id" disabled="true"/>
|
||||
</vbox>
|
||||
<hbox flex="1">
|
||||
<grid id="student-detail-grid" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
@@ -51,46 +58,52 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<row>
|
||||
<label value="UID" control="student-detail-textbox-uid"/>
|
||||
<textbox id="student-detail-textbox-uid" disabled="true"/>
|
||||
</row>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Anrede" control="student-detail-textbox-anrede"/>
|
||||
<textbox id="student-detail-textbox-anrede" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-anrede" disabled="true" maxlength="16" size="16"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="TitelPre" control="student-detail-textbox-titelpre"/>
|
||||
<textbox id="student-detail-textbox-titelpre" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-titelpre" disabled="true" maxlength="64" size="64"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="TitelPost" control="student-detail-textbox-titelpost"/>
|
||||
<textbox id="student-detail-textbox-titelpost" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-titelpost" disabled="true" maxlength="32"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Vorname" control="student-detail-textbox-vorname"/>
|
||||
<textbox id="student-detail-textbox-vorname" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-vorname" disabled="true" maxlength="32"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Vornamen" control="student-detail-textbox-vornamen"/>
|
||||
<textbox id="student-detail-textbox-vornamen" disabled="true" />
|
||||
<textbox id="student-detail-textbox-vornamen" disabled="true" maxlength="128"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Nachname" control="student-detail-textbox-nachname"/>
|
||||
<textbox id="student-detail-textbox-nachname" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-nachname" disabled="true" maxlength="64"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Geburtsdatum" control="student-detail-textbox-geburtsdatum"/>
|
||||
<textbox id="student-detail-textbox-geburtsdatum" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-geburtsdatum" disabled="true" maxlength="10"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Geburtsort" control="student-detail-textbox-geburtsort"/>
|
||||
<textbox id="student-detail-textbox-geburtsort" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-geburtsort" disabled="true" maxlength="128"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Geburtszeit" control="student-detail-textbox-geburtszeit"/>
|
||||
<textbox id="student-detail-textbox-geburtszeit" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-geburtszeit" disabled="true" maxlength="5"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Foto" />
|
||||
<hbox><image src='' id="student-detail-image" width='60' height='60'/><spacer flex="1" /></hbox>
|
||||
<hbox>
|
||||
<image src='' id="student-detail-image" width='60' height='60'/>
|
||||
<vbox>
|
||||
<button id="student-detail-button-image-upload" label="Bild upload" oncommand="StudentImageUpload();" disabled="true"/>
|
||||
</vbox>
|
||||
<spacer flex="1" />
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Anmerkung" control="student-detail-textbox-anmerkung"/>
|
||||
@@ -98,15 +111,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</row>
|
||||
<row>
|
||||
<label value="Homepage" control="student-detail-textbox-homepage"/>
|
||||
<textbox id="student-detail-textbox-homepage" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-homepage" disabled="true" maxlength="256"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="SVNR" control="student-detail-textbox-svnr"/>
|
||||
<textbox id="student-detail-textbox-svnr" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-svnr" disabled="true" maxlength="10"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Ersatzkennzeichen" control="student-detail-textbox-ersatzkennzeichen"/>
|
||||
<textbox id="student-detail-textbox-ersatzkennzeichen" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-ersatzkennzeichen" disabled="true" maxlength="10"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Familienstand" control="student-detail-menulist-familienstand"/>
|
||||
@@ -134,7 +147,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</row>
|
||||
<row>
|
||||
<label value="Anzahl der Kinder" control="student-detail-textbox-anzahlderkinder"/>
|
||||
<textbox id="student-detail-textbox-anzahlderkinder" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-anzahlderkinder" disabled="true" maxlength="2"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Staatsbuergerschaft" control="student-detail-menulist-staatsbuergerschaft"/>
|
||||
@@ -180,10 +193,95 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
</row>
|
||||
<row>
|
||||
<label value="Matrikelnummer" control="student-detail-textbox-matrikelnummer"/>
|
||||
<textbox id="student-detail-textbox-matrikelnummer" disabled="true"/>
|
||||
<textbox id="student-detail-textbox-matrikelnummer" disabled="true" maxlength="15"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Studiengang" control="student-detail-textbox-studiengang_kz"/>
|
||||
<textbox id="student-detail-textbox-studiengang_kz" disabled="true" maxlength="4"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Semester" control="student-detail-textbox-semester"/>
|
||||
<textbox id="student-detail-textbox-semester" disabled="true" maxlength="1"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Verband" control="student-detail-textbox-verband"/>
|
||||
<textbox id="student-detail-textbox-verband" disabled="true" maxlength="1"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Gruppe" control="student-detail-textbox-gruppe"/>
|
||||
<textbox id="student-detail-textbox-gruppe" disabled="true" maxlength="1"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<!-- STUDENT PREStudent -->
|
||||
<vbox id="student-prestudent" style="margin:0px;">
|
||||
<hbox style="background:#eeeeee;margin:0px;padding:2px">
|
||||
<label value="Details" style="font-size:12pt;font-weight:bold;margin-top:5px;" flex="1" />
|
||||
<spacer flex="1" />
|
||||
<button id="student-prestudent-button-save" label="Speichern" oncommand="StudentPrestudentSave();" disabled="true"/>
|
||||
</hbox>
|
||||
<vbox hidden="true">
|
||||
<label value="Neu"/>
|
||||
<checkbox id="student-prestudent-checkbox-new" checked="true" />
|
||||
<label value="Person_id"/>
|
||||
<textbox id="student-prestudent-textbox-person_id" disabled="true"/>
|
||||
</vbox>
|
||||
<hbox flex="1">
|
||||
<grid id="student-prestudent-grid" style="overflow:auto;margin:4px;" flex="1">
|
||||
<columns >
|
||||
<column flex="1"/>
|
||||
<column flex="5"/>
|
||||
<column flex="3"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="Aufmerksam durch" control="student-prestudent-menulist-aufmerksamdurch"/>
|
||||
<menulist id="student-prestudent-menulist-aufmerksamdurch" disabled="false"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/aufmerksamdurch.rdf.php" flex="1"
|
||||
ref="http://www.technikum-wien.at/aufmerksamdurch/alle" >
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/aufmerksamdurch/rdf#aufmerksamdurch_kurzbz"
|
||||
label="rdf:http://www.technikum-wien.at/aufmerksamdurch/rdf#aufmerksamdurch_kurzbz"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Berufstaetigkeit" control="student-prestudent-menulist-berufstaetigkeit"/>
|
||||
<menulist id="student-prestudent-menulist-berufstaetigkeit" disabled="false"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/berufstaetigkeit.rdf.php" flex="1"
|
||||
ref="http://www.technikum-wien.at/berufstaetigkeit/alle" >
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/berufstaetigkeit/rdf#bezeichnung"
|
||||
label="rdf:http://www.technikum-wien.at/berufstaetigkeit/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<label value="Ausbildung" control="student-prestudent-menulist-ausbildung"/>
|
||||
<menulist id="student-prestudent-menulist-berufstaetigkeit" disabled="false"
|
||||
datasources="<?php echo APP_ROOT ?>rdf/berufstaetigkeit.rdf.php" flex="1"
|
||||
ref="http://www.technikum-wien.at/berufstaetigkeit/alle" >
|
||||
<template>
|
||||
<menupopup>
|
||||
<menuitem value="rdf:http://www.technikum-wien.at/berufstaetigkeit/rdf#bezeichnung"
|
||||
label="rdf:http://www.technikum-wien.at/berufstaetigkeit/rdf#bezeichnung"
|
||||
uri="rdf:*"/>
|
||||
</menupopup>
|
||||
</template>
|
||||
</menulist>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
</overlay>
|
||||
@@ -47,8 +47,8 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/student/studentdetailoverlay.xul.p
|
||||
<hbox>
|
||||
<toolbox flex="1">
|
||||
<toolbar id="nav-toolbar">
|
||||
<toolbarbutton id="student-toolbar-neu" label="Neue Lehreinheit" oncommand="StudentNeu();" disabled="true" image="../skin/images/NeuDokument.png" tooltiptext="Student neu anlegen" />
|
||||
<toolbarbutton id="student-toolbar-del" label="Löschen" oncommand="StudentDelete();" disabled="true" image="../skin/images/DeleteIcon.png" tooltiptext="Student löschen"/>
|
||||
<!--<toolbarbutton id="student-toolbar-neu" label="Neuer Student" oncommand="StudentNeu();" disabled="true" image="../skin/images/NeuDokument.png" tooltiptext="Student neu anlegen" />-->
|
||||
<!--<toolbarbutton id="student-toolbar-del" label="Löschen" oncommand="StudentDelete();" disabled="true" image="../skin/images/DeleteIcon.png" tooltiptext="Student löschen"/>-->
|
||||
<toolbarbutton id="student-toolbar-refresh" label="Neu laden" oncommand="StudentTreeRefresh()" disabled="false" image="../skin/images/refresh.png" tooltiptext="Liste neu laden"/>
|
||||
<spacer flex="1"/>
|
||||
<label id="student-toolbar-label-anzahl"/>
|
||||
@@ -162,9 +162,11 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/student/studentdetailoverlay.xul.p
|
||||
<tabbox id="student-tabbox" flex="3" orient="vertical">
|
||||
<tabs orient="horizontal" id="lehrveranstaltung-tabs">
|
||||
<tab id="student-tab-detail" label="Details" />
|
||||
<tab id="student-tab-prestudent" label="PreStudent" />
|
||||
</tabs>
|
||||
<tabpanels id="student-tabpanels-main" flex="1">
|
||||
<vbox id="student-detail" style="margin-top:10px;" />
|
||||
<vbox id="student-prestudent" style="margin-top:10px;" />
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</vbox>
|
||||
|
||||
@@ -224,7 +224,7 @@ function StudentDetailReset()
|
||||
// ****
|
||||
function StudentDetailDisableFields(val)
|
||||
{
|
||||
document.getElementById('student-detail-textbox-uid').disabled=val;
|
||||
//document.getElementById('student-detail-textbox-uid').disabled=val;
|
||||
document.getElementById('student-detail-textbox-anrede').disabled=val;
|
||||
document.getElementById('student-detail-textbox-titelpre').disabled=val;
|
||||
document.getElementById('student-detail-textbox-titelpost').disabled=val;
|
||||
@@ -246,6 +246,11 @@ function StudentDetailDisableFields(val)
|
||||
document.getElementById('student-detail-menulist-geburtsnation').disabled=val;
|
||||
document.getElementById('student-detail-menulist-sprache').disabled=val;
|
||||
document.getElementById('student-detail-textbox-matrikelnummer').disabled=val;
|
||||
document.getElementById('student-detail-button-image-upload').disabled=val;
|
||||
document.getElementById('student-detail-textbox-studiengang_kz').disabled=val;
|
||||
document.getElementById('student-detail-textbox-semester').disabled=val;
|
||||
document.getElementById('student-detail-textbox-verband').disabled=val;
|
||||
document.getElementById('student-detail-textbox-gruppe').disabled=val;
|
||||
}
|
||||
|
||||
// ****
|
||||
@@ -276,8 +281,13 @@ function StudentDetailSave()
|
||||
geburtsnation = document.getElementById('student-detail-menulist-geburtsnation').value;
|
||||
sprache = document.getElementById('student-detail-menulist-sprache').value;
|
||||
matrikelnummer = document.getElementById('student-detail-textbox-matrikelnummer').value;
|
||||
studiengang_kz = document.getElementById('student-detail-textbox-studiengang_kz').value;
|
||||
semester = document.getElementById('student-detail-textbox-semester').value;
|
||||
verband = document.getElementById('student-detail-textbox-verband').value;
|
||||
gruppe = document.getElementById('student-detail-textbox-gruppe').value;
|
||||
|
||||
var req = new phpRequest('student/studentDBDML.php','','');
|
||||
var url = '<?php echo APP_ROOT ?>content/student/studentDBDML.php';
|
||||
var req = new phpRequest(url,'','');
|
||||
neu = document.getElementById('student-detail-checkbox-new').checked;
|
||||
|
||||
if (neu)
|
||||
@@ -313,11 +323,15 @@ function StudentDetailSave()
|
||||
req.add('geburtsnation', geburtsnation);
|
||||
req.add('sprache', sprache);
|
||||
req.add('matrikelnummer', matrikelnummer);
|
||||
req.add('studiengang_kz', studiengang_kz);
|
||||
req.add('semester', semester);
|
||||
req.add('verband', verband);
|
||||
req.add('gruppe', gruppe);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
|
||||
if (!val.dbdml_return)
|
||||
{
|
||||
alert(val.dbdml_errormsg)
|
||||
@@ -333,6 +347,17 @@ function StudentDetailSave()
|
||||
}
|
||||
}
|
||||
|
||||
function StudentImageUpload()
|
||||
{
|
||||
person_id = document.getElementById('student-detail-textbox-person_id').value;
|
||||
if(person_id!='')
|
||||
{
|
||||
window.open('<?php echo APP_ROOT; ?>content/bildupload.php?person_id='+person_id,'Bild Upload', 'height=10,width=350,left=0,top=0,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes');
|
||||
}
|
||||
else
|
||||
alert('Es wurde keine Person ausgewaehlt');
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Auswahl eines Studenten
|
||||
// * bei Auswahl eines Studenten wird dieser geladen
|
||||
@@ -356,8 +381,8 @@ function StudentAuswahl()
|
||||
{
|
||||
//Student wurde markiert
|
||||
//loeschen button aktivieren
|
||||
document.getElementById('student-toolbar-del').disabled=false;
|
||||
StudentDetailDisableFields(false);
|
||||
document.getElementById('student-detail-button-save').disabled=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -370,7 +395,7 @@ function StudentAuswahl()
|
||||
return false;
|
||||
}
|
||||
|
||||
var url = '<?php echo APP_ROOT ?>rdf/student.rdf.php?uid='+uid;
|
||||
var url = '<?php echo APP_ROOT ?>rdf/student.rdf.php?uid='+uid+'&'+gettimestamp();
|
||||
|
||||
//hier wird GetDataSourceBlocking verwendet da sich
|
||||
//bei der Methode mit phpRequest der Mozilla aufhaengt
|
||||
@@ -417,6 +442,10 @@ function StudentAuswahl()
|
||||
sprache=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#sprache" ));
|
||||
matrikelnummer=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#matrikelnummer" ));
|
||||
person_id=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#person_id" ));
|
||||
studiengang_kz=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studiengang_kz" ));
|
||||
semester=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#semester" ));
|
||||
verband=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#verband" ));
|
||||
gruppe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#gruppe" ));
|
||||
|
||||
//Daten den Feldern zuweisen
|
||||
|
||||
@@ -436,7 +465,7 @@ function StudentAuswahl()
|
||||
document.getElementById('student-detail-textbox-ersatzkennzeichen').value=ersatzkennzeichen;
|
||||
document.getElementById('student-detail-menulist-familienstand').value=familienstand;
|
||||
document.getElementById('student-detail-menulist-geschlecht').value=geschlecht;
|
||||
if(aktiv=='Ja')
|
||||
if(aktiv=='true')
|
||||
document.getElementById('student-detail-checkbox-aktiv').checked=true;
|
||||
else
|
||||
document.getElementById('student-detail-checkbox-aktiv').checked=false;
|
||||
@@ -445,5 +474,10 @@ function StudentAuswahl()
|
||||
document.getElementById('student-detail-menulist-geburtsnation').value=geburtsnation;
|
||||
document.getElementById('student-detail-menulist-sprache').value=sprache;
|
||||
document.getElementById('student-detail-textbox-matrikelnummer').value=matrikelnummer;
|
||||
document.getElementById('student-detail-image').src='<?php echo APP_ROOT?>content/bild.php?src=person&person_id='+person_id;
|
||||
document.getElementById('student-detail-image').src='<?php echo APP_ROOT?>content/bild.php?src=person&person_id='+person_id+'&'+gettimestamp();
|
||||
document.getElementById('student-detail-textbox-person_id').value=person_id;
|
||||
document.getElementById('student-detail-textbox-studiengang_kz').value=studiengang_kz;
|
||||
document.getElementById('student-detail-textbox-semester').value=semester;
|
||||
document.getElementById('student-detail-textbox-verband').value=verband;
|
||||
document.getElementById('student-detail-textbox-gruppe').value=gruppe;
|
||||
}
|
||||
@@ -30,6 +30,7 @@ class aufmerksamdurch
|
||||
var $new; // @var boolean
|
||||
var $errormsg; // @var string
|
||||
var $done=false; // @var boolean
|
||||
var $result = array();
|
||||
|
||||
//Tabellenspalten
|
||||
Var $aufmerksamdurch_kurzbz; // @var string
|
||||
@@ -37,38 +38,69 @@ class aufmerksamdurch
|
||||
var $ext_id; // @var integer
|
||||
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param $conn Connection
|
||||
* $aufmerksamdurch_kurzbz = ID (Default=null)
|
||||
*/
|
||||
// ****
|
||||
// * Konstruktor
|
||||
// * @param $conn Connection
|
||||
// * $aufmerksamdurch_kurzbz = ID (Default=null)
|
||||
// * $unicode
|
||||
// ****
|
||||
function aufmerksamdurch($conn,$aufmerksamdurch_kurzbz=null, $unicode=false)
|
||||
{
|
||||
$this->conn = $conn;
|
||||
if ($unicode)
|
||||
if($unicode!=null)
|
||||
{
|
||||
$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 ($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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $aufmerksam_kurzbz ID
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
// *******************************************
|
||||
// * @param $aufmerksam_kurzbz ID
|
||||
// * @return true wenn ok, false im Fehlerfall
|
||||
// *******************************************
|
||||
function load($aufmerksam_kurzbz)
|
||||
{
|
||||
//noch nicht implementiert
|
||||
}
|
||||
|
||||
// *******************************************
|
||||
// * Laedt alle Datansaetze
|
||||
// * @return true wenn ok, false im Fehlerfall
|
||||
// *******************************************
|
||||
function getAll()
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_aufmerksamdurch ORDER BY aufmerksamdurch_kurzbz";
|
||||
if($result = pg_query($this->conn, $qry))
|
||||
{
|
||||
while($row = pg_fetch_object($result))
|
||||
{
|
||||
$obj = new aufmerksamdurch($this->conn, null, null);
|
||||
|
||||
$obj->aufmerksamdurch_kurzbz = $row->aufmerksamdurch_kurzbz;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim laden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************
|
||||
// * wenn $var '' ist wird "null" zurueckgegeben
|
||||
// * wenn $var !='' ist werden datenbankkritische
|
||||
@@ -79,12 +111,13 @@ class aufmerksamdurch
|
||||
{
|
||||
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 $schluessel_id aktualisiert
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
|
||||
// **************************************************************************
|
||||
// * 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 $schluessel_id aktualisiert
|
||||
// * @return true wenn ok, false im Fehlerfall
|
||||
// **************************************************************************
|
||||
function save()
|
||||
{
|
||||
$this->done=false;
|
||||
@@ -155,15 +188,5 @@ class aufmerksamdurch
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loescht den Datenensatz mit der ID die uebergeben wird
|
||||
* @param $aufmerksamdurch_kurzbz ID die geloescht werden soll
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
function delete($aufmerksamdurch_kurzbz)
|
||||
{
|
||||
//noch nicht implementiert!
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -40,7 +40,7 @@ class person
|
||||
var $gebdatum; // date
|
||||
var $gebort; // varchar(128)
|
||||
var $gebzeit; // time
|
||||
var $foto; // oid
|
||||
var $foto; // text
|
||||
var $anmerkungen; // varchar(256)
|
||||
var $homepage; // varchar(256)
|
||||
var $svnr; // char(10)
|
||||
@@ -208,11 +208,7 @@ class person
|
||||
$this->errormsg = "*****\nGeburtsort darf nicht laenger als 128 Zeichen sein: ".$this->nachname.", ".$this->vorname."\n*****\n";
|
||||
return false;
|
||||
}
|
||||
if($this->foto!='' && !is_numeric($this->foto))
|
||||
{
|
||||
$this->errormsg = "FotoOID ist ungueltig\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
if(strlen($this->homepage)>256)
|
||||
{
|
||||
$this->errormsg = "*****\nHomepage darf nicht laenger als 256 Zeichen sein: ".$this->nachname.", ".$this->vorname."\n*****\n";
|
||||
@@ -376,8 +372,7 @@ class person
|
||||
if($row->geburtsnation!=$this->geburtsnation) $update=true;
|
||||
if($row->geschlecht!=$this->geschlecht) $update=true;
|
||||
if($row->staatsbuergerschaft!=$this->staatsbuergerschaft) $update=true;
|
||||
|
||||
|
||||
|
||||
if($update)
|
||||
{
|
||||
$qry = 'UPDATE public.tbl_person SET'.
|
||||
@@ -413,8 +408,10 @@ class person
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->done)
|
||||
{
|
||||
|
||||
if(pg_query($this->conn,$qry))
|
||||
{
|
||||
if($this->new)
|
||||
|
||||
@@ -206,7 +206,7 @@ class student extends benutzer
|
||||
' gruppe='.$this->addslashes($this->gruppe).
|
||||
" WHERE student_uid='".addslashes($this->uid)."';";
|
||||
}
|
||||
|
||||
|
||||
if(pg_query($this->conn,$qry))
|
||||
{
|
||||
pg_query($this->conn,'COMMIT;');
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
// 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/vnd.mozilla.xul+xml");
|
||||
// xml
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
// DAO
|
||||
require_once('../vilesci/config.inc.php');
|
||||
require_once('../include/aufmerksamdurch.class.php');
|
||||
|
||||
// Datenbank Verbindung
|
||||
if (!$conn = pg_pconnect(CONN_STRING))
|
||||
$error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!';
|
||||
|
||||
$ad=new aufmerksamdurch($conn,null,true);
|
||||
|
||||
$ad->getAll();
|
||||
|
||||
$rdf_url='http://www.technikum-wien.at/aufmerksamdurch';
|
||||
|
||||
?>
|
||||
|
||||
<RDF:RDF
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:AUFMERKSAM="<?php echo $rdf_url; ?>/rdf#"
|
||||
>
|
||||
|
||||
|
||||
<RDF:Seq about="<?php echo $rdf_url ?>/alle">
|
||||
|
||||
<?php
|
||||
foreach ($ad->result as $row)
|
||||
{
|
||||
?>
|
||||
<RDF:li>
|
||||
<RDF:Description id="<?php echo $row->aufmerksamdurch_kurzbz; ?>" about="<?php echo $rdf_url.'/'.$row->aufmerksamdurch_kurzbz; ?>" >
|
||||
<AUFMERKSAM:aufmerksamdurch_kurzbz><![CDATA[<?php echo $row->aufmerksamdurch_kurzbz; ?>]]></AUFMERKSAM:aufmerksamdurch_kurzbz>
|
||||
<AUFMERKSAM:beschreibung><![CDATA[<?php echo $row->beschreibung; ?>]]></AUFMERKSAM:beschreibung>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</RDF:Seq>
|
||||
</RDF:RDF>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
// 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/vnd.mozilla.xul+xml");
|
||||
// xml
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
// DAO
|
||||
require_once('../vilesci/config.inc.php');
|
||||
|
||||
// Datenbank Verbindung
|
||||
if (!$conn = pg_pconnect(CONN_STRING))
|
||||
$error_msg='Es konnte keine Verbindung zum Server aufgebaut werden!';
|
||||
|
||||
$rdf_url='http://www.technikum-wien.at/berufstaetigkeit';
|
||||
|
||||
?>
|
||||
|
||||
<RDF:RDF
|
||||
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:BT="<?php echo $rdf_url; ?>/rdf#"
|
||||
>
|
||||
|
||||
|
||||
<RDF:Seq about="<?php echo $rdf_url ?>/alle">
|
||||
|
||||
<?php
|
||||
$qry = "SET CLIENT_ENCODING to 'UNICODE'; SELECT * FROM bis.tbl_berufstaetigkeit ORDER BY berufstaetigkeit_bez";
|
||||
if($result = pg_query($conn, $qry))
|
||||
{
|
||||
while($row = pg_fetch_object($result))
|
||||
{
|
||||
?>
|
||||
<RDF:li>
|
||||
<RDF:Description id="<?php echo $row->berufstaetigkeit_code; ?>" about="<?php echo $rdf_url.'/'.$row->berufstaetigkeit_code; ?>" >
|
||||
<BT:code><![CDATA[<?php echo $row->berufstaetigkeit_code; ?>]]></BT:code>
|
||||
<BT:bezeichnung><![CDATA[<?php echo $row->berufstaetigkeit_bez; ?>]]></BT:bezeichnung>
|
||||
<BT:kurzbz><![CDATA[<?php echo $row->berufstaetigkeit_kurzbz; ?>]]></BT:kurzbz>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</RDF:Seq>
|
||||
</RDF:RDF>
|
||||
+1
-1
@@ -86,7 +86,7 @@ function drawStudent($student)
|
||||
<STUDENT:geburtsdatum_iso><![CDATA[<?php echo $student->gebdatum; ?>]]></STUDENT:geburtsdatum_iso>
|
||||
<STUDENT:alias><![CDATA[<?php echo $student->alias ?>]]></STUDENT:alias>
|
||||
<STUDENT:homepage><![CDATA[<?php echo $student->homepage ?>]]></STUDENT:homepage>
|
||||
<STUDENT:aktiv><![CDATA[<?php echo ($student->aktiv?'True':'False') ?>]]></STUDENT:aktiv>
|
||||
<STUDENT:aktiv><![CDATA[<?php echo ($student->aktiv?'true':'false') ?>]]></STUDENT:aktiv>
|
||||
<STUDENT:gebort><![CDATA[<?php echo $student->gebort; ?>]]></STUDENT:gebort>
|
||||
<STUDENT:gebzeit><![CDATA[<?php echo $student->gebzeit; ?>]]></STUDENT:gebzeit>
|
||||
<STUDENT:foto><![CDATA[<?php echo $student->foto; ?>]]></STUDENT:foto>
|
||||
|
||||
Reference in New Issue
Block a user