';
break;
case 'checkbox':
$ret .= '';
break;
case 'select':
$ret .= '';
break;
case 'hidden':
$ret .= '';
break;
default:
break;
}
return $ret;
}
// login credentials
$auth = array(
'login'=>'login',
'pass'=>'password'
);
// parameters to check availability
$params = array(
'ofr_tourOp'=>'ITAK',
'ofr_id'=>'3b9e9af3bea2b7e822df6805066de0cbc501a337f843d85689f84b47ac86e1f2',
'par_adt'=>'2'
);
$mdsws = new mdswsBookings();
if (isset($_POST['Person']))
$rqxml = $mdsws->genXMLRQ($auth, 'book', $params, $_POST);
else
$rqxml = $mdsws->genXMLRQ($auth, 'check', $params);
$check_res_xml = $mdsws->sendXML($rqxml);
$check_res = simplexml_load_string($check_res_xml);
if (isset($check_res->offerstatus) && isset($check_res->offerstatus->attributes()->status) && $check_res->offerstatus->attributes()->status == 'BA')
{
echo "";
if (isset($check_res->booking_number))
echo "Numer rezerwacji u operatora: ".$check_res->booking_number."\n";
echo "
";
if (isset($check_res->booking_errors))
{
foreach ($check_res->booking_errors->children() as $error)
echo ''.$error.'
';
}
echo "";
echo "Oferta dostępna! \n";
echo "Cena całkowita : ".$check_res->pricetotal->attributes()->price.' '.$check_res->pricetotal->attributes()->curr."\n";
echo "Cena za os. : ".$check_res->priceperson->attributes()->price.' '.$check_res->priceperson->attributes()->curr."\n";
if (isset($check_res->hints))
{
echo "Info od organizatora: \n\n";
foreach ($check_res->hints->children() as $hint)
echo $hint."\n";
}
echo "
";
if (isset($check_res->forminfo))
{
echo "Formularz: \n";
echo '';
}
}
else
echo 'Oferta niedostępna!';
?>