| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/application/views/scripts/flight-new/ |
Upload File : |
<?php
$apiResponse = $this->apiResponse;
$prices = $this->prices;
$item = $this->item;
$ICSourceSysId = $apiResponse['ICSourceSysId'];
$results = $apiResponse['results'];
$NewFareRules = $apiResponse['NewFareRules'];
$ErrorMessage = $apiResponse['message'];
?>
<?php if ($ICSourceSysId == 7) { ?>
<?php if ($NewFareRules) { ?>
<ul class="nav nav-tabs farerulestab" role="tablist" style="margin-bottom: 0px">
<?php if ($NewFareRules) {
$ii = 0;
foreach ($NewFareRules as $secTors => $vl) { ?>
<li role="presentation" class="<?= ($ii == 0) ? 'active' : '' ?>"><a href="#<?= $secTors ?>" aria-controls="profile" role="tab" data-toggle="tab"><?= str_replace('_', ' ', $secTors) ?></a></li>
<?php
$ii++;
}
}
?>
</ul>
<div class="tab-content">
<?php if ($NewFareRules) {
$iii = 0;
foreach ($NewFareRules as $secTors => $vl) { ?>
<div role="tabpanel" class="tab-pane <?= ($iii == 0) ? 'active' : '' ?>" id="<?= $secTors ?>" style="padding: 0px;">
<table class="table table-bordered">
<tr>
<th style="padding: 15px; width:15%;">Sector</th>
<th style="padding: 15px; width:35%;">Time Frame</th>
<th style="padding: 15px; width:50%;">Charges & Description</th>
</tr>
<tr style="text-align: center;">
<td colspan="3" style="text-align: center; color: red;">Mentioned fees is per pax per sector <a flowType="SEARCH" style="float: right;" IsLCC="<?= $getData['IsLCC'] ?>" id="<?= $getData['TraceId'] ?>" class="DetailedRules" href="javascript://">Detailed Rules</a></td>
</tr>
<?php
if ($vl) {
foreach ($vl as $key => $value) {
?>
<tr>
<td style="padding: 15px;"><?= $value['sector'] ?></td>
<td style="padding: 15px;"><?= $value['TimeFrame'] ?></td>
<td style="padding: 15px;">
<?php if ($value['amount'] > 0 || $value['additionalFee'] > 0) { ?>
<?= $value['CurrencyTitle'] ?> <?= $value['amount'] ?> + <?= $value['additionalFee'] ?>
<?php } ?>
<?php foreach ($value['policyInfo'] as $poinfo) { ?>
<p style="line-height: 10px; padding-top: 5px"><?= $poinfo ?></p>
<?php } ?>
</td>
</tr>
<?php }
} ?>
</table>
</div>
<?php
$iii++;
}
}
?>
</div>
<?php } else { ?>
<table class="tablestyle" border="0" width="100%">
<tr style="text-align: center;">
<td style="text-align: center;"><?= $ErrorMessage ?></td>
</tr>
</table>
<?php } ?>
<?php
} elseif ($ICSourceSysId == 3) {
$FareRules = $results['Response']['FareRules'];
$ErrorCode = $results['Response']['Error']['ErrorCode'];
$ErrorMessage = $results['Response']['Error']['ErrorMessage'];
?>
<?php if (isset($prices['MiniFR']) && !empty($prices['MiniFR'])) { ?>
<div class="tab-content">
<div style="padding: 0px;">
<table class="table table-bordered" style="font-size: 12px;">
<tr>
<th style="padding: 15px; width:15%;">Sector</th>
<th style="padding: 15px; width:35%;">Time Frame</th>
<th style="padding: 15px; width:50%;">Charges & Description</th>
</tr>
<?php
if (isset($prices['MiniFR'])) {
?>
<tr style="text-align: center;">
<td colspan="3" style="text-align: center; font-weight: 600;font-size: 15px; color: black;"><?= $item['SourceAirportCode'] ?> - <?= $item['DestAirportCode'] ?></td>
</tr>
<?php
if ($prices['MiniFR']) {
foreach ($prices['MiniFR'] as $types => $values) {
echo '<tr><td colspan="3" style="background: #6c6d6f; color: white;">' . $types . '</td></tr>';
foreach ($values as $value) {
?>
<tr>
<td style="padding: 15px;" nowrap><?= $value['sector'] ?></td>
<td style="padding: 15px;"><?= $value['TimeFrame'] ?></td>
<td style="padding: 15px;"><?= $value['CurrencyTitle'] ?> <?= $value['amount'] ?> + <?= $value['additionalFee'] ?></td>
</tr>
<?php
}
}
}
?>
<?php
}
?>
</table>
</div>
</div>
<?php } ?>
<table border="0" style="border:1px solid #d7d7d7;" width="100%">
<tbody>
<?php if ($ErrorCode == 0) { ?>
<?php if ($FareRules) {
foreach ($FareRules as $val) { ?>
<tr style="text-align: center;">
<td style="text-align: center; background:#C4EEC8;"><?= $val['Origin'] ?> - <?= $val['Destination'] ?></td>
</tr>
<tr>
<td class="fare_cont_align11" style="text-align: left;display: block; padding: 0 10px;"><?= htmlspecialchars_decode(str_replace('--------------------------------------------------', '<br><br>', $val['FareRuleDetail'])) ?></td>
</tr>
<?php }
}
} else { ?>
<tr style="text-align: center;">
<td style="text-align: center;"><?= $ErrorMessage ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } elseif ($ICSourceSysId == 11 || $ICSourceSysId == 13 || $ICSourceSysId == 14 || $ICSourceSysId == 20 || $ICSourceSysId == 30) {
$FareRules = $apiResponse['results']['FareRules'];
?>
<table border="0" style="border:1px solid #d7d7d7;" width="100%">
<tbody>
<?php if ($FareRules) {
foreach ($FareRules as $val) { ?>
<tr style="text-align: center;">
<td style="text-align: center;"><?= $val['FareRuleDesc'] ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<?php } else { ?>
<table border="0" style="border:1px solid #d7d7d7;" width="100%">
<tbody>
<tr style="text-align: center;">
<td style="text-align: center; background:#C4EEC8;"><?= $item['SourceAirportCode'] ?> - <?= $item['DestAirportCode'] ?></td>
</tr>
<tr style="text-align: center;">
<td style="text-align: center;"><?= $item['FareRules'] ?></td>
</tr>
</tbody>
</table>
<?php } ?>
<div id="FareRulesDdetails"></div>