예제 #1
0
<?php 
// Include soap request class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'request.php';
// Include view class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR . 'unit' . DIRECTORY_SEPARATOR . 'default.php';
include 'extender.php';
class DetailExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        return 'window.alert(' . CommonExtender::FormatLocalizedString('SelectedDetail', $dataItem->oem) . ')';
    }
}
// Create request object
$request = new GuayaquilRequest($_GET['c'], $_GET['ssd'], Config::$catalog_data);
// 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];
    $details = $data[1];
    echo '<h1>' . CommonExtender::FormatLocalizedString('UnitName', (string) $unit['name']) . '</h1>';
    $renderer = new GuayaquilUnit(new DetailExtender());
예제 #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 GuayaquilRequest('', '', Config::$catalog_data);
// 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');
    // Draw catalogs list
    echo $renderer->Draw($data[0]);
}
예제 #3
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' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'request.php';
include 'extender.php';
// Create request object
$request = new GuayaquilRequest($_GET['c'], $_GET['ssd'], Config::$catalog_data);
// Append commands to request
$request->appendGetCatalogInfo();
if (@$_GET['spi'] == 't') {
    $request->appendGetWizard();
}
if (@$_GET['spi2'] == 't') {
    $request->appendGetWizard2();
}
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $cataloginfo = $data[0]->row;
    if (@$cataloginfo['supportvinsearch'] == 'true') {
        include 'vinsearch.php';
    }
    if (@$cataloginfo['supportframesearch'] == 'true') {
예제 #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 GuayaquilRequest($_GET['c'], $_GET['ssd'], Config::$catalog_data);
// 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>';
    echo '<div id="pagecontent">';
    $renderer = new GuayaquilQuickGroupsList(new QuickGroupsExtender());
    echo $renderer->Draw($groups, $_GET['c'], $_GET['vid'], $_GET['ssd']);
예제 #5
0
class CatalogExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        $link = 'catalog.php?&c=' . $dataItem['code'] . '&ssd=' . $dataItem['ssd'];
        if ($dataItem['supportparameteridentification'] == 'true') {
            $link .= '&spi=t';
        }
        if ($dataItem['supportparameteridentification2'] == 'true') {
            $link .= '&spi2=t';
        }
        return $link;
    }
}
// Create request object
$request = new GuayaquilRequest('', '', Config::$catalog_data);
// Append commands to request
$request->appendListCatalogs();
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    // Create GuayaquilCatalogsList object. This class implements default catalogs list view
    $renderer = new GuayaquilCatalogsList(new CatalogExtender());
    // Configure columns
    $renderer->columns = array('icon', 'name', 'version');
    // Draw catalogs list
    echo $renderer->Draw($data[0]);
}
예제 #6
0
            $link = 'vehicle.php?c=' . $catalog . '&vid=' . $renderer->vehicleid . '&cid=' . $dataItem['categoryid'] . '&ssd=' . $dataItem['ssd'];
        } elseif ($type == 'unit') {
            $coi = array();
            foreach ($dataItem->Detail as $detail) {
                $i = (string) $detail['codeonimage'];
                $coi[$i] = $i;
            }
            $link = 'unit.php?c=' . $catalog . '&vid=' . $renderer->vehicle_id . '&uid=' . $dataItem['unitid'] . '&cid=' . $renderer->categoryid . '&ssd=' . $dataItem['ssd'] . '&coi=' . implode(',', $coi);
        } elseif ($type == 'detail') {
            $link = 'unit.php?c=' . $catalog . '&vid=' . $renderer->vehicle_id . '&uid=' . $renderer->currentunit['unitid'] . '&cid=' . $renderer->categoryid . '&coi=' . $dataItem['codeonimage'] . '&ssd=' . $dataItem['ssd'];
        }
        return $link;
    }
}
// Create request object
$request = new GuayaquilRequest($_GET['c'], $_GET['ssd'], Config::$catalog_data);
// 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];
    $details = $data[2];
    echo '<h1>' . CommonExtender::FormatLocalizedString('GroupDetails', $vehicle['name']) . '</h1>';
    echo '<div id="pagecontent">';
