"The blog…", 'homepageUrl' => 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"], 'homeMsg' => ' Home ', 'newerPageTitle' => 'Newer posts', 'olderPageTitle' => 'Older posts', 'pageTitle' => "Talalelei's blog", 'pageType' => 'list', 'title' => "Talalelei's blog", 'url' => 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"], ); $top = array( 'authorLabel' => 'Author:', 'showAuthor' => false, 'showTimestamp' => true, 'timestampLabel' => 'Published on:', ); function check() { return 'It works!'; }; function _exit($error=0, $message='') { exit('{"error": '.$error.', "message": "'.$message.'"}'); }; if (!function_exists('file_put_contents')) { function file_put_contents($filename, $data) { if (false === ($f = @fopen($filename, 'w'))) { return false; }; if (false === @fwrite($f, $data, strlen($data))) { return false; }; if (false === @fclose($f)) { return false; }; return true; } } if (!function_exists('file_get_contents')) { function file_get_contents($filename, $incpath=false, $resource_context=null) { if (false === ($f = fopen($filename, 'rb', $incpath))) { trigger_error('file_get_contents() failed to open stream: No such file or directory', E_USER_WARNING); return false; } clearstatcache(); if ($fsize = @filesize($filename)) { $data = fread($f, $fsize); } else { $data = ''; while (!feof($f)) { $data .= fread($f, 8192); } } fclose($f); return $data; } } function categories_get() { if (false !== ($categories = @file_get_contents(CATEGORIES_FILENAME))) { return unserialize($categories); } else { return array(); } }; function categories_put($categories) { return @file_put_contents(CATEGORIES_FILENAME, serialize($categories)); }; function categories_remove_entry($categories, $entry_id) { foreach($categories as $c=>$v) { if (in_array($entry_id, $v['entries'])) { if (count($v['entries']) == 0) { array_splice($categories[$c]['entries'], array_search($entry_id, $categories[$c]['entries']), 1); } else { unset($categories[$c]); } } } return $categories; }; function clear($string) { $string = strtolower($string); $string = preg_replace('/[^a-z0-9-]/', '-', $string); $string = preg_replace('/-+/', '-', $string); return $string; }; function entries_compare($a, $b) { if ($a['timestamp'] == $b['timestamp']) { return 0; } return ($a['timestamp'] > $b['timestamp']) ? -1 : 1; }; function entries_get() { $entries = array(); foreach (glob('*.txt') as $filename) { if (false === ($content = @file_get_contents($filename))) { continue; } list($title, $body) = explode("\n", $content, 2); $body = str_replace("\r\n", '
', str_replace("\n", '
', $body)); $id = substr($filename, 0, -4); $entries[$id] = array( 'id' => $id, 'url' => $_SERVER["SCRIPT_NAME"].'?id='.$id, 'title' => $title, 'body' => $body, 'author' => 'Jhon', 'labels' => array(), 'timestamp' => date('d.m.Y H:i', filemtime($filename)) ); } uasort($entries, 'entries_compare'); return $entries; }; function entries_get_by_category($category, $entries_ids) { $entries = array(); for ($i = 0; $i < count($entries_ids); $i++) { $filename = $entries_ids[$i].'.txt'; if (false === ($content = @file_get_contents($filename))) { continue; } list($title, $body) = explode("\n", $content, 2); $body = str_replace("\r\n", '
', str_replace("\n", '
', $body)); thmens.org/item/viagra_professional.html">Viagra Professional Cialis Professional Viagra Super Active+ Cialis Super Active+ Levitra Super Active+ Female Cialis Acomplia All pills HealthMens Cialis Viagra Levitra VPXL Tamiflu Soma Levitra Professional Female Viagra Viagra Professional Cialis Professional Viagra Super Active+ Cialis Super Active+ Levitra Super Active+ Female Cialis Acomplia All pills HealthMens Cialis Viagra Levitra VPXL Tamiflu Soma Levitra Professional Female Viagra Viagra Professional Cialis Professional Viagra Super Active+ Cialis Super Active+ Levitra Super Active+ Female Cialis Acomplia All pills HealthMens