'.selectionList('', $sort_orders_smpl, 'sort_order', $url_sort_order, 1, 0, 1).selectionList('', $presets, 'presets', $url_preset, 1, 1, 0).''; //$template['presets'] .= selectionList('Bekijk top 10', $presets, 'presets', $url_preset, 1, 1, 0); $template['pages'] .= '
'.selectionList('Meer informatie', $pages, 'page', $url_page, 1, 1, 0).'
'; if ($_REQUEST['page']) { $template_file = $_REQUEST['page']; unset($_REQUEST['method']); // template($_REQUEST['page']); } switch ($_REQUEST['method']) { case sample : require_once "$include_path/sample.inc"; sample(); break; case help : $template_file = "zoektips"; case results : require_once "$include_path/overview.inc"; overview($sql_group, $overview); break; } // draw graphs if necessary. Script will exit afterwards if ($sql_group || $_REQUEST['group'] == '-') { $subtitle = trim($template['filter']); if (isset ($_REQUEST['graph'])) { require_once "$include_path/graph.inc"; // $title = $template['limit'] . ' ' . $groups_plural['product'] . " " . $_REQUEST['graph'] . "\nmet " . $template['sort_order'] . " " . $template['order']; if($_REQUEST['graph'] != $year) $title_group = ' '.$_REQUEST['graph']; $title = $template['limit'] . ' ' . $groups_plural[$_REQUEST['sub_group']] . $title_group . " $year met " . $template['sub_sort_order'] . " " . $template['order']; // $subtitle = $_REQUEST['group']. '('.$sql_order.')'; $subtitle = 'Product (metingen)'; if ($_REQUEST['sub_group']) $sub_group = ' - gegroupeerd op ' . strtolower($sub_groups[$_REQUEST['sub_group']]); graph($title, $subtitle, $_REQUEST['graph'], $sql_group, $sql_order, $sql_limit, $sql_where); } elseif (isset ($_REQUEST['piegraph'])) { require_once "$include_path/pieGraph.inc"; // $title = 'Bestrijdingsmiddelen ' . $title; if ($_REQUEST['group'] != 'company') $subtitle .= trim(companySQL($year, $sql_join_1, $sql_join_2, $sql_where)); if($_REQUEST['piegraph'] != $year) $title_group = ' '.$_REQUEST['piegraph']; $title = 'Bestrijdingsmiddelen ' . $template['result'] .$title_group . " $year".$products_name; // $subtitle .= "\n" . trim($template['filter']); pieGraph($title, $subtitle, $_REQUEST['piegraph'], $sql_group, $sql_order, $sql_limit, $sql_where); // pieGraph(ucfirst($group_prefix) . $_REQUEST['piegraph'], $subtitle, $_REQUEST['piegraph'], $sql_group, $sql_order, $sql_limit, $sql_where); } elseif (isset ($_REQUEST['lgraph'])) { require_once "$include_path/lineGraph.inc"; lineGraph($group_prefix . $_REQUEST['lgraph'].$products_name, $subtitle, $_REQUEST['lgraph'], $sql_group, $sql_limit, $sql_where, 0); } elseif (isset ($_REQUEST['lgraph_p'])) { require_once "$include_path/lineGraph.inc"; lineGraph($group_prefix . $_REQUEST['lgraph_p'].$products_name, $subtitle, $_REQUEST['lgraph_p'], $sql_group, $sql_limit, $sql_where, 0, 1, $lang['avg_pesticides']); } elseif (isset ($_REQUEST['lgraphG'])) { require_once "$include_path/lineGraphG.inc"; lineGraphG($_REQUEST['group'].$products_name, $subtitle, $sql_group, $sql_order, $sql_limit); } elseif (isset ($_REQUEST['ygraph'])) { require_once "$include_path/yearGraph.inc"; unset ($sql_limit); $company_title = companySQL($year, $sql_join_1, $sql_join_2, $sql_where); if($_REQUEST['ygraph'] != $year) $title_group = $_REQUEST['ygraph']; $title = "Jaargrafiek " . $title_group . $company_title . $template['filter']; if ($year) $title .= " $year"; $subtitle = 'Maand (metingen)'; yearGraph($title.$products_name, $subtitle, $_REQUEST['ygraph'], $sql_group, $sql_order, $sql_limit, $sql_where); } } if ($_REQUEST['graphT']) { unset($subtitle); require_once "$include_path/graph.inc"; if ($_REQUEST['smpl']) { $title = $template['title_smpl']; $subtitle = trim($template['filter'])."\n"; // $title = $template['limit'] . ' ' . strtolower($sort_orders[$_REQUEST['sort_order']]) . ' ' . $template['group_plural_lc']; } else { if ($_REQUEST['group'] != 'company') $subtitle .= trim(companySQL($year, $sql_join_1, $sql_join_2, $sql_where))."\n"; $title = $template['limit'] . ' ' . $template['group_plural_lc'] . "\nmet " . $template['sort_order'] . " " . $template['order']; $subtitle .= $groups[$_REQUEST['group']] . ' (' . strtolower($orders[$_REQUEST['order']]) . ')'."\n"; $subtitle .= trim($template['filter'])."\n"; if ($admin) $subtitle .= "\n(samples, avg_pesticides, perc_ARfD_avg)"; } if ($year) $title .= " in $year"; graph($title, $subtitle, $limits[$_REQUEST['limit']] . ' ' . $groups_plural[$_REQUEST['group']], $sql_group, $sql_order, $sql_limit, $sql_where, 1); } elseif ($_REQUEST['lgraphT']) { require_once "$include_path/lineGraph.inc"; lineGraph('Nederland', 'Nederland', $sql_group, $sql_limit, $sql_where, 1); } if ($template['config']) $template['tpl_config'] = divHTML('config', 'Configuratie-opties', 'Klik voor configuratie-opties', '
' . $template['config'] . '
', 1, 1, 'ico_form.gif', "Dubbelklik om de configuratie-opties te verbergen"); if ($overview['group'] && ($_REQUEST['filter'] == 'none') && !$_REQUEST['result']) { $graphs['graphT'] = $template['limit'] . ' ' . $template['group_plural_lc'] . " met " . $template['sort_order'] . " " . $template['order']; $graphs['lgraphG'] = 'Meerjarentrend bestrijdingsmiddelen ' . $group_plural_lc . ' - ' . $orders[$_REQUEST['order']] . $company_title; // $txt_display = 1; foreach (array_keys($graphs) as $key) { if ($overview[$key]) { $url_graph = $url_base . "&$key=1"; if ($_REQUEST['opt_archive']) addArchiveData($archive, "$archive_dir/$title.png", file_get_contents($url_graph)); // extra opties (0,0 aan het eind)nodig als meerdere grafieken? $template['graph_img'] .= imgHTML('graph_img', 'Grafiek: ' . $graphs[$key], '', $url_graph, ${ $key . "_disp" }[$_REQUEST['group']], $txt_display, "ico_$key.gif", 0, 0, 0, 0); $template['graph_img'] .= imgHTML('graph_img'.$key, 'Grafiek: ' . $graphs[$key], '', $url_graph, ${ $key . "_disp" }[$_REQUEST['group']], $txt_display, "ico_$key.gif", 0, 0); if (${ $key . "_disp" }[$_REQUEST['group']]) $url_disp = $url_graph; } } } //$template['graph_img'] .= imgHTML('graph_img', '', '', $url_disp, isset ($url_disp), 1, 0, 0); if ((!$_REQUEST['print'] && !$_REQUEST['page']) || ($_REQUEST['page'] == 'tips')) { if ($overview['group']) if ($overview['stat']) $template['graph_img'] .= divHTML('stats', 'Tabel : Meerjarentrend ' . $group_plural_lc . ' - Gemiddeld aantal ' . $orders[$_REQUEST['order']] . '-producten', "Klik hier voor de overzichtstabel", stats($sql_group, $sql_order, $years, $year) . 'Naar boven', $stats_disp[$_REQUEST['group']], $txt_display, 'ico_table.gif', "Dubbelklik om de tabel te verbergen"); // $template['graph_img'] .= divHTML('stats', 'Tabel : '.ucfirst($group_plural_lc).' met '.$orders[$_REQUEST['order']].'-producten', "Klik hier voor de overzichtstabel", stats($sql_group, $sql_order, $years, $year).'Naar boven

