Example #1
0
 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;
 }
Example #2
0
 function Draw($catalog, $unit, $imagemap, $details, $replacements, $cataloginfo, $prices = array(), $availability = array())
 {
     $this->catalog = $catalog;
     $this->ConfigureUnitImageRenderer($this->unitimagerenderer);
     $this->ConfigureDetailListRenderer($this->detaillistrenderer);
     if (CommonExtender::isFeatureSupported($cataloginfo, 'quickgroups')) {
         GuayaquilToolbar::AddButton($this->GetLocalizedString('QuickGroupsLink'), $this->FormatLink('quickgroup', null, $this->catalog));
     }
     $unit['note'] = '';
     foreach ($unit->attribute as $attr) {
         $unit['note'] .= '<b>' . (string) $attr->attributes()->name . '</b>: ' . (string) $attr->attributes()->value . '<br/>';
     }
     $note = $this->GetNote($unit['note']);
     if ($note) {
         echo '<p class="guayaquil_unit_note">' . $note . '</p>';
     }
     $html = $this->drawtoolbar ? GuayaquilToolbar::Draw() : '';
     $html .= $this->DrawContainer($catalog, $unit, $imagemap, $details, $replacements, $prices, $availability);
     if ($this->drawlegend) {
         $html .= $this->DrawLegend();
     }
     $html .= '<div style="visibility: visible; display: block; height: 20px; text-align: right;"><a href="http://dev.laximo.ru" rel="follow" style="visibility: visible; display: inline; font-size: 10px; font-weight: normal; text-decoration: none;">guayaquil</a></div>';
     return $html;
 }
Example #3
0
 function FormatLink($type, $dataItem, $catalog, $renderer)
 {
     return 'window.alert(' . CommonExtender::FormatLocalizedString('SelectedDetail', $dataItem->oem) . ')';
 }
Example #4
0
}
// 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];
    $details = $data[2];
    echo '<h1>' . CommonExtender::FormatLocalizedString('GroupDetails', $vehicle['name']) . '</h1>';
    echo '<div id="pagecontent">';
    $renderer = new GuayaquilQuickDetailsList(new QuickDetailsExtender());
    $renderer->detaillistrenderer = new GuayaquilDetailsList($renderer->extender);
    $renderer->detaillistrenderer->group_by_filter = 1;
    echo $renderer->Draw($details, $_GET['c'], $_GET['vid'], $_GET['ssd']);
    echo '</div>';
}
?>
</body>
</html>
Example #5
0
    $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];
    $details = $data[1];
    echo '<h1>' . CommonExtender::FormatLocalizedString('UnitName', (string) $unit['name']) . '</h1>';
    $renderer = new GuayaquilUnit(new DetailExtender());
    $renderer->detaillistrenderer = new GuayaquilDetailsList($renderer->extender);
    $renderer->detaillistrenderer->columns = array('Toggle' => 1, 'PNC' => 3, 'OEM' => 2, 'Name' => 3, 'Cart' => 1, 'Price' => 3, 'Note' => 2, 'Tooltip' => 1);
    echo $renderer->Draw($_GET['c'], $unit, $imagemap, $details, NULL, NULL);
    $pnc = array();
    if (array_key_exists('coi', $_GET)) {
        $pnc = explode(',', $_GET['coi']);
    }
    if (array_key_exists('oem', $_GET) && $_GET['oem']) {
        $oem = $_GET['oem'];
        foreach ($details as $detail) {
            if ((string) $detail['oem'] == $oem) {
                $pnc[] = (string) $detail['codeonimage'];
            }
        }
Example #6
0
<?php

require_once 'extender.php';
echo '<h1>' . CommonExtender::LocalizeString('Search by wizard') . '</h1>';
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR . 'wizard' . DIRECTORY_SEPARATOR . 'wizard.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'];
        }
    }
}
class GuayaquilWizard2 extends GuayaquilWizard
{
    function DrawConditionDescription($catalog, $condition)
    {
        return '';
    }
    function DrawVehiclesListLink($catalog, $wizard)
    {
        return '';
    }
}
$renderer = new GuayaquilWizard2(new WizardExtender());
echo $renderer->Draw($_GET['c'], $wizard);
echo '<br><br>';
?>
Example #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 
require_once 'extender.php';
echo '<h1>' . CommonExtender::LocalizeString('SearchByFrame') . '</h1>';
include 'guayaquillib' . DIRECTORY_SEPARATOR . 'render' . DIRECTORY_SEPARATOR . 'catalog' . DIRECTORY_SEPARATOR . 'framesearchform.php';
class FrameSearchExtender extends CommonExtender
{
    function FormatLink($type, $dataItem, $catalog, $renderer)
    {
        return 'vehicles.php?ft=findByFrame&c=' . $catalog . '&frame=$frame$&frameNo=$frameno$';
    }
}
$renderer = new GuayaquilFrameSearchForm(new FrameSearchExtender());
echo $renderer->Draw($_GET['c'], $cataloginfo, @$formframe, @$formframeno);
echo '<br><br>';
?>
</body>
</html>

Example #8
0
<?php

echo '<h1>' . CommonExtender::LocalizeString('SearchByCustom') . ' ' . $operation['description'] . '</h1>';
include_once 'guayaquillib/render/catalog/operationform.php';
if (!class_exists('OperationSearchExtender')) {
    class OperationSearchExtender extends CommonExtender
    {
        function FormatLink($type, $dataItem, $catalog, $renderer)
        {
            return 'vehicles.php?ft=execCustomOperation&c=' . $catalog;
        }
    }
}
$renderer = new GuayaquilOperationSearchForm(new OperationSearchExtender());
echo $renderer->Draw(array_key_exists('c', $_GET) ? $_GET['c'] : '', $operation, @$_GET['data']);
echo '<br><br>';
?>


Example #9
0
        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']);
    echo '</div>';
}
?>
</body>
</html>
Example #10
0
{
    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);
}
?>
</body>
</html>
Example #11
0
            }
            foreach ($detail->properties->property as $property) {
                echo '<div>' . $property['property'] . ' ' . $property['locale'] . ' ' . $property['value'] . '</div>';
            }
            foreach ($detail->images->image as $image) {
                echo '<div>' . $image['filename'] . '</div>';
            }
            foreach ($detail->replacements->replacement as $replacement) {
                echo '<div>' . $replacement['type'] . ' ' . $replacement['way'] . ' ';
                echo '<a href="am_manufacturerinfo.php?manufacturerid=' . $replacement->detail['manufacturerid'] . '">' . $replacement->detail['manufacturer'] . '</a> <a href="am_finddetail.php?detail_id=' . $replacement->detail['detailid'] . '&options=' . $options . '">' . $replacement->detail['formattedoem'] . '</a> ' . $replacement->detail['name'];
                $weight = (double) $replacement->detail['weight'];
                if ($weight) {
                    echo 'Weight ' . $weight;
                }
                $volume = (double) $replacement->detail['volume'];
                if ($volume) {
                    echo 'Volume ' . $volume;
                }
                $dimensions = (double) $replacement->detail['dimensions'];
                if ($dimensions) {
                    echo 'Weight ' . $dimensions;
                }
                echo ' <a href="applicability.php?&oem=' . $replacement->detail['oem'] . '&brand=' . $replacement->detail['manufacturer'] . '">' . CommonExtender::FormatLocalizedString("applicability") . '</a>';
                echo '</div>';
            }
        }
    }
}
?>
</body>
</html>
Example #12
0
// Execute request
$data = $request->query();
// Check errors
if ($request->error != '') {
    echo $request->error;
} else {
    $vehicles = $data[0];
    $cataloginfo = $data[1]->row;
    if (is_object($vehicles) == false || $vehicles->row->getName() == '') {
        if ($_GET['ft'] == 'findByVIN') {
            echo CommonExtender::FormatLocalizedString('FINDFAILED', $_GET['vin']);
        } else {
            echo CommonExtender::FormatLocalizedString('FINDFAILED', $_GET['frame'] . '-' . $_GET['frameNo']);
        }
    } else {
        echo '<h1>' . CommonExtender::LocalizeString('Cars') . '</h1><br>';
        // Create data renderer
        $renderer = new GuayaquilVehiclesList(new VehiclesExtender());
        $renderer->columns = array('name', 'date', 'datefrom', 'dateto', 'model', 'framecolor', 'trimcolor', 'modification', 'grade', 'frame', 'engine', 'engineno', 'transmission', 'doors', 'manufactured', 'options', 'creationregion', 'destinationregion', 'description', 'remarks');
        $renderer->qg = (string) $cataloginfo['supportquickgroups'] == 'true';
        // Draw data
        echo $renderer->Draw($_GET['c'], $vehicles);
    }
    if ($cataloginfo['supportvinsearch'] == 'true') {
        $formvin = $_GET['vin'];
        include 'vinsearch.php';
    }
    if ($cataloginfo['supportframesearch'] == 'true') {
        $formframe = $_GET['frame'];
        $formframeno = $_GET['frameNo'];
        include 'framesearch.php';
Example #13
0
    $vehicles = $data[0];
    $cataloginfo = $catalogCode ? $data[1]->row : false;
    if (is_object($vehicles) == false || $vehicles->row->getName() == '') {
        if ($_GET['ft'] == 'findByVIN') {
            echo CommonExtender::FormatLocalizedString('FINDFAILED', $_GET['vin']);
        } else {
            echo CommonExtender::FormatLocalizedString('FINDFAILED', $_GET['frame'] . '-' . $_GET['frameNo']);
        }
    } else {
        echo '<h1>' . CommonExtender::LocalizeString('Cars') . '</h1><br>';
        // Create data renderer
        $renderer = new GuayaquilVehiclesList(new VehiclesExtender());
        $renderer->columns = array('name', 'date', 'datefrom', 'dateto', 'model', 'framecolor', 'trimcolor', 'modification', 'grade', 'frame', 'engine', 'engineno', 'transmission', 'doors', 'manufactured', 'options', 'creationregion', 'destinationregion', 'description', 'remarks');
        $renderer->qg = !$cataloginfo ? -1 : (CommonExtender::isFeatureSupported($cataloginfo, 'quickgroups') ? 1 : 0);
        // Draw data
        echo $renderer->Draw($catalogCode, $vehicles);
    }
    if ($cataloginfo && CommonExtender::isFeatureSupported($cataloginfo, 'vinsearch') || $findType == 'findByVIN') {
        $formvin = array_key_exists('vin', $_GET) ? $_GET['vin'] : '';
        include 'forms/vinsearch.php';
    }
    if ($cataloginfo && CommonExtender::isFeatureSupported($cataloginfo, 'framesearch') || $findType == 'findByFrame') {
        $formframe = array_key_exists('frame', $_GET) ? $_GET['frame'] : '';
        $formframeno = array_key_exists('frameNo', $_GET) ? $_GET['frameNo'] : '';
        include 'forms/framesearch.php';
    }
}
?>
</body>
</html>