Skip to content

Instantly share code, notes, and snippets.

@samfajar
Created September 8, 2014 10:37
Show Gist options
  • Save samfajar/b80e1b028cbfeb650b90 to your computer and use it in GitHub Desktop.
Save samfajar/b80e1b028cbfeb650b90 to your computer and use it in GitHub Desktop.
// check value restriction
$restriction = (string)$node['ristriction']->Restriction;
if(($restriction != 'Open' || $restriction != 'Close'))
{
$correct_data = FALSE;
// exit loop
break;
}
$status = (string)$node['ristriction']->Status;
if($status != 'Arrival' || $status != 'Depature' || $status != 'Master')
{
$correct_data = FALSE;
// exit loop
break;
}
$rateplancode = (int)$node['StatusApplicationControl']->RatePlanCode;
if(!($rateplancode > 0) || $rateplancode == NULL)
{
$correct_data = FALSE;
// exit loop
break;
}
$invcode = (int)$node['StatusApplicationControl']->InvCode;
if(!($invcode > 0) || $invcode == NULL)
{
$correct_data = FALSE;
// exit loop
break;
}
$end = (string)$node['StatusApplicationControl']->End;
if($end == '')
{
$correct_data = FALSE;
// exit loop
break;
}
$bookinglimit = (int)$AvailStatusMessage->attributes()->BookingLimit;
if($bookinglimit < 0 || $bookinglimit == NULL)
{
$correct_data = FALSE;
// exit loop
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment