mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Notizen editieren und neu Anlegen
This commit is contained in:
@@ -58,8 +58,10 @@ function NotizInit(id)
|
||||
text='';
|
||||
start='';
|
||||
ende='';
|
||||
id='';
|
||||
}
|
||||
|
||||
document.getElementById('notiz-textbox-notiz_id').value=id;
|
||||
document.getElementById('notiz-textbox-titel').value=titel;
|
||||
document.getElementById('notiz-textbox-text').value=text;
|
||||
document.getElementById('notiz-box-start').value=start;
|
||||
@@ -71,5 +73,52 @@ function NotizInit(id)
|
||||
// ****
|
||||
function NotizSpeichern()
|
||||
{
|
||||
alert('Noch nicht implementiert');
|
||||
//Werte holen
|
||||
//projekttask_id = document.getElementById('textbox-projekttaskdetail-projekttask_id').value;
|
||||
|
||||
var notiz_id = document.getElementById('notiz-textbox-notiz_id').value;
|
||||
var titel = document.getElementById('notiz-textbox-titel').value;
|
||||
var text = document.getElementById('notiz-textbox-text').value;
|
||||
var start = document.getElementById('notiz-box-start').iso;
|
||||
var ende = document.getElementById('notiz-box-ende').iso;
|
||||
var verfasser_uid = getUsername();
|
||||
var bearbeiter_uid = getUsername();
|
||||
|
||||
var soapBody = new SOAPObject("saveNotiz");
|
||||
soapBody.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
|
||||
soapBody.appendChild(new SOAPObject("titel")).val(titel);
|
||||
soapBody.appendChild(new SOAPObject("text")).val(text);
|
||||
soapBody.appendChild(new SOAPObject("verfasser_uid")).val(verfasser_uid);
|
||||
soapBody.appendChild(new SOAPObject("bearbeiter_uid")).val(bearbeiter_uid);
|
||||
soapBody.appendChild(new SOAPObject("start")).val(start);
|
||||
soapBody.appendChild(new SOAPObject("ende")).val(ende);
|
||||
|
||||
soapBody.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
soapBody.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
soapBody.appendChild(new SOAPObject("projekttask_id")).val(projekttask_id);
|
||||
soapBody.appendChild(new SOAPObject("uid")).val(uid);
|
||||
soapBody.appendChild(new SOAPObject("person_id")).val(person_id);
|
||||
soapBody.appendChild(new SOAPObject("prestudent_id")).val(prestudent_id);
|
||||
soapBody.appendChild(new SOAPObject("bestellung_id")).val(bestellung_id);
|
||||
|
||||
var sr = new SOAPRequest("saveNotiz",soapBody);
|
||||
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
|
||||
SOAPClient.SendRequest(sr, clb_saveNotiz);
|
||||
}
|
||||
|
||||
function clb_saveNotiz(respObj)
|
||||
{
|
||||
try
|
||||
{
|
||||
var id = respObj.Body[0].saveNotizResponse[0].message[0].Text;
|
||||
window.opener.document.getElementById(opener_id).RefreshNotiz();
|
||||
window.close();
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
var fehler = respObj.Body[0].Fault[0].faultstring[0].Text;
|
||||
alert('Fehler: '+fehler);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,20 @@ else
|
||||
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/notiz.window.js.php" />
|
||||
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
|
||||
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqSOAPClient.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqXMLUtils.js"></script>
|
||||
<script type="text/javascript">
|
||||
var projekt_kurzbz = '<?php echo (isset($_GET['projekt_kurzbz'])?addslashes($_GET['projekt_kurzbz']):'');?>';
|
||||
var projektphase_id = '<?php echo (isset($_GET['projektphase_id'])?addslashes($_GET['projektphase_id']):'');?>';
|
||||
var projekttask_id = '<?php echo (isset($_GET['projekttask_id'])?addslashes($_GET['projekttask_id']):'');?>';
|
||||
var uid = '<?php echo (isset($_GET['uid'])?addslashes($_GET['uid']):'');?>';
|
||||
var person_id = '<?php echo (isset($_GET['person_id'])?addslashes($_GET['person_id']):'');?>';
|
||||
var prestudent_id = '<?php echo (isset($_GET['prestudent_id'])?addslashes($_GET['prestudent_id']):'');?>';
|
||||
var bestellung_id = '<?php echo (isset($_GET['bestellung_id'])?addslashes($_GET['bestellung_id']):'');?>';
|
||||
|
||||
var opener_id = '<?php echo (isset($_GET['opener_id'])?addslashes($_GET['opener_id']):'');?>';
|
||||
</script>
|
||||
<vbox>
|
||||
|
||||
<textbox id="notiz-textbox-notiz_id" hidden="true"/>
|
||||
|
||||
+48
-6
@@ -69,11 +69,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-start" label="Start" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#start" />
|
||||
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"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#ende" />
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-erledigt" label="Erledigt" flex="2" hidden="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
@@ -83,6 +83,13 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#notiz_id" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-startISO" label="StartISO" flex="2" hidden="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#startISO" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-ende" label="EndeISO" flex="2" hidden="true" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
|
||||
</xul:treecols>
|
||||
|
||||
<xul:template>
|
||||
@@ -98,6 +105,8 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#ende"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#erledigt"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#notiz_id"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#startISO"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO"/>
|
||||
</xul:treerow>
|
||||
</xul:treeitem>
|
||||
</xul:treechildren>
|
||||
@@ -165,6 +174,14 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
|
||||
try
|
||||
{
|
||||
this.setAttribute('projekt_kurzbz',projekt_kurzbz);
|
||||
this.setAttribute('projektphase_id',projektphase_id);
|
||||
this.setAttribute('projekttask_id',projekttask_id);
|
||||
this.setAttribute('uid',uid);
|
||||
this.setAttribute('person_id',person_id);
|
||||
this.setAttribute('prestudent_id',prestudent_id);
|
||||
this.setAttribute('bestellung_id',bestellung_id);
|
||||
|
||||
var datasource="<?php echo APP_ROOT; ?>rdf/notiz.rdf.php?ts="+gettimestamp();
|
||||
datasource = datasource+"&projekt_kurzbz="+encodeURIComponent(projekt_kurzbz);
|
||||
datasource = datasource+"&projektphase_id="+encodeURIComponent(projektphase_id);
|
||||
@@ -235,10 +252,31 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<parameter name="id"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
var param = '';
|
||||
var projekt_kurzbz = this.getAttribute('projekt_kurzbz');
|
||||
var projektphase_id = this.getAttribute('projektphase_id');
|
||||
var projekttask_id = this.getAttribute('projekttask_id');
|
||||
var uid = this.getAttribute('uid');
|
||||
var person_id = this.getAttribute('person_id');
|
||||
var prestudent_id = this.getAttribute('prestudent_id');
|
||||
var bestellung_id = this.getAttribute('bestellung_id');
|
||||
|
||||
var opener_id = this.getAttribute('id');
|
||||
|
||||
var param = '';
|
||||
|
||||
param = param+'?projekt_kurzbz='+encodeURIComponent(projekt_kurzbz);
|
||||
param = param+'&projektphase_id='+encodeURIComponent(projektphase_id);
|
||||
param = param+'&projekttask_id='+encodeURIComponent(projekttask_id);
|
||||
param = param+'&uid='+encodeURIComponent(uid);
|
||||
param = param+'&person_id='+encodeURIComponent(person_id);
|
||||
param = param+'&prestudent_id='+encodeURIComponent(prestudent_id);
|
||||
param = param+'&bestellung_id='+encodeURIComponent(bestellung_id);
|
||||
|
||||
param = param+'&opener_id='+encodeURIComponent(opener_id);
|
||||
if(id!=undefined)
|
||||
param = '?id='+id;
|
||||
param = param+'&id='+id;
|
||||
|
||||
|
||||
window.open('<?php echo APP_ROOT; ?>content/notiz.window.xul.php'+param,'Notiz','chrome, status=no, width=500, height=350, centerscreen, resizable');
|
||||
]]>
|
||||
</body>
|
||||
@@ -253,7 +291,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var prestudent_id = this.getAttribute('prestudent_id');
|
||||
var bestellung_id = this.getAttribute('bestellung_id');
|
||||
|
||||
this.LoadNotizTree(projekt_kurzbz,projektphase_id,projekttask_id,uid,person_id,prestudent_id,bestellung_id, true);
|
||||
if(projekt_kurzbz!='' || projektphase_id!='' || projekttask_id!=''
|
||||
|| uid!='' || person_id!='' || prestudent_id!='' || bestellung_id!='')
|
||||
{
|
||||
this.LoadNotizTree(projekt_kurzbz,projektphase_id,projekttask_id,uid,person_id,prestudent_id,bestellung_id, true);
|
||||
}
|
||||
</constructor>
|
||||
<destructor>
|
||||
//debug('Notiz Binding Stop');
|
||||
|
||||
+31
-3
@@ -149,7 +149,7 @@ class notiz extends basis_db
|
||||
'ende='.$this->addslashes($this->ende).', '.
|
||||
'erledigt='.($this->erledigt?'true':'false').', '.
|
||||
'updateamum='.$this->addslashes($this->updateamum).', '.
|
||||
'updatevon='.$this->addslashes($this->updatevon).', '.
|
||||
'updatevon='.$this->addslashes($this->updatevon).' '.
|
||||
'WHERE notiz_id='.$this->addslashes($this->notiz_id).';';
|
||||
}
|
||||
|
||||
@@ -184,11 +184,39 @@ class notiz extends basis_db
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Fehler beim Speichern des Datensatzes";
|
||||
$this->errormsg = "Fehler beim Speichern des Datensatzes".$qry;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Speichert die Zuordnung einer Notiz
|
||||
*
|
||||
*/
|
||||
public function saveZuordnung()
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id,
|
||||
uid, person_id, prestudent_id, bestellung_id) VALUES(".
|
||||
$this->addslashes($this->notiz_id).','.
|
||||
$this->addslashes($this->projekt_kurzbz).','.
|
||||
$this->addslashes($this->projektphase_id).','.
|
||||
$this->addslashes($this->projekttask_id).','.
|
||||
$this->addslashes($this->uid).','.
|
||||
$this->addslashes($this->person_id).','.
|
||||
$this->addslashes($this->prestudent_id).','.
|
||||
$this->addslashes($this->bestellung_id).');';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern der Daten'.$qry;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
+6
-2
@@ -29,6 +29,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
// DAO
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/notiz.class.php');
|
||||
require_once('../include/datum.class.php');
|
||||
|
||||
$rdf_url='http://www.technikum-wien.at/notiz';
|
||||
|
||||
@@ -50,6 +51,7 @@ $uid=(isset($_GET['uid'])?$_GET['uid']:null);
|
||||
$person_id=(isset($_GET['person_id'])?$_GET['person_id']:null);
|
||||
$prestudent_id=(isset($_GET['prestudent_id'])?$_GET['prestudent_id']:null);
|
||||
$bestellung_id=(isset($_GET['bestellung_id'])?$_GET['bestellung_id']:null);
|
||||
$datum_obj = new datum();
|
||||
|
||||
if(!$notiz->getNotiz($erledigt, $projekt_kurzbz, $projektphase_id, $projekttask_id, $uid, $person_id, $prestudent_id, $bestellung_id))
|
||||
die($notiz->errormsg);
|
||||
@@ -64,8 +66,10 @@ foreach($notiz->result as $row)
|
||||
<NOTIZ:text><![CDATA['.$row->text.']]></NOTIZ:text>
|
||||
<NOTIZ:verfasser_uid><![CDATA['.$row->verfasser_uid.']]></NOTIZ:verfasser_uid>
|
||||
<NOTIZ:bearbeiter_uid><![CDATA['.$row->bearbeiter_uid.']]></NOTIZ:bearbeiter_uid>
|
||||
<NOTIZ:start><![CDATA['.$row->start.']]></NOTIZ:start>
|
||||
<NOTIZ:ende><![CDATA['.$row->ende.']]></NOTIZ:ende>
|
||||
<NOTIZ:start><![CDATA['.$datum_obj->formatDatum($row->start,'d.m.Y').']]></NOTIZ:start>
|
||||
<NOTIZ:ende><![CDATA['.$datum_obj->formatDatum($row->ende,'d.m.Y').']]></NOTIZ:ende>
|
||||
<NOTIZ:startISO><![CDATA['.$row->start.']]></NOTIZ:startISO>
|
||||
<NOTIZ:endeISO><![CDATA['.$row->ende.']]></NOTIZ:endeISO>
|
||||
<NOTIZ:erledigt><![CDATA['.($row->erledigt?'Ja':'Nein').']]></NOTIZ:erledigt>
|
||||
<NOTIZ:insertamum><![CDATA['.$row->insertamum.']]></NOTIZ:insertamum>
|
||||
<NOTIZ:insertvon><![CDATA['.$row->insertvon.']]></NOTIZ:insertvon>
|
||||
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
@import url("chrome://global/skin/");
|
||||
|
||||
label.kalenderwoche
|
||||
{
|
||||
font-size: medium;
|
||||
}
|
||||
button
|
||||
{
|
||||
font-size: x-small;
|
||||
min-width: 10px;
|
||||
}
|
||||
menubar,menupopup,toolbar,tabpanels,tabbox,iframe,box,hbox,vbox,tree,label,description
|
||||
{
|
||||
border: 0px;
|
||||
border-top: 0px;
|
||||
border-bottom: 0px;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
border-top-width: 0px;
|
||||
border-bottom-width: 0px;
|
||||
border-left-width: 0px;
|
||||
border-right-width: 0px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
menupopup
|
||||
{
|
||||
border: 1px solid black;
|
||||
}
|
||||
grid.lvaStundenplan
|
||||
{
|
||||
font-size: x-small;
|
||||
}
|
||||
grid.lvaStundenplan button
|
||||
{
|
||||
font-size: x-small;
|
||||
border: 0px;
|
||||
border-top: 0px;
|
||||
border-bottom: 0px;
|
||||
border-left: 0px;
|
||||
border-right: 0px;
|
||||
border-top-width: 0px;
|
||||
border-bottom-width: 0px;
|
||||
border-left-width: 0px;
|
||||
border-right-width: 0px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
|
||||
tree treecol {
|
||||
background-color: #FFFFCC;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
tree {
|
||||
font-size:9pt;
|
||||
font-family:Arial;
|
||||
}
|
||||
|
||||
box.studentDetail {
|
||||
-moz-binding: url('lehrveranstaltungbinding.xml.php#studentDetail');
|
||||
}
|
||||
|
||||
label,textbox {
|
||||
font-size:9pt;
|
||||
font-family:Arial;
|
||||
}
|
||||
|
||||
treechildren::-moz-tree-row(selected) { background-color: #FFFFAA; }
|
||||
treechildren::-moz-tree-row(odd) { background-color: #EEEEEE; }
|
||||
treechildren::-moz-tree-row(odd, selected) { background-color: #FFFFAA; }
|
||||
treechildren::-moz-tree-row(even, selected) { background-color: #FFFFAA; }
|
||||
treechildren::-moz-tree-cell-text(selected) { color: #000000; }
|
||||
treechildren::-moz-tree-cell-text(odd, selected) { color: #000000; }
|
||||
Executable
+137
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 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
|
||||
* Karl Burkhart <burkhart@technikum-wien.at>.
|
||||
*/
|
||||
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");
|
||||
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/notiz.class.php');
|
||||
require_once('../include/datum.class.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
|
||||
$SOAPServer = new SoapServer(APP_ROOT."/soap/notiz.wsdl.php?".microtime());
|
||||
$SOAPServer->addFunction("saveNotiz");
|
||||
$SOAPServer->addFunction("deleteNotiz");
|
||||
$SOAPServer->handle();
|
||||
|
||||
// WSDL Chache auf aus
|
||||
ini_set("soap.wsdl_cache_enabled", "0");
|
||||
|
||||
/**
|
||||
*
|
||||
* Speichert die vom Webservice übergebenen Parameter in die DB
|
||||
* @param string $notiz_id
|
||||
* @param string $titel
|
||||
* @param string $text
|
||||
* @param string $verfasser_uid
|
||||
* @param string $bearbeiter_uid
|
||||
* @param string $start
|
||||
* @param string $ende
|
||||
* @param string $projekt_kurzbz
|
||||
* @param string $projektphase_id
|
||||
* @param string $projekttask_id
|
||||
* @param string $uid
|
||||
* @param string $person_id
|
||||
* @param string $prestudent_id
|
||||
* @param string $bestellung_id
|
||||
*/
|
||||
function saveNotiz($notiz_id, $titel, $text, $verfasser_uid, $bearbeiter_uid, $start, $ende, $projekt_kurzbz, $projektphase_id, $projekttask_id, $uid, $person_id, $prestudent_id, $bestellung_id)
|
||||
{
|
||||
$user = get_uid();
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/notiz', null, 'sui'))
|
||||
return new SoapFault("Server", "Sie haben keine Berechtigung zum Speichern von Notizen");
|
||||
|
||||
$notiz = new notiz();
|
||||
if($notiz_id != '')
|
||||
{
|
||||
if($notiz->load($notiz_id))
|
||||
{
|
||||
$notiz->new = false;
|
||||
}
|
||||
else
|
||||
return new SoapFault("Server", "Fehler beim Laden");
|
||||
}
|
||||
else
|
||||
{
|
||||
$notiz->new=true;
|
||||
$notiz->insertvon = $user;
|
||||
$notiz->insertamum = date('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
$notiz->titel=$titel;
|
||||
$notiz->text=$text;
|
||||
$notiz->verfasser_uid = $verfasser_uid;
|
||||
$notiz->bearbeiter_uid = $bearbeiter_uid;
|
||||
$notiz->start = $start;
|
||||
$notiz->ende = $ende;
|
||||
|
||||
if($notiz->save())
|
||||
{
|
||||
if($notiz->new)
|
||||
{
|
||||
$notiz->projekt_kurzbz = $projekt_kurzbz;
|
||||
$notiz->projektphase_id = $projektphase_id;
|
||||
$notiz->projekttask_id = $projekttask_id;
|
||||
$notiz->uid = $uid;
|
||||
$notiz->person_id = $person_id;
|
||||
$notiz->prestudent_id = $prestudent_id;
|
||||
$notiz->bestellung_id = $bestellung_id;
|
||||
|
||||
if(!$notiz->saveZuordnung())
|
||||
return new SoapFault("Server", $notiz->errormsg);
|
||||
}
|
||||
return $notiz->notiz_id;
|
||||
}
|
||||
else
|
||||
return new SoapFault("Server", $notiz->errormsg);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Löscht die Notiz mit der vom Webservice übergebenen ID
|
||||
* @param $notiz_id
|
||||
*/
|
||||
function deleteNotiz($notiz_id)
|
||||
{
|
||||
$user = get_uid();
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/notiz', null, 'suid'))
|
||||
return new SoapFault("Server", "Sie haben keine Berechtigung zum Speichern von Notizen");
|
||||
|
||||
$notiz = new notiz();
|
||||
if($notiz->delete($notiz_id))
|
||||
return "OK";
|
||||
else
|
||||
return new SoapFault("Server", $projekttask->errormsg);
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Executable
+81
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
header("Content-type: text/plain");
|
||||
echo "<?xml version='1.0' encoding='utf-8' ?>";
|
||||
?>
|
||||
|
||||
<wsdl:definitions name="Notiz"
|
||||
targetNamespace="http://localhost/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://localhost/soap/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsd1="http://localhost/soap/notiz.xsd"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
|
||||
<wsdl:message name="saveNotizRequest">
|
||||
<wsdl:part name="notiz_id" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="titel" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="text" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="verfasser_uid" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="bearbeiter_uid" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="start" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="ende" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="projekt_kurzbz" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="projektphase_id" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="projekttask_id" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="uid" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="person_id" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="prestudent_id" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="bestellung_id" type="xsd:string"></wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:message name="saveNotizResponse">
|
||||
<wsdl:part name="message" type="xsd:string"></wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:message name="deleteNotizRequest">
|
||||
<wsdl:part name="notiz_id" type="xsd:string"></wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="deleteNotizResponse">
|
||||
<wsdl:part name="message" type="xsd:string"></wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<wsdl:portType name="ConfigPortType" >
|
||||
<wsdl:operation name="saveNotiz">
|
||||
<wsdl:input message="tns:saveNotizRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:saveNotizResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="deleteNotiz">
|
||||
<wsdl:input message="tns:deleteNotizRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:deleteNotizResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
|
||||
<wsdl:binding name="ConfigBinding" type="tns:ConfigPortType">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="saveNotiz">
|
||||
<soap:operation soapAction="<?php echo APP_ROOT."soap/saveNotiz";?>" />
|
||||
<wsdl:input>
|
||||
<soap:body use="encoded" namespace="http://localhost/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="encoded" namespace="http://localhost/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="deleteNotiz">
|
||||
<soap:operation soapAction="<?php echo APP_ROOT."soap/deleteNotiz";?>" />
|
||||
<wsdl:input>
|
||||
<soap:body use="encoded" namespace="http://localhost/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="encoded" namespace="http://localhost/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
|
||||
<wsdl:service name="Notiz">
|
||||
<wsdl:port name="ConfigWebservicePort" binding="tns:ConfigBinding">
|
||||
<soap:address location="<?php echo APP_ROOT."soap/notiz.soap.php";?>"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
Reference in New Issue
Block a user