include('config.php'); include('function.php'); //=======================// header("X-Frame-Options: SAMEORIGIN"); header("X-Frame-Options: ALLOW-FROM http://nsfwalbum.com/"); //=======================// if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'http') { header("Location: https://".$root_domain.$_SERVER['REQUEST_URI']); } //=======================// include('/home/www/nsfwalbum.com/compare/Crawler-Detect-master/vendor/autoload.php'); use Jaybizzle\CrawlerDetect\CrawlerDetect; $CrawlerDetect = new CrawlerDetect; //=======================// if ($_COOKIE["content"] == 'videos') { $content = 'videos'; } elseif ($_COOKIE["content"] == 'images') { $content = 'images'; } else { $content = 'all'; } //=======================// if ($_COOKIE["sourced"] == 1) { $sourced = 1; } else { $sourced = 0; } //=======================// /* if (empty($_GET['sort'])) { $_GET['sort'] = 'main'; } */ if (empty($_GET['sort']) AND empty($_GET['category']) AND empty($_GET['r']) AND empty($_GET['search'])) { $_GET['sort'] = 'best'; $_GET['period'] = 'day'; //$_GET['period'] = 'week'; } //=======================// $title = 'WOW PORN GIFS'; if ($_GET['sort'] == 'hottest' || empty($_GET['sort'])) { $title = 'HOTTEST WOW PORN GIFS'; } elseif ($_GET['sort'] == 'newest') { $title = 'NEWEST WOW PORN GIFS'; } elseif ($_GET['sort'] == 'popular') { $title = 'POPULAR WOW PORN GIFS'; } elseif ($_GET['sort'] == 'random') { $title = 'RANDOM WOW PORN GIFS'; } if ($_GET['sort'] == 'best') { $title = 'BEST WOW PORN GIFS'; if ($_GET['period'] == 'day') { $title.= ' OF THE DAY'; } elseif ($_GET['period'] == 'week') { $title.= ' OF THE WEEK'; } elseif ($_GET['period'] == 'month') { $title.= ' OF THE MONTH'; } elseif ($_GET['period'] == 'allTime') { $title.= ' OF THE ALL TIME'; } } // SECURITY FIX: sanitize sort and period for safe JavaScript output if (isset($_GET['sort'])) { $_GET['sort'] = preg_replace('/[^a-zA-Z]/', '', $_GET['sort']); } if (isset($_GET['period'])) { $_GET['period'] = preg_replace('/[^a-zA-Z]/', '', $_GET['period']); } if (isset($_GET['category'])) { $_GET['category'] = htmlspecialchars($_GET['category']); $title = $_GET['category'].' - '.$title; } $description = 'Watch HOTTEST WOW porn pictures and gifs at '.$root_domain; $meta_keywords = 'gifs, porn, nsfw, pictures, pics, hentai, anime'; //=======================// if (isset($_GET['r'])) { // SECURITY FIX: sanitize for XSS $_GET['r'] = htmlspecialchars($_GET['r'], ENT_QUOTES, 'UTF-8'); $mysqli = new mysqli("localhost", "xen", "sssss", "kittycage"); // SECURITY FIX: use prepared statement to prevent SQL injection $stmt = $mysqli->prepare("SELECT subreddit_descr FROM reddit_subreddits WHERE subreddit_name = ?"); $stmt->bind_param("s", $_GET['r']); $stmt->execute(); $result = $stmt->get_result(); while ($row = $result->fetch_assoc()) { $subreddit_descr = $row['subreddit_descr']; } $stmt->close(); $mysqli->close(); $description = $subreddit_descr; //$description = strlen($description) > 150 ? substr($description,0,150)."..." : $description; if (!empty($title)) { $title = $_GET['r'].' - '.$title; } else { $title = $_GET['r']; } } //=======================// if(isset($_GET['search'])){ include('s.php'); } elseif(isset($_GET['post'])){ include('post.php'); } //=======================// ?>