0) { $shopAdminLink = true; while ($row = @mysqli_fetch_array($result)) { if($row['active'] == 1) { $siteAdminAvailableShops[] = $row['shop_code']; } } } else { $shopAdminLink = false; } // statistik leeren if(isset($_POST['clear_search']) && $_POST['clear_search'] == 1) { $query = "DELETE FROM shop_search_query WHERE shop_code = '" . $_POST['input_shop_code'] . "'"; mysqli_query($GLOBALS['mysql_con'],$query); } $zeitraum_values = array( "1 WEEK", "1 MONTH", "1 YEAR", "100 YEAR" ); $zeitraum_names = array( $translation->get("last_week"), $translation->get("last_month"), $translation->get("last_year"), $translation->get("show_all") ); $sort_values = array( "1", "2", "3", "4" ); $sort_names = array( $translation->get("frequency_desc"), $translation->get("frequency_asc"), $translation->get("result_desc"), $translation->get("result_asc") ); $shop_values = array(); $shop_names = array(); $query = "SELECT * FROM shop_shop"; $result = mysqli_query($GLOBALS['mysql_con'],$query); while($shop=mysqli_fetch_assoc($result)) { // wenn benutzer diesen shop nicht sehen darf if($shopAdminLink === true && !in_array($shop['code'], $siteAdminAvailableShops)) { continue; } if($_POST['input_shop_code'] == '') { $_POST['input_shop_code'] = $shop['code']; } $shop_values[] = $shop['code']; $shop_names[] = $shop['description']; } ?>