$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; $tabpage->indexcol = 'produktid'; $query = "SELECT *,{$table['produkt']}.id as produktid, {$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']}.id\n AND {$table['produkt']}.id_hersteller=t_manufacturer.id\n\n AND " . stripslashes($abfrage); $tpl->setVariable("TABELLE", $tabpage->get($query, $from, 'overview')); }
} function makeURL($eintrag) { $url = url(array('module' => 'product', 'action' => 'overview', 'id' => $eintrag['id'])); return $url; } } $browser = new HTML_menu_browser_company($cfg['database']['dsn']); $browser->setQuery("SELECT *, rc_produktkat.id as id, count(rc_produkt.id) as numchildren\n FROM rc_produktkat LEFT JOIN rc_produkt ON (rc_produkt.id_produktkat=rc_produktkat.id)\n GROUP BY rc_produktkat.id ORDER BY rc_produktkat.name_" . LC_LANG); $browser->lang = LC_LANG; $m = $browser->getMenu(); $table['product'] = $cfg['table']['product']; $table['cat_product'] = $cfg['table']['cat_product']; if (!$id) { $id = 0; } require_once 'mms_tablepager.php'; $tabpage = new PageTable($cfg['database']['dsn'], "overview"); $tabpage->make_url = false; $tabpage->fields = array('name'); $tabpage->col_view = 'name'; $tabpage->url_view = url(array('module' => 'product', 'action' => 'details')); $tabpage->add_extra = false; $query = "select name_" . LC_LANG . " from {$table['cat_product']} where id = {$id} ORDER BY name_" . LC_LANG; $str_category = $db_con->getOne($query); $query = "select* from {$table['product']}\n where id_produktkat={$id} order by name asc"; $prod_menu = new mms_template_Menu($m, 'yahoo', "REQUEST_URI"); $prod_menu->keepEmpty = false; $prod_menu->shownumchildren = true; $content['CONTENT'] .= "<h1>" . $str_category . "</h1>" . $prod_menu->get('urhere') . '<br>' . $prod_menu->get('yahoo') . '<br><hr>' . $tabpage->get($query, $from, 'overview');
$tbl->addRow(array($lang->translate('website'), $row->product_url)); $tbl->setColAttributes(0, 'width="100"'); $tbl->setColAttributes(1, 'width="300"'); $row1Style = array('class' => 'overview'); $row2Style = array('class' => 'overviewalternate'); $tbl->altRowAttributes(0, $row1Style, $row2Style); $tpl->setVariable("UEBERSCHRIFT", $row->product_name); $tpl->SetVariable("TABELLE_UEBERSCHRIFT", $row->product_name . " (" . $link_back . ")"); /** BEGIN Vertrieb **/ $query = "select *,t_reseller.name as reseller\n from {$table['product']},{$table['company']} as t_reseller, {$table['reseller']}\n where {$table['product']}.id={$id}\n AND {$table['product']}.id={$table['reseller']}.id_produkt\n AND {$table['reseller']}.id_firma=t_reseller.id"; require_once 'mms_tablepager.php'; $tabpage = new PageTable($cfg['database']['dsn'], "overview"); $tabpage->fields = array('name', 'land'); $tabpage->make_url = false; $tabpage->add_extra = false; $tabpage->col_view = 'name'; $tabpage->url_view = url(array('module' => 'company', 'action' => 'details')); $res_vertrieb = '<h2>' . $lang->translate('reseller') . '</h2>' . $tabpage->get($query, $from, 'overview') . '<br>'; /** END Vertrieb **/ /** BEGIN Beispielmischungen **/ $query = "select *,{$table['compound']}.id as mixid, {$table['compound']}.name_" . LC_LANG . " as mischname from {$table['product']},{$table['compound_details']},{$table['compound']} where {$table['compound_details']}.id_produkt={$table['product']}.id AND {$table['compound']}.id = {$table['compound_details']}.id_mischung AND {$table['product']}.id={$id}"; $tabpage = new PageTable($cfg['database']['dsn'], "overview"); $tabpage->fields = array('mischname'); $tabpage->map_cols = array('mischname' => $lang->translate('compound')); $tabpage->url_view = url(array('module' => 'compound', 'action' => 'details')); $tabpage->setEmptyString($lang->translate('no compounds available for this product')); $res_compound = '<h2>' . $lang->translate('compound') . '</h2>' . $tabpage->get($query, $from, 'overview'); /** END Beispielmischungen **/ $tpl->setCurrentBlock("TABELLEBLOCK"); $tpl->setVariable("TABELLE", $tbl->toHTML() . $res_vertrieb . $res_compound); $tpl->parseCurrentBlock();
// // +----------------------------------------------------------------------+ // | MoleCMS | // +----------------------------------------------------------------------+ // | Copyright (c) 2000-2002 MoleManMedia Tim Franz | // +----------------------------------------------------------------------+ // | Authors: Tim Franz <*****@*****.**> | // +----------------------------------------------------------------------+ // // $Id: overview.php,v 1.1 2002/08/07 09:25:40 moleman Exp $ $content['CONTENT'] .= "<h1>" . $lang->translate('Stellenbörse') . "</h1>"; $query = "select* from rc_jobs_category"; $bereich = $db_con->getAll($query, DB_FETCHMODE_ASSOC); for ($i = 0; $i < count($bereich); $i++) { require_once 'mms_tablepager.php'; $tabpage = new PageTable($cfg['database']['dsn'], "overview"); $tabpage->make_url = false; $tabpage->str_emptyresult = ""; $tabpage->indexcol = "id_job"; $tabpage->fields = array("ueberschrift", "branche", "name", "region"); $tabpage->map_cols = array("ueberschrift" => "Position", "branche" => "Branche", "region" => "Region", "name" => $lang->translate("Firma")); $tabpage->col_view = 'ueberschrift'; $tabpage->url_view = url(array('module' => 'jobs', 'action' => 'details')); $tabpage->add_extra = false; $query = "SELECT * FROM rc_jobs LEFT JOIN rc_firma ON (id=firma) WHERE aktiv = 1 AND bereich =" . $bereich[$i]['id_jobcat']; $tabresult = $tabpage->get($query, 0, 'overview'); if ($tabresult != "") { $content['CONTENT'] .= '<h2>' . $bereich[$i]['category_' . LC_LANG] . '</h2>'; $content['CONTENT'] .= $tabresult; } }
class HTML_menu_browser_company extends HTML_menu_browser { function HTML_menu_browser_company($DSN = '', $table = '', $query = "") { $this->HTML_Menu_browser($DSN, $table, $query); } function makeURL($eintrag) { $url = url(array('module' => 'infolinks', 'action' => 'overview', 'id' => $eintrag['id'])); return $url; } } $browser = new HTML_menu_browser_company($cfg['database']['dsn']); $browser->setQuery("SELECT *, rc_infolinkkat.id as id, count(rc_firma_produktkat.id_firma) as numchildren\nFROM rc_infolinkkat LEFT JOIN rc_firma_produktkat ON (rc_firma_produktkat.id_produktkat=rc_infolinkkat.id)\nGROUP BY rc_infolinkkat.id"); $m = $browser->getMenu(); $table['infolinks'] = $cfg['table']['infolinks']; $table['firma'] = $cfg['table']['company']; $table['firma_produktkat'] = $cfg['table']['company_cat_product']; if (!$id) { $id = 0; } require_once 'mms_tablepager.php'; $tabpage = new PageTable($cfg['database']['dsn'], "overview"); $tabpage->fields = array('name'); $tabpage->url_view = url(array('module' => 'infolinks', 'action' => 'details')); $query = "select*, {$table['firma']}.name as name from {$table['firma_produktkat']},{$table['firma']}\n where {$table['firma_produktkat']}.id_produktkat={$id}\n and {$table['firma_produktkat']}.id_firma = {$table['firma']}.id order by land asc"; $cmp_menu = new mms_template_Menu($m, 'tree', "REQUEST_URI"); $cmp_menu->keepEmpty = false; $cmp_menu->shownumchildren = true; $content['CONTENT'] .= '<h1>' . $cmp_menu->get('urhere') . '</h1>' . '<br>' . $cmp_menu->get('tree') . '<br>' . $tabpage->get($query, $from, 'overview'); //$nav->setMenu($cmp_menu->get('tree'));