*/ ?> true, 'query' => true, 'sort' => true, 'time' => true, 'tabs' => true ); $opts['logtable'] = 'qb_changelog'; /* Get the user's default language and use it if possible or you can specify particular one you want to use. Refer to official documentation for list of available languages. */ $opts['language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE']; /* Table-level filter capability. If set, it is included in the WHERE clause of any generated SELECT statement in SQL query. This gives you ability to work only with subset of data from table. $opts['filters'] = "column1 like '%11%' AND column2<17"; $opts['filters'] = "section_id = 9"; $opts['filters'] = "PMEtable0.sessions_count > 200"; */ /* Field definitions Fields will be displayed left to right on the screen in the order in which they appear in generated list. Here are some most used field options documented. ['name'] is the title used for column headings, etc.; ['maxlen'] maximum length to display add/edit/search input boxes ['trimlen'] maximum length of string content to display in row listing ['width'] is an optional display width specification for the column e.g. ['width'] = '100px'; ['mask'] a string that is used by sprintf() to format field output ['sort'] true or false; means the users may sort the display on this column ['strip_tags'] true or false; whether to strip tags from content ['nowrap'] true or false; whether this field should get a NOWRAP ['required'] true or false; if generate javascript to prevent null entries ['select'] T - text, N - numeric, D - drop-down, M - multiple selection ['options'] optional parameter to control whether a field is displayed L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view Another flags are: R - indicates that a field is read only W - indicates that a field is a password field H - indicates that a field is to be hidden and marked as hidden ['URL'] is used to make a field 'clickable' in the display e.g.: 'mailto:$value', 'http://$value' or '$page?stuff'; ['URLtarget'] HTML target link specification (for example: _blank) ['textarea']['rows'] and/or ['textarea']['cols'] specifies a textarea is to be used to give multi-line input e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10 ['values'] restricts user input to the specified constants, e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99) ['values']['table'] and ['values']['column'] restricts user input to the values found in the specified column of another table ['values']['description'] = 'desc_column' The optional ['values']['description'] field allows the value(s) displayed to the user to be different to those in the ['values']['column'] field. This is useful for giving more meaning to column values. Multiple descriptions fields are also possible. Check documentation for this. */ $opts['fdd']['Betrieb'] = array( 'name' => 'Betrieb', 'select' => 'T', 'maxlen' => 20, 'sort' => true ); $opts['fdd']['Stufe2'] = array( 'name' => 'Stufe2', 'select' => 'T', 'maxlen' => 6, 'sort' => true ); $opts['fdd']['FAGNR'] = array( 'name' => 'FAGNR', 'select' => 'T', 'maxlen' => 25, 'required' => true, 'sort' => true ); $opts['fdd']['FTYPE'] = array( 'name' => 'FTYPE', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['KNDNR'] = array( 'name' => 'KNDNR', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['KNAME'] = array( 'name' => 'KNAME', 'select' => 'T', 'maxlen' => 50, 'sort' => true ); $opts['fdd']['Stufe5'] = array( 'name' => 'Stufe5', 'select' => 'T', 'maxlen' => 30, 'sort' => true ); $opts['fdd']['REDAT'] = array( 'name' => 'REDAT', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['O500_HW2BUCHGBETR'] = array( 'name' => 'O500 HW2BUCHGBETR', 'select' => 'T', 'maxlen' => 8, 'sort' => true ); $opts['fdd']['FLDAT_von'] = array( 'name' => 'FLDAT von', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['FLDAT_bis'] = array( 'name' => 'FLDAT bis', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['FLDAT'] = array( 'name' => 'FLDAT', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['O500_MAHNSTUFE'] = array( 'name' => 'O500 MAHNSTUFE', 'select' => 'T', 'maxlen' => 50, 'sort' => true ); $opts['fdd']['Next_MAHNSTUFE'] = array( 'name' => 'Next MAHNSTUFE', 'select' => 'T', 'maxlen' => 50, 'sort' => true ); $opts['fdd']['ZA_1'] = array( 'name' => 'ZA 1', 'select' => 'T', 'maxlen' => 50, 'sort' => true ); $opts['fdd']['ZA_2'] = array( 'name' => 'ZA 2', 'select' => 'T', 'maxlen' => 50, 'sort' => true ); $opts['fdd']['ZA_3'] = array( 'name' => 'ZA 3', 'select' => 'T', 'maxlen' => 50, 'sort' => true ); $opts['fdd']['O500_HW2BETR_OFFEN'] = array( 'name' => 'O500 HW2BETR OFFEN', 'select' => 'T', 'maxlen' => 8, 'sort' => true ); $opts['fdd']['OPDAT'] = array( 'name' => 'OPDAT', 'select' => 'T', 'maxlen' => 10, 'default' => '0000-00-00', 'required' => true, 'sort' => true ); $opts['fdd']['O500_BELEGNR1'] = array( 'name' => 'O500 BELEGNR1', 'select' => 'T', 'maxlen' => 20, 'required' => true, 'sort' => true ); $opts['fdd']['Ktelf'] = array( 'name' => 'Ktelf', 'select' => 'T', 'maxlen' => 13, 'sort' => true ); $opts['fdd']['Kstra'] = array( 'name' => 'Kstra', 'select' => 'T', 'maxlen' => 40, 'sort' => true ); $opts['fdd']['Kdplz'] = array( 'name' => 'Kdplz', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['Kdort'] = array( 'name' => 'Kdort', 'select' => 'T', 'maxlen' => 30, 'sort' => true ); $opts['fdd']['Bemerkung'] = array( 'name' => 'Bemerkung', 'select' => 'T', 'maxlen' => 65535, 'textarea' => array( 'rows' => 5, 'cols' => 50), 'sort' => true ); $opts['fdd']['Wiedervorlage'] = array( 'name' => 'Wiedervorlage', 'select' => 'T', 'maxlen' => 10, 'default' => '0000-00-00', 'sort' => true ); $opts['fdd']['Bemerkung_2'] = array( 'name' => 'Bemerkung 2', 'select' => 'T', 'maxlen' => 65535, 'textarea' => array( 'rows' => 5, 'cols' => 50), 'sort' => true ); $opts['fdd']['Bearbeitet'] = array( 'name' => 'Bearbeitet', 'select' => 'T', 'maxlen' => 1, 'default' => 'N', 'sort' => true ); $opts['fdd']['Mahnen'] = array( 'name' => 'Mahnen', 'select' => 'T', 'maxlen' => 1, 'default' => 'J', 'sort' => true ); $opts['fdd']['User'] = array( 'name' => 'User', 'select' => 'T', 'maxlen' => 30, 'sort' => true ); $opts['fdd']['Aenderungsdatum'] = array( 'name' => 'Aenderungsdatum', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['User_2'] = array( 'name' => 'User 2', 'select' => 'T', 'maxlen' => 30, 'sort' => true ); $opts['fdd']['Reklamation'] = array( 'name' => 'Reklamation', 'select' => 'T', 'maxlen' => 5, 'default' => 'N', 'sort' => true ); $opts['fdd']['Aenderungsdatum_u2'] = array( 'name' => 'Aenderungsdatum u2', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['geplAuslief_NA'] = array( 'name' => 'GeplAuslief NA', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['Auslief_NA'] = array( 'name' => 'Auslief NA', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['geplAuslief_GA'] = array( 'name' => 'GeplAuslief GA', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['Auslief_GA'] = array( 'name' => 'Auslief GA', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['LKNAME'] = array( 'name' => 'LKNAME', 'select' => 'T', 'maxlen' => 24, 'sort' => true ); $opts['fdd']['LKTELF'] = array( 'name' => 'LKTELF', 'select' => 'T', 'maxlen' => 13, 'sort' => true ); $opts['fdd']['LKSTRA'] = array( 'name' => 'LKSTRA', 'select' => 'T', 'maxlen' => 40, 'sort' => true ); $opts['fdd']['LKDPLZ'] = array( 'name' => 'LKDPLZ', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['LKDORT'] = array( 'name' => 'LKDORT', 'select' => 'T', 'maxlen' => 30, 'sort' => true ); $opts['fdd']['Reserve_1'] = array( 'name' => 'Reserve 1', 'select' => 'T', 'maxlen' => 255, 'required' => true, 'sort' => true ); $opts['fdd']['Reserve_3'] = array( 'name' => 'Reserve 3', 'select' => 'T', 'maxlen' => 255, 'sort' => true ); $opts['fdd']['shipment_date'] = array( 'name' => 'Shipment date', 'select' => 'T', 'maxlen' => 10, 'required' => true, 'sort' => true ); $opts['fdd']['customer_number_leasing'] = array( 'name' => 'Customer number leasing', 'select' => 'T', 'maxlen' => 20, 'required' => true, 'sort' => true ); $opts['fdd']['customer_name_leasing'] = array( 'name' => 'Customer name leasing', 'select' => 'T', 'maxlen' => 100, 'required' => true, 'sort' => true ); $opts['fdd']['text1'] = array( 'name' => 'Text1', 'select' => 'T', 'maxlen' => 255, 'required' => true, 'sort' => true ); $opts['fdd']['text2'] = array( 'name' => 'Text2', 'select' => 'T', 'maxlen' => 255, 'required' => true, 'sort' => true ); $opts['fdd']['Faell_Tage'] = array( 'name' => 'Faell Tage', 'select' => 'T', 'maxlen' => 12, 'sort' => true ); $opts['fdd']['Wochen'] = array( 'name' => 'Wochen', 'select' => 'T', 'maxlen' => 10, 'sort' => true ); $opts['fdd']['qb_id'] = array( 'name' => 'Qb ID', 'select' => 'T', 'options' => 'AVCPDR', // auto increment 'maxlen' => 11, 'default' => '0', 'sort' => true ); function flag_enabled($rec) { global $adodb, $opts; $rs2 = $adodb->Execute('SELECT * FROM '.$opts['tb'].' '. ' WHERE '.$opts['key'].' = ? ', array($rec)); if ($rs2->EOF) return 1; $sql = "SELECT * FROM fm_ahr_report_crc WHERE FAGNR = [FAGNR] AND O500_BELEGNR1 = [O500_BELEGNR1] AND OPDAT = [OPDAT] AND Reserve_1 = [Reserve_1];"; $sql = trim($sql); if (!$sql) return 1; foreach ($rs2->fields as $k => $v) { $v = addslashes($v); $sql = str_replace('['.$k.']', "'$v'", $sql); } $rs = $adodb->Execute($sql); if ($rs->EOF) return 1; return 0; } if (flag_enabled(@$_REQUEST['rec']) === 0) { if (isset($opts['fdd']['Betrieb'])) { $opts['fdd']['Betrieb']['input'] = 'R'; }if (isset($opts['fdd']['O500_KTOART'])) { $opts['fdd']['O500_KTOART']['input'] = 'R'; }if (isset($opts['fdd']['O500_KTONR'])) { $opts['fdd']['O500_KTONR']['input'] = 'R'; }if (isset($opts['fdd']['O500_BELEGNR1'])) { $opts['fdd']['O500_BELEGNR1']['input'] = 'R'; }if (isset($opts['fdd']['OPDAT'])) { $opts['fdd']['OPDAT']['input'] = 'R'; }if (isset($opts['fdd']['O500_BELEGSYMBOL'])) { $opts['fdd']['O500_BELEGSYMBOL']['input'] = 'R'; }if (isset($opts['fdd']['O500_HW2BUCHGBETR'])) { $opts['fdd']['O500_HW2BUCHGBETR']['input'] = 'R'; }if (isset($opts['fdd']['O500_HW2BETR_OFFEN'])) { $opts['fdd']['O500_HW2BETR_OFFEN']['input'] = 'R'; }if (isset($opts['fdd']['FLDAT'])) { $opts['fdd']['FLDAT']['input'] = 'R'; }if (isset($opts['fdd']['REDAT'])) { $opts['fdd']['REDAT']['input'] = 'R'; }if (isset($opts['fdd']['BELEG8'])) { $opts['fdd']['BELEG8']['input'] = 'R'; }if (isset($opts['fdd']['REBEB'])) { $opts['fdd']['REBEB']['input'] = 'R'; }if (isset($opts['fdd']['FAGNR'])) { $opts['fdd']['FAGNR']['input'] = 'R'; }if (isset($opts['fdd']['FTYPE'])) { $opts['fdd']['FTYPE']['input'] = 'R'; }if (isset($opts['fdd']['FZFIL'])) { $opts['fdd']['FZFIL']['input'] = 'R'; }if (isset($opts['fdd']['FFIRM'])) { $opts['fdd']['FFIRM']['input'] = 'R'; }if (isset($opts['fdd']['RAARTH'])) { $opts['fdd']['RAARTH']['input'] = 'R'; }if (isset($opts['fdd']['KDBERA'])) { $opts['fdd']['KDBERA']['input'] = 'R'; }if (isset($opts['fdd']['FILIALE'])) { $opts['fdd']['FILIALE']['input'] = 'R'; }if (isset($opts['fdd']['KDBNR'])) { $opts['fdd']['KDBNR']['input'] = 'R'; }if (isset($opts['fdd']['KDBNAME'])) { $opts['fdd']['KDBNAME']['input'] = 'R'; }if (isset($opts['fdd']['KNAME'])) { $opts['fdd']['KNAME']['input'] = 'R'; }if (isset($opts['fdd']['KNDNR'])) { $opts['fdd']['KNDNR']['input'] = 'R'; }if (isset($opts['fdd']['ZAW'])) { $opts['fdd']['ZAW']['input'] = 'R'; }if (isset($opts['fdd']['Kanrs'])) { $opts['fdd']['Kanrs']['input'] = 'R'; }if (isset($opts['fdd']['Ktelf'])) { $opts['fdd']['Ktelf']['input'] = 'R'; }if (isset($opts['fdd']['Kname'])) { $opts['fdd']['Kname']['input'] = 'R'; }if (isset($opts['fdd']['Stufe1'])) { $opts['fdd']['Stufe1']['input'] = 'R'; }if (isset($opts['fdd']['Stufe2'])) { $opts['fdd']['Stufe2']['input'] = 'R'; }if (isset($opts['fdd']['Stufe3'])) { $opts['fdd']['Stufe3']['input'] = 'R'; }if (isset($opts['fdd']['Stufe4'])) { $opts['fdd']['Stufe4']['input'] = 'R'; }if (isset($opts['fdd']['Stufe5'])) { $opts['fdd']['Stufe5']['input'] = 'R'; }if (isset($opts['fdd']['Next_MAHNSTUFE'])) { $opts['fdd']['Next_MAHNSTUFE']['input'] = 'R'; }if (isset($opts['fdd']['O500_MAHNSTUFE'])) { $opts['fdd']['O500_MAHNSTUFE']['input'] = 'R'; }if (isset($opts['fdd']['ZA_1'])) { $opts['fdd']['ZA_1']['input'] = 'R'; }if (isset($opts['fdd']['ZA_2'])) { $opts['fdd']['ZA_2']['input'] = 'R'; }if (isset($opts['fdd']['ZA_3'])) { $opts['fdd']['ZA_3']['input'] = 'R'; }if (isset($opts['fdd']['Kstra'])) { $opts['fdd']['Kstra']['input'] = 'R'; }if (isset($opts['fdd']['Kdplz'])) { $opts['fdd']['Kdplz']['input'] = 'R'; }if (isset($opts['fdd']['Kdort'])) { $opts['fdd']['Kdort']['input'] = 'R'; }if (isset($opts['fdd']['Faell_Tage'])) { $opts['fdd']['Faell_Tage']['input'] = 'R'; }if (isset($opts['fdd']['Wochen'])) { $opts['fdd']['Wochen']['input'] = 'R'; }if (isset($opts['fdd']['geplAuslief_NA'])) { $opts['fdd']['geplAuslief_NA']['input'] = 'R'; }if (isset($opts['fdd']['Auslief_NA'])) { $opts['fdd']['Auslief_NA']['input'] = 'R'; }if (isset($opts['fdd']['geplAuslief_GA'])) { $opts['fdd']['geplAuslief_GA']['input'] = 'R'; }if (isset($opts['fdd']['Auslief_GA'])) { $opts['fdd']['Auslief_GA']['input'] = 'R'; }if (isset($opts['fdd']['LKNAME'])) { $opts['fdd']['LKNAME']['input'] = 'R'; }if (isset($opts['fdd']['LKNDNR'])) { $opts['fdd']['LKNDNR']['input'] = 'R'; }if (isset($opts['fdd']['LKSTRA'])) { $opts['fdd']['LKSTRA']['input'] = 'R'; }if (isset($opts['fdd']['LKDPLZ'])) { $opts['fdd']['LKDPLZ']['input'] = 'R'; }if (isset($opts['fdd']['LKDORT'])) { $opts['fdd']['LKDORT']['input'] = 'R'; }if (isset($opts['fdd']['LKTELF'])) { $opts['fdd']['LKTELF']['input'] = 'R'; }if (isset($opts['fdd']['Reserve_1'])) { $opts['fdd']['Reserve_1']['input'] = 'R'; }if (isset($opts['fdd']['Reserve_3'])) { $opts['fdd']['Reserve_3']['input'] = 'R'; }if (isset($opts['fdd']['shipment_date'])) { $opts['fdd']['shipment_date']['input'] = 'R'; }if (isset($opts['fdd']['customer_number_leasing'])) { $opts['fdd']['customer_number_leasing']['input'] = 'R'; }if (isset($opts['fdd']['customer_name_leasing'])) { $opts['fdd']['customer_name_leasing']['input'] = 'R'; }if (isset($opts['fdd']['text1'])) { $opts['fdd']['text1']['input'] = 'R'; }if (isset($opts['fdd']['text2'])) { $opts['fdd']['text2']['input'] = 'R'; } } if (isset($opts['fdd']['FTYPE'])) { $opts['fdd']['FTYPE']['options'] = 'ACD'; }if (isset($opts['fdd']['KNDNR'])) { $opts['fdd']['KNDNR']['options'] = 'ACD'; }if (isset($opts['fdd']['Ktelf'])) { $opts['fdd']['Ktelf']['options'] = 'ACD'; }if (isset($opts['fdd']['Kstra'])) { $opts['fdd']['Kstra']['options'] = 'ACD'; }if (isset($opts['fdd']['Kdplz'])) { $opts['fdd']['Kdplz']['options'] = 'ACD'; }if (isset($opts['fdd']['Kdort'])) { $opts['fdd']['Kdort']['options'] = 'ACD'; }if (isset($opts['fdd']['User'])) { $opts['fdd']['User']['options'] = 'ACD'; }if (isset($opts['fdd']['User_2'])) { $opts['fdd']['User_2']['options'] = 'ACD'; }if (isset($opts['fdd']['Faell_Tage'])) { $opts['fdd']['Faell_Tage']['options'] = 'ACD'; }if (isset($opts['fdd']['Next_MAHNSTUFE'])) { $opts['fdd']['Next_MAHNSTUFE']['options'] = 'ACD'; }if (isset($opts['fdd']['ZA_1'])) { $opts['fdd']['ZA_1']['options'] = 'ACD'; }if (isset($opts['fdd']['ZA_2'])) { $opts['fdd']['ZA_2']['options'] = 'ACD'; }if (isset($opts['fdd']['ZA_3'])) { $opts['fdd']['ZA_3']['options'] = 'ACD'; }if (isset($opts['fdd']['FLDAT_ori'])) { $opts['fdd']['FLDAT_ori']['options'] = 'ACD'; }if (isset($opts['fdd']['geplAuslief_NA'])) { $opts['fdd']['geplAuslief_NA']['options'] = 'ACD'; }if (isset($opts['fdd']['Auslief_NA'])) { $opts['fdd']['Auslief_NA']['options'] = 'ACD'; }if (isset($opts['fdd']['geplAuslief_GA'])) { $opts['fdd']['geplAuslief_GA']['options'] = 'ACD'; }if (isset($opts['fdd']['Auslief_GA'])) { $opts['fdd']['Auslief_GA']['options'] = 'ACD'; }if (isset($opts['fdd']['LKNAME'])) { $opts['fdd']['LKNAME']['options'] = 'ACD'; }if (isset($opts['fdd']['LKNDNR'])) { $opts['fdd']['LKNDNR']['options'] = 'ACD'; }if (isset($opts['fdd']['LKSTRA'])) { $opts['fdd']['LKSTRA']['options'] = 'ACD'; }if (isset($opts['fdd']['LKDPLZ'])) { $opts['fdd']['LKDPLZ']['options'] = 'ACD'; }if (isset($opts['fdd']['LKDORT'])) { $opts['fdd']['LKDORT']['options'] = 'ACD'; }if (isset($opts['fdd']['LKTELF'])) { $opts['fdd']['LKTELF']['options'] = 'ACD'; }if (isset($opts['fdd']['Reserve_1'])) { $opts['fdd']['Reserve_1']['options'] = 'ACD'; } $opts['triggers']['insert']['after'] = 'phpME_report_566306087.TIA.inc.php'; $opts['triggers']['update']['after'] = 'phpME_report_566306087.TUA.inc.php'; $opts['triggers']['delete']['after'] = 'phpME_report_566306087.TDA.inc.php'; $opts['fdd']['qb_id']['input'] = 'H'; if ($isSupervisor) { $userAction['add'] = 1; $userAction['change'] = 1; $userAction['delete'] = 1; $userAction['list'] = 1; $userAction['filter'] = 1; $userAction['copy'] = 1; } else { $userAction = getReportActions($_SESSION['userid'], 'fm_ahr_naga'); } if ($userAction['add']) $opts['options'] .= 'A'; if ($userAction['change']) $opts['options'] .= 'C'; if ($userAction['delete']) $opts['options'] .= 'D'; if (!$userAction['list']) $opts['filters'] = '1=0'; if ($userAction['filter']) $opts['options'] .= 'F'; #if ($userAction['copy']) $opts['options'] .= 'P'; $tableid = 'qb_report_824536287'; $tableid2 = 'qb_report_1'; $reportName = 'fm_ahr_naga'; $paramsql = 'FLDAT >= [datefrom:FLDAT] and FLDAT <= [dateuntil:FLDAT] and Betrieb = [betr:Betrieb] and Stufe5 = [stufe_5:Stufe5] and O500_Mahnstufe = [mahnst:O500_Mahnstufe] and Stufe2 = [stufe_2:Stufe2] and KNAME = [k_name:KNAME] and Wochen = [woch:Wochen] and Reklamation = [rekl:Reklamation] and Wiedervorlage = [Wiedervorl:Wiedervorlage] and Mahnen = [Mahnen_ent:Mahnen] and Reserve_3 = [rechgut:Reserve_3]'; $isparam = false; foreach ($_POST as $k => $v) { $v = trim($v); // old style if (strstr($paramsql, '['.$k.']')) { $_SESSION[$k.'_566306087'] = $v; $isparam = true; $key = '['.$k.']'; $value = "'".$v."'"; // new style } else if (ereg('\['.$k.':([^]]+)\]', $paramsql, $r)) { $isparam = true; $key = $r[0]; if ($v) { if(ereg('([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})', $v, $regs)) { $z = $regs[3].'-'.$regs[2].'-'.$regs[1]; $value = "'".$z."'"; }else $value = "'".$v."'"; $_SESSION[$k.'_566306087'] = $v; } else { $value = $r[1]; $_SESSION[$k.'_566306087'] = ''; } } $paramsql = str_replace($key, $value, $paramsql); } if ($isparam) { $opts['filters'] = $paramsql; $_SESSION['filters_566306087'] = $opts['filters']; } else { $opts['filters'] = $_SESSION['filters_566306087']; } //SQL for content of Filters $datefrom = ''; $dateuntil = ''; $rsFilters = $adodb->Execute('SELECT Betrieb FROM qb_report_824536287 GROUP BY Betrieb'); $betr = $rsFilters -> GetMenu('betr', @$_SESSION['betr_566306087']); $rsFilters = $adodb->Execute('SELECT Stufe5 FROM qb_report_824536287 GROUP BY Stufe5'); $stufe_5 = $rsFilters -> GetMenu('stufe_5', @$_SESSION['stufe_5_566306087']); $rsFilters = $adodb->Execute('SELECT O500_Mahnstufe FROM qb_report_824536287 GROUP BY O500_Mahnstufe'); $mahnst = $rsFilters -> GetMenu('mahnst', @$_SESSION['mahnst_566306087']); $rsFilters = $adodb->Execute('SELECT Stufe2 FROM qb_report_824536287 GROUP BY Stufe2'); $stufe_2 = $rsFilters -> GetMenu('stufe_2', @$_SESSION['stufe_2_566306087']); $rsFilters = $adodb->Execute('SELECT KNAME FROM qb_report_824536287 GROUP BY KNAME'); $k_name = $rsFilters -> GetMenu('k_name', @$_SESSION['k_name_566306087']); $rsFilters = $adodb->Execute('SELECT wochen FROM qb_report_824536287 GROUP BY wochen'); $woch = $rsFilters -> GetMenu('woch', @$_SESSION['woch_566306087']); $rsFilters = $adodb->Execute('SELECT Reklamation FROM qb_report_824536287 GROUP BY Reklamation'); $rekl = $rsFilters -> GetMenu('rekl', @$_SESSION['rekl_566306087']); $Wiedervorl = ''; $rsFilters = $adodb->Execute('SELECT Mahnen FROM qb_report_824536287 GROUP BY Mahnen'); $Mahnen_ent = $rsFilters -> GetMenu('Mahnen_ent', @$_SESSION['Mahnen_ent_566306087']); $rsFilters = $adodb->Execute('SELECT Reserve_3 FROM qb_report_824536287 GROUP BY Reserve_3'); $rechgut = $rsFilters -> GetMenu('rechgut', @$_SESSION['rechgut_566306087']); function translate($str) { return __($str, null, $tableid2); } require 'smarty/libs/Smarty.class.php'; $smarty = new Smarty; $smarty->compile_check = true; $smarty->debugging = false; $smarty->register_modifier("translate","translate"); $smarty->register_modifier("number_format","number_format"); $smarty->assign('curdate', time()); $smarty->assign('count', __('COUNT')); $smarty->assign('grandTotal', __('grandTotal')); $smarty->assign('subTotal', __('subTotal')); $smarty->assign('title', __("TITLE", $reportName, $tableid2)); $smarty->assign('Total', __('Total')); $smarty->assign('Query', __('Query')); $smarty->assign('Reset', __('Reset')); $smarty->assign("BetriebTxt", __("Betrieb", "Betrieb", $tableid2)); $smarty->assign("Stufe2Txt", __("Stufe2", "Stufe2", $tableid2)); $smarty->assign("FAGNRTxt", __("FAGNR", "FAGNR", $tableid2)); $smarty->assign("FTYPETxt", __("FTYPE", "FTYPE", $tableid2)); $smarty->assign("KNDNRTxt", __("KNDNR", "KNDNR", $tableid2)); $smarty->assign("KNAMETxt", __("KNAME", "KNAME", $tableid2)); $smarty->assign("Stufe5Txt", __("Stufe5", "Stufe5", $tableid2)); $smarty->assign("REDATTxt", __("REDAT", "REDAT", $tableid2)); $smarty->assign("O500_HW2BUCHGBETRTxt", __("O500_HW2BUCHGBETR", "O500_HW2BUCHGBETR", $tableid2)); $smarty->assign("FLDAT_vonTxt", __("FLDAT_von", "FLDAT_von", $tableid2)); $smarty->assign("FLDAT_bisTxt", __("FLDAT_bis", "FLDAT_bis", $tableid2)); $smarty->assign("FLDATTxt", __("FLDAT", "FLDAT", $tableid2)); $smarty->assign("O500_MAHNSTUFETxt", __("O500_MAHNSTUFE", "O500_MAHNSTUFE", $tableid2)); $smarty->assign("Next_MAHNSTUFETxt", __("Next_MAHNSTUFE", "Next_MAHNSTUFE", $tableid2)); $smarty->assign("ZA_1Txt", __("ZA_1", "ZA_1", $tableid2)); $smarty->assign("ZA_2Txt", __("ZA_2", "ZA_2", $tableid2)); $smarty->assign("ZA_3Txt", __("ZA_3", "ZA_3", $tableid2)); $smarty->assign("O500_HW2BETR_OFFENTxt", __("O500_HW2BETR_OFFEN", "O500_HW2BETR_OFFEN", $tableid2)); $smarty->assign("OPDATTxt", __("OPDAT", "OPDAT", $tableid2)); $smarty->assign("O500_BELEGNR1Txt", __("O500_BELEGNR1", "O500_BELEGNR1", $tableid2)); $smarty->assign("KtelfTxt", __("Ktelf", "Ktelf", $tableid2)); $smarty->assign("KstraTxt", __("Kstra", "Kstra", $tableid2)); $smarty->assign("KdplzTxt", __("Kdplz", "Kdplz", $tableid2)); $smarty->assign("KdortTxt", __("Kdort", "Kdort", $tableid2)); $smarty->assign("BemerkungTxt", __("Bemerkung", "Bemerkung", $tableid2)); $smarty->assign("WiedervorlageTxt", __("Wiedervorlage", "Wiedervorlage", $tableid2)); $smarty->assign("Bemerkung_2Txt", __("Bemerkung_2", "Bemerkung_2", $tableid2)); $smarty->assign("BearbeitetTxt", __("Bearbeitet", "Bearbeitet", $tableid2)); $smarty->assign("MahnenTxt", __("Mahnen", "Mahnen", $tableid2)); $smarty->assign("UserTxt", __("User", "User", $tableid2)); $smarty->assign("AenderungsdatumTxt", __("Aenderungsdatum", "Aenderungsdatum", $tableid2)); $smarty->assign("User_2Txt", __("User_2", "User_2", $tableid2)); $smarty->assign("ReklamationTxt", __("Reklamation", "Reklamation", $tableid2)); $smarty->assign("Aenderungsdatum_u2Txt", __("Aenderungsdatum_u2", "Aenderungsdatum_u2", $tableid2)); $smarty->assign("geplAuslief_NATxt", __("geplAuslief_NA", "geplAuslief_NA", $tableid2)); $smarty->assign("Auslief_NATxt", __("Auslief_NA", "Auslief_NA", $tableid2)); $smarty->assign("geplAuslief_GATxt", __("geplAuslief_GA", "geplAuslief_GA", $tableid2)); $smarty->assign("Auslief_GATxt", __("Auslief_GA", "Auslief_GA", $tableid2)); $smarty->assign("LKNAMETxt", __("LKNAME", "LKNAME", $tableid2)); $smarty->assign("LKTELFTxt", __("LKTELF", "LKTELF", $tableid2)); $smarty->assign("LKSTRATxt", __("LKSTRA", "LKSTRA", $tableid2)); $smarty->assign("LKDPLZTxt", __("LKDPLZ", "LKDPLZ", $tableid2)); $smarty->assign("LKDORTTxt", __("LKDORT", "LKDORT", $tableid2)); $smarty->assign("Reserve_1Txt", __("Reserve_1", "Reserve_1", $tableid2)); $smarty->assign("Reserve_3Txt", __("Reserve_3", "Reserve_3", $tableid2)); $smarty->assign("shipment_dateTxt", __("shipment_date", "shipment_date", $tableid2)); $smarty->assign("customer_number_leasingTxt", __("customer_number_leasing", "customer_number_leasing", $tableid2)); $smarty->assign("customer_name_leasingTxt", __("customer_name_leasing", "customer_name_leasing", $tableid2)); $smarty->assign("text1Txt", __("text1", "text1", $tableid2)); $smarty->assign("text2Txt", __("text2", "text2", $tableid2)); $smarty->assign("Faell_TageTxt", __("Faell_Tage", "Faell_Tage", $tableid2)); $smarty->assign("WochenTxt", __("Wochen", "Wochen", $tableid2)); $smarty->assign("filter_datefromTxt", __("FLDAT_von", "FLDAT_von", "$tableid2")); $smarty->assign("filter_datefromVal", $datefrom); $smarty->assign("filter_dateuntilTxt", __("FLDAT_bis", "FLDAT_bis", "$tableid2")); $smarty->assign("filter_dateuntilVal", $dateuntil); $smarty->assign("filter_betrTxt", __("Betrieb", "Betrieb", "$tableid2")); $smarty->assign("filter_betrVal", $betr); $smarty->assign("filter_betrVal", $betr); $smarty->assign("filter_stufe_5Txt", __("Stufe5", "Stufe5", "$tableid2")); $smarty->assign("filter_stufe_5Val", $stufe_5); $smarty->assign("filter_stufe_5Val", $stufe_5); $smarty->assign("filter_mahnstTxt", __("O500_Mahnstufe", "O500_Mahnstufe", "$tableid2")); $smarty->assign("filter_mahnstVal", $mahnst); $smarty->assign("filter_mahnstVal", $mahnst); $smarty->assign("filter_stufe_2Txt", __("Stufe2", "Stufe2", "$tableid2")); $smarty->assign("filter_stufe_2Val", $stufe_2); $smarty->assign("filter_stufe_2Val", $stufe_2); $smarty->assign("filter_k_nameTxt", __("KNAME", "KNAME", "$tableid2")); $smarty->assign("filter_k_nameVal", $k_name); $smarty->assign("filter_k_nameVal", $k_name); $smarty->assign("filter_wochTxt", __("wochen", "wochen", "$tableid2")); $smarty->assign("filter_wochVal", $woch); $smarty->assign("filter_wochVal", $woch); $smarty->assign("filter_reklTxt", __("Reklamation", "Reklamation", "$tableid2")); $smarty->assign("filter_reklVal", $rekl); $smarty->assign("filter_reklVal", $rekl); $smarty->assign("filter_WiedervorlTxt", __("Wiedervorlage", "Wiedervorlage", "$tableid2")); $smarty->assign("filter_WiedervorlVal", $Wiedervorl); $smarty->assign("filter_Mahnen_entTxt", __("Mahnen", "Mahnen", "$tableid2")); $smarty->assign("filter_Mahnen_entVal", $Mahnen_ent); $smarty->assign("filter_Mahnen_entVal", $Mahnen_ent); $smarty->assign("filter_rechgutTxt", __("Reserve_3", "Reserve_3", "$tableid2")); $smarty->assign("filter_rechgutVal", $rechgut); $smarty->assign("filter_rechgutVal", $rechgut); // Now important call to phpMyEdit global $phpme; require_once 'phpMyEdit3.class.php'; $phpme = new phpMyEdit($opts); $where=''; if($whereParam = $phpme -> make_where_from_query_opts()) $where = 'WHERE '.$whereParam; $rsGroup = $adodb->Execute('SELECT @A:=SUM(O500_HW2BETR_OFFEN) as ALLGroup_O500_HW2BETR_OFFEN FROM qb_report_824536287 '.$where); //die($phpme -> make_where_from_query_opts()); $smarty->assign('ALLGroup_SUM', __($rsGroup->fields['ALLGroup_O500_HW2BETR_OFFEN'])); $columnCount = $smarty->get_template_vars('columnCount'); #if ($columnCount < 1) return; if (isset($_GET['dopdf'])) { ob_start(); } if ($smarty->template_exists('report_fm_ahr_naga.tpl')) { $smarty->display('report_fm_ahr_naga.tpl'); } else { $smarty->display('report_fm_ahr_naga_default.tpl'); } if (isset($_GET['dopdf'])) { $tmpfname = tempnam("/tmp", "output.html"); $fp = fopen($tmpfname, 'w'); fwrite($fp, ob_get_contents()); ob_end_clean(); fclose($fp); header('Content-Type: application/pdf'); passthru('htmldoc -t pdf --webpage '.$tmpfname); } ?>