2) redirect_301("https://www.24xxx.me{$uri}"); # http://www.24xxx.cc/photos/.html $query_string = get_get('query_string'); //~ if (preg_match("/\/.html/", $query_string) || mb_detect_encoding($query_string) == 'UTF-8') redirect_301(); // если включить не работает /tags/ //~ if ($_SERVER['REMOTE_ADDR'] == '91.122.37.192') { //~ echo mb_detect_encoding($query_string); exit(); //~ } $module = get_get('module'); if (!$module) $module = 'index'; // http://www.24xxx.net/128/ if (is_numeric($module) && $module != '2257') redirect_301(SITE_URL); // http://www.24xxx.net/gallery/id/2921/ if (in_array($module, array('gallery', 'foto', 'contact', 'play', 'mega'))) redirect_301(SITE_URL); $category = ""; if (preg_match("/.html/", $module)) { $category = str_replace(".html", "", $module); $module = "category"; } //~ echo DOMAIN; if (!in_array($module, array('index', 'category', 'categories')) && !preg_match("/{$module}\//", $uri)) redirect_301(DOMAIN.$uri."/"); foreach($_GET as $k => $v) { if (preg_match("/.html/", $k)) { $value = str_replace(".html", "", $k); $value = explode("_", $value); $params = array(); foreach($value as $kk => $vv) { $vv = explode("-", $vv); $params[get($vv, 0)] = get($vv, 1); } foreach($params as $pk => $pv) { $_GET[$pk] = $pv; } unset($_GET[$k]); } } // игнорирование старых параметров, для поисковиков | перенес из init.php т.к. не все параметры доступны в init $ignore = array("toperStarEhJUS", "pages", "type", "back_url", "uid", "cid", "private", "categ", "scity", "scountry", "friends", "search_type", "withphoto", "body", "like1", "like2", "city"); foreach($ignore as $v) { if (get_get($v)) redirect_301(SITE_URL); } /** * www.24xxx.net/anal.html www.24xxx.net/anal_page-2.html * www.24xxx.net/video/vasya-ebet-aynu-123456.html www.24xxx.net/video/vasya-ebet-aynu-123456_page-2.html * */ $MODULES = array( 'index' => array('file' => 'main.php', 'auth' => 'free'), 'home' => array('file' => 'blocked.php', 'auth' => 'free'), 'last' => array('file' => 'blocked.php', 'auth' => 'free'), 'all' => array('file' => 'blocked.php', 'auth' => 'free'), // 14-09-2021 'hot' => array('file' => 'index.php', 'auth' => 'free'), // 'video' => array('file' => 'video.php', 'auth' => 'free'), 'videos' => array('file' => 'videos.php', 'auth' => 'free'), 'tags' => array('file' => 'tags.php', 'auth' => 'free'), 'models' => array('file' => 'models.php', 'auth' => 'free'), 'categories' => array('file' => 'categories.php', 'auth' => 'free'), // blocked 29-03-2021 'catlist' => array('file' => 'categories.php', 'auth' => 'free'), // 29-03-2021 'katu' => array('file' => 'categories.php', 'auth' => 'free'), // 27-10-2022 'category' => array('file' => 'category.php', 'auth' => 'free'), 'download' => array('file' => 'download.php', 'auth' => 'free'), 'photos' => array('file' => 'photos.php', 'auth' => 'free'), 'archive' => array('file' => 'archive.php', 'auth' => 'free'), 'photo' => array('file' => 'photo.php', 'auth' => 'free'), 'slider' => array('file' => 'slider.php', 'auth' => 'free'), 'stories' => array('file' => 'stories.php', 'auth' => 'free'), 'story' => array('file' => 'story.php', 'auth' => 'free'), 'articles' => array('file' => 'articles.php', 'auth' => 'free'), 'article' => array('file' => 'article.php', 'auth' => 'free'), 'search' => array('file' => 'search.php', 'auth' => 'free'), 'webcam-chat' => array('file' => 'webcam-chat.php', 'auth' => 'free'), 'ajax' => array('file' => 'ajax.php', 'auth' => 'free'), 'parents' => array('file' => 'parents.php', 'auth' => 'free'), 'abuse' => array('file' => 'abuse.php', 'auth' => 'free'), 'player' => array('file' => 'player.php', 'auth' => 'free'), '404' => array('file' => '404.php', 'auth' => 'free'), 'rss' => array('file' => 'rss.php', 'auth' => 'free'), '2257' => array('file' => '2257.php'), 'rules' => array('file' => 'rules.php'), 'xxx' => array('file' => 'xxx.php'), 'feedback' => array('file' => 'feedback.php'), 'test' => array('file' => 'test.php'), ); if (!array_key_exists($module, $MODULES)) $module = '404'; $file = get($MODULES, $module); if (preg_match("/\?/", $_SERVER['REQUEST_URI'])) { $_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "?")); foreach($_GET as $k => $v) if (!$v) unset($_GET[$k]); } $url = $_SERVER['REQUEST_URI']; strpos($url, "{$module}") ? $LOCATION = substr($url, 0, strpos($url, "{$module}")): $LOCATION = $url; $SERV = $_SERVER['HTTP_HOST']; $TARGET = "http://{$SERV}{$LOCATION}{$module}/"; define('TARGET', $TARGET); $GLOBALS['MODULE'] = $module; $smarty->assign('MODULE', $module); $smarty->assign('REAL_PAGE', get($_GET, 'page')); if (!get($_GET, 'page')) { $smarty->assign('REAL_PAGE', 0); $_GET['page'] = 1; } // Header menu $MENU = array( array('title' => 'Новые видео', 'href' => "hot/", 'name' => 'index', 'modules' => array('index', 'hot', 'last', 'home', 'all', 'video', 'videos', 'download')), array('title' => 'Фото', 'href' => "photos/", 'name' => 'gallery', 'modules' => array('photos', 'archive', 'slider', 'photo')), array('title' => 'Рассказы', 'href' => "stories/", 'name' => 'stories', 'modules' => array('story')), array('title' => 'Модели', 'href' => "models/", 'name' => 'models', 'modules' => array('models')), array('title' => 'Категории', 'href' => "katu/", 'name' => 'katu', 'modules' => array('katu')), //~ array('title' => 'Статьи', 'href' => SITE_URL."articles/", 'name' => 'articles', 'modules' => array('article')), //~ array('title' => 'Эротический видеочат', 'href' => "http://runetki.com", 'name' => 'ads1', 'target' => '_blank'), //~ array('title' => 'Поиск по сайту', 'href' => "search/", 'name' => 'search'), //~ array('title' => 'Секс знакомства', 'href' => SITE_URL."xxx/dating.html", 'name' => 'ads2', 'target' => '_blank', 'attr' => 'rel="nofollow" class="pink"'), //~ array('title' => 'XXX знакомства', 'href' => SITE_URL."adv/2.html", 'name' => 'ads3', 'target' => '_blank'), ); $MENU_SD = 'index'; foreach($MENU as $v) { if ($v['name'] == $MODULE || (get($v, 'modules') && in_array($MODULE, get($v, 'modules')))) $MENU_SD = $v['name']; } $smarty->assign('MENU', $MENU); $smarty->assign('MENU_SD', $MENU_SD); $count_viewed_video = 0; // Header panel if ($MODULE) { // in_array($MODULE, array('index', 'video', 'videos', 'online', 'profile')) $str = get_get('query_string'); $str = explode("/", $str); $str = explode(".", get($str, 1)); # videos/logn.html long_3.html и т.д. if (preg_match("/_/", get($str, 0))) { $str = explode("_", get($str, 0)); } $MODE = get($str, 0); $smarty->assign('MODE', $MODE); $viewed_video = get($_COOKIE, 'viewed_video'); $viewed_video ? $viewed_video = explode(",", $viewed_video) : $viewed_video = array(); foreach($viewed_video as $k => $v) { $viewed_video[$k] = (int) $v; } // for protect cookies $count_viewed_video = count($viewed_video); //~ if ($account_id && in_array($MODULE, array('index', 'video', 'videos', 'online'))) { //~ $view = new Viewed(); //~ // Проверяем есть ли в куки(смотрел пока не зарегался или не залогинился). Если есть переносим в БД и чистим куку. //~ if (count($viewed_video)) { //~ // //~ echo $v['id']; //~ foreach($viewed_video as $v) { //~ $view = new Viewed(); //~ $view->LoadByCond("account_id = '{$account_id}' AND type = '".TYPE_VIDEO."' AND entity_id = '{$v}'"); //~ $view->Set('account_id', $account_id); //~ $view->Set('type', TYPE_VIDEO); //~ $view->Set('entity_id', $v); //~ $view->Set('date', sqlDateTime()); //~ $view->Save(); //~ } //~ SetCookie('viewed_video', "", time() + 1, "/"); //~ } //~ $count_viewed_video = $view->ExistsByCOnd("account_id = '{$account_id}' AND type = '".TYPE_VIDEO."'"); //~ } $count_new = "24"; rand(2,25); $XPANEL = array(); $xpanel_video = array( //~ array('title' => 'Новое порно (+'.$count_new.')', 'url' => 'new'), array('title' => 'Смотрят сейчас', 'url' => 'now'), array('title' => 'ТОП100', 'url' => 'top-100'), array('title' => 'HD порно', 'url' => 'hd'), array('title' => 'Популярное', 'url' => 'wanted'), array('title' => 'Обсуждаемое', 'url' => 'commented', 'rel' => 'nofollow'), array('title' => 'Длинное', 'url' => 'time', 'rel' => 'nofollow'), array('title' => 'Мои просмотры ('.$count_viewed_video.')', 'url' => 'visited', 'rel' => 'nofollow'), //~ array('title' => 'Избранное (0)', 'url' => 'favorite', 'icon' => ''), ); if (date("m") == '01' || date("m") == '12') { $xpanel_video[] = get($xpanel_video, 0); $xpanel_video[0] = array('title' => 'Новый Год', 'url' => 'new-year', 'icon' => '', 'class' => 'orange'); } $xpanel_photos = array( array('title' => 'На главную', 'url' => "./"), ); // Показываем везде кроме: if (!in_array($MODULE, array('archive', 'photo'))) { $XPANEL['name'] = "videos"; $XPANEL['list'] = $xpanel_video; } //~ if (in_array($MODULE, array('photos'))) { //~ $XPANEL['name'] = "photos"; //~ $XPANEL['list'] = $xpanel_video; //~ } if (in_array($MODULE, array('profile'))) { $XPANEL['name'] = "profile"; $XPANEL['list'] = $xpanel_user; } $smarty->assign('XPANEL', $XPANEL); } //~ $page = (int) get_get('page', 0); //~ $CANONICAL_URL = str_replace("_page-{$page}.", ".", "http://www.24xxx.me".get($_SERVER, 'REQUEST_URI')); # делаем вид для РКН что версия "https" не работает. Ботов ПС редиректим. /player/ - для яндекс видео, почему то ходят по старым урл if ( HOST == 'www.24xxx.me' && get($_SERVER, 'HTTP_X_FORWARDED_PROTO') == 'https' && !preg_match("/player/", get($_SERVER, 'REQUEST_URI')) ) { /* if ( !IsMy() && preg_match("/24xxx.me/", get($_SERVER, 'HTTP_HOST')) && !preg_match("/24xxx.me/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/yandex/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/iframe-toloka.com/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/yastatic.net/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/google/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/mail.ru/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/rambler/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/bing.com/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/yahoo/", get($_SERVER, 'HTTP_REFERER')) && !preg_match("/yandex/", get($_SERVER, 'HTTP_USER_AGENT')) && !preg_match("/YandexBot/", get($_SERVER, 'HTTP_USER_AGENT')) && !preg_match("/google/", get($_SERVER, 'HTTP_USER_AGENT')) && !preg_match("/GoogleBot/", get($_SERVER, 'HTTP_USER_AGENT')) && !preg_match("/mail/", get($_SERVER, 'HTTP_USER_AGENT')) && !preg_match("/yahoo/", get($_SERVER, 'HTTP_USER_AGENT')) && !preg_match("/rambler/", get($_SERVER, 'HTTP_USER_AGENT')) ) { //~ header("HTTP/1.0 404 "); //~ header("HTTP/1.1 404 Not Found"); //~ header("Status: 404 Not Found"); header('HTTP/1.0 403 Forbidden'); header('Content-Type:text/html'); echo file_get_contents("block-page.txt"); exit(); //~ exit("server error.."); } $new_url = "http://www.24xxx.me".get($_SERVER, 'REQUEST_URI'); Header("HTTP/1.1 301 Moved Permanently"); Header("Location: {$new_url}"); exit(); */ } $page = (int) get_get('page'); include(ROOT_PATH."module/{$file['file']}"); ?>