mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
This commit is contained in:
@@ -65,11 +65,21 @@ class Messages extends VileSci_Controller
|
||||
array_shift($variables->retval); // Remove person_id
|
||||
array_shift($variables->retval); // Remove prestudent_id
|
||||
|
||||
//
|
||||
$oe_kurzbz = null;
|
||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||
$benutzerResult = $this->BenutzerfunktionModel->getByPersonId($sender_id);
|
||||
if (hasData($benutzerResult))
|
||||
{
|
||||
$oe_kurzbz = $benutzerResult->retval[0]->oe_kurzbz;
|
||||
}
|
||||
|
||||
$data = array (
|
||||
'sender_id' => $sender_id,
|
||||
'receivers' => $prestudent->retval,
|
||||
'message' => $msg,
|
||||
'variables' => $variablesArray
|
||||
'variables' => $variablesArray,
|
||||
'oe_kurzbz' => $oe_kurzbz
|
||||
);
|
||||
|
||||
$v = $this->load->view('system/messageWrite', $data);
|
||||
|
||||
@@ -59,7 +59,48 @@ class OrganisationseinheitLib
|
||||
return $this->treeSearch($schema, $table, $select, $where, $orderby, $result->retval[0]->_ppk);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function treeSearchEntire($table, $alias, $fields, $where, $orderby, $oe_kurzbz)
|
||||
{
|
||||
$select = "";
|
||||
if (is_array($fields))
|
||||
{
|
||||
for ($i = 0; $i < count($fields); $i++)
|
||||
{
|
||||
$select .= $fields[$i];
|
||||
if ($i != count($fields) - 1)
|
||||
{
|
||||
$select .= ", ";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$select = $fields;
|
||||
}
|
||||
|
||||
$result = $this->ci->OrganisationseinheitModel->getOneLevelAlias($table, $alias, $select, $where, $orderby, $oe_kurzbz);
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
if ($result->retval[0]->_pk != null && $result->retval[0]->_ppk != null && $result->retval[0]->_jtpk != null)
|
||||
{
|
||||
$tmpResult = $this->treeSearchEntire($table, $alias, $select, $where, $orderby, $result->retval[0]->_ppk);
|
||||
|
||||
if (hasData($tmpResult) && $tmpResult->retval[0]->_pk != null && $tmpResult->retval[0]->_ppk != null && $tmpResult->retval[0]->_jtpk != null)
|
||||
{
|
||||
$result->retval = array_merge($result->retval, $tmpResult->retval);
|
||||
}
|
||||
}
|
||||
else if ($result->retval[0]->_ppk != null)
|
||||
{
|
||||
$result = $this->treeSearchEntire($table, $alias, $select, $where, $orderby, $result->retval[0]->_ppk);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -78,9 +78,34 @@ class Organisationseinheit_model extends DB_Model
|
||||
) _joined_table ON (orgs._pk = _joined_table._pk)
|
||||
WHERE orgs._pk = ?
|
||||
ORDER BY %s";
|
||||
|
||||
|
||||
$query = sprintf($query, $table, $fields, $schema, $table, $where, $orderby);
|
||||
|
||||
|
||||
return $this->execQuery($query, array($oe_kurzbz));
|
||||
}
|
||||
}
|
||||
|
||||
public function getOneLevelAlias($table, $alias, $fields, $where, $orderby, $oe_kurzbz)
|
||||
{
|
||||
$query = "WITH RECURSIVE organizations(_pk, _ppk) AS
|
||||
(
|
||||
SELECT o.oe_kurzbz, o.oe_parent_kurzbz
|
||||
FROM public.tbl_organisationseinheit o
|
||||
WHERE o.oe_parent_kurzbz IS NULL
|
||||
UNION ALL
|
||||
SELECT o.oe_kurzbz, o.oe_parent_kurzbz
|
||||
FROM public.tbl_organisationseinheit o INNER JOIN organizations orgs ON (o.oe_parent_kurzbz = orgs._pk)
|
||||
)
|
||||
SELECT orgs._pk, orgs._ppk, _joined_table.*
|
||||
FROM organizations orgs LEFT JOIN (
|
||||
SELECT %s.oe_kurzbz as _jtpk, %s
|
||||
FROM %s
|
||||
WHERE %s
|
||||
) _joined_table ON (orgs._pk = _joined_table._jtpk)
|
||||
WHERE orgs._pk = ?
|
||||
ORDER BY %s";
|
||||
|
||||
$query = sprintf($query, $alias, $fields, $table, $where, $orderby);
|
||||
|
||||
return $this->execQuery($query, array($oe_kurzbz));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
class Benutzerfunktion_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -11,4 +11,15 @@ class Benutzerfunktion_model extends DB_Model
|
||||
$this->dbTable = 'public.tbl_benutzerfunktion';
|
||||
$this->pk = 'benutzerfunktion_id';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getByPersonId($person_id)
|
||||
{
|
||||
// Join with the table
|
||||
$this->addJoin('public.tbl_benutzer', 'uid');
|
||||
|
||||
return $this->loadWhere(array('person_id' => $person_id));
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@
|
||||
<?php
|
||||
echo $this->widgetlib->widget(
|
||||
'Vorlage_widget',
|
||||
null,
|
||||
array('oe_kurzbz' => $oe_kurzbz),
|
||||
array('name' => 'vorlage', 'id' => 'vorlageDnD')
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -4,13 +4,26 @@ class Vorlage_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
$this->load->model('system/Vorlage_model', 'VorlageModel');
|
||||
$this->VorlageModel->addOrder('vorlage_kurzbz');
|
||||
// Loads
|
||||
$this->load->library('OrganisationseinheitLib');
|
||||
|
||||
$this->addSelectToModel($this->VorlageModel, 'vorlage_kurzbz', 'bezeichnung');
|
||||
$vorlage = $this->organisationseinheitlib->treeSearchEntire(
|
||||
'(
|
||||
SELECT v.vorlage_kurzbz, v.bezeichnung, vs.version, vs.oe_kurzbz, vs.aktiv, vs.subject, vs.text, v.mimetype
|
||||
FROM tbl_vorlagestudiengang vs INNER JOIN tbl_vorlage v USING(vorlage_kurzbz)
|
||||
) templates',
|
||||
'templates',
|
||||
array("templates.vorlage_kurzbz AS id", "UPPER(templates.oe_kurzbz) || ' - ' || templates.bezeichnung || ' - V' || templates.version AS description"),
|
||||
'templates.aktiv = TRUE
|
||||
AND templates.subject IS NOT NULL
|
||||
AND templates.text IS NOT NULL
|
||||
AND templates.mimetype = \'text/html\'',
|
||||
"description ASC",
|
||||
$widgetData['oe_kurzbz']
|
||||
);
|
||||
|
||||
$this->setElementsArray(
|
||||
$this->VorlageModel->loadWhere(array('mimetype' => 'text/html')),
|
||||
$vorlage,
|
||||
true,
|
||||
'Select a vorlage...',
|
||||
'No vorlage found'
|
||||
|
||||
@@ -289,12 +289,14 @@ $i=0;
|
||||
while($begin<$ende)
|
||||
{
|
||||
$i++;
|
||||
if(!date("w",$begin))
|
||||
$begin=jump_day($begin,1);
|
||||
$begin = montag($begin);
|
||||
|
||||
$stdplan->init_stdplan();
|
||||
$datum=$begin;
|
||||
$begin+=604800; // eine Woche
|
||||
|
||||
// eine Woche weiterspringen
|
||||
$datum_tmp = new datum();
|
||||
$begin = $datum_tmp->jump_week($begin,1);
|
||||
|
||||
// Stundenplan einer Woche laden
|
||||
if(!$stdplan->load_week($datum,$db_stpl_table))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+110
-110
@@ -45,7 +45,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-neu" label="Neue Notiz" oncommand="document.getBindingParent(this).NeueNotiz()" image="<?php echo APP_ROOT;?>skin/images/NeuDokument.png" tooltiptext="Neue Notiz anlegen" />
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-del" label="Loeschen" oncommand="document.getBindingParent(this).Loeschen()" image="<?php echo APP_ROOT;?>skin/images/DeleteIcon.png" disabled="true" tooltiptext="Notiz löschen"/>
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-aktualisieren" label="Aktualisieren" oncommand="document.getBindingParent(this).RefreshNotiz()" image="<?php echo APP_ROOT;?>skin/images/refresh.png" tooltiptext="Liste neu laden"/>
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-filter" label="Filter" type="menu">
|
||||
<xul:toolbarbutton anonid="toolbarbutton-notiz-filter" label="Filter" type="menu">
|
||||
<xul:menupopup>
|
||||
<xul:menuitem label="Alle Notizen anzeigen" oncommand="document.getBindingParent(this).LoadNotizTree(document.getBindingParent(this).getAttribute('projekt_kurzbz'),document.getBindingParent(this).getAttribute('projektphase_id'),document.getBindingParent(this).getAttribute('projekttask_id'),document.getBindingParent(this).getAttribute('uid'),document.getBindingParent(this).getAttribute('person_id'),document.getBindingParent(this).getAttribute('prestudent_id'),document.getBindingParent(this).getAttribute('bestellung_id'), document.getBindingParent(this).getAttribute('user'), document.getBindingParent(this).getAttribute('lehreinheit_id'), null, document.getBindingParent(this).getAttribute('anrechnung_id'));" tooltiptext="Alle Notizen anzeigen"/>
|
||||
<xul:menuitem label="nur offene Notizen anzeigen" oncommand="document.getBindingParent(this).LoadNotizTree(document.getBindingParent(this).getAttribute('projekt_kurzbz'),document.getBindingParent(this).getAttribute('projektphase_id'),document.getBindingParent(this).getAttribute('projekttask_id'),document.getBindingParent(this).getAttribute('uid'),document.getBindingParent(this).getAttribute('person_id'),document.getBindingParent(this).getAttribute('prestudent_id'),document.getBindingParent(this).getAttribute('bestellung_id'), document.getBindingParent(this).getAttribute('user'), document.getBindingParent(this).getAttribute('lehreinheit_id'), false, document.getBindingParent(this).getAttribute('anrechnung_id'));" tooltiptext="nur offene Notizen anzeigen"/>
|
||||
@@ -60,34 +60,34 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
onselect="document.getBindingParent(this).edit(event);"
|
||||
flags="dont-build-content" style="min-height: 60px"
|
||||
>
|
||||
|
||||
|
||||
<xul:treecols>
|
||||
<xul:treecol anonid="treecol-notiz-titel" label="Titel" flex="5" primary="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator" sortActive="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#titel" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-text" label="Text" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#text" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-verfasser" label="Verfasser" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#verfasser_uid" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-bearbeiter" label="Bearbeiter" flex="2" hidden="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#bearbeiter_uid" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-start" label="Start" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator" sortActive="true" sortDirection="descending"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#startISO" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-ende" label="Ende" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-dokumente" label="Dokumente" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#dokumente" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-erledigt" label="Erledigt" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
@@ -106,7 +106,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
|
||||
</xul:treecols>
|
||||
|
||||
|
||||
<xul:template>
|
||||
<xul:rule>
|
||||
<xul:treechildren>
|
||||
@@ -138,7 +138,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
</xul:splitter>
|
||||
<xul:vbox flex="1">
|
||||
<xul:textbox anonid="textbox-notiz-notiz_id" hidden="true"/>
|
||||
|
||||
|
||||
<xul:groupbox flex="1">
|
||||
<xul:caption anonid="caption-notiz-detail" label="Neue Notiz"/>
|
||||
<xul:grid anonid="grid-notiz-detail" style="overflow:auto;margin:4px;" flex="1">
|
||||
@@ -188,7 +188,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:menulist anonid="menulist-notiz-bearbeiter"
|
||||
editable="true" flex="1"
|
||||
datasources="rdf:null"
|
||||
ref="http://www.technikum-wien.at/mitarbeiter/liste"
|
||||
ref="http://www.technikum-wien.at/mitarbeiter/liste"
|
||||
oninput="document.getBindingParent(this).BearbeiterLoad(this);"
|
||||
oncommand=""
|
||||
>
|
||||
@@ -201,7 +201,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
</xul:template>
|
||||
</xul:menulist>
|
||||
</xul:hbox>
|
||||
|
||||
|
||||
</xul:hbox>
|
||||
</xul:row>
|
||||
<xul:row>
|
||||
@@ -247,7 +247,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<![CDATA[
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
tree = document.getAnonymousElementByAttribute(this ,'anonid', 'tree-notiz');
|
||||
|
||||
|
||||
var direction = treecol.getAttribute("sortDirection");
|
||||
var current = treecol.parentNode.firstChild;
|
||||
while (current) {
|
||||
@@ -262,7 +262,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
} else {
|
||||
direction = "ascending";
|
||||
treecol.setAttribute("sortDirection",direction);
|
||||
}
|
||||
}
|
||||
var sortService = Components.classes["@mozilla.org/xul/xul-sort-service;1"].
|
||||
getService(Components.interfaces.nsIXULSortService);
|
||||
sortService.sort(tree, treecol.getAttribute('sort'), direction);
|
||||
@@ -326,9 +326,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var start = document.getAnonymousElementByAttribute(this ,'anonid', 'box-notiz-start').iso;
|
||||
var ende = document.getAnonymousElementByAttribute(this ,'anonid', 'box-notiz-ende').iso;
|
||||
var verfasser_uid = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-verfasser').value;
|
||||
|
||||
|
||||
menulist = document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter');
|
||||
|
||||
|
||||
//Es kann sein, dass im Eingabefeld nichts steht und
|
||||
//trotzdem ein Eintrag auf selected gesetzt ist.
|
||||
//In diesem Fall soll aber kein Wert zurueckgegeben werden
|
||||
@@ -337,7 +337,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
bearbeiter_uid='';
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
//Wenn es Selektierte Eintraege gibt, dann den value zurueckliefern
|
||||
var children = menulist.getElementsByAttribute('selected','true');
|
||||
if(children.length>0)
|
||||
@@ -345,9 +345,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
else
|
||||
bearbeiter_uid = '';
|
||||
}
|
||||
|
||||
|
||||
var erledigt = document.getAnonymousElementByAttribute(this ,'anonid', 'checkbox-notiz-erledigt').checked;
|
||||
|
||||
|
||||
var projekt_kurzbz = this.getAttribute('projekt_kurzbz');
|
||||
var projektphase_id = this.getAttribute('projektphase_id');
|
||||
var projekttask_id = this.getAttribute('projekttask_id');
|
||||
@@ -357,11 +357,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var bestellung_id = this.getAttribute('bestellung_id');
|
||||
var lehreinheit_id = this.getAttribute('lehreinheit_id');
|
||||
var anrechnung_id = this.getAttribute('anrechnung_id');
|
||||
|
||||
|
||||
var soapBody = new SOAPObject("saveNotiz");
|
||||
//soapBody.appendChild(new SOAPObject("username")).val('joe');
|
||||
//soapBody.appendChild(new SOAPObject("passwort")).val('waschl');
|
||||
|
||||
|
||||
var notiz = new SOAPObject("notiz");
|
||||
notiz.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
|
||||
notiz.appendChild(new SOAPObject("titel")).cdataval(titel);
|
||||
@@ -371,7 +371,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
notiz.appendChild(new SOAPObject("start")).val(start);
|
||||
notiz.appendChild(new SOAPObject("ende")).val(ende);
|
||||
notiz.appendChild(new SOAPObject("erledigt")).val(erledigt);
|
||||
|
||||
|
||||
notiz.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
notiz.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
notiz.appendChild(new SOAPObject("projekttask_id")).val(projekttask_id);
|
||||
@@ -382,11 +382,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
notiz.appendChild(new SOAPObject("lehreinheit_id")).val(lehreinheit_id);
|
||||
notiz.appendChild(new SOAPObject("anrechnung_id")).val(anrechnung_id);
|
||||
soapBody.appendChild(notiz);
|
||||
|
||||
|
||||
var sr = new SOAPRequest("saveNotiz",soapBody);
|
||||
|
||||
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
|
||||
|
||||
|
||||
function mycallb(obj) {
|
||||
var me=obj;
|
||||
this.invoke=function (respObj) {
|
||||
@@ -412,11 +412,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
me.RefreshNotiz();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
|
||||
SOAPClient.SendRequest(sr, cb.invoke);
|
||||
|
||||
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
@@ -451,9 +451,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<method name="Loeschen">
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
|
||||
var notiz_id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
|
||||
|
||||
|
||||
// falls nichts markiert ist
|
||||
if(notiz_id =='')
|
||||
alert('Keine Notiz ausgewählt')
|
||||
@@ -465,11 +465,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=true;
|
||||
var soapBody = new SOAPObject("deleteNotiz");
|
||||
soapBody.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
|
||||
|
||||
|
||||
var sr = new SOAPRequest("deleteNotiz",soapBody);
|
||||
|
||||
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
|
||||
|
||||
|
||||
function mycallb(obj) {
|
||||
var me=obj;
|
||||
this.invoke=function (respObj) {
|
||||
@@ -494,16 +494,16 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
me.RefreshNotiz();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
|
||||
SOAPClient.SendRequest(sr, cb.invoke);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<method name="updateErledigt">
|
||||
<parameter name="event"/>
|
||||
<body>
|
||||
@@ -512,13 +512,13 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var col = new Object();
|
||||
var childElt = new Object();
|
||||
//Tree holen
|
||||
var tree = event.currentTarget;
|
||||
var tree = event.currentTarget;
|
||||
//Treecol ermitteln in die geklickt wurde
|
||||
tree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, childElt);
|
||||
//abbrechen wenn auf Header oder Scrollbar geklickt wurde
|
||||
if(!col.value)
|
||||
return 0;
|
||||
|
||||
|
||||
var val = tree.view.getCellValue(row.value, col.value);
|
||||
var text = tree.view.getCellText(row.value, col.value);
|
||||
var newval='false';
|
||||
@@ -526,11 +526,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
newval='false';
|
||||
else
|
||||
newval='true';
|
||||
|
||||
|
||||
var col_id = tree.columns.getColumnFor(document.getAnonymousElementByAttribute(this ,'anonid', 'treecol-notiz-notiz_id'));
|
||||
var id = tree.view.getCellText(row.value, col_id);
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'toolbarbutton-notiz-del').disabled=false;
|
||||
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'toolbarbutton-notiz-del').disabled=false;
|
||||
|
||||
if(text=='erledigt')
|
||||
{
|
||||
var soapBody = new SOAPObject("setErledigt");
|
||||
@@ -539,7 +539,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
|
||||
var sr = new SOAPRequest("setErledigt",soapBody);
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
|
||||
|
||||
|
||||
function mycallb(obj) {
|
||||
var me=obj;
|
||||
this.invoke=function (respObj) {
|
||||
@@ -556,9 +556,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
me.RefreshNotiz();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
|
||||
SOAPClient.SendRequest(sr,cb.invoke);
|
||||
}
|
||||
]]>
|
||||
@@ -569,7 +569,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<body>
|
||||
<![CDATA[
|
||||
var id = this.value;
|
||||
|
||||
|
||||
if(id!='')
|
||||
{
|
||||
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
|
||||
@@ -577,22 +577,22 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
{
|
||||
notizdoks.removeChild(notizdoks.firstChild);
|
||||
}
|
||||
|
||||
|
||||
this.DisableDetails(false);
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=false;
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
//Daten holen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/notiz.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
|
||||
var dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
|
||||
var subject = rdfService.GetResource("http://www.technikum-wien.at/notiz/" + id);
|
||||
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/notiz/rdf";
|
||||
|
||||
|
||||
//RDF parsen
|
||||
titel = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titel" ));
|
||||
text = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#text" ));
|
||||
@@ -602,12 +602,12 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
bearbeiter = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bearbeiter_uid" ));
|
||||
updateamum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#updateamum" ));
|
||||
erledigt = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#erledigt" ));
|
||||
|
||||
|
||||
if(erledigt=='true')
|
||||
erledigt=true;
|
||||
else
|
||||
erledigt=false;
|
||||
|
||||
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value=id;
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-titel').value=titel;
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-text').value=text;
|
||||
@@ -621,43 +621,43 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
{
|
||||
menulist = document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter');
|
||||
this.BearbeiterLoad(menulist, bearbeiter);
|
||||
|
||||
|
||||
var children = menulist.getElementsByAttribute('value',bearbeiter);
|
||||
menulist.selectedItem=children[0];
|
||||
menulist.selectedItem=children[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
menulist = document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter');
|
||||
this.BearbeiterLoad(menulist, bearbeiter);
|
||||
|
||||
|
||||
var children = menulist.getElementsByAttribute('value',bearbeiter);
|
||||
menulist.selectedItem=null;
|
||||
}
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'caption-notiz-detail').label="Bearbeiten";
|
||||
|
||||
|
||||
// Dokumente auslesen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/dms.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
// Alle Elemente aus dem RDF holen
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
|
||||
// Durchlaufen der Elemente
|
||||
while(dsResources.hasMoreElements())
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/dms/rdf";
|
||||
|
||||
//Spalten holen
|
||||
name = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#name" ));
|
||||
dms_id = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#dms_id" ));
|
||||
|
||||
|
||||
if(dms_id!='')
|
||||
{
|
||||
// Download-Link für Dokument einfügen
|
||||
@@ -667,7 +667,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
dokbtn.setAttribute("onclick", "window.open('"+dokurl+"')");
|
||||
dokbtn.setAttribute("style", "margin-right: -5px;");
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(dokbtn);
|
||||
|
||||
|
||||
// Link zum Löschen des Dokuments
|
||||
var delbtn = document.createElement("button");
|
||||
delbtn.setAttribute("image", "<?php echo APP_ROOT;?>skin/images/delete_x.png");
|
||||
@@ -686,16 +686,16 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<body>
|
||||
<![CDATA[
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
if(typeof(filter)=='undefined')
|
||||
v = menulist.value;
|
||||
else
|
||||
v = filter;
|
||||
|
||||
|
||||
if(v.length>2)
|
||||
{
|
||||
{
|
||||
var url = '<?php echo APP_ROOT; ?>rdf/mitarbeiter.rdf.php?filter='+encodeURIComponent(v)+'&'+gettimestamp();
|
||||
|
||||
|
||||
var oldDatasources = menulist.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
@@ -703,7 +703,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
menulist.builder.rebuild();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
if(typeof(filter)=='undefined')
|
||||
var datasource = rdfService.GetDataSource(url);
|
||||
@@ -734,7 +734,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<![CDATA[
|
||||
//debug('LoadNotizTree');
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
this.initialsiert=false;
|
||||
@@ -744,8 +744,8 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
this.DisableControls(false);
|
||||
this.DisableDetails(true);
|
||||
this.ResetDetails();
|
||||
|
||||
|
||||
|
||||
|
||||
this.setAttribute('projekt_kurzbz',projekt_kurzbz);
|
||||
this.setAttribute('projektphase_id',projektphase_id);
|
||||
this.setAttribute('projekttask_id',projekttask_id);
|
||||
@@ -755,18 +755,18 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
this.setAttribute('bestellung_id',bestellung_id);
|
||||
this.setAttribute('user',user);
|
||||
this.setAttribute('lehreinheit_id',lehreinheit_id);
|
||||
|
||||
//Wenn kein Erledigt Parameter uebergeben wird, dann wird die zuletzt
|
||||
|
||||
//Wenn kein Erledigt Parameter uebergeben wird, dann wird die zuletzt
|
||||
//verwendete Einstellung verwendet
|
||||
if(typeof erledigt=="undefined")
|
||||
erledigt = this.getAttribute('erledigt');
|
||||
|
||||
if(typeof erledigt!="undefined")
|
||||
this.setAttribute('erledigt',erledigt);
|
||||
|
||||
|
||||
if(typeof anrechnung_id=="undefined")
|
||||
anrechnung_id = '';
|
||||
|
||||
|
||||
if(typeof anrechnung_id!="undefined")
|
||||
this.setAttribute('anrechnung_id',anrechnung_id);
|
||||
|
||||
@@ -786,9 +786,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
datasource = datasource+"&erledigt=true";
|
||||
else if((typeof erledigt=="boolean" && erledigt==false) || (typeof erledigt=="string" && erledigt=='false'))
|
||||
datasource = datasource+"&erledigt=false";
|
||||
|
||||
|
||||
datasource = datasource+"&anrechnung_id="+encodeURIComponent(anrechnung_id);
|
||||
|
||||
|
||||
//debug('Source:'+datasource);
|
||||
var tree = document.getAnonymousElementByAttribute(this ,'anonid', 'tree-notiz');
|
||||
|
||||
@@ -798,34 +798,34 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
{
|
||||
tree.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
this.TreeNotizDatasource = rdfService.GetDataSource(datasource);
|
||||
this.TreeNotizDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
this.TreeNotizDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink);
|
||||
tree.database.AddDataSource(this.TreeNotizDatasource);
|
||||
|
||||
|
||||
this.TreeNotizDatasource.addXMLSinkObserver({
|
||||
notiz: this,
|
||||
onBeginLoad: function(aSink)
|
||||
{},
|
||||
|
||||
|
||||
onInterrupt: function(aSink)
|
||||
{},
|
||||
|
||||
|
||||
onResume: function(aSink)
|
||||
{},
|
||||
|
||||
|
||||
onEndLoad: function(aSink)
|
||||
{
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
//aSink.removeXMLSinkObserver(this);
|
||||
//debug('onEndLoad start Rebuild');
|
||||
var tree = document.getAnonymousElementByAttribute(this.notiz ,'anonid', 'tree-notiz');
|
||||
tree.builder.rebuild();
|
||||
},
|
||||
|
||||
|
||||
onError: function(aSink, aStatus, aErrorMsg)
|
||||
{ alert("error! " + aErrorMsg); }
|
||||
});
|
||||
@@ -843,7 +843,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
notiz.selectItem();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
@@ -859,7 +859,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
if(tree.view)
|
||||
{
|
||||
var items = tree.view.rowCount; //Anzahl der Zeilen ermitteln
|
||||
|
||||
|
||||
//In der globalen Variable ist die zu selektierende ID gespeichert
|
||||
if(this.selectID!=null)
|
||||
{
|
||||
@@ -868,7 +868,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
//id der row holen
|
||||
var col = tree.columns.getColumnFor(document.getAnonymousElementByAttribute(this ,'anonid', 'treecol-notiz-notiz_id'));
|
||||
id = tree.view.getCellText(i, col);
|
||||
|
||||
|
||||
//wenn dies die zu selektierende Zeile
|
||||
if(this.selectID==id)
|
||||
{
|
||||
@@ -877,21 +877,21 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
//Sicherstellen, dass die Zeile im sichtbaren Bereich liegt
|
||||
tree.treeBoxObject.ensureRowIsVisible(i);
|
||||
this.selectID=null;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<method name="UploadDokument">
|
||||
<body>
|
||||
<![CDATA[
|
||||
notiz_id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
|
||||
|
||||
|
||||
if(notiz_id != '')
|
||||
{
|
||||
NotizDokumentUploadScope = this;
|
||||
@@ -903,13 +903,13 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<method name="LoeschenDokument">
|
||||
<parameter name="dms_id"/>
|
||||
<parameter name="dateiname"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
|
||||
//Abfrage ob wirklich geloescht werden soll
|
||||
if (confirm('Wollen Sie die Datei '+dateiname+' wirklich loeschen?'))
|
||||
{
|
||||
@@ -948,39 +948,39 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var cb=new mycallb(this);
|
||||
|
||||
SOAPClient.SendRequest(sr, cb.invoke);
|
||||
|
||||
|
||||
// Alle Download-Buttons der Dokumente entfernen
|
||||
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
|
||||
while(notizdoks.hasChildNodes())
|
||||
{
|
||||
notizdoks.removeChild(notizdoks.firstChild);
|
||||
}
|
||||
|
||||
|
||||
// Dokumente auslesen
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
|
||||
var url = '<?php echo APP_ROOT ?>rdf/dms.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
||||
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
// Alle Elemente aus dem RDF holen
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
|
||||
// Durchlaufen der Elemente
|
||||
while(dsResources.hasMoreElements())
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/dms/rdf";
|
||||
|
||||
//Spalten holen
|
||||
name = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#name" ));
|
||||
dms_id = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#dms_id" ));
|
||||
|
||||
|
||||
if(dms_id!='')
|
||||
{
|
||||
// Download-Link für Dokument einfügen
|
||||
@@ -990,7 +990,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
dokbtn.setAttribute("onclick", "window.open('"+dokurl+"')");
|
||||
dokbtn.setAttribute("style", "margin-right: -5px;");
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(dokbtn);
|
||||
|
||||
|
||||
// Link zum Löschen des Dokuments
|
||||
var delbtn = document.createElement("button");
|
||||
delbtn.setAttribute("image", "<?php echo APP_ROOT;?>skin/images/delete_x.png");
|
||||
@@ -1000,11 +1000,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
|
||||
<constructor>
|
||||
//debug('load notiz:'+this.getAttribute('id'));
|
||||
this.DisableControls(true);
|
||||
@@ -1019,8 +1019,8 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var user = this.getAttribute('user');
|
||||
var lehreinheit_id = this.getAttribute('lehreinheit_id');
|
||||
var anrechnung_id = this.getAttribute('anrechnung_id');
|
||||
|
||||
if(projekt_kurzbz!='' || projektphase_id!='' || projekttask_id!=''
|
||||
|
||||
if(projekt_kurzbz!='' || projektphase_id!='' || projekttask_id!=''
|
||||
|| uid!='' || person_id!='' || prestudent_id!='' || bestellung_id!='' || user!='' || lehreinheit_id!='' || anrechnung_id!='')
|
||||
{
|
||||
this.LoadNotizTree(projekt_kurzbz,projektphase_id,projekttask_id,uid,person_id,prestudent_id,bestellung_id, user, lehreinheit_id, null, anrechnung_id);
|
||||
@@ -1031,6 +1031,6 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
//debug('Notiz Binding Stop');
|
||||
</destructor>
|
||||
</implementation>
|
||||
|
||||
|
||||
</binding>
|
||||
</bindings>
|
||||
|
||||
@@ -370,8 +370,9 @@ class prestudent extends person
|
||||
*/
|
||||
public function getPrestudentRT($datum)
|
||||
{
|
||||
$sql_query='SELECT
|
||||
DISTINCT tbl_prestudent.prestudent_id,
|
||||
$sql_query='SELECT * FROM (
|
||||
SELECT
|
||||
DISTINCT on(tbl_prestudent.prestudent_id) tbl_prestudent.prestudent_id,
|
||||
tbl_person.vorname, tbl_person.nachname, tbl_person.person_id, tbl_person.titelpre,
|
||||
tbl_person.titelpost, tbl_person.gebdatum,
|
||||
tbl_reihungstest.*,
|
||||
@@ -386,6 +387,7 @@ class prestudent extends person
|
||||
AND tbl_rt_person.studienplan_id IN (SELECT studienplan_id FROM public.tbl_prestudentstatus WHERE prestudent_id=tbl_prestudent.prestudent_id)
|
||||
AND EXISTS(SELECT * FROM public.tbl_prestudentstatus JOIN public.tbl_studiensemester USING(studiensemester_kurzbz)
|
||||
WHERE prestudent_id=tbl_prestudent.prestudent_id AND tbl_studiensemester.start>'.$this->db_add_param($datum).')
|
||||
) a
|
||||
ORDER BY nachname,vorname';
|
||||
|
||||
if(!$this->db_query($sql_query))
|
||||
@@ -1748,7 +1750,7 @@ class prestudent extends person
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Loescht einen Prestudenten und legt einen Log-Eintrag dafuer an
|
||||
* @param integer $prestudent_id
|
||||
@@ -1761,11 +1763,11 @@ class prestudent extends person
|
||||
$this->errormsg = 'Prestudent_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$qry = "DELETE FROM public.tbl_prestudent
|
||||
WHERE
|
||||
prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
|
||||
|
||||
if($this->load($prestudent_id))
|
||||
{
|
||||
$this->db_query('BEGIN;');
|
||||
@@ -1818,7 +1820,7 @@ class prestudent extends person
|
||||
$this->db_add_param($this->zgvdoktornation).','.
|
||||
$this->db_add_param($this->gsstudientyp_kurzbz).','.
|
||||
$this->db_add_param($this->aufnahmegruppe_kurzbz).');';
|
||||
|
||||
|
||||
if($log->save(true))
|
||||
{
|
||||
if($this->db_query($qry))
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* CSV Export der Studierenden für ÖH
|
||||
*/
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/erhalter.class.php');
|
||||
require_once('../../include/studiensemester.class.php');
|
||||
require_once('../../include/datum.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
if(!$rechte->isBerechtigt('admin'))
|
||||
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||
|
||||
$db = new basis_db();
|
||||
$datum_obj = new datum();
|
||||
|
||||
$stsem_obj = new studiensemester();
|
||||
$studiensemester_kurzbz = $stsem_obj->getAktOrNext();
|
||||
|
||||
$erhalter = new erhalter();
|
||||
$erhalter->getAll();
|
||||
|
||||
if(!isset($erhalter->result[0]))
|
||||
die('Es ist kein Erhalter vorhanden');
|
||||
|
||||
$erhalter_row = $erhalter->result[0];
|
||||
|
||||
$filename='Studierendenliste'.$studiensemester_kurzbz.'_'.date('Y-m-d').'.csv';
|
||||
|
||||
header( 'Content-Type: text/csv' );
|
||||
header( 'Content-Disposition: attachment;filename='.$filename);
|
||||
|
||||
|
||||
// Daten holen - Alle Personen mit akt. Status Student, Diplomand und Incoming die bezahlt haben
|
||||
$qry="
|
||||
SELECT * FROM (
|
||||
SELECT DISTINCT ON (matrikelnr) matrikelnr AS personenkennzeichen,
|
||||
tbl_person.svnr,
|
||||
tbl_person.ersatzkennzeichen,
|
||||
tbl_person.gebdatum,
|
||||
tbl_person.nachname,
|
||||
tbl_person.vorname,
|
||||
tbl_person.geschlecht,
|
||||
tbl_student.studiengang_kz,
|
||||
tbl_student.student_uid,
|
||||
(SELECT plz FROM public.tbl_adresse WHERE person_id=public.tbl_person.person_id ORDER BY zustelladresse desc LIMIT 1) AS zustell_plz,
|
||||
(SELECT gemeinde FROM public.tbl_adresse WHERE person_id=public.tbl_person.person_id ORDER BY zustelladresse desc LIMIT 1) AS zustell_ort,
|
||||
(SELECT strasse FROM public.tbl_adresse WHERE person_id=public.tbl_person.person_id ORDER BY zustelladresse desc LIMIT 1) AS zustell_strasse,
|
||||
(SELECT plz FROM public.tbl_adresse WHERE person_id=public.tbl_person.person_id ORDER BY heimatadresse desc LIMIT 1) AS heimat_plz,
|
||||
(SELECT gemeinde FROM public.tbl_adresse WHERE person_id=public.tbl_person.person_id ORDER BY heimatadresse desc LIMIT 1) AS heimat_ort,
|
||||
(SELECT strasse FROM public.tbl_adresse WHERE person_id=public.tbl_person.person_id ORDER BY heimatadresse desc LIMIT 1) AS heimat_strasse,
|
||||
tbl_person.person_id,
|
||||
tbl_studiengang.bezeichnung as stg_bezeichnung,
|
||||
tbl_studiengangstyp.bezeichnung as stg_typ,
|
||||
get_rolle_prestudent(tbl_prestudent.prestudent_id, ".$db->db_add_param($studiensemester_kurzbz).") as status
|
||||
FROM public.tbl_person
|
||||
JOIN public.tbl_konto as ka using(person_id)
|
||||
JOIN public.tbl_konto as kb using(person_id)
|
||||
JOIN public.tbl_benutzer using(person_id)
|
||||
JOIN public.tbl_student on(uid=student_uid)
|
||||
JOIN public.tbl_prestudent using(prestudent_id)
|
||||
JOIN public.tbl_prestudentstatus on(tbl_prestudentstatus.prestudent_id=tbl_student.prestudent_id)
|
||||
JOIN public.tbl_studiengang ON(tbl_prestudent.studiengang_kz=tbl_studiengang.studiengang_kz)
|
||||
JOIN public.tbl_studiengangstyp ON(tbl_studiengangstyp.typ=tbl_studiengang.typ)
|
||||
WHERE
|
||||
tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)."
|
||||
AND get_rolle_prestudent(tbl_prestudent.prestudent_id, ".$db->db_add_param($studiensemester_kurzbz).") in('Student','Diplomand','Incoming', 'Unterbrecher')
|
||||
AND tbl_student.studiengang_kz<10000
|
||||
AND bismelden
|
||||
AND tbl_benutzer.aktiv
|
||||
) a
|
||||
ORDER BY person_id";
|
||||
|
||||
$last_person_id='';
|
||||
$data_row = array();
|
||||
$personenkennzeichen = array();
|
||||
$studiengang_kz = array();
|
||||
|
||||
$data_row = array(
|
||||
'Nachname',
|
||||
'Vorname',
|
||||
'Geburtsdatum',
|
||||
'Studienort Plz',
|
||||
'Studienort Ort',
|
||||
'Studienort Strasse',
|
||||
'Heimatort Plz',
|
||||
'Heimatort Ort',
|
||||
'Heimatort Strasse',
|
||||
'Mail',
|
||||
'Studiengangstyp',
|
||||
'Studiengangsbezeichnung',
|
||||
'Status'
|
||||
);
|
||||
echo implode(';',$data_row).";\r\n";
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$last_person_id=$row->person_id;
|
||||
|
||||
$personenkennzeichen[]=trim($row->personenkennzeichen);
|
||||
if($row->studiengang_kz<0)
|
||||
$studiengang_kz[] = sprintf('%1$03d',$erhalter_row->erhalter_kz).sprintf('%1$04d',abs($row->studiengang_kz));
|
||||
else
|
||||
$studiengang_kz[] = sprintf('%1$04d',$row->studiengang_kz);
|
||||
|
||||
$data_row = array(
|
||||
$row->nachname,
|
||||
$row->vorname,
|
||||
$datum_obj->formatDatum($row->gebdatum,'Y-m-d'),
|
||||
$row->zustell_plz,
|
||||
$row->zustell_ort,
|
||||
$row->zustell_strasse,
|
||||
$row->heimat_plz,
|
||||
$row->heimat_ort,
|
||||
$row->heimat_strasse,
|
||||
$row->student_uid.'@'.DOMAIN,
|
||||
$row->stg_typ,
|
||||
$row->stg_bezeichnung,
|
||||
$row->status
|
||||
);
|
||||
echo implode(';',$data_row).";\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user