// больше не куда фильтровать
    } else {
        $_data['conditions'] = 'SpecOff';
    }
    //echo $_data['sysopt'] . substr($siyopt_code,0,4) . $_data['sysopt'] . $sysopt . "<br>";
    $parts_data[] = $_data;
}
//var_dump($parts_data);
//die();
// ------------------------------
// ВЫВОД РЕЗУЛЬАТА
$params = array();
// подсветить conditions
$params['f_sel_name'] = "conditions";
$params['f_sel_val_col'] = array('MatchOn' => "LimeGreen", 'SpecOff' => "CornflowerBlue", 'MatchOff' => "");
echo array_h_2_html($parts_data, $parts_h, $params);
/*	
$params = array();
$params['query'] = $query;
$params['f_sel_name'] = "conditions";

// 	отработать VIN
$params['f_sel_val_col'] = array(
		'MatchOn' => "LimeGreen",
		'SpecOff' => "CornflowerBlue",
		'MatchOff' => "yellow"
		);

$params['f_exec_name'] = "part_code";
$params['exec_module'] = "Part_Subs.php";
$params['img4demo'] = "";  // определить имя рисунка
    // добавим поле EXEC
    $vin_list_h = array_keys($vin_frame_list[0]);
    $vin_list_h = array_merge(array('exec'), $vin_list_h);
    foreach ($vin_frame_list as $i => $row) {
        // EXEC на замену
        $url = "<a href='Illustrated_Index.php?vin={$vin}&catalog=" . $row['catalog'] . "&catalog_code=" . $row['catalog_code'];
        $url .= "&model_code=" . $row['model_code'] . "&sysopt=" . $row['sysopt'] . "&compl_code=" . $row['compl_code'] . "&vdate=" . $row['vdate'];
        $url .= "'>Exec</a>";
        $vin_frame_list[$i] = array_merge(array('exec' => $url), $row);
    }
    echo array_h_2_html($vin_frame_list, $vin_list_h);
    return;
}
//----------------------------------------------
// III.
echo "<hr /><H3>III. JOHOVN, SHAMEI</H3>";
echo "<font color='red'><b>Показывает список моделей, которые юзер будет выбирать если не будет точного поиска по вину.</b></font>";
$vin_model_list = _TOY_VIN_MODEL_info(array('vin' => $vin));
if (!empty($vin_model_list)) {
    // добавим поле EXEC
    $vin_list_h = array_keys($vin_model_list[0]);
    $vin_list_h = array_merge(array('exec'), $vin_list_h);
    foreach ($vin_model_list as $i => $row) {
        // EXEC на замену
        $url = "<a href='Characteristics.php?vin={$vin}&catalog=" . $row['catalog'] . "&catalog_code=" . $row['catalog_code'];
        $url .= "&model_code=" . $row['model_code'];
        $url .= "'>Exec</a>";
        $vin_model_list[$i] = array_merge(array('exec' => $url), $row);
    }
    echo array_h_2_html($vin_model_list, $vin_list_h);
}
Example #3
0
            // больше не куда фильтровать
        } else {
            $_data['conditions'] = 'SpecOff';
        }
        $parts_data[] = $_data;
    }
    //var_dump($parts_data);
    //die();
    // ------------------------------
    // ВЫВОД РЕЗУЛЬАТА
    $params = array();
    // подсветить conditions
    $params['f_sel_name'] = "conditions";
    $params['f_sel_val_col'] = array('MatchOn' => "LimeGreen", 'SpecOff' => "CornflowerBlue", 'MatchOff' => "");
    echo "<br/><hr/> Результат Поиска VIN:{$vin} Catalog:{$catalog} PNC:{$pnc}";
    $parts_matchon = array();
    // результат обработки запроса
    foreach ($parts_data as $_p_d) {
        if ($_p_d['conditions'] == 'MatchOff') {
            continue;
        }
        $parts_matchon[] = $_p_d;
    }
    echo array_h_2_html($parts_matchon, $parts_h, $params);
}
/*
// тестировать 	
$params = array();
$params['is_show_sql'] = 0;
$params['query'] = $query;
ExecQuery($params);*/
Example #4
0
<?php 
/************************************************************
 * view module
 * bunak - tecdoc@ukr.net
 *		Применяемость номера к авто
 ************************************************************/
include_once "index_ini.php";
$part_num = isset($_REQUEST["part_num"]) ? $_REQUEST["part_num"] : '';
// покажем форму для поиска
$_TEMPL = array();
$_TEMPL['part_num'] = $part_num;
include "templ_part_type.php";
// Применяемость запчасти к авто, делается долго
$part_type_res = _TOY_part_type(array('part_code' => $part_num));
if (empty($part_type_res)) {
    echo "Result is empty";
    exit;
}
$part_type_res_h = array_keys(current($part_type_res));
echo array_h_2_html($part_type_res, $part_type_res_h);
Example #5
0
 * bunak - tecdoc@ukr.net
 *
 ************************************************************/
include_once "index_ini.php";
$frame = isset($_REQUEST["frame"]) ? $_REQUEST["frame"] : '';
$fr_number = isset($_REQUEST["fr_number"]) ? $_REQUEST["fr_number"] : '';
// покажем форму для поиска
$_TEMPL = array();
$_TEMPL['frame'] = $frame;
$_TEMPL['fr_number'] = $fr_number;
include "templ_freame_search.php";
// Frame
$frame_res = _TOY_frame_info(array('frame_code' => $frame, 'serial_number' => $fr_number));
$frame_res_h = array_keys(current($frame_res));
// может быть несколько записей, например разные регионы
// view_frame_result.php?frame=ACA20&fr_number=0015070
foreach ($frame_res as $_k => $_frame) {
    // EXEC на замену
    $url = "<a href='Illustrated_Index.php?";
    $url .= "catalog=" . $_frame['catalog'];
    $url .= "&model_code=" . $_frame['model_code'];
    $url .= "&vdate=" . $_frame['vdate'];
    $url .= "&siyopt_code=" . $_frame['siyopt_code'];
    $url .= "&catalog_code=" . $_frame['catalog_code'];
    $url .= "&sysopt=" . $_frame['sysopt'];
    $url .= "&compl_code=" . $_frame['compl_code'];
    $url .= "'>" . $_frame['model_code'] . "</a>";
    $frame_res[$_k]['model_code'] = $url;
}
echo array_h_2_html($frame_res, $frame_res_h);