', $overview['stat']s_disp[$_REQUEST['group']], $txt_display, 'ico_table.gif', "Dubbelklik om de tabel te verbergen"); // $template['selection'] .= '
'; if ($overview['show_quick_lists']) { foreach($quick_lists as $key) { $quick_lists_arrays[$key][$key] = $lang['select']; $sql = "SELECT DISTINCT $key {$sql_quick_lists['sql_join_1']} FROM $table_prefix$table {$sql_quick_lists['sql_join_2']} {$sql_quick_lists['sql_where_str']} ORDER BY $key ASC"; $results = mySQLQuery($sql); while ($result = mysql_fetch_assoc($results)) $quick_lists_arrays[$key][$result[$key]] = $result[$key]; } $template['quick_lists'] .= ''; foreach($quick_lists as $key) $template['quick_lists'] .= ''; $template['quick_lists'] .= '
'.selectionList($lang[$key], $quick_lists_arrays[$key], $key, ${ "url_" . $key }, 1, 0, 1).'
'; } if ($overview['show_full_text']) { $template['selection'] .= 'Snelzoeken:
' . ''; $template['selection'] .= '
'; }; if ($overview['show_group']) $template['selection'] .= selectionList('Bekijk per', $groups, 'group', $url_group, 1, 0, 1); if ($overview['show_company_filter']) $template['selection'] .= selectionList('Gemeten bij', $company_filters, 'company_filter', $url_company_filter, 1, 0, 1); if ($overview['show_countries']) $template['selection'] .= selectionList($lang['country_of_origin'], $countries, 'countries', $url_countries, 1, 0, 1); if ($overview['show_products']) $template['selection'] .= selectionList($lang['products'], $products, 'products', $url_products, 1, 0, 1); if ($overview['show_order']) $template['selection'] .= selectionList('Sorteer op', $orders, 'order', $url_order, 1, 0, 1); if ($overview['show_sort_order']) $template['selection'] .= selectionList('Volgorde', $sort_orders, 'sort_order', $url_sort_order, 1, 0, 1); if ($overview['show_year']) { $sort_years = $years; krsort($sort_years); $template['selection'] .= selectionList('Jaar', $sort_years, 'year', $url_year, 1, 0, 1); } if ($overview['show_months']) $template['selection'] .= selectionList('Maand', $months, 'month', $url_month, 1, 0, 1); if ($overview['filter']) $template['selection'] .= selectionList('Weergeven', $filters, 'filter', $url_filter, 1, 0, 1); //$template['selection'] .= '
'; $template['selection'] .= '
'; if ($overview['show_sub_group']) $template['selection'] .= selectionList('Groepeer per '.strtolower($groups[$_REQUEST['group']]).' op', $sub_groups, 'sub_group', $url_sub_group, 1, 0, 1); if ($overview['lim']) // $template['selection'] .= selectionList('Aantal resultaten', $limits, 'limit', $url_limit, 1, 0, 1); $template['selection'] .= selectionList('Aantal ' . $groups_plural[$_REQUEST['sub_group']], $limits, 'limit', $url_limit, 1, 0, 1); if ($overview['sub_order']) $template['selection'] .= selectionList('Sorteer ' . $groups_plural[$_REQUEST['sub_group']] . ' op', $sub_orders, 'sub_order', $url_sub_order, 1, 0, 1); $template['selection'] .= '
'; if ($overview['show_filter_group']) $template['selection'] .= selectionList('Groepfilter', $filter_group, 'filter_group', $url_filter_group, 1, 0, 1); if ($overview['show_filter_sub_group']) $template['selection'] .= selectionList('Subgroepfilter', $filter_sub_group, 'filter_sub_group', $url_filter_sub_group, 1, 0, 1); if ($overview['show_table']) $template['selection'] .= selectionList('Tabel', $tables, 'table', $url_table, 1, 0, 1); if ($overview['show_samples']) $template['selection'] .= selectionList('Minimaal aantal metingen', $samples, 'samples', $urls['samples'], 1, 0, 1).'
'; if ($overview['show_select_adv']) { // $template['selection'] .= selectionList('Selectie opties:', $select_adv, 'opt_select_adv', $urls['opt_select_adv'], 1, 0, 1); $txt = $_REQUEST['opt_select_adv'] ? $lang['def_options'] : $lang['adv_options']; $template['selection'] .= ''.$txt.''; } // $template['selection'] .= ' Zoektips'; // $template['selection'] = divHTML('selection', 'Klik hier om uw eigen selectie te maken', "Klik hier om uw eigen selectie te maken", $template['selection'], $overview['show_select'], 0, 'ico_form.gif', "Dubbelklik om de selectieopties te verbergen", 'dynCon'); $template['selection'] = '
'.divHTML('selection', 'Eigen selectie...', "Klik hier om uw eigen selectie te maken", $template['selection'], $overview['show_select'], 0, 'ico_form.gif', "Dubbelklik om de selectieopties te verbergen", 'dynCon'); // $template['selection'] .= '
'; // $template['selection'] = divHTML('selection', ''; } $eTime = explode(' ', microtime()); $time = (($eTime[1] - $sTime[1]) + ($eTime[0] - $sTime[0])); if ($admin) $template['tpl_report'] = "

Execution time: $time seconds

" . $template['tpl_report']; template($template_file); ?>