Beispiel #1
0
<?php

error_reporting(0);
//get search id
$_SESSION['aztarikh'] = $_REQUEST['aztarikh'];
$_SESSION['tatarikh'] = $_REQUEST['tatarikh'];
$aztarikh = $_GET['aztarikh'];
$tatarikh = $_GET['tatarikh'];
$way = $_GET['way'];
$extra = 'extra';
if (isset($_REQUEST['tatarikh']) && $_REQUEST['way'] == 'two') {
    $request_tmp = search_class::search($aztarikh, $tatarikh, $_SESSION['from_city'], $_SESSION['to_city'], $extra, isset($_REQUEST['airlines']) ? $_REQUEST['airlines'] : array(), isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'all', $way);
} else {
    $request_tmp = search_class::search($aztarikh, '', $_SESSION['from_city'], $_SESSION['to_city'], $extra, isset($_REQUEST['airlines']) ? $_REQUEST['airlines'] : array(), isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'all', $way);
}
if ($request_tmp['request_code']) {
    echo json_encode(array('err' => 0, 'request_code' => $request_tmp['request_code']));
} else {
    echo json_encode(array('err' => 1, 'request_code' => 0));
}
function pin_array($nidde, $array)
{
    $out = FALSE;
    foreach ($array as $value) {
        if (strpos($value, $nidde) !== FALSE) {
            $out = TRUE;
        }
    }
    return $out;
}
function checkEnabled($source, $airline)
Beispiel #2
0
$content_ok = '<div class="buy-link"><a onclick = "passengerCount(#flight_index#, this, true);" style="margin-top: 6px;" class="yourButton">انتخاب</a></div>';
$is_ajax = isset($_REQUEST['isajax']);
$aztarikh = trim($_REQUEST['aztarikh']);
$tatarikh = trim($_REQUEST['tatarikh']);
$from_city = trim($_REQUEST['from_city']);
$to_city = trim($_REQUEST['to_city']);
//$way = trim($_REQUEST['way']);
$extra = 'extra';
$airlines_ul = array();
$results = array();
$jresults = array();
if ($aztarikh != '' && $from_city != '' && $to_city != '') {
    if ($tatarikh && $way == 'two') {
        $results_tmp = search_class::search($aztarikh, $tatarikh, $from_city, $to_city, $extra, isset($_REQUEST['airlines']) ? $_REQUEST['airlines'] : array(), isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'all', $way);
    } else {
        $results_tmp = search_class::search($aztarikh, '', $from_city, $to_city, $extra, isset($_REQUEST['airlines']) ? $_REQUEST['airlines'] : array(), isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'all', $way);
    }
    $sairlines = isset($_REQUEST['airlines']) ? $_REQUEST['airlines'] : array('ALL');
    $flight_results = "<div style='padding:10px; color:red;font-size:18px; font-family:yekan;'>" . 'نتیجه ای یافت نشد.' . "</div>";
    $flight_resultss = '';
    $flight_index = 0;
    if ($flight_resultss != '') {
        $flight_results = $flight_resultss;
    }
    //    var_dump($airlines_ul);
    $airline_translate = array(array("ایران ایر", "IRAN AIR"), array("ماهان", "ماهان", "MAHAN"), array("تابان", "TABAN"), array("زاگرس", "ZAGROS"), array("آتا", "اتا", "ATA"), array("کیش ایر", "KISH AIR"), array("معراج"), array("ASEMAN", "آسمان"), array("معراج"), array("کاسپین"), array("كاسپين"), array("ايرتور"));
    if (count($airlines_ul) == 0) {
        //    $airlines_ul = '';
    } else {
        $tmppp = '<ul>';
        for ($i = 0; $i < count($airlines_ul); $i++) {