예제 #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 'am_searchpanel.php';
// Include soap request class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'requestAm.php';
$request = new GuayaquilRequest('en_US');
$request->appendListManufacturer();
$data = $request->query();
if ($request->error != '') {
    echo $request->error;
} else {
    $data = simplexml_load_string($data);
    $rows = $data[0]->ListManufacturer->row;
    echo '<table>';
    foreach ($rows as $row) {
        echo '<tr><td>' . $row['name'] . '</td><td>' . $row['alias'] . '</td><td>' . $row['searchurl'] . '</td></tr>';
    }
    echo '</table>';
}
?>
</body>
</html>
예제 #8
0
if ($options) {
    $options = implode($options, ',');
}
$replacementtypes = @$_GET['replacementtypes'];
$replacementtypes = implode($replacementtypes, ',');
$request = new GuayaquilRequest('en_US');
$request->appendFindOEM($oem, $options, $brand, $replacementtypes);
$data = $request->query();
if ($request->error != '') {
    echo $request->error;
} else {
    echo '<hr><div>';
    $data = simplexml_load_string($data);
    $data = $data[0]->FindOEM->detail;
    if (!$data || !(string) $data['manufacturerid']) {
        $request = new GuayaquilRequest('en_US');
        $request->appendFindOEMCorrection($oem);
        $data = $request->query();
        $data = simplexml_load_string($data);
        $data = $data[0]->FindOEMCorrection->detail;
        if (!$data || !(string) $data['manufacturerid']) {
            echo "<p>Article {$oem} not found.</p>";
        } else {
            echo "<p>Article {$oem} not found. Please select it from list</p>";
        }
    }
    if ($data) {
        foreach ($data as $detail) {
            echo '<a href="am_manufacturerinfo.php?manufacturerid=' . $detail['manufacturerid'] . '">' . $detail['manufacturer'] . '</a> <a href="am_finddetail.php?detail_id=' . $detail['detailid'] . '&options=' . $options . '">' . $detail['formattedoem'] . '</a> ' . $detail['name'];
            //echo ' <a href="applicability.php?&oem='.$detail['oem'].'&brand='.$detail['manufacturer'].'">'.CommonExtender::FormatLocalizedString("applicability").'</a>';
            echo '</div>';
예제 #9
0
// Include view class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR . 'wizard2' . DIRECTORY_SEPARATOR . 'wizard.php';
include 'extender.php';
class WizardExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        if ($type == 'vehicles') {
            return 'vehicles.php?ft=findByWizard2&c=' . $catalog . '&ssd=' . $renderer->wizard->row['ssd'];
        } else {
            return 'wizard2.php?c=' . $catalog . '&ssd=$ssd$';
        }
    }
}
// Create request object
$request = new GuayaquilRequest($_GET['c'], $_GET['ssd'], Config::$catalog_data);
// Append commands to request
$request->appendGetCatalogInfo();
$request->appendGetWizard2($_GET['ssd']);
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $wizard = $data[1];
    $cataloginfo = $data[0]->row;
    echo '<h1>' . CommonExtender::LocalizeString('Search by wizard') . ' - ' . $cataloginfo['name'] . '</h1>';
    $renderer = new GuayaquilWizard(new WizardExtender());
    echo $renderer->Draw($_GET['c'], $wizard);
}
예제 #10
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 'am_searchpanel.php';
// Include soap request class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'requestAm.php';
$manufacturerid = $_GET['manufacturerid'];
$request = new GuayaquilRequest('en_US');
$request->appendManufacturerInfo($manufacturerid);
$data = $request->query();
if ($request->error != '') {
    echo $request->error;
} else {
    $data = simplexml_load_string($data);
    $data = $data[0]->ManufacturerInfo->row;
    echo '<div> name: ' . $data['name'] . '</div>';
    echo '<div> alias: ' . $data['alias'] . '</div>';
    echo '<div> searchurl: ' . $data['searchurl'] . '</div>';
}
?>
</body>
</html>
예제 #11
0
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR . 'vehicles' . DIRECTORY_SEPARATOR . 'vehicletable.php';
include 'extender.php';
class VehiclesExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        if (!$catalog) {
            $catalog = $dataItem['catalog'];
        }
        $link = ($renderer->qg ? 'qgroups' : 'vehicle') . '.php?c=' . $catalog . '&vid=' . $dataItem['vehicleid'] . '&ssd=' . $dataItem['ssd'] . '&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
