Пример #1
0
            foreach ($dataItem->Detail as $detail) {
                if ((string) $detail['match']) {
                    $i = (string) $detail['codeonimage'];
                    $coi[$i] = $i;
                }
            }
            $link = 'unit.php?c=' . $catalog . '&vid=' . $renderer->vehicleid . '&uid=' . $dataItem['unitid'] . '&cid=' . $renderer->currentunit['categoryid'] . '&ssd=' . $dataItem['ssd'] . '&coi=' . implode(',', $coi);
        } elseif ($type == 'detail') {
            $link = Config::$redirectUrl;
            $link = str_replace('$oem$', urlencode($dataItem['oem']), $link);
        }
        return $link;
    }
}
// Create request object
$request = new GuayaquilRequestOEM($_GET['c'], $_GET['ssd'], Config::$catalog_data);
if (Config::$useLoginAuthorizationMethod) {
    $request->setUserAuthorizationMethod(Config::$userLogin, Config::$userKey);
}
// Append commands to request
$request->appendGetVehicleInfo($_GET['vid']);
$request->appendListCategories($_GET['vid'], isset($_GET['cid']) ? $_GET['cid'] : -1);
$request->appendListQuickDetail($_GET['vid'], $_GET['gid'], 1);
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $vehicle = $data[0]->row;
    $categories = $data[1];
Пример #2
0
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR . 'applicability' . DIRECTORY_SEPARATOR . 'applicability.php';
include 'extender.php';
class CatalogExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        if ($type == 'unit') {
            return 'unit.php?&uid=' . $dataItem['unitid'] . '&c=' . $catalog . '&ssd=' . $dataItem['ssd'] . '&oem=' . $renderer->oem;
        }
        return 'applicability.php?&oem=' . $dataItem['oem'] . '&brand=' . $dataItem['brand'];
    }
}
$brand = $_GET['brand'];
$oem = $_GET['oem'];
// Create request object
$request = new GuayaquilRequestOEM('', '', Config::$catalog_data);
if (Config::$useLoginAuthorizationMethod) {
    $request->setUserAuthorizationMethod(Config::$userLogin, Config::$userKey);
}
// Append commands to request
$request->appendFindDetailApplicability($oem, $brand);
// Execute request
$data = $request->query();
//echo '<pre>'; print_r($data); echo '</pre>';
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    // Create GuayaquilCatalogsList object. This class implements default catalogs list view
    $renderer = new GuayaquilApplicability(new CatalogExtender(), $oem);
    $renderer->columns = array('name', 'date', 'datefrom', 'dateto', 'model', 'framecolor', 'trimcolor', 'modification', 'grade', 'frame', 'engine', 'engineno', 'transmission', 'doors', 'manufactured', 'options', 'creationregion', 'destinationregion', 'description', 'remarks');
Пример #3
0
include 'extender.php';
class DetailExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        if ($type == 'filter') {
            $link = 'detailfilter.php?c=' . $catalog . '&vid=' . $renderer->vehicle_id . '&uid=' . $_GET['uid'] . '&cid=' . $_GET['cid'] . 'did=' . $dataItem['detailid'] . '&ssd=' . $dataItem['ssd'] . '&f=' . urlencode($dataItem['filter']);
        } else {
            $link = Config::$redirectUrl;
            $link = str_replace('$oem$', urlencode($dataItem['oem']), $link);
        }
        return $link;
    }
}
// Create request object
$request = new GuayaquilRequestOEM($_GET['c'], $_GET['ssd'], Config::$catalog_data);
if (Config::$useLoginAuthorizationMethod) {
    $request->setUserAuthorizationMethod(Config::$userLogin, Config::$userKey);
}
// Append commands to request
$request->appendGetUnitInfo($_GET['uid']);
$request->appendListDetailByUnit($_GET['uid']);
$request->appendListImageMapByUnit($_GET['uid']);
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $unit = $data[0]->row;
    $imagemap = $data[2];
Пример #4
0
// Include view class
include 'extender.php';
class QuickGroupsExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        if ($type == 'vehicle') {
            $link = 'vehicle.php?c=' . $catalog . '&vid=' . $renderer->vehicleid . '&ssd=' . $renderer->ssd;
        } else {
            $link = 'qdetails.php?c=' . $catalog . '&gid=' . $dataItem['quickgroupid'] . '&vid=' . $renderer->vehicleid . '&ssd=' . $renderer->ssd;
        }
        return $link;
    }
}
// Create request object
$request = new GuayaquilRequestOEM($_GET['c'], $_GET['ssd'], Config::$catalog_data);
if (Config::$useLoginAuthorizationMethod) {
    $request->setUserAuthorizationMethod(Config::$userLogin, Config::$userKey);
}
// Append commands to request
$request->appendGetVehicleInfo($_GET['vid']);
$request->appendListQuickGroup($_GET['vid']);
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $vehicle = $data[0]->row;
    $groups = $data[1];
    echo '<h1>' . CommonExtender::FormatLocalizedString('CarName', $vehicle['name']) . '</h1>';
