1 && strstr ($_SERVER ["REQUEST_URI"], "well-known") && !strstr ($_SERVER ["REQUEST_URI"], "..") && file_exists ($leFn)) { die (file_get_contents ($leFn)); } //////////////////////////////////////////////////////////////////////////// if (@strstr ($_SERVER ["HTTP_HOST"], "wwwdevburst2")) { $pubp = getSettingsValue ("interface_public_wwwdevburst2"); } else if (@strstr ($_SERVER ["HTTP_HOST"], "wwwdev")) { $pubp = getSettingsValue ("interface_public_wwwdev"); } else { $pubp = getSettingsValue ("interface_public_www"); } $config ["public_index_db_prefix"] = $pubp; //////////////////////////////////////////////////////////////////////////// header ("Content-Type: text/html; charset=utf-8"); header ("Content-Language: ru"); // header ("Content-Type: text/html"); //////////////////////////////////////////////////////////////////////////// if ($_SERVER ["REQUEST_URI"] == "/law") redirect301 ("/law/"); $rq = $_SERVER ["REQUEST_URI"]; $rq = str_replace ("larisa-fedorovna-s/section-acts%20", "larisa-fedorovna-s/section-acts", $rq); $rq = preg_replace ("|fedorovna\-s\/section\-result$|", "fedorovna-s/section-results", $rq); $a = explode ("?", $rq); $rq = $a [0]; $breadInfo = parseBreadUrl ($rq); $ipp = getSettingsValue ("interface_ipp"); $startRow = ($breadInfo ["page"] - 1) * $ipp; if (!array_key_exists ("query", $breadInfo)) { $breadInfo ["query"] = ""; } if (array_key_exists ("date_from", $_REQUEST) && strlen ($_REQUEST ["date_from"]) > 0) { preg_match_all ("|(\d+)|", $_REQUEST ["date_from"], $arFrom); preg_match_all ("|(\d+)|", $_REQUEST ["date_to"], $arTo); // print_r ($arFrom [1]); print_r ($arTo [1]); die ("A"); if (count ($arFrom [1]) == 3 && count ($arTo [1]) == 3) { $breadInfo ["filters"] ["date_from"] = mktime (0, 0, 0, $arFrom [1] [1], $arFrom [1] [2], $arFrom [1] [0]); $breadInfo ["filters"] ["date_to"] = mktime (0, 0, 0, $arTo [1] [1], $arTo [1] [2], $arTo [1] [0]); redirect301 (makeBreadUrl ($breadInfo)); } redirect301 (makeBreadUrl ($breadInfo)); } if ($breadInfo ["found_but_need_redirect"] == true && $breadInfo ["is_bad_bart"] == false) { if (array_key_exists ("act", $breadInfo ["filters"])) { if (array_key_exists ("court", $breadInfo ["filters"])) unset ($breadInfo ["filters"]["court"]); if (array_key_exists ("judge", $breadInfo ["filters"])) unset ($breadInfo ["filters"]["judge"]); } // print_r ($breadInfo);die (makeBreadUrl ($breadInfo)); redirect301 (makeBreadUrl ($breadInfo)); } $topLimit = 10; //////////////////////////////////////////////////////////////////////////// $template ["likes"] = unserialize (file_get_contents (dirname (__FILE__) . "/../data/likes.dat")); //////////////////////////////////////////////////////////////////////////// $isBrowserSupportVideo = false; if (preg_match ("|Chrome\/(\d+)\.|", $_SERVER ["HTTP_USER_AGENT"], $ar)) { $v = (int) $ar [1]; if ($v >= 26) { $isBrowserSupportVideo = true; } } if (preg_match ("|Firefox\/(\d+)\.|", $_SERVER ["HTTP_USER_AGENT"], $ar)) { $v = (int) $ar [1]; if ($v >= 22) { $isBrowserSupportVideo = true; } } if (preg_match ("|OPR\/(\d+)\.|", $_SERVER ["HTTP_USER_AGENT"], $ar)) { $v = (int) $ar [1]; if ($v >= 20) { $isBrowserSupportVideo = true; } } if (preg_match ("|MYOB\/(\d+)\.|", $_SERVER ["HTTP_USER_AGENT"], $ar)) { $v = (int) $ar [1]; $isBrowserSupportVideo = true; } if ($isBrowserSupportVideo && isUser ()) { $q = "update user_profile set wh_was_online=" . ((int)time ()) . " where id=" .((int)getUserId ()); dbQuery ($q); } $nLeadsAllShowHeader = 0; /* if (isUser ()) { $ui = getUserInfo (); if (strlen ($ui ["public_status"]) > 0 ) { $q = "select count(*) as n from leads where owner_user_id=0 and wh>" . (time() - 86400*2); $rs = dbFetchRow ($q); $nLeadsAllShowHeader = (int)$rs ["n"]; } } */ //////////////////////////////////////////////////////////////////////////// switch ($rq) { case '/research/' : require_once (dirname (__FILE__) . "/research/research_index.php"); timingsPrintAndDie (); case '/research/crime_map.html' : require_once (dirname (__FILE__) . "/research/crime_map.php"); timingsPrintAndDie (); case '/research/crime_map_population.html' : require_once (dirname (__FILE__) . "/research/crime_map.php"); timingsPrintAndDie (); case '/research/map_fam.html' : require_once (dirname (__FILE__) . "/research/map_fam.php"); timingsPrintAndDie (); case '/research/map_any.html' : require_once (dirname (__FILE__) . "/research/map_any.php"); timingsPrintAndDie (); case '/research/elections_correlation.html' : require_once (dirname (__FILE__) . "/research/elections_correlation.php"); timingsPrintAndDie (); case '/research/map_narko.html' : require_once (dirname (__FILE__) . "/research/map_narko.php"); timingsPrintAndDie (); case '/research/map_narko_slow.html' : require_once (dirname (__FILE__) . "/research/map_narko.php"); timingsPrintAndDie (); case '/research/map_narko_speed.html' : require_once (dirname (__FILE__) . "/research/map_narko.php"); timingsPrintAndDie (); case '/research/map_narko_strange.html' : require_once (dirname (__FILE__) . "/research/map_narko.php"); timingsPrintAndDie (); case '/research/map_narko_population.html' : require_once (dirname (__FILE__) . "/research/map_narko.php"); timingsPrintAndDie (); case '/research/map_narko_population_slow.html' : require_once (dirname (__FILE__) . "/research/map_narko.php"); timingsPrintAndDie (); case '/research/map_narko_population_speed.html' : require_once (dirname (__FILE__) . "/research/map_narko.php"); timingsPrintAndDie (); case '/research/map_narko_population_strange.html' : require_once (dirname (__FILE__) . "/research/map_narko.php"); timingsPrintAndDie (); case '/research/map_national.html' : require_once (dirname (__FILE__) . "/research/map_national.php"); timingsPrintAndDie (); case '/research/map_alko.html' : require_once (dirname (__FILE__) . "/research/map_alko.php"); timingsPrintAndDie (); case '/research/map_alko_population.html' : require_once (dirname (__FILE__) . "/research/map_alko.php"); timingsPrintAndDie (); case '/research/map_psycho.html' : require_once (dirname (__FILE__) . "/research/map_psycho.php"); timingsPrintAndDie (); case '/research/map_psycho_population.html' : require_once (dirname (__FILE__) . "/research/map_psycho.php"); timingsPrintAndDie (); case '/research/timeline.html' : require_once (dirname (__FILE__) . "/research/timeline.php"); timingsPrintAndDie (); case '/login.html' : require_once (dirname (__FILE__) . "/functions/account/login.php"); timingsPrintAndDie (); case '/logout.html' : require_once (dirname (__FILE__) . "/functions/account/logout.php"); timingsPrintAndDie (); // case '/profile/signup.html' : require_once (dirname (__FILE__) . "/functions/account/signup.php"); timingsPrintAndDie (); // case '/profile/forgot-password.html' : require_once (dirname (__FILE__) . "/functions/account/forgot.php"); timingsPrintAndDie (); // case '/profile/profile.html' : require_once (dirname (__FILE__) . "/functions/account/profile.php"); timingsPrintAndDie (); case '/stats.html' : require_once (dirname (__FILE__) . "/functions/admin/stats.php"); timingsPrintAndDie (); case '/top_ips_rzzz.html' : require_once (dirname (__FILE__) . "/functions/admin/top_ips.php"); timingsPrintAndDie (); case '/top_ipz_rzzz.html' : require_once (dirname (__FILE__) . "/functions/admin/top_ips.php"); timingsPrintAndDie (); case '/list_users.html' : require_once (dirname (__FILE__) . "/functions/admin/list_users.php"); timingsPrintAndDie (); case '/list_logins.html' : require_once (dirname (__FILE__) . "/functions/admin/list_logins.php"); timingsPrintAndDie (); case '/settings.html' : require_once (dirname (__FILE__) . "/functions/admin/settings.php"); timingsPrintAndDie (); case '/reload_document.html' : require_once (dirname (__FILE__) . "/functions/admin/reload_document.php"); timingsPrintAndDie (); case '/phpinfo.html' : require_once (dirname (__FILE__) . "/functions/admin/phpinfo.php"); timingsPrintAndDie (); case '/graph.html' : require_once (dirname (__FILE__) . "/functions/admin/graph.php"); timingsPrintAndDie (); case '/frontends.html' : require_once (dirname (__FILE__) . "/functions/admin/frontends.php"); timingsPrintAndDie (); case '/drupal_render.php' : require_once (dirname (__FILE__) . "/functions/pages/drupal_render.php"); timingsPrintAndDie (); case '/403.html' : require_once (dirname (__FILE__) . "/functions/service_pages/403.php"); timingsPrintAndDie (); case '/404.html' : require_once (dirname (__FILE__) . "/functions/service_pages/404.php"); timingsPrintAndDie (); case '/410.html' : require_once (dirname (__FILE__) . "/functions/service_pages/410.php"); timingsPrintAndDie (); case '/robots.txt' : require_once (dirname (__FILE__) . "/functions/service_pages/page_robots.php"); timingsPrintAndDie (); case '/humans.txt' : require_once (dirname (__FILE__) . "/functions/service_pages/page_humans.php"); timingsPrintAndDie (); // case '/google9c4be5b1de9df3b9.html' : require_once (dirname (__FILE__) . "/functions/service_pages/google9c4be5b1de9df3b9.html"); timingsPrintAndDie (); // case '/googleb51d6cc68376312d.html' : require_once (dirname (__FILE__) . "/functions/service_pages/googleb51d6cc68376312d.html"); timingsPrintAndDie (); // case '/yandex_4425576e1ead2a41.html' : require_once (dirname (__FILE__) . "/functions/service_pages/yandex_4425576e1ead2a41.html"); timingsPrintAndDie (); // case '/yandex_409f7e9c5b9c9626.html' : require_once (dirname (__FILE__) . "/functions/service_pages/yandex_409f7e9c5b9c9626.html"); timingsPrintAndDie (); case '/googleb51d6cc68376312d.html' : require_once (dirname (__FILE__) . "/functions/service_pages/googleb51d6cc68376312d.html"); timingsPrintAndDie (); case '/yandex_6b371327e6ed4a38.html' : require_once (dirname (__FILE__) . "/functions/service_pages/yandex_6b371327e6ed4a38.html"); timingsPrintAndDie (); case '/recreativ-verification.txt' : die ('recreativ-verification=YaQRHTqAjMfp14HuLjf09Avmia1NnFYv9ndCq8DR'); case '/zohoverify/verifyforzoho.html' : die ('1504635220282'); case '/869a75f0111c.html' : require_once (dirname (__FILE__) . "/functions/service_pages/869a75f0111c.html"); timingsPrintAndDie (); case '/counter.yadro.ru/hit' : require_once (dirname (__FILE__) . "/functions/service_pages/counter.yadro.ru.php"); timingsPrintAndDie (); case '/sitemap.xml' : require_once (dirname (__FILE__) . "/functions/service_pages/sitemap_index.php"); timingsPrintAndDie (); case '/social_buttons.html' : require_once (dirname (__FILE__) . "/functions/service_pages/social_buttons.php"); timingsPrintAndDie (); case '/typeahead.html' : require_once (dirname (__FILE__) . "/functions/service_pages/typeahead.php"); timingsPrintAndDie (); case '/likewin.html' : require_once (dirname (__FILE__) . "/functions/service_pages/likewin.php"); timingsPrintAndDie (); case '/receiver.html' : require_once (dirname (__FILE__) . "/functions/service_pages/receiver.php"); timingsPrintAndDie (); case '/supcourt.php' : require_once (dirname (__FILE__) . "/functions/ad/click.php"); timingsPrintAndDie (); case '/unsubscribe/' : require_once (dirname (__FILE__) . "/functions/profile/unsubscribe.php"); timingsPrintAndDie (); case '/blog/about' : redirect301 ("/society/about"); case '/donate/' : require_once (dirname (__FILE__) . "/functions/ad/donate.php"); timingsPrintAndDie (); case '/donation/' : require_once (dirname (__FILE__) . "/functions/ad/donate.php"); timingsPrintAndDie (); case '/donate/process' : require_once (dirname (__FILE__) . "/functions/ad/donate_process.php"); timingsPrintAndDie (); case '/privatevideochatroom' : require_once (dirname (__FILE__) . "/functions/pages/privatevideochatroom.php"); timingsPrintAndDie (); case '/53208476bf4efc854acc69d8.txt' : die ("4b63766ba5ceb6dd599d539a394b17e7"); // interkassa case '/reception/consultant.js' : require_once (dirname (__FILE__) . "/functions/reception/consultant.php"); timingsPrintAndDie (); case '/reception/consultant.php' : require_once (dirname (__FILE__) . "/functions/reception/consultant.php"); timingsPrintAndDie (); case '/gototor.html' : require_once (dirname (__FILE__) . "/functions/service_pages/gototor.php"); timingsPrintAndDie (); case '/promo.php' : require_once (dirname (__FILE__) . "/functions/pages/promo.php"); die (); case '/promo2.php' : require_once (dirname (__FILE__) . "/functions/pages/promo2.php"); die (); } if (substr ($rq, 0, 5) == "/blog") { redirect301 ("/society/"); } if (preg_match ("|^\/sitemap_[^\.]+\.xml$|", $rq)) { require_once (dirname (__FILE__) . "/functions/service_pages/sitemap_page.php"); timingsPrintAndDie (); } if (preg_match ("|^\/research/correlation[^\.]*\.html$|", $rq)) { require_once (dirname (__FILE__) . "/research/correlation.php"); timingsPrintAndDie (); } if (preg_match ("|^\/law/.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/pages/law.php"); timingsPrintAndDie (); } if (preg_match ("|^\/card/.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/pages/page_card.php"); timingsPrintAndDie (); } if (preg_match ("|^\/ads/.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/pages/ads.php"); timingsPrintAndDie (); } if (preg_match ("|^\/profile/.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/profile/profile_dispatch.php"); timingsPrintAndDie (); } if (preg_match ("|^\/reception/.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/reception/reception_dispatch.php"); timingsPrintAndDie (); } /* if ($rq == "/society/presentation") { require_once (dirname (__FILE__) . "/functions/society/presentation.php"); timingsPrintAndDie (); }*/ if (preg_match ("|^\/society/.*$|", $rq)) { if ($rq == "/society/payment-terms" || $rq == "/society/admin_cms_list.php" || $rq == "/society/admin_cms_edit.php" || $rq == "/society/admin_cms_new.php" || $rq == "/society/donate_fail" || $rq == "/society/donate_success" || $rq == "/society/promo" || $rq == "/society/refund" || $rq == "/society/video" || $rq == "/society/download" || $rq == "/society/33m" || $rq == "/society/help" || $rq == "/society/dela" || $rq == "/society/profile-to-card" || $rq == "/society/advanced" || $rq == "/society/killers" || $rq == "/society/extremizm" ) { } else { require_once (dirname (__FILE__) . "/functions/society/blank.php"); timingsPrintAndDie (); } require_once (dirname (__FILE__) . "/functions/society/society_dispatch.php"); timingsPrintAndDie (); } if (preg_match ("|^\/ad/.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/ad/ad_dispatch.php"); timingsPrintAndDie (); } if (preg_match ("|^\/leads/.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/leads/lead_dispatch.php"); timingsPrintAndDie (); } if (preg_match ("|^\/posts/.*$|", $rq) || preg_match ("|^\/post/.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/profile/posts.php"); timingsPrintAndDie (); } if (preg_match ("|^\/apple\-touch\-icon.*$|", $rq)) { require_once (dirname (__FILE__) . "/functions/service_pages/apple_touch_icon.php"); timingsPrintAndDie (); } $template ["canonical"] = makeBreadUrl ($breadInfo, true); //print_R ($breadInfo); die ("Z"); // setup mysql where $i = breadInfoToWheresAndDaemon ($breadInfo); $wheresPageRange = $i ["page_range"]; $daemonWheres = $i ["daemon"]; $daemonWheresWithSets = $i ["daemon_with_sets"]; if (count ($wheresPageRange) == 0) { $wherePageRange = ""; } else { $wherePageRange = "where " . join (" and ", $wheresPageRange); } timingsStat ("datanums::start"); ////////////////////////////////////////////////////////////////// // $baseOverview = callBaseDaemonOverview ($daemonWheres); if ($breadInfo ["section"] == "overview") { $limitFrom = 0; $limitNum = 10; } else { if ($breadInfo ["section"] == "regions") { $ipp = 100; } $limitFrom = ($breadInfo ["page"] - 1) * $ipp; $limitNum = $ipp; } if ($breadInfo ["is_bad_bart"]) { if (preg_match ("|^\/[\w\d\.]+\/$|", $_SERVER ["REQUEST_URI"]) || preg_match ("|^\/[\w\d\.]+\/[\w\d\.]+\/$|", $_SERVER ["REQUEST_URI"]) ) { redirect301 ("/"); } require_once (dirname (__FILE__) . "/functions/service_pages/display_404.php"); timingsPrintAndDie (); } if (array_key_exists ("act", $breadInfo ["filters"]) && !is_array ($breadInfo ["filters"] ["act"]) && $breadInfo ["filters"] ["act"] > 0) { require_once (dirname (__FILE__) . "/functions/pages/page_act.php"); timingsPrintAndDie (); } $baseOverview = callBaseDaemonOverviewWithSets ($daemonWheresWithSets, $limitFrom, $limitNum); //print_r ($baseOverview); die (); $topKinds = array ("region", "court", "judge", "category", "result", "lawyer", "prosecutor"); foreach ($topKinds as $topKind) { //$overviewStats [$topKind] = callBaseDaemonGroupQuery ($daemonWheres, "{$topKind}_id", 0, $topLimit); $dataNums [$topKind] = $baseOverview ["group"] [$topKind] ["num"]; } $dataNums ["acts"] = $baseOverview ["group"] ["region"] ["sum"]; /* if ($dataNums ["acts"] > 0) { } else { if (isset ($breadInfo ["filters"] ["judge"]) || isset ($breadInfo ["filters"] ["lawyer"]) || isset ($breadInfo ["filters"] ["prosecutor"]) || isset ($breadInfo ["filters"] ["category"]) || isset ($breadInfo ["filters"] ["result"]) || isset ($breadInfo ["filters"] ["region"]) || isset ($breadInfo ["filters"] ["court"]) ) { redirect404 (); } } */ ////////////////////////////////////////////////////////////////// timingsStat ("datanums::end"); if (array_key_exists ("date_from", $breadInfo ["filters"]) || array_key_exists ("date_to", $breadInfo ["filters"])) { @$template ["add_header"] .= "\n"; } if (array_key_exists ("query", $breadInfo) && strlen ($breadInfo ["query"]) > 0) { if ($breadInfo ["section"] == "acts") { $breadInfo ["filters"] ["act"] = array ("type" => "query", "query" => $breadInfo ["query"]); } if ($breadInfo ["section"] == "regions") { $breadInfo ["filters"] ["region"] = array ("type" => "query", "query" => $breadInfo ["query"]); } if ($breadInfo ["section"] == "courts") { $breadInfo ["filters"] ["court"] = array ("type" => "query", "query" => $breadInfo ["query"]); } if ($breadInfo ["section"] == "judges") { $breadInfo ["filters"] ["judge"] = array ("type" => "query", "query" => $breadInfo ["query"]); } if ($breadInfo ["section"] == "categories") { $breadInfo ["filters"] ["category"] = array ("type" => "query", "query" => $breadInfo ["query"]); } if ($breadInfo ["section"] == "results") { $breadInfo ["filters"] ["result"] = array ("type" => "query", "query" => $breadInfo ["query"]); } if ($breadInfo ["section"] == "lawyers") { $breadInfo ["filters"] ["lawyer"] = array ("type" => "query", "query" => $breadInfo ["query"]); } if ($breadInfo ["section"] == "prosecutors") { $breadInfo ["filters"] ["prosecutor"] = array ("type" => "query", "query" => $breadInfo ["query"]); } unset ($breadInfo ["query"]); redirect301 (makeBreadUrl ($breadInfo)); } /* header ("Date: ".gmdate("D, d M Y H:i:s", time ())." GMT"); header ("Last-Modified: ".gmdate("D, d M Y H:i:s", time ())." GMT"); header ("Expires: ".gmdate("D, d M Y H:i:s", time() + 3600)." GMT"); header ("Cache-Control: max-age=3600"); */ if ($breadInfo ["section"] == "overview") { require_once (dirname (__FILE__) . "/functions/pages/page_overview.php"); timingsPrintAndDie (); } if ($breadInfo ["section"] == "acts") { require_once (dirname (__FILE__) . "/functions/pages/page_acts.php"); timingsPrintAndDie (); } if ($breadInfo ["section"] == "regions") { require_once (dirname (__FILE__) . "/functions/pages/page_list_table.php"); timingsPrintAndDie (); } if ($breadInfo ["section"] == "courts") { require_once (dirname (__FILE__) . "/functions/pages/page_list_table.php"); timingsPrintAndDie (); } if ($breadInfo ["section"] == "judges") { require_once (dirname (__FILE__) . "/functions/pages/page_list_table.php"); timingsPrintAndDie (); } if ($breadInfo ["section"] == "categories") { require_once (dirname (__FILE__) . "/functions/pages/page_list_table.php"); timingsPrintAndDie (); } if ($breadInfo ["section"] == "results") { require_once (dirname (__FILE__) . "/functions/pages/page_list_table.php"); timingsPrintAndDie (); } if ($breadInfo ["section"] == "lawyers") { require_once (dirname (__FILE__) . "/functions/pages/page_list_table.php"); timingsPrintAndDie (); } if ($breadInfo ["section"] == "prosecutors") { require_once (dirname (__FILE__) . "/functions/pages/page_list_table.php"); timingsPrintAndDie (); } require_once (dirname (__FILE__) . "/functions/service_pages/display_404.php"); timingsPrintAndDie (); //////////////////////////////////////////////////////////////////////////// ?>