train->FlightsNo,0,1);
$arr = array('C','D','G');
$sel_count = 0;
if(in_array($traintype,$arr)){
$selectseat = '';
$train_select = $v->train->FOI_SelectedSeat;
$a1=$b1=$c1=$d1=$f1=$a2=$b2=$c2=$d2=$f2=false;
if($train_select){
$obj = explode(',',$train_select);
foreach($obj as $value){
switch($value){
case '1A':
$a1 = true;
$sel_count++;
break;
case '1B':
$b1 = true;
$sel_count++;
break;
case '1C':
$c1 = true;
$sel_count++;
break;
case '1D':
$d1 = true;
$sel_count++;
break;
case '1F':
$f1 = true;
$sel_count++;
break;
case '2A':
$a2 = true;
$sel_count++;
break;
case '2B':
$b2 = true;
$sel_count++;
break;
case '2C':
$c2 = true;
$sel_count++;
break;
case '2D':
$d2 = true;
$sel_count++;
break;
case '2F':
$f2 = true;
$sel_count++;
break;
}
}
}
$html = '';
$html .= ' '.$v->train->Cabin.' for '.$v->train->FlightsNo.' ('.$sel_count.' of '.count($v->people).' Seats) ';
$html .= '';
if($a1){
$html .= ' ';
}else{
$html .= ' ';
}
if($v->train->Aircraft == 'O' || $v->train->Aircraft == '8'){
if($b1){
$html .= ' ';
}else{
$html .= ' ';
}
}
if($c1){
$html .= ' ';
}else{
$html .= ' ';
}
if($v->train->Aircraft != '9'){
if($d1){
$html .= ' ';
}else{
$html .= ' ';
}
}
if($f1){
$html .= ' ';
}else{
$html .= ' ';
}
$html .= ' ';
$html .= '';
if($a2){
$html .= ' ';
}else{
$html .= ' ';
}
if($v->train->Aircraft == 'O' || $v->train->Aircraft == '8'){
if($b2){
$html .= ' ';
}else{
$html .= ' ';
}
}
if($c2){
$html .= ' ';
}else{
$html .= ' ';
}
if($v->train->Aircraft != '9'){
if($d2){
$html .= ' ';
}else{
$html .= ' ';
}
}
if($f2){
$html .= ' ';
}else{
$html .= ' ';
}
$html .= ' ';
if($v->train->Aircraft != 'F'){
echo $html;
}
}
?>
|