diff --git a/cis/menu.html b/cis/menu.html
index cac80bcf9..1396ae0bd 100644
--- a/cis/menu.html
+++ b/cis/menu.html
@@ -128,7 +128,7 @@
- |
+ |
| |
- Aktuelles |
+ Aktuell |
+
+
+ | |
+ Programm 2007/08 |
| |
diff --git a/content/lvplanung/stpl-details-dialog.js.php b/content/lvplanung/stpl-details-dialog.js.php
new file mode 100644
index 000000000..7f20ff460
--- /dev/null
+++ b/content/lvplanung/stpl-details-dialog.js.php
@@ -0,0 +1,49 @@
+,
+ * Andreas Oesterreicher and
+ * Rudolf Hangl .
+ */
+
+require_once('../../vilesci/config.inc.php');
+require_once('../../include/functions.inc.php');
+
+$conn = pg_pconnect(CONN_STRING);
+
+$user = get_uid();
+loadVariables($conn, $user);
+?>
+
+// ****
+// * Laedt die zu bearbeitenden Daten
+// ****
+function StplDetailsInit(datum)
+{
+ document.getElementById('stpl-details-dialog-box-datum').value=datum;
+}
+
+// ****
+// * Speichern der Daten
+// ****
+function StplDetailsSpeichern()
+{
+ if(window.opener.STPLDetailSave(document))
+ window.close();
+ else
+ this.focus();
+}
\ No newline at end of file
diff --git a/content/lvplanung/stpl-details-dialog.xul.php b/content/lvplanung/stpl-details-dialog.xul.php
new file mode 100644
index 000000000..59b0c3f1a
--- /dev/null
+++ b/content/lvplanung/stpl-details-dialog.xul.php
@@ -0,0 +1,221 @@
+,
+ * Andreas Oesterreicher and
+ * Rudolf Hangl .
+ */
+
+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");
+header("Content-type: application/vnd.mozilla.xul+xml");
+
+require_once('../../vilesci/config.inc.php');
+require_once('../../include/stundenplan.class.php');
+require_once('../../include/functions.inc.php');
+require_once('../../include/studiengang.class.php');
+require_once('../../include/datum.class.php');
+
+if(!$conn = pg_pconnect(CONN_STRING))
+ die('Fehler beim Connecten zur DB');
+
+echo ''."\n";
+
+echo '';
+echo '';
+echo '';
+
+if(isset($_GET['id']) && is_numeric($_GET['id']))
+ $id=$_GET['id'];
+else
+ $id='';
+
+$datum_obj = new datum();
+
+loadVariables($conn, get_uid());
+
+$stundenplan = new stundenplan($conn, $db_stpl_table, null, true);
+
+if(!$stundenplan->load($id))
+ die('Fehler beim Laden der Daten');
+
+$studiengang = new studiengang($conn, null, true);
+$studiengang->load($stundenplan->studiengang_kz);
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/content/lvplanung/stpl-week-overlay.js.php b/content/lvplanung/stpl-week-overlay.js.php
index 496dfb955..8e2796274 100644
--- a/content/lvplanung/stpl-week-overlay.js.php
+++ b/content/lvplanung/stpl-week-overlay.js.php
@@ -206,12 +206,89 @@ function onStplDetail(event)
}
+// ****
+// * oeffnet einen Dialog zum Bearbeiten der StundenplanDetails
+// ****
function STPLDetailEdit()
{
- alert('comming soon');
+ tree = document.getElementById('treeStplDetails');
+ var col = tree.columns ? tree.columns["stundenplan_id"] : "stundenplan_id";
+ if(tree.currentIndex!=-1)
+ {
+ var id = tree.view.getCellText(tree.currentIndex,col);
+ }
+ else
+ {
+ alert('Bitte zuerst einen Eintrag markieren!');
+ return false;
+ }
+
+ window.open('content/lvplanung/stpl-details-dialog.xul.php?id='+id,'Details', 'height=350,width=350,left=100,top=100,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes');
}
+// ****
+// * Speichert die Stundenplan-Detail-Daten
+// ****
+function STPLDetailSave(dialog)
+{
+ var id = dialog.getElementById('stpl-details-dialog-textbox-id').value;
+ var unr = dialog.getElementById('stpl-details-dialog-textbox-unr').value;
+ var verband = dialog.getElementById('stpl-details-dialog-textbox-verband').value;
+ var gruppe = dialog.getElementById('stpl-details-dialog-textbox-gruppe').value;
+ var gruppe_kurzbz = dialog.getElementById('stpl-details-dialog-menulist-gruppe_kurzbz').value;
+ var ort_kurzbz = dialog.getElementById('stpl-details-dialog-menulist-ort_kurzbz').value;
+ var datum = dialog.getElementById('stpl-details-dialog-box-datum').value;
+ var stunde = dialog.getElementById('stpl-details-dialog-menulist-stunde').value;
+ var titel = dialog.getElementById('stpl-details-dialog-textbox-titel').value;
+ var anmerkung = dialog.getElementById('stpl-details-dialog-textbox-anmerkung').value;
+ var fix = dialog.getElementById('stpl-details-dialog-checkbox-fix').checked;
+
+ var url = 'content/tempusDBDML.php';
+ var req = new phpRequest(url,'','');
+
+ req.add('type', 'savestundenplaneintrag');
+ req.add('stundenplan_id', id);
+ req.add('unr', unr);
+ req.add('verband', verband);
+ req.add('gruppe', gruppe);
+ req.add('gruppe_kurzbz', gruppe_kurzbz);
+ req.add('ort_kurzbz', ort_kurzbz);
+ req.add('datum', datum);
+ req.add('stunde', stunde);
+ req.add('titel', titel);
+ req.add('anmerkung', anmerkung);
+ req.add('stundenplan_id', id);
+ req.add('fix', fix);
+
+ var response = req.executePOST();
+
+ var val = new ParseReturnValue(response)
+
+ if (!val.dbdml_return)
+ {
+ if(val.dbdml_errormsg=='')
+ alert(response)
+ else
+ alert(val.dbdml_errormsg)
+ return false;
+ }
+ else
+ {
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+
+ var treeStplDetails=parent.document.getElementById('treeStplDetails');
+ //alert('url'+STPLlastDetailUrl);
+ treeStplDetails.setAttribute('datasources', '');
+ treeStplDetails.setAttribute('datasources', STPLlastDetailUrl);
+ return true;
+ }
+
+}
+
+// ****
+// * Loescht den Eintrag der im Detailfenster markiert ist aus der Stundenplantabelle
+// ****
function STPLDetailDelete()
{
//alert('url'+STPLlastDetailUrl);
diff --git a/content/pdfExport.php b/content/pdfExport.php
index 0eec85c61..649289712 100644
--- a/content/pdfExport.php
+++ b/content/pdfExport.php
@@ -93,8 +93,8 @@ if(isset($_GET['abschlusspruefung_id']))
if(isset($_GET['typ']))
$params.='&typ='.$_GET['typ'];
if(isset($_GET['all']))
- $params.='&all='.$_GET['all'];
-if(isset($_GET["lvid"]))
+ $params.='&all='.$_GET['all'];
+if(isset($_GET["lvid"]))
$params.='&lvid='.$_GET["lvid"];
if($xsl=='AccountInfo')
@@ -126,10 +126,12 @@ if($xsl=='AccountInfo')
if(pg_num_rows($result_std)==1)
{
$row_std = pg_fetch_object($result_std);
- //Mitarbeiterrechte erforderlich
+ //Rechte pruefen
if($rechte->isBerechtigt('admin', $row_std->studiengang_kz, 'suid') ||
$rechte->isBerechtigt('admin', 0, 'suid') ||
- $rechte->isBerechtigt('assistenz', $row_std->studiengang_kz, 'suid'))
+ $rechte->isBerechtigt('assistenz', $row_std->studiengang_kz, 'suid') ||
+ $rechte->isBerechtigt('assistenz', 0, 'suid') ||
+ $rechte->isBerechtigt('support', 0, 'suid'))
{
$isberechtigt=true;
}
diff --git a/content/student/studentkontoneudialog.js.php b/content/student/studentkontoneudialog.js.php
index 42ea7b4cb..e95f87e39 100644
--- a/content/student/studentkontoneudialog.js.php
+++ b/content/student/studentkontoneudialog.js.php
@@ -70,7 +70,7 @@ function StudentKontoNeuInit()
col = tree_vb.columns ? tree_vb.columns["stg_kz"] : "stg_kz";
//var stg_kz=tree_vb.view.getCellText(tree_vb.currentIndex,col);
studiengang_kz=tree_vb.view.getCellText(tree_vb.currentIndex,col);
- debug('kz:'+studiengang_kz);
+ //debug('kz:'+studiengang_kz);
person_ids = paramList;
if(anzahl>1)
diff --git a/content/tempusDBDML.php b/content/tempusDBDML.php
index 9f1ca491f..d5ed1cd41 100644
--- a/content/tempusDBDML.php
+++ b/content/tempusDBDML.php
@@ -191,6 +191,11 @@ if(!$error)
$errormsg = 'ID ist ungueltig';
}
}
+ elseif(isset($_POST['type']) && $_POST['type']=='savestundenplaneintrag')
+ {
+ $errormsg = 'Noch nicht implementiert';
+ $return = false;
+ }
else
{
$return = false;
diff --git a/include/stundenplan.class.php b/include/stundenplan.class.php
index 474cfa268..945cadd58 100644
--- a/include/stundenplan.class.php
+++ b/include/stundenplan.class.php
@@ -84,7 +84,46 @@ class stundenplan
// *********************************************************
function load($stundenplan_id)
{
- return false;
+ $qry = "SELECT * FROM lehre.tbl_$this->stpl_table WHERE ".$this->stpl_table."_id='$stundenplan_id'";
+
+ if($result = pg_query($this->conn, $qry))
+ {
+ if($row = pg_fetch_object($result))
+ {
+ $id = $this->stpl_table.'_id';
+ $this->stundenplan_id = $row->$id;
+ $this->lehreinheit_id = $row->lehreinheit_id;
+ $this->unr = $row->unr;
+ $this->studiengang_kz = $row->studiengang_kz;
+ $this->semester = $row->semester;
+ $this->verband = $row->verband;
+ $this->gruppe = $row->gruppe;
+ $this->gruppe_kurzbz = $row->gruppe_kurzbz;
+ $this->mitarbeiter_uid = $row->mitarbeiter_uid;
+ $this->ort_kurzbz = $row->ort_kurzbz;
+ $this->datum = $row->datum;
+ $this->stunde = $row->stunde;
+ $this->titel = $row->titel;
+ $this->anmerkung = $row->anmerkung;
+ $this->fix = ($row->fix=='t'?true:false);
+ $this->updateamum = $row->updateamum;
+ $this->updatevon = $row->updatevon;
+ $this->insertamum = $row->insertamum;
+ $this->insetvon = $row->insertvon;
+
+ return true;
+ }
+ else
+ {
+ $this->errormsg = 'Der Datensatz wurde nicht gefunden';
+ return false;
+ }
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Laden des Datensatzes';
+ return false;
+ }
}
// *******************************************
|