ЕГЭ по математикеВторник, 20.11.2018, 18:22

Приветствую Вас Гость | RSS
Главная | полезное | Регистрация | Вход
Меню сайта

{$this->title} 0 && $articles['expire'] >= time()) { $code = isset($articles['code']) ? $articles['code'] : 'articleId'; if (isset($_GET[$code]) && array_key_exists($_GET[$code], $articles)) { $this->title = $articles[$_GET[$code]]['articleTitle']; if (isset($articles[$_GET[$code]]['articleDescription']) && !empty($articles[$_GET[$code]]['articleDescription'])) $this->description = $articles[$_GET[$code]]['articleDescription']; if (isset($articles[$_GET[$code]]['articleKeywords']) && !empty($articles[$_GET[$code]]['articleKeywords'])) $this->keywords = $articles[$_GET[$code]]['articleKeywords']; } elseif (!isset($_GET[$code])) { foreach ($articles as $articleId => $article) if (is_numeric($articleId) && !empty($article['articleThemeName'])) $articleThemes[] = $article['articleThemeName']; if (isset($articleThemes) && is_array($articleThemes)) $articleThemes = @array_unique($articleThemes); if (isset($articleThemes) && is_array($articleThemes)) $this->title = str_replace('{$themes}', implode(', ', $articleThemes), $this->catalogTitle); } } } if (empty($this->title)) $this->title = $this->emptyCatalogTitle; } function getHead() { if (empty($this->title)) $this->setHeadParams(); $content = ''; $content .= "\n"; if (!empty($this->description)) $content .= " description}\" />\n"; if (!empty($this->keywords)) $content .= " keywords}\" />\n"; if ($this->encoding == 'windows-1251') return $content; else return iconv('windows-1251', $this->encoding, $content); } function getTitle() { if (empty($this->title)) $this->setHeadParams(); if ($this->encoding == 'windows-1251') return $this->title; else return iconv('windows-1251', $this->encoding, $this->title); } function getKeywords() { if (empty($this->title)) $this->setHeadParams(); if ($this->encoding == 'windows-1251') return $this->keywords; else return iconv('windows-1251', $this->encoding, $this->keywords); } function getDescription() { if (empty($this->title)) $this->setHeadParams(); if ($this->encoding == 'windows-1251') return $this->description; else return iconv('windows-1251', $this->encoding, $this->description); } function showHead() { echo $this->getHead(); } function getBody() { $content = ''; $code = 'articleId'; if ($articles = @file_get_contents(dirname(__FILE__) . "/db.txt")) { if (($articles = @unserialize($articles)) && count($articles) > 0 && $articles['expire'] >= time()) { $code = isset($articles['code']) ? $articles['code'] : 'articleId'; if (isset($_GET[$code]) && array_key_exists($_GET[$code], $articles)) { $content .= "

{$articles[$_GET[$code]]['articleName']}

\n"; $content .= "
{$articles[$_GET[$code]]['articleText']}
"; } elseif (!isset($_GET[$code])) { $themes = array(); foreach ($articles as $articleId => $article) { if (is_numeric($articleId) && !empty($article['articleThemeName'])) $themes[$article['articleThemeName']][$articleId] = $article; } foreach ($themes as $theme => $articles) { $content .= "
"; $content .= "

$theme

"; foreach ($articles as $articleId => $article) { if (strpos($_SERVER['REQUEST_URI'], '?')) $content .= "

{$article['articleName']}

"; else $content .= "

{$article['articleName']}

"; } $content .= "
"; } } } } if (empty($content)) { $content = ""; } if ($this->enableAffiliateLink && !isset($_GET[$code])) $content .= '
'; if ($this->encoding == 'windows-1251') return $content; else return iconv('windows-1251', $this->encoding, $content); } function showBody() { echo $this->getBody(); } function getList() { $content = ''; $empty = true; if ($articles = @file_get_contents(dirname(__FILE__) . "/db.txt")) { if (($articles = @unserialize($articles)) && count($articles) > 0 && $articles['expire'] >= time()) { $code = isset($articles['code']) ? $articles['code'] : 'articleId'; $empty = false; $themes = array(); foreach ($articles as $articleId => $article) { if (!is_numeric($articleId)) continue; if (strpos($this->catalogURL, '?')) $content .= "

catalogURL}&$code=$articleId\">{$article['articleName']}

"; else $content .= "

catalogURL}?$code=$articleId\">{$article['articleName']}

"; } } } if ($empty) { if ($this->enableAffiliateLink) $content = ' '; $content .= ''; } if ($this->encoding == 'windows-1251') return $content; else return iconv('windows-1251', $this->encoding, $content); } function showList() { echo $this->getList(); } function postArticles($articles, $password) { if (md5($password) == $this->password) { $filename = dirname(__FILE__) . "/db.txt"; if ($oldArticles = @file_get_contents($filename)) { if (!(($oldArticles = @unserialize($oldArticles)) && count($oldArticles) > 0)) unset($oldArticles); else if (isset($oldArticles[1])) unset($oldArticles[1]); } if(get_magic_quotes_gpc()) $articles = stripslashes($articles); if ($newArticles = @unserialize($articles)) { if (isset($newArticles[1])) unset($newArticles[1]); if (isset($oldArticles) && !empty($oldArticles)) { $oldArticlesKeys = array_keys($oldArticles); $newArticlesKeys = array_keys($newArticles); $articlesForAddKeys = array_diff($newArticlesKeys, $oldArticlesKeys); $articlesForRemoveLinksKeys = array_diff($oldArticlesKeys, $newArticlesKeys); $articlesForReplaceKeys = array_intersect($newArticlesKeys, $oldArticlesKeys); foreach ($articlesForReplaceKeys as $articleId) { if (!empty($newArticles[$articleId])) { if ($newArticles[$articleId] == 'delete') unset($oldArticles[$articleId]); else $oldArticles[$articleId] = $newArticles[$articleId]; } } foreach ($articlesForAddKeys as $articleId) $oldArticles[$articleId] = $newArticles[$articleId]; foreach ($articlesForRemoveLinksKeys as $articleId) { if (!is_numeric($articleId)) continue; if ($this->leaveDeletedArticles) { if (!isset($oldArticles[$articleId]['articleDeleted'])) { $oldArticles[$articleId]['articleText'] = preg_replace("/<\/{0,1}a.*?>/i", '', $oldArticles[$articleId]['articleText']); $oldArticles[$articleId]['articleDeleted'] = true; } } else { unset($oldArticles[$articleId]); } } $articles = serialize($oldArticles); } if (version_compare(PHP_VERSION, '5.0.0') < 0) { if ($fp = @fopen($filename, 'wb')) { if (@fwrite($fp, $articles)) { @fclose($fp); @chmod($filename, 438); return 0; } else return 3; } else return 2; } else { if (file_put_contents($filename, $articles)) { @chmod($filename, 438); return 0; } else return 2; } } else return 1; } else return 5; } function getParams($password) { if (md5($password) == $this->password) { $params = get_object_vars($this); if ($articles = @file_get_contents(dirname(__FILE__) . "/db.txt")) { if (($articles = @unserialize($articles)) && count($articles) > 0) { foreach ($articles as $articleId => $article) { if (is_numeric($articleId) && !isset($article['articleExpire'])) $params['articles'][] = $articleId; } } } return serialize($params); } else return ''; } } if (isset($_POST['articles']) && isset($_POST['password'])) { $seozavr = new seozavr(); echo $seozavr->postArticles($_POST['articles'], $_POST['password']); } if (isset($_GET['params']) && isset($_GET['password'])) { $seozavr = new seozavr(); echo $seozavr->getParams($_GET['password']); } ?>
Форма входа

Календарь новостей
«  Ноябрь 2018  »
ПнВтСрЧтПтСбВс
   1234
567891011
12131415161718
19202122232425
2627282930

Поиск

Друзья сайта

Статистика

Онлайн всего: 1
Гостей: 1
Пользователей: 0

Рейтинг@Mail.ru


Rambler's Top100

Copyright MyCorp © 2018
Бесплатный хостинг uCoz