Пример #5
0
// Include catalog list view
include 'guayaquillib/render/catalogs/2coltable.php';
include 'extender.php';
class CatalogExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        $link = 'catalog.php?&c=' . $dataItem['code'] . '&ssd=' . $dataItem['ssd'];
        if (CommonExtender::isFeatureSupported($dataItem, 'wizardsearch2')) {
            $link .= '&spi2=t';
        }
        return $link;
    }
}
// Create request object
$request = new GuayaquilRequestOEM('', '', Config::$catalog_data);
if (Config::$useLoginAuthorizationMethod) {
    $request->setUserAuthorizationMethod(Config::$userLogin, Config::$userKey);
}
// Append commands to request
$request->appendListCatalogs();
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    ?>
    <table border="0" width="100%">
        <tr>
            <td>
Пример #6
0
include 'extender.php';
class VehiclesExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        if (!$catalog) {
            $catalog = $dataItem['catalog'];
        }
        $link = ($renderer->qg == 1 ? 'qgroups' : 'vehicle') . '.php?c=' . $catalog . '&vid=' . $dataItem['vehicleid'] . '&ssd=' . $dataItem['ssd'] . ($renderer->qg == -1 ? '&checkQG' : '') . '&path_data=' . urlencode(base64_encode(substr($dataItem['vehicle_info'], 0, 300)));
        return $link;
        //return 'vehicle.php?c='.$catalog.'&vid='.$dataItem['vehicleid'].'&ssd='.$dataItem['ssd'];
    }
}
// Create request object
$catalogCode = array_key_exists('c', $_GET) ? $_GET['c'] : false;
$request = new GuayaquilRequestOEM($catalogCode, array_key_exists('ssd', $_GET) ? $_GET['ssd'] : '', Config::$catalog_data);
if (Config::$useLoginAuthorizationMethod) {
    $request->setUserAuthorizationMethod(Config::$userLogin, Config::$userKey);
}
// Append commands to request
$findType = $_GET['ft'];
if ($findType == 'findByVIN') {
    $request->appendFindVehicleByVIN($_GET['vin']);
} else {
    if ($findType == 'findByFrame') {
        $request->appendFindVehicleByFrame($_GET['frame'], $_GET['frameNo']);
    } else {
        if ($findType == 'execCustomOperation') {
            $request->appendExecCustomOperation($_GET['operation'], $_GET['data']);
        } else {
            if ($findType == 'findByWizard2') {
Пример #7
0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>
<body>
<?php 
// Include soap request class
include 'guayaquillib/data/requestOem.php';
include 'extender.php';
// Create request object
$request = new GuayaquilRequestOEM($_GET['c'], $_GET['ssd'], Config::$catalog_data);
if (Config::$useLoginAuthorizationMethod) {
    $request->setUserAuthorizationMethod(Config::$userLogin, Config::$userKey);
}
// Append commands to request
$request->appendGetCatalogInfo();
if (@$_GET['spi2'] == 't') {
    $request->appendGetWizard2();
}
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $cataloginfo = $data[0]->row;
    foreach ($cataloginfo->features->feature as $feature) {
        switch ((string) $feature['name']) {
            case 'vinsearch':
                include 'forms/vinsearch.php';
Пример #8
0
<?php 
// Include soap request class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'requestOem.php';
// Include view class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR . 'filter' . DIRECTORY_SEPARATOR . 'default.php';
include 'extender.php';
class GuayaquilExtender3 extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        $link = 'unit.php?c=' . $catalog . '&vid=' . $renderer->vehicle_id . '&uid=' . $dataItem['unitid'] . '&cid=' . $renderer->categoryid . '&ssd=' . $dataItem['ssd'];
        return $link;
    }
}
// Create request object
$request = new GuayaquilRequestOEM($_GET['c'], $_GET['ssd'], Config::$catalog_data);
if (Config::$useLoginAuthorizationMethod) {
    $request->setUserAuthorizationMethod(Config::$userLogin, Config::$userKey);
}
// Append commands to request
$request->appendGetFilterByUnit($_GET['f'], $_GET['vid'], $_GET['uid']);
$request->appendGetUnitInfo($_GET['uid']);
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $filter_data = $data[0];
    $unit = $data[1]->row;
    echo '<h1>' . CommonExtender::FormatLocalizedString('UnitName', (string) $unit['name']) . '</h1>';