'z') && ($c < '0' || $c > '9') && ($c < 'A' || $c > 'Z') && $c != '_' && $c != '-') { $page = ''; $pageNotFound = true; } } if (strlen($page) > 0 && $page{strlen($page) - 1} == '/') $page = substr($page, 0, strlen($page) - 1); if (strlen($page) > 0 && $page{0} == '/') $page = substr($page, 1); $remoteAddress = getenv('HTTP_X_FORWARDED_FOR'); if (!$remoteAddress) { $remoteAddress = getenv('HTTP_PC_REMOTE_ADDR'); $proxyAddress = getenv('REMOTE_ADDR'); $proxyName = gethostbyaddr($proxyAddress); if (!$remoteAddress) { $remoteAddress = getenv('REMOTE_ADDR'); $proxyAddress = '-'; $proxyName = '-'; } } else { $proxyAddress = getenv('REMOTE_ADDR'); $proxyName = gethostbyaddr($proxyAddress); } $hostName = gethostbyaddr($remoteAddress); /** VERSION **/ if (!strncmp($page, 'version/', 8)) { header("Content-Type: text/plain"); $version1 = trim(file_get_contents($versionFile)); $version2 = trim(substr($page, 8)); $start1 = $start2 = 0; $comparison = 0; while ($comparison == 0 && $start1 < strlen($version1) && $start2 < strlen($version2)) { if (!($end1 = strpos($version1, '.', $start1)) && !($end1 = strpos($version1, '-', $start1))) { $end1 = strlen($version1); } if (!($end2 = strpos($version2, '.', $start2)) && !($end2 = strpos($version2, '-', $start2))) { $end2 = strlen($version2); } $v1 = "0000000000" . substr($version1, $start1, $end1 - $start1); $v2 = "0000000000" . substr($version2, $start2, $end2 - $start2); $comparison = substr($v1, strlen($v1) - 10, 10) - substr($v2, strlen($v2) - 10, 10); $start1 = $end1 + 1; $start2 = $end2 + 1; } if ($comparison <= 0) { $vstatus = '+'; //echo ('OK'); echo ('REFRESH 720'); /* 12 h */ // echo ('REFRESH 60'); /* 1 h */ // echo ('REFRESH 1'); /* 1 min */ //echo ('DISPLAY: Jaiku API keys has been reset! To get Mauku refresh your API key, goto settings and change your password to something bogus. After Mauku has tried to login with it and failed, set the password back to your real password. (Friday, January 25, 2008)'); } else { $vstatus = '*'; echo ('UPDATE: http://repository.innologies.com/installs/mauku.install There is a newer version ' . $version1 . ' available to update. You are using version ' . substr($page, 8) . '.'); } if (($clientinfo = getenv("QUERY_STRING"))) { $clieninfo = trim($clientinfo); } else { $clientinfo = "-"; } if (($f = fopen($logFileBase . '.version.log', 'a'))) { fwrite($f, $vstatus . ' ' . $date . "\t $remoteAddress $hostName ($proxyAddress $proxyName)\t " . $version2 . "\t" . $clientinfo . "\n"); fclose($f); } return; } else if (!strcmp($page, 'backtrace_upload')) { $tempnam = tempnam($backtraceUploadDir, $backtraceName . '_' . date('Ymd_His') . '_'); if (($f = fopen($tempnam, "w"))) { fwrite($f, "$remoteAddress $hostName ($proxyAddress $proxyName)\n"); $body = file_get_contents('php://input'); if (strlen($body) > 262144) { $body = substr($body, 0, 262144); } fwrite($f, $body); fclose($f); } chmod($tempnam, 0444); echo ("The information is uploaded.\nThank you for your valuable help."); return; } /*************/ $pageFile = $page; if (is_dir($pageDir . $page)) { $pageFile = $page . '/.index'; $pageIsDir = true; } if (!is_readable($pageDir . $pageFile)) { $page = $pageFile = strtolower($page); if (is_dir($pageDir . $page)) { $pageFile = $page . '/.index'; $pageIsDir = true; } if (!is_readable($pageDir . $pageFile)) { $pageFile = '.index'; $pageNotFound = true; } } $pageModified = filemtime($pageDir . $pageFile); /***************/ $agent = getenv("HTTP_USER_AGENT"); $referer = getenv('HTTP_REFERER'); if (!$pageNotFound && !strncmp($referer, $baseUrl, strlen($baseUrl))) { $referer = NULL; } if ($pageNotFound) $status = "X"; else if ($referer) $status = "+"; else $status = "-"; $date = date('j.n.Y H:i:s'); if (($f = fopen($logFileBase . '.access.log', 'a'))) { fwrite($f, $status . ' ' . $date . "\t $remoteAddress $hostName ($proxyAddress $proxyName)\t /$page\n"); fclose($f); } if ($referer && ($f = fopen($logFileBase . '.referer.log', 'a'))) { fwrite($f, $date . "\t $remoteAddress\t $referer\n"); fclose($f); } if ($agent && ($f = fopen($logFileBase . '.agent.log', 'a'))) { fwrite($f, $date . "\t $remoteAddress\t $agent\n"); fclose($f); } /***************/ $nameCache = array(); if (filemtime($nameCacheFile) < filemtime($pageDir . $pageFile)) { function constructNameCache($path) { global $pageDir, $nameCache; if($d = opendir($pageDir . $path)) { while (($n = readdir($d)) !== false) { if ($n{0} == '.' && ( strlen($n) == 1 || $n{1} == '.')) continue; if (strlen($path) > 0) $pn = $path . '/' . $n; else $pn = $n; if (is_dir($pageDir . $pn)) { constructNameCache($pn); } else { $f = fopen($pageDir . $pn, "r"); if (!strcmp($n, ".index")) $pn = $path; if ($f) { while (!feof($f)) { $s = stristr(fgets($f, 2048), '

'); if ($s !== FALSE) { $i = strpos($s, '

'); if (!$i) $i = strpos($s, ''); if ($i) $nameCache[$pn] = strip_tags(substr($s, 4, $i - 4)); else $nameCache[$pn] = strip_tags(substr($s, 4, strlen($s) - 5)); break; } } if (feof($f)) $nameCache[$pn] = '?'; fclose($f); } } } } } constructNameCache(''); ksort($nameCache); $nameCache[''] = 'Mauku'; $f = fopen($nameCacheFile, 'w'); if ($f) { reset($nameCache); while (list($key, $value) = each($nameCache)) fwrite($f, "$key $value\n"); fclose($f); } } else { $f = fopen($nameCacheFile, "r"); if ($f) { while (!feof($f)) { $s = fgets($f, 1024); $i = strpos($s, ' '); if ($i !== FALSE) $nameCache[substr($s, 0, $i)] = trim(substr($s, $i + 1)); } fclose($f); } } /****************/ if ($pageNotFound) { header("HTTP/1.1 404 Not Found"); } header("Last-Modified: " . gmdate("D, d M Y H:i:s", $pageModified) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 20) . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); if (!$pageNotFound && (($p = strrpos($page, '.')) !== FALSE || (strcmp(strtolower($page), $page) && ($p = strrpos($page, '/')) !== FALSE))) { $suffix = substr($page, $p + 1); if (($f = fopen($mimeFile, 'r')) !== FALSE) { while (!feof($f) && ! isset($mimetype)) { $str = fgets($f); if ($str{0} != '#') { $s = split("[[:space:]]", $str); foreach ($s as $i) { if (!strcmp($i, $suffix)) { $mimetype = $s[0]; break; } } } } } if (!isset($mimetype)) { $mimetype = "application/binary"; } header("Content-Type: $mimetype"); readfile($pageDir . $pageFile); } else { ?> Mauku - <? if ($pageNotFound) echo ("Page Not Found"); else if ($nameCache[$page] == 'Mauku') echo ('The micro-blogging client for Maemo devices'); else echo($nameCache[$page]); ?>

Page Not Found

If you think this is an error in the site, please, inform the author (mauku@henrikhedberg.com).

Päivitä vanhentunut osoite

Saavuit tälle sivulle vanhentuneen osoitteen kautta. IKI- ja TOL-osoitteet eivät ole enää käytössä. Päivitä vanhentunut linkki tai ilmoita väärästä osoitteesta sen sivuston ylläpitäjälle, jonka kautta päädyit näille sivuille. Kiitos!