mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-20 21:49:27 +00:00
Projektphase auf Complex Type umgeschrieben
This commit is contained in:
@@ -219,21 +219,26 @@ function saveProjektphaseDetail()
|
||||
neu = document.getElementById('checkbox-projektphase-detail-neu').checked;
|
||||
|
||||
var soapBody = new SOAPObject("saveProjektphase");
|
||||
soapBody.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
soapBody.appendChild(new SOAPObject("projektphase_fk")).val(projektphase_fk);
|
||||
soapBody.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
soapBody.appendChild(new SOAPObject("bezeichnung")).val(bezeichnung);
|
||||
soapBody.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
soapBody.appendChild(new SOAPObject("start")).val(start);
|
||||
soapBody.appendChild(new SOAPObject("ende")).val(ende);
|
||||
soapBody.appendChild(new SOAPObject("budget")).val(budget);
|
||||
soapBody.appendChild(new SOAPObject("personentage")).val(personentage);
|
||||
//soapBody.appendChild(new SOAPObject("username")).val('joe');
|
||||
//soapBody.appendChild(new SOAPObject("passwort")).val('waschl');
|
||||
|
||||
var phase = new SOAPObject("phase");
|
||||
phase.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
phase.appendChild(new SOAPObject("projektphase_fk")).val(projektphase_fk);
|
||||
phase.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
phase.appendChild(new SOAPObject("bezeichnung")).val(bezeichnung);
|
||||
phase.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
phase.appendChild(new SOAPObject("start")).val(start);
|
||||
phase.appendChild(new SOAPObject("ende")).val(ende);
|
||||
phase.appendChild(new SOAPObject("budget")).val(budget);
|
||||
phase.appendChild(new SOAPObject("personentage")).val(personentage);
|
||||
if(neu)
|
||||
soapBody.appendChild(new SOAPObject("neu")).val('true');
|
||||
phase.appendChild(new SOAPObject("neu")).val('true');
|
||||
else
|
||||
soapBody.appendChild(new SOAPObject("neu")).val('false');
|
||||
soapBody.appendChild(new SOAPObject("user")).val(getUsername());
|
||||
|
||||
phase.appendChild(new SOAPObject("neu")).val('false');
|
||||
phase.appendChild(new SOAPObject("user")).val(getUsername());
|
||||
soapBody.appendChild(phase);
|
||||
|
||||
var sr = new SOAPRequest("saveProjektphase",soapBody);
|
||||
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/projektphase.soap.php?"+gettimestamp();
|
||||
|
||||
@@ -34,7 +34,6 @@ function initProjektphase(projektphase_id)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
|
||||
}
|
||||
|
||||
// ****
|
||||
@@ -55,19 +54,25 @@ function saveProjektphase()
|
||||
// Variablen checken
|
||||
|
||||
// SOAP-Action
|
||||
var soapBody = new SOAPObject("saveProjektphase");
|
||||
soapBody.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
soapBody.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
soapBody.appendChild(new SOAPObject("projektphase_fk")).val(projektphase_fk);
|
||||
soapBody.appendChild(new SOAPObject("bezeichnung")).val(bezeichnung);
|
||||
soapBody.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
soapBody.appendChild(new SOAPObject("start")).val(start);
|
||||
soapBody.appendChild(new SOAPObject("ende")).val(ende);
|
||||
soapBody.appendChild(new SOAPObject("budget")).val(budget);
|
||||
soapBody.appendChild(new SOAPObject("personentage")).val(personentage);
|
||||
soapBody.appendChild(new SOAPObject("user")).val(getUsername());
|
||||
soapBody.appendChild(new SOAPObject("neu")).val("true");
|
||||
var sr = new SOAPRequest("saveProjektDaten",soapBody);
|
||||
var soapBody = new SOAPObject("saveProjektphase");
|
||||
//soapBody.appendChild(new SOAPObject("username")).val('joe');
|
||||
//soapBody.appendChild(new SOAPObject("passwort")).val('waschl');
|
||||
|
||||
var phase = new SOAPObject("phase");
|
||||
phase.appendChild(new SOAPObject("projektphase_id")).val(projektphase_id);
|
||||
phase.appendChild(new SOAPObject("projektphase_fk")).val(projektphase_fk);
|
||||
phase.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
|
||||
phase.appendChild(new SOAPObject("bezeichnung")).val(bezeichnung);
|
||||
phase.appendChild(new SOAPObject("beschreibung")).val(beschreibung);
|
||||
phase.appendChild(new SOAPObject("start")).val(start);
|
||||
phase.appendChild(new SOAPObject("ende")).val(ende);
|
||||
phase.appendChild(new SOAPObject("budget")).val(budget);
|
||||
phase.appendChild(new SOAPObject("personentage")).val(personentage);
|
||||
phase.appendChild(new SOAPObject("neu")).val("true");
|
||||
|
||||
soapBody.appendChild(phase);
|
||||
|
||||
var sr = new SOAPRequest("saveProjektPhase",soapBody);
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/projektphase.soap.php?"+gettimestamp();
|
||||
SOAPClient.SendRequest(sr, clb_saveProjektphase);
|
||||
}
|
||||
|
||||
+29
-26
@@ -28,6 +28,8 @@ require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/basis_db.class.php');
|
||||
require_once('../include/projektphase.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/projektphase.wsdl.php?".microtime());
|
||||
$SOAPServer->addFunction("saveProjektphase");
|
||||
@@ -38,44 +40,45 @@ ini_set("soap.wsdl_cache_enabled", "0");
|
||||
|
||||
/**
|
||||
*
|
||||
* Speichert die vom Webservice übergebenen Parameter in die DB
|
||||
* @param string $projektphase_id
|
||||
* @param string $projekt_kurzbz
|
||||
* @param string $projektphase_fk
|
||||
* @param string $bezeichnung
|
||||
* @param string $beschreibung
|
||||
* @param date $start
|
||||
* @param date $ende
|
||||
* @param string $budget
|
||||
* @param string $personentage
|
||||
* @param string $user
|
||||
* @param string $neu
|
||||
* Speichert die vom Webservice übergebene Phase in die DB
|
||||
* @param $username
|
||||
* @param $passwort
|
||||
* @param $phase
|
||||
*/
|
||||
function saveProjektphase($projektphase_id, $projekt_kurzbz, $projektphase_fk, $bezeichnung, $beschreibung, $start, $ende, $budget, $personentage, $user, $neu)
|
||||
{
|
||||
function saveProjektphase($username, $passwort, $phase)
|
||||
{
|
||||
if(!$user = check_user($username, $passwort))
|
||||
return new SoapFault("Server", "Invalid Credentials");
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(!$rechte->isBerechtigt('planner', null, 'sui'))
|
||||
return new SoapFault("Server", "Sie haben keine Berechtigung zum Speichern von Phasen.");
|
||||
|
||||
$projektphase = new projektphase();
|
||||
if($projektphase_id!='')
|
||||
if($phase->projektphase_id!='')
|
||||
{
|
||||
$projektphase->load($projektphase_id);
|
||||
$projektphase->load($phase->projektphase_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$projektphase->insertvon = $user;
|
||||
$projektphase->insertamum=date('Y-m-d H:i:s');
|
||||
}
|
||||
$projektphase->projektphase_id=$projektphase_id;
|
||||
$projektphase->projekt_kurzbz=$projekt_kurzbz;
|
||||
$projektphase->projektphase_fk=$projektphase_fk;
|
||||
$projektphase->bezeichnung = $bezeichnung;
|
||||
$projektphase->beschreibung = $beschreibung;
|
||||
$projektphase->start = $start;
|
||||
$projektphase->ende = $ende;
|
||||
$projektphase->budget = $budget;
|
||||
$projektphase->personentage = $personentage;
|
||||
$projektphase->projektphase_id=$phase->projektphase_id;
|
||||
$projektphase->projekt_kurzbz=$phase->projekt_kurzbz;
|
||||
$projektphase->projektphase_fk=$phase->projektphase_fk;
|
||||
$projektphase->bezeichnung = $phase->bezeichnung;
|
||||
$projektphase->beschreibung = $phase->beschreibung;
|
||||
$projektphase->start = $phase->start;
|
||||
$projektphase->ende = $phase->ende;
|
||||
$projektphase->budget = $phase->budget;
|
||||
$projektphase->personentage = $phase->personentage;
|
||||
$projektphase->updatevon = $user;
|
||||
$projektphase->updateamum = date('Y-m-d H:i:s');
|
||||
|
||||
if($neu=='true')
|
||||
if($phase->neu=='true')
|
||||
$projektphase->new = true;
|
||||
else
|
||||
$projektphase->new = false;
|
||||
|
||||
@@ -5,14 +5,22 @@ echo "<?xml version='1.0' encoding='utf-8' ?>";
|
||||
?>
|
||||
|
||||
<wsdl:definitions name="Projektphase"
|
||||
targetNamespace="http://localhost/soap/"
|
||||
targetNamespace="http://www.technikum-wien.at/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:tns="http://localhost/soap/"
|
||||
xmlns:tns="http://www.technikum-wien.at/soap/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsd1="http://localhost/soap/projektphase.xsd"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
|
||||
<wsdl:message name="SaveProjektphaseRequest">
|
||||
|
||||
<wsdl:message name="SaveProjektphaseRequest">
|
||||
<wsdl:part name="username" type="xsd:string" minOccurs="0"></wsdl:part>
|
||||
<wsdl:part name="passwort" type="xsd:string" minOccurs="0"></wsdl:part>
|
||||
<wsdl:part name="phase" type="tns:phase"></wsdl:part>
|
||||
</wsdl:message>
|
||||
|
||||
<xsd:complexType name="phase">
|
||||
<xsd:all>
|
||||
<wsdl:part name="projektphase_id" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="projekt_kurzbz" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="projektphase_fk" type="xsd:string"></wsdl:part>
|
||||
@@ -24,7 +32,8 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:part name="personentage" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="user" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="neu" type="xsd:boolean"></wsdl:part>
|
||||
</wsdl:message>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
|
||||
<wsdl:message name="SaveProjektphaseResponse">
|
||||
<wsdl:part name="message" type="xsd:string"></wsdl:part>
|
||||
|
||||
Reference in New Issue
Block a user