$value) { $_POST[$key] = mysql_real_escape_string($value); } //This stops SQL Injection in GET vars foreach ($_GET as $key => $value) { $_GET[$key] = mysql_real_escape_string($value); } /* KONFIGURATION BEGINN */ $server = ""; $user = "xxx"; $passwort = "xxx"; $datenbank = "xxx"; $domaintitel = "edelstahl-reiskocher.com"; $domainemail = "info@edelstahl-reiskocher.com"; $domainurl = "http://www.edelstahl-reiskocher.com"; $domainanzeigeurl = "edelstahl-reiskocher.com"; $projekttitel = "Edelstahl Reiskocher"; $mainkey1 = "Reiskocher"; $mainkey2 = "Reiskocher Dampfgarer"; $mainkey3 = "Reiskocher Mikrowelle"; $mainkey4 = "Sushi Reiskocher"; $mainkey5 = "Reiskocher kaufen"; $onlineshopfuer = "Edelstahl Reiskocher"; $bestelltext = "Edelstahl Reiskocher anzeigen"; $dmozlink = "http://www.dmoz.org/World/Deutsch/Online-Shops/Haus_und_Garten/Haushaltsbedarf/Haushaltsger%C3%A4te/"; $produkttext = "Haben Sie Interesse an Reiskochern aus Edestahl?"; $headerbild1 = "edelstahl-reiskocher-1.jpg"; $headerbild2 = "edelstahl-reiskocher-2.jpg"; $headerbild3 = "edelstahl-reiskocher-3.jpg"; $headerbild4 = "edelstahl-reiskocher-4.jpg"; $headerbild1_link = "http://www.edelstahl-reiskocher.com/"; $headerbild2_link = "http://www.edelstahl-reiskocher.com/"; $headerbild3_link = "http://www.edelstahl-reiskocher.com/"; $headerbild4_link = "http://www.edelstahl-reiskocher.com/"; $amazon_channel = "edelstahlreiskocher-21"; $amazon_rubrik = "kitchen-de"; $amazon_suchwort = "reiskocher"; $adressefooter = "Redaktionsbüro Patrick Fiekers, Sporckweg 51, 48153 Münster, Telefon: 02 51 - 2 89 13 41, E-Mail: ".$domainemail; $contentshoplink = 'Besuche unseren Shop: Suchst Du Reiskocher für Reis oder Sushi Reis, aus Eselstahl? Jetzt reinschauen. Informationen rund um den Reiskocher.'; $shoplink = "http://www.amazon.de/gp/search?ie=UTF8&keywords=reiskocher&tag=edelstahlreiskocher-21&index=blended&linkCode=ur2&camp=1638&creative=6742"; $googlekonto = "xxx"; $googlekontopw = "xxx"; $bildquelle = 'Daniel Gilbey - Fotolia.com
Twilight_Art_Pictures - Fotolia.com'; $bildquelle_hotline = 'Yuri Arcurs - Fotolia.com'; $descriptionmain = "Ein Reiskocher ist ein elektrisches Gerät, welches die unterschiedlichsten Reissorten in ihrer Konsistenz und Geschmacksrichtungen herstellen kann."; $affilineturl = "#"; $affilineturlpfad = "/kunden/homepages/0/d72348228/htdocs/edelstahl-reiskocher.com/klangundkleid/dateien/affilinet_products_39_17621.csv"; $linkzahlungsmittel = "http://www.amazon.de/gp/search?ie=UTF8&keywords=".$amazon_suchwort."&tag=".$amazon_channel."&index=&linkCode=ur2&camp=1638&creative=6742"; $versandkostenfrei = 50; $mwst = 19; //module $modul_produkte = "0"; $modul_content = "1"; $modul_glossar = "0"; $pseudocron = "0"; //groups $cgroupkat = array("", "Reiskocher", "News"); $geo_city = "Münster"; $geo_country = "Germany"; $geo_cstate = "Nordrhein-Westfalen"; $geo_zipcode = "48153"; $geo_position = "51.92192;7.60713"; $geo_region = "DE-NRW"; /* KONFIGURATION ENDE */ MYSQL_CONNECT($server, $user, $passwort) or die ( "Kein Server"); MYSQL_SELECT_DB($datenbank) or die ( "Keine DB"); MYSQL_QUERY("SET NAMES utf8;"); //kategorien in array $limit = 15; function cut_string($string, $length, $etc, $break_words) { $string = strip_tags($string); if ($length == 0) { return ''; } if (strlen($string) > $length) { $length -= strlen($etc); if (!$break_words) { $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1)); } return substr($string, 0, $length).$etc; } else { return $string; } } function str_replace_last($search, $replace, $str) { $str_rev = strrev($str); $search_rev = strrev($search); $replace_rev = strrev($replace); $pos = strpos($str_rev, $search_rev); if($pos !== FALSE) { return strrev(substr_replace($str_rev, $replace_rev, $pos, strlen($search))); } else { return $str; } } function str_replace_first($search, $replace, $subject) { $retval = $subject; $pos = strpos($subject,$search); if ($pos !== false) { $retval = substr_replace($subject,$replace,$pos,strlen($search)); } return $retval; } function str_replace_second($search, $replace, $subject, $pos) { $retval = $subject; $pos = strpos($subject,$search,$pos); if ($pos !== false) { $retval = substr_replace($subject,$replace,$pos,strlen($search)); } return $retval; } function count_hits($artid) { global $server; global $user; global $passwort; global $datenbank; MYSQL_CONNECT($server, $user, $passwort) or die ( "Kein Server"); MYSQL_SELECT_DB($datenbank) or die ( "Keine DB"); MYSQL_QUERY("INSERT INTO hits (ID,hits) VALUES ('".mysql_real_escape_string($artid)."','1') ON DUPLICATE KEY UPDATE hits=hits+1"); mysql_close($link); } function count_commenthits($artid) { global $server; global $user; global $passwort; global $datenbank; MYSQL_CONNECT($server, $user, $passwort) or die ( "Kein Server"); MYSQL_SELECT_DB($datenbank) or die ( "Keine DB"); MYSQL_QUERY("UPDATE comments set hits = hits + 1 where pid = '".mysql_real_escape_string($artid)."' "); mysql_close($link); } function count_searchterm($artid,$counterhits) { global $server; global $user; global $passwort; global $datenbank; MYSQL_CONNECT($server, $user, $passwort) or die ( "Kein Server"); MYSQL_SELECT_DB($datenbank) or die ( "Keine DB"); MYSQL_QUERY("INSERT INTO searchterms set searchterm='".mysql_real_escape_string($artid)."', hits = '".$counterhits."' "); mysql_close($link); } function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE, $mainkey1, $mainkey2, $mainkey3, $mainkey4, $mainkey5, $no1key) { global $l_prevpage, $l_nextpage; $total_pages = ceil($num_items/$per_page); //url generieren $uurl = split("-",$base_url); if($total_pages == 1) { return ""; } $on_page = floor($start_item/$per_page) + 1; $page_string = ""; $this_block_start = ($on_page < 10) ? 1 : floor($on_page/10) * 10; $this_block_end = ($on_page < 10) ? 9 : $this_block_start + 9; if($this_block_end > $total_pages) { $this_block_end = $total_pages; } for($i = $this_block_start; $i <= $this_block_end; $i++) { if ($i == "1") { $page_string .= ($i == $on_page) ? "$i" : "\"".$no1key."\""; } else { $page_string .= ($i == $on_page) ? "$i" : "$i"; } if($i < $this_block_end) { $page_string .= ", "; } } if($this_block_start > 1) { $page_string_prepend = ""; for($i = 0; $i < $this_block_start; $i+=10) { if ($i == "1") { $page_string_prepend .= "\"".$no1key."\", "; } else { $page_string_prepend .= "" . ( ($i == 0) ? ($i+1) : $i) . " - " . ($i+9) . ", "; } } $page_string = $page_string_prepend . $page_string; } if($this_block_end < $total_pages) { $page_string_append = ", "; for($i = $this_block_end + 1; $i < $total_pages; $i+=10) { $page_string_append .= "" . ( ($i == 0) ? ($i+1) : $i) . " - " . ((($i+9) < $total_pages) ? ($i+9) : $total_pages) .""; if($i < $total_pages - 10) { $page_string_append .= ", "; } } $page_string .= $page_string_append; } if($add_prevnext_text) { if($on_page > 1) { $page_string = "Zurück | " . $page_string; } if($on_page < $total_pages) { $page_string .= " | Weiter"; } } return $page_string; } function generate_pagination_suche($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE, $mainkey1, $mainkey2, $mainkey3, $mainkey4, $mainkey5) { global $l_prevpage, $l_nextpage; $total_pages = ceil($num_items/$per_page); //url generieren $uurl = split("-",$base_url); if($total_pages == 1) { return ""; } $on_page = floor($start_item/$per_page) + 1; $page_string = ""; $this_block_start = ($on_page < 10) ? 1 : floor($on_page/10) * 10; $this_block_end = ($on_page < 10) ? 9 : $this_block_start + 9; if($this_block_end > $total_pages) { $this_block_end = $total_pages; } for($i = $this_block_start; $i <= $this_block_end; $i++) { if ($i == "1") { $page_string .= ($i == $on_page) ? "$i" : "\"".str_replace("/","",$uurl[1])."\""; } else { $page_string .= ($i == $on_page) ? "$i" : "$i"; } if($i < $this_block_end) { $page_string .= ", "; } } if($this_block_start > 1) { $page_string_prepend = ""; for($i = 0; $i < $this_block_start; $i+=10) { if ($i == "1") { $page_string_prepend .= "\"".str_replace("/","",$uurl[1])."\", "; } else { $page_string_prepend .= "" . ( ($i == 0) ? ($i+1) : $i) . " - " . ($i+9) . ", "; } } $page_string = $page_string_prepend . $page_string; } if($this_block_end < $total_pages) { $page_string_append = ", "; for($i = $this_block_end + 1; $i < $total_pages; $i+=10) { $page_string_append .= "" . ( ($i == 0) ? ($i+1) : $i) . " - " . ((($i+9) < $total_pages) ? ($i+9) : $total_pages) .""; if($i < $total_pages - 10) { $page_string_append .= ", "; } } $page_string .= $page_string_append; } if($add_prevnext_text) { if($on_page > 1) { $page_string = "Zurück | " . $page_string; } if($on_page < $total_pages) { $page_string .= " | Weiter"; } } return $page_string; } error_reporting(0); ini_set("error_reporting",0); ?> , , ,