$request = new GuayaquilRequest($_GET['c'], $_GET['ssd'], Config::$catalog_data);
// Append commands to request
if ($_GET['ft'] == 'findByVIN') {
    $request->appendFindVehicleByVIN($_GET['vin']);
} else {
    if ($_GET['ft'] == 'findByFrame') {
        $request->appendFindVehicleByFrame($_GET['frame'], $_GET['frameNo']);
    } else {
        if ($_GET['ft'] == 'findByWizard') {
            $request->appendFindVehicleByWizard($_GET['wid']);
        } else {
            if ($_GET['ft'] == 'findByWizard2') {
                $request->appendFindVehicleByWizard2($_GET['ssd']);
            }
        }
    }
예제 #12
0
    }
}
class UnitExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        /*if ($type == 'filter')
              $link = 'unitfilter.php?c=' . $catalog . '&vid=' . $renderer->vehicle_id . '&uid=' . $dataItem['unitid'] .  '&cid=' . $renderer->categoryid . '&ssd=' . $dataItem['ssd'] . '&path_id=' . $renderer->path_id . '&f=' . urlencode($dataItem['filter']);
          else*/
        $link = 'unit.php?c=' . $catalog . '&vid=' . $renderer->vehicle_id . '&uid=' . $dataItem['unitid'] . '&cid=' . $renderer->categoryid . '&ssd=' . $dataItem['ssd'] . '&path_id=' . $renderer->path_id;
        return $link;
        //return 'unit.php?c='.$catalog.'&uid='.$dataItem['unitid'].'&ssd='.$dataItem['ssd'];
    }
}
// Create request object
$request = new GuayaquilRequest($_GET['c'], $_GET['ssd'], Config::$catalog_data);
// Append commands to request
$request->appendGetCatalogInfo();
$request->appendGetVehicleInfo($_GET['vid']);
$request->appendListCategories($_GET['vid'], isset($_GET['cid']) ? $_GET['cid'] : -1);
$request->appendListUnits($_GET['vid'], isset($_GET['cid']) ? $_GET['cid'] : -1);
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $catalogInfo = $data[0]->row;
    $vehicle = $data[1]->row;
    $categories = $data[2];
    $units = $data[3];
예제 #13
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 'am_searchpanel.php';
// Include soap request class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'requestAm.php';
$detail_id = $_GET['detail_id'];
$options = $_GET['options'];
$request = new GuayaquilRequest('en_US');
$request->appendFindDetail($detail_id, $options);
$data = $request->query();
if ($request->error != '') {
    echo $request->error;
} else {
    $data = simplexml_load_string($data);
    $data = $data[0]->FindDetails->detail;
    foreach ($data as $detail) {
        echo '<hr>';
        echo '<div><a href="am_manufacturerinfo.php?manufacturerid=' . $detail['manufacturerid'] . '">' . $detail['manufacturer'] . '</a> <a href="am_finddetail.php?detail_id=' . $detail['detailid'] . '">' . $detail['formattedoem'] . '</a> ' . $detail['name'] . '</div>';
        $weight = (double) $detail['weight'];
        if ($weight) {
            echo '<div>Weight ' . $weight . '</div>';
        }
        $volume = (double) $detail['volume'];
        if ($volume) {
            echo '<div>Volume ' . $volume . '</div>';
        }
예제 #14
0
// Include view class
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR . 'wizard' . DIRECTORY_SEPARATOR . 'wizard.php';
include 'extender.php';
class WizardExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        if ($type == 'vehicles') {
            return 'vehicles.php?ft=findByWizard&c=' . $catalog . '&wid=' . $renderer->wizard->row['wizardid'] . '&ssd=' . $renderer->wizard->row['ssd'];
        } else {
            return 'wizard.php?c=' . $catalog . '&wizardid=' . $renderer->wizard->row['wizardid'] . '&valueid=$valueid$&ssd=' . $renderer->wizard->row['ssd'];
        }
    }
}
// Create request object
$request = new GuayaquilRequest($_GET['c'], $_GET['ssd'], Config::$catalog_data);
// Append commands to request
$request->appendGetCatalogInfo();
$request->appendGetWizard($_GET['wizardid'], $_GET['valueid']);
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $wizard = $data[1];
    $cataloginfo = $data[0]->row;
    echo '<h1>' . CommonExtender::LocalizeString('Search by wizard') . ' - ' . $cataloginfo['name'] . '</h1>';
    $renderer = new GuayaquilWizard(new WizardExtender());
    echo $renderer->Draw($_GET['c'], $wizard);
}