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; }
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; }
// 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]; 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);
$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>