<?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>'; ?>
<!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>
{ 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>
<?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>'; ?>
// 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';