Ejemplo n.º 1
0
//
// $Id: overview.php,v 1.1 2002/08/07 09:25:47 moleman Exp $
include_once 'Menu_Browser_DB.php';
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' => '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;
Ejemplo n.º 2
0
//
// $Id: overview.php,v 1.1 2002/08/07 09:25:43 moleman Exp $
include_once 'Menu_Browser_DB.php';
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' => 'company', '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_firma_produktkat.id_firma) as numchildren\nFROM rc_produktkat LEFT JOIN rc_firma_produktkat ON (rc_firma_produktkat.id_produktkat=rc_produktkat.id)\nGROUP BY rc_produktkat.id");
$m = $browser->getMenu();
$table['firma'] = $cfg['table']['company'];
$table['firma_produktkat'] = $cfg['table']['company_cat_product'];
$table['cat_product'] = $cfg['table']['cat_product'];
if (!$id) {
    $id = 0;
}
$query = "select name_" . LC_LANG . " from {$table['cat_product']} where id = {$id}";
$str_category = $db_con->getOne($query);
require_once 'mms_tablepager.php';
$tabpage = new PageTable($cfg['database']['dsn'], "overview");
$tabpage->url_view = $phpfile["firma_details"];
$tabpage->fields = array('name');
$tabpage->url_view = url(array('module' => 'company', 'action' => 'details'));