200 ) { $feedback['error']['droplistResultsPerPage'] = 1; } // Wenn Fehler passiert sind zeige diese an und füge ||||| zu damit im Resultdiv ein leeres Result rückgegeben wird if (!empty($feedback['error'])) { echo feedback($feedback, 'error', $replacer, $fadeout)."|||||"; // Feedback, Typus, Replacer als Array, Fadeout Timer in Millisekunden } // Kein Fehler, CSV generieren if (empty($feedback['error'])) { // Beginn der Abfrage $query = "SELECT * FROM ".$GLOBALS['mysqlTab']['domainlist']." WHERE type='drop' AND takeout = '0' AND status = 'pending' AND trademarkStatus != 'accepted' AND orderableUntil > '".time()."' AND orderableSince < '".time()."'"; // Mögliche Filterparameter if (isset($_GET['tld']) and $_GET['tld'] != ""){ $query .= " AND tld = '".$_GET['tld']."'"; } if (isset($_POST['tld']) and $_POST['tld'] != ""){ $query .= " AND tld = '".$_POST['tld']."'"; } if (isset($_POST['contains']) and $_POST['contains'] != ""){ $query .= " AND sld LIKE '%".$_POST['contains']."%'"; } if (isset($_POST['lengthMin']) and $_POST['lengthMin'] != ""){ $query .= " AND CHAR_LENGTH(sld) >= '".$_POST['lengthMin']."'"; } if (isset($_POST['lengthMax']) and $_POST['lengthMax'] != ""){ $query .= " AND CHAR_LENGTH(sld) <= '".$_POST['lengthMax']."'"; } if (isset($_POST['idn']) and $_POST['idn'] == "yes"){ $query .= " AND punycode LIKE 'xn--%'"; } if (isset($_POST['idn']) and $_POST['idn'] == "no"){ $query .= " AND punycode NOT LIKE 'xn--%'"; } if (isset($_POST['hyphen']) and $_POST['hyphen'] == "yes"){ $query .= " AND sld LIKE '%-%'"; } if (isset($_POST['hyphen']) and $_POST['hyphen'] == "no"){ $query .= " AND sld NOT LIKE '%-%'"; } if (isset($_POST['numbers']) and $_POST['numbers'] == "yes"){ $query .= " AND sld REGEXP '[0-9]'"; } if (isset($_POST['numbers']) and $_POST['numbers'] == "no"){ $query .= " AND sld REGEXP '^[0-9]'"; } if (isset($_POST['dictionary']) and $_POST['dictionary'] == "yes"){ $query .= " AND (dictDE = '1' OR dictEN = '1' OR dictSV = '1')"; } if (isset($_POST['dictionary']) and $_POST['dictionary'] == "de"){ $query .= " AND dictDE = '1'"; } if (isset($_POST['dictionary']) and $_POST['dictionary'] == "en"){ $query .= " AND dictEN = '1'"; } if (isset($_POST['dictionary']) and $_POST['dictionary'] == "sv"){ $query .= " AND dictSV = '1'"; } if (isset($_POST['dictionary']) and $_POST['dictionary'] == "no"){ $query .= " AND (dictDE = '0' AND dictEN = '0' AND dictSV = '0')"; } if (isset($_POST['orderableUntil']) and $_POST['orderableUntil'] != "" and $_POST['orderableSince'] > time()){ $query .= " AND orderableUntil <= '".$_POST['orderableUntil']."'"; } if (isset($_POST['orderableSince']) and $_POST['orderableSince'] != "" and $_POST['orderableSince'] < time()){ $query .= " AND orderableSince >= '".$_POST['orderableSince']."'"; } if (isset($_POST['googleHitsMin']) and $_POST['googleHitsMin'] != ""){ $query .= " AND googleHits >= '".$_POST['googleHitsMin']."'"; } if (isset($_POST['googleHitsMax']) and $_POST['googleHitsMax'] != ""){ $query .= " AND googleHits <= '".$_POST['googleHitsMax']."'"; } if (isset($_POST['googleAdsMin']) and $_POST['googleAdsMin'] != ""){ $query .= " AND googleAds >= '".$_POST['googleAdsMin']."'"; } if (isset($_POST['googleAdsMax']) and $_POST['googleAdsMax'] != ""){ $query .= " AND googleAds <= '".$_POST['googleAdsMax']."'"; } if (isset($_POST['googlePRMin']) and $_POST['googlePRMin'] != ""){ $query .= " AND googlePR >= '".$_POST['googlePRMin']."'"; } if (isset($_POST['googlePRMax']) and $_POST['googlePRMax'] != ""){ $query .= " AND googlePR <= '".$_POST['googlePRMax']."'"; } if (isset($_POST['googleAdwordsSearchesMin']) and $_POST['googleSearchesMin'] != ""){ $query .= " AND googleAdwordsSearches >= '".$_POST['googleSearchesMin']."'"; } if (isset($_POST['googleAdwordsSearchesMax']) and $_POST['googleSearchesMax'] != ""){ $query .= " AND googleAdwordsSearches <= '".$_POST['googleSearchesMax']."'"; } if (isset($_POST['googleAdwordsCPCMin']) and $_POST['googleCPCMin'] != ""){ $query .= " AND googleAdwordsCPC >= '".$_POST['googleCPCMin']."'"; } if (isset($_POST['googleAdwordsCPCMax']) and $_POST['googleCPCMax'] != ""){ $query .= " AND googleAdwordsCPC <= '".$_POST['googleCPCMax']."'"; } if (isset($_POST['googleAdwordsImpressionsMin']) and $_POST['googleImpressionsMin'] != ""){ $query .= " AND googleAdwordsImpressions >= '".$_POST['googleImpressionsMin']."'"; } if (isset($_POST['googleAdwordsImpressionsMax']) and $_POST['googleImpressionsMax'] != ""){ $query .= " AND googleAdwordsImpressions <= '".$_POST['googleImpressionsMax']."'"; } if (isset($_POST['alexaRankMin']) and $_POST['alexaRankMin'] != ""){ $query .= " AND alexaRank >= '".$_POST['alexaRankMin']."'"; } if (isset($_POST['alexaRankMax']) and $_POST['alexaRankMax'] != ""){ $query .= " AND alexaRank <= '".$_POST['alexaRankMax']."'"; } if (isset($_POST['archiveOrgMin']) and $_POST['archiveOrgMin'] != ""){ $query .= " AND archiveOrg >= '".$_POST['archiveOrgMin']."-01-01' AND archiveOrg != '0000-00-00'"; } if (isset($_POST['archiveOrgMax']) and $_POST['archiveOrgMax'] != ""){ $query .= " AND archiveOrg <= '".$_POST['archiveOrgMax']."-12-31' AND archiveOrg != '0000-00-00'"; } if (isset($_POST['dmozEntry']) and $_POST['dmozEntry'] == "yes"){ $query .= " AND dmozEntry = '1'"; } if (isset($_POST['dmozEntry']) and $_POST['dmozEntry'] == "no"){ $query .= " AND dmozEntry = '0'"; } if (isset($_POST['mozRankMin']) and $_POST['mozRankMin'] != ""){ $query .= " AND mozRank >= '".$_POST['mozRankMin']."'"; } if (isset($_POST['mozRankMax']) and $_POST['mozRankMax'] != ""){ $query .= " AND mozRank <= '".$_POST['mozRankMax']."'"; } if (isset($_POST['mozLinksMin']) and $_POST['mozLinksMin'] != ""){ $query .= " AND mozLinks >= '".$_POST['mozLinksMin']."'"; } if (isset($_POST['mozLinksMax']) and $_POST['mozLinksMax'] != ""){ $query .= " AND mozLinks <= '".$_POST['mozLinksMax']."'"; } if (isset($_POST['mozDomainAuthorityMin']) and $_POST['mozDomainAuthorityMin'] != ""){ $query .= " AND mozDomainAuthority >= '".$_POST['mozDomainAuthorityMin']."'"; } if (isset($_POST['mozDomainAuthorityMax']) and $_POST['mozDomainAuthorityMax'] != ""){ $query .= " AND mozDomainAuthority <= '".$_POST['mozDomainAuthorityMax']."'"; } if (isset($_POST['mozEquityLinksMin']) and $_POST['mozEquityLinksMin'] != ""){ $query .= " AND mozEquityLinks >= '".$_POST['mozEquityLinksMin']."'"; } if (isset($_POST['mozEquityLinksMax']) and $_POST['mozEquityLinksMax'] != ""){ $query .= " AND mozEquityLinks <= '".$_POST['mozEquityLinksMax']."'"; } if (isset($_POST['kicksLinkPopMin']) and $_POST['kicksLinkPopMin'] != ""){ $query .= " AND kicksLinkPop >= '".$_POST['kicksLinkPopMin']."'"; } if (isset($_POST['kicksLinkPopMax']) and $_POST['kicksLinkPopMax'] != ""){ $query .= " AND kicksLinkPop <= '".$_POST['kicksLinkPopMax']."'"; } if (isset($_POST['kicksDomainPopMin']) and $_POST['kicksDomainPopMin'] != ""){ $query .= " AND kicksDomainPop >= '".$_POST['kicksDomainPopMin']."'"; } if (isset($_POST['kicksDomainPopMax']) and $_POST['kicksDomainPopMax'] != ""){ $query .= " AND kicksDomainPop <= '".$_POST['kicksDomainPopMax']."'"; } if (isset($_POST['kicksIpPopMin']) and $_POST['kicksIpPopMin'] != ""){ $query .= " AND kicksIpPop >= '".$_POST['kicksIpPopMin']."'"; } if (isset($_POST['kicksIpPopMax']) and $_POST['kicksIpPopMax'] != ""){ $query .= " AND kicksIpPop <= '".$_POST['kicksIpPopMax']."'"; } if (isset($_POST['kicksClassCPopMin']) and $_POST['kicksClassCPopMin'] != ""){ $query .= " AND kicksClassCPop >= '".$_POST['kicksClassCPopMin']."'"; } if (isset($_POST['kicksClassCPopMax']) and $_POST['kicksClassCPopMax'] != ""){ $query .= " AND kicksClassCPop <= '".$_POST['kicksClassCPopMax']."'"; } if (isset($_POST['ciRankMin']) and $_POST['ciRankMin'] != ""){ $query .= " AND ciRank >= '".$_POST['ciRankMin']."'"; } if (isset($_POST['ciRankMax']) and $_POST['ciRankMax'] != ""){ $query .= " AND ciRank <= '".$_POST['ciRankMax']."'"; } // Beenmden der Abfrage $query .= " ORDER BY ciRank DESC LIMIT 0,1000"; $output = "Catch.info .CSV Download;;;;\n"; $output .= date("d.m.Y H:i:s", time())."h;;;;\n"; $output .= "Reproduction and Transmission is forbidden.;;;;\n"; $output .= "Encoding: UTF-8;;;;\n"; $output .= ";;;;\n"; $output .= ";;;;\n"; $output .= "Counter;Domain;Second Level;Top Level;Punycode\n"; $i = 1; $check2 = queryDB($query); while ($check = mysql_fetch_object($check2)) { $output .= $i.";".$check->domain.";".$check->sld.";".$check->tld.";".$check->punycode."\n"; $i += 1; } header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=Catch.info.Export-".date("d.m.Y", time()).".csv"); header("Pragma: no-cache"); header("Expires: 0"); echo $output; } } }