Exemple #1
0
$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];
    if (array_key_exists('checkQG', $_GET) && CommonExtender::isFeatureSupported($catalogInfo, 'quickgroups')) {
        $link = 'qgroups.php?c=' . $_GET['c'] . '&vid=' . $_GET['vid'] . '&ssd=' . $_GET['ssd'] . '&path_data=' . $_GET['path_data'];
        header("Location: " . $link);
        exit;
    }
    echo '<h1>' . CommonExtender::FormatLocalizedString('CarName', $vehicle['name']) . '</h1>';
    echo '<div id="pagecontent">';
    $renderer = new GuayaquilCategoriesList(new CategoryExtender());
    $renderer->vehicle_id = $_GET['vid'];
    $renderer->categoryid = array_key_exists('cid', $_GET) ? $_GET['cid'] : -1;
    echo $renderer->Draw($_GET['c'], $categories, $renderer->vehicle_id, $renderer->categoryid, $_GET['ssd'], $catalogInfo);
    $renderer = new GuayaquilUnitsList(new UnitExtender());
    $renderer->vehicle_id = $_GET['vid'];
    $renderer->categoryid = array_key_exists('cid', $_GET) ? $_GET['cid'] : -1;
    $renderer->imagesize = 250;
    echo $renderer->Draw($_GET['c'], $units);
    echo '</div>';
}
?>
</body>
</html>
Exemple #2
0
}
// 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];
    echo '<h1>' . CommonExtender::FormatLocalizedString('CarName', $vehicle['name']) . '</h1>';
    echo '<div id="pagecontent">';
    $renderer = new GuayaquilCategoriesList(new CategoryExtender());
    echo $renderer->Draw($_GET['c'], $categories, $_GET['vid'], $_GET['cid'], $_GET['ssd'], $catalogInfo);
    $renderer = new GuayaquilUnitsList(new UnitExtender());
    $renderer->imagesize = 250;
    echo $renderer->Draw($_GET['c'], $units);
    echo '</div>';
}
?>
</body>
</html>