Exemple #1
0
</div>
                                </td>
                                <td>
                                    <img src="<?php 
    echo asset_url();
    ?>
images/img/arrow-blue.png">

                                    <div class="date ta_currentdate"><?php 
    echo $tatarikh;
    ?>
</div>
                                </td>
                                <td class="gh-src-des">
                                    <div class="place"><?php 
    echo city_class::loadByIata($from_city);
    ?>
</div>
                                </td>
                                <td class="next-day ta-next-day loked" style="display: block;">
                                    <a href="#">
                                        <img src="<?php 
    echo asset_url();
    ?>
images/img/next-day.png" alt="روز بعد" onclick="change($('#global_az_currentday').html(), $('#global_ta_nextday').html());" >
                                        <span class="title">روز بعد</span>
                                    </a>
                                </td>
                            </tr>
                        <?php 
}
Exemple #2
0
}
$dat = 0;
if (isset($_REQUEST['dat'])) {
    $dat = (int) $_REQUEST['dat'];
}
$results = array();
$result_fare = search_class::loadLowFare($dat);
if (isset($result_fare["data"])) {
    $results = $result_fare["data"];
    foreach ($results as $i => $res) {
        $results[$i]['from_city_small'] = city_class::loadByIata($res['from_city']);
        //$this->inc_model->substrH(city_class::loadByIata($res['from_city']), 5);
        $results[$i]['to_city_small'] = city_class::loadByIata($res['to_city']);
        //$this->inc_model->substrH(city_class::loadByIata($res['to_city']), 5);
        $results[$i]['from_city_name'] = city_class::loadByIata($res['from_city']);
        $results[$i]['to_city_name'] = city_class::loadByIata($res['to_city']);
        $results[$i]['price_monize'] = $this->inc_model->monize($res['price'] / 10);
    }
}
for ($i = 0; $i < 8; $i++) {
    if (!isset($results[$i])) {
        $results[$i]['from_city_small'] = '----';
        $results[$i]['to_city_small'] = '----';
        $results[$i]['from_city_name'] = '----';
        $results[$i]['to_city_name'] = '----';
        $results[$i]['price_monize'] = '----';
    }
}
$sign = $dat < 0 ? ' - ' : ' + ';
$dat = abs($dat);
$result_fare['tarikh'] = jdate("Y/m/d", strtotime(date("Y-m-d") . $sign . $dat . ' day'));
 $flight_types = array(0 => "", 1 => "tell.gif", 2 => "tour.gif", 3 => "twoway.gif", 4 => "", 5 => "", 6 => "", 7 => "", 8 => "");
 $tmppp = '';
 $content_ok = '<div class="buy-link"><a onclick = "passengerCount(#flight_index#, this, true);" style="margin-top: 6px;" class="yourButton">انتخاب</a></div>';
 $sairlines = isset($_REQUEST['airlines']) ? $_REQUEST['airlines'] : array('ALL');
 $extra = 'extra';
 $airlines_ul = array();
 $results = array();
 $jresults = array();
 $flight_index = 0;
 $flight_resultss = '';
 foreach ($results_tmp[0]["data"] as $flight_index0 => $flight) {
     if (pin_array($flight['airline'], $sairlines) || count($sairlines) == 1 && $sairlines[0] == 'ALL') {
         //&& (int) $flight['price'] > 10000) {
         $res = str_replace("#from_city#", city_class::loadByIata($flight['from_city']), $result_tmp);
         $res = str_replace("#asset_url#", asset_url(), $res);
         $res = str_replace("#to_city#", city_class::loadByIata($flight['to_city']), $res);
         $res = str_replace("#fdate#", jdate("Y-m-d", strtotime($flight['fdate'])), $res);
         $res = str_replace("#ftime#", $flight['ftime'], $res);
         $res = str_replace("#price#", $this->inc_model->monize($flight['price']), $res);
         $res = str_replace("#air_name#", $flight['airline'], $res);
         $res = str_replace("#flight_index#", $flight_index, $res);
         $res = str_replace("#flight_number#", $flight['flight_number'], $res);
         $res = str_replace("#air_aiata#", strtolower($flight['aiata']), $res);
         $res = str_replace("#class_ghimat#", $flight['class_ghimat'], $res);
         $res = str_replace("#capacity#", $flight['capacity'], $res);
         $res = str_replace("#source_id#", 'src_' . $flight['source_id'], $res);
         //var_dump($flight);exit;
         //check disable or not ?aiata
         if (checkEnabled($flight['source_id'], $flight['aiata'])) {
             $res = str_replace("#Disabled#", 'false', $res);
         } else {