mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
Ort Webservice - getRaeume akzeptiert nun optional einen Raumtyp als Parameter
This commit is contained in:
+3
-3
@@ -115,7 +115,7 @@ function getOrtFromKurzbz($ort_kurzbz, $authentifizierung)
|
||||
INSERT INTO system.tbl_webservicerecht(berechtigung_kurzbz, methode, attribut) VALUES('soap/ort','getRaeume','reservieren');
|
||||
INSERT INTO system.tbl_webservicerecht(berechtigung_kurzbz, methode, attribut) VALUES('soap/ort','getRaeume','stockwerk');
|
||||
*/
|
||||
function getRaeume($authentifizierung)
|
||||
function getRaeume($raumtyp_kurzbz=null, $authentifizierung)
|
||||
{
|
||||
$user = $authentifizierung->username;
|
||||
$passwort = $authentifizierung->passwort;
|
||||
@@ -131,8 +131,8 @@ function getRaeume($authentifizierung)
|
||||
|
||||
// Daten für Lehrveranstaltung
|
||||
$ort = new ort();
|
||||
if(!$ort->getAll())
|
||||
return new SoapFault("Server", "Error loading Data");
|
||||
if(!$ort->getAll($raumtyp_kurzbz))
|
||||
return new SoapFault("Server", "Error loading Data:".$ort->errormsg);
|
||||
|
||||
$return = array();
|
||||
class foo{};
|
||||
|
||||
@@ -49,6 +49,7 @@ echo "<?xml version='1.0' encoding='utf-8' ?>";
|
||||
</s:complexType>
|
||||
|
||||
<wsdl:message name="GetRaeumeRequest">
|
||||
<wsdl:part minOccurs="0" maxOccurs="1" name="raumtyp_kurzbz" type="s:string"/>
|
||||
<wsdl:part minOccurs="0" maxOccurs="1" name="authentifizierung" type="tns:GetAuthentifizierung"/>
|
||||
</wsdl:message>
|
||||
|
||||
|
||||
@@ -148,8 +148,8 @@ if(!check_lektor($getuid))
|
||||
{
|
||||
var soapBody = new SOAPObject("getLehrveranstaltungFromId");
|
||||
var authentifizierung = new SOAPObject("authentifizierung");
|
||||
authentifizierung.appendChild(new SOAPObject("username")).val("burkhart");
|
||||
authentifizierung.appendChild(new SOAPObject("passwort")).val("R3sid3nt");
|
||||
authentifizierung.appendChild(new SOAPObject("username")).val("foo");
|
||||
authentifizierung.appendChild(new SOAPObject("passwort")).val("bar");
|
||||
|
||||
soapBody.appendChild(new SOAPObject("lehrveranstaltung_id")).val("222");
|
||||
soapBody.appendChild(new SOAPObject("semester")).val("");
|
||||
|
||||
@@ -117,6 +117,10 @@ if(!check_lektor($getuid))
|
||||
<td align="right">Passwort:</td>
|
||||
<td><input id="passwort" name="passwort" type="password" size="30" maxlength="255" value="'.(isset($_REQUEST['passwort']) ? $_REQUEST['passwort'] : "").'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Raumtyp:</td>
|
||||
<td><input id="raumtyp_kurzbz" name="raumtyp_kurzbz" type="text" size="30" maxlength="255" value="'.(isset($_REQUEST['raumtyp_kurzbz']) ? $_REQUEST['raumtyp_kurzbz'] : "").'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"></td>
|
||||
<td>
|
||||
@@ -141,13 +145,16 @@ if(!check_lektor($getuid))
|
||||
{
|
||||
user = document.getElementById("username").value;
|
||||
passwort = document.getElementById("passwort").value;
|
||||
raumtyp_kurzbz = document.getElementById("raumtyp_kurzbz").value;
|
||||
|
||||
var soapBody = new SOAPObject("getRaeume");
|
||||
var authentifizierung = new SOAPObject("authentifizierung");
|
||||
authentifizierung.appendChild(new SOAPObject("username")).val(user);
|
||||
authentifizierung.appendChild(new SOAPObject("passwort")).val(passwort);
|
||||
|
||||
soapBody.appendChild(new SOAPObject("raumtyp_kurzbz")).val(raumtyp_kurzbz);
|
||||
soapBody.appendChild(authentifizierung);
|
||||
|
||||
|
||||
var sr = new SOAPRequest("getRaeume",soapBody);
|
||||
SOAPClient.Proxy="'.APP_ROOT.'/soap/ort.soap.php?"+gettimestamp();
|
||||
@@ -316,7 +323,8 @@ if(isset($_REQUEST['submit']) && $_GET['method']=='getRaeume')
|
||||
$authentifizierung = new foo();
|
||||
$authentifizierung->username=$_REQUEST['username'];
|
||||
$authentifizierung->passwort=$_REQUEST['passwort'];
|
||||
$response = $client->getRaeume($authentifizierung);
|
||||
$raumtyp_kurzbz=(isset($_REQUEST['raumtyp_kurzbz'])?$_REQUEST['raumtyp_kurzbz']:null);
|
||||
$response = $client->getRaeume($raumtyp_kurzbz,$authentifizierung);
|
||||
|
||||
var_dump($response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user