$sql = new Sql_Query(); $sql->conditions = 1; $sql->method = 'get'; $sql->translate = "on"; $sql->container = "on"; $sql->variable = "on"; $sql->module = 'company'; $sql->action = 'search'; $sql->lang = LC_LANG; } if (isset($x)) { $abfrage = $sql->where("x", 1); $from = 0; } $tpl->setVariable("UEBERSCHRIFT", $GLOBALS['str_companysearch']); $content["ABFRAGEBOX"] = $sql->form("x", $map_cols, "searchbox", url(array('module' => 'company', 'action' => 'search'))); if (!isset($order)) { $order = "name"; } if ($abfrage) { require_once 'mms_tablepager.php'; $tabpage = new PageTable($cfg['database']['dsn'], "overview"); $tabpage->url_view = url(array('module' => 'company', 'action' => 'details')); $tabpage->url = url(array('module' => 'company', 'action' => 'search', 'abfrage' => urlencode($abfrage))); $tabpage->fields = $fields; $tabpage->map_cols = $map_cols; $table['firma'] = $cfg['table']['company']; $query = "SELECT * FROM {$table['firma']} WHERE {$abfrage} ORDER BY {$order} ASC"; $tpl->setVariable("TABELLE", $tabpage->get($query, $from, 'overview')); } $nav->setImage('../pic/search.gif');
$sql = new Sql_Query(); $sql->conditions = 1; $sql->method = 'get'; $sql->translate = "on"; $sql->container = "on"; $sql->variable = "on"; $sql->module = 'product'; $sql->action = 'search'; $sql->lang = LC_LANG; } if (isset($x)) { $abfrage = $sql->where("x", 1); $from = 0; } $tpl->setVariable("UEBERSCHRIFT", $lang->translate('productsearch')); $content["ABFRAGEBOX"] = $sql->form("x", $searchable_fields, "searchbox", url(array('module' => 'product', 'action' => 'search'))); if (!isset($order)) { $order = "name"; } if ($abfrage) { require_once 'mms_tablepager.php'; $table['firma'] = $cfg['table']['company']; $table['produkt'] = $cfg['table']['product']; $table['produktkat'] = $cfg['table']['cat_product']; $tabpage = new PageTable($cfg['database']['dsn'], "overview"); $tabpage->url_view = url(array('module' => 'product', 'action' => 'details')); // echo $abfrage; // $abfrage=urldecode($abfrage); $tabpage->url = url(array('module' => 'product', 'action' => 'search', 'abfrage' => urlencode($abfrage))); $tabpage->fields = $fields; $tabpage->map_cols = $map_cols;
*/ $searchable_fields = array("m100" => "M100", "m300" => "M300", "ts" => "TS", "eab" => "EAB", "rebound" => "Rebound", "shore_a" => "Shore A", "sg" => "SG"); if (!isset($sql)) { $sql = new Sql_Query(); $sql->conditions = 1; $sql->translate = "on"; $sql->container = "on"; $sql->variable = "on"; $sql->lang = LC_LANG; $sess->register("sql"); } if (isset($x)) { $abfrage = $sql->where("x", 1); } $tpl->setvariable("UEBERSCHRIFT", $GLOBALS['str_productsearch']); $tpl->setvariable("ABFRAGEBOX", $sql->form("x", $searchable_fields, "searchbox")); if ($abfrage) { /*$db->query(" SELECT *,$table[produkt].name as produktname, t_reseller.name as vertriebname, t_manufacturer.name as herstellername FROM $table[produkt], $table[produktkat],$table[firma] as t_manufacturer,$table[firma] as t_reseller,$table[reseller] WHERE $table[produkt].id_produktkat=$table[produktkat].old_id AND $table[produkt].id_hersteller=t_manufacturer.id AND $table[reseller].id_produkt=$table[produkt].id AND $table[reseller].id_firma=t_reseller.id AND $abfrage"); */ $db->query("\n SELECT *,{$table['produkt']}.name as produktname, t_manufacturer.name as herstellername\n FROM\n {$table['produkt']}, {$table['produktkat']},{$table['firma']} as t_manufacturer\n WHERE\n {$table['produkt']}.id_produktkat={$table['produktkat']}.old_id\n AND {$table['produkt']}.id_hersteller=t_manufacturer.id\n\n AND {$abfrage}"); $tpl->setvariable(array("NUMRESULTS" => o_0or1($db->num_rows(), $GLOBALS['str_noresult'], "%s " . $GLOBALS['str_searchhits']), "TABELLE" => $tbl->get_result($db, "overview"))); } $tpl->setVariable("CATEGORY_LOGO", "<img src=\"/pic/product.jpg\" border=\"0\">");