Updown.city

Profile

There is no Privacy Policy or copyright license here. I would like to close this website rather than write things like this. (but I might share something related to this topic, which makes me believe human beings is not so fucked up as I thought, for example Copyheart.org.

本站沒有任何隱私協議或版權聲明。我寧願關掉這個倒霉的網站也不願意寫這種鬼東西。(取而代之的我會分享一些與這個話題相關的東西,比如Copyheart.org,它讓我感到人類沒有我以爲的那樣完蛋。

Impressum

I am a bird living inside of a nutshell

i am a bird living in a nutshell.

Credits

Script building journal archive page. (it might be outdated)

<?php
function rebuild() {
	$count = 0;
	$pagination = 0;
	$paged = 0;
	$preamble = <<<EOF
		<input type="hidden" name="journal-archive">
		<h1>archive</h1>
	EOF; file_put_contents("pagination/0",$preamble);
	$string = '';
	for ($index = 0; $index < TOTAL; $index++) {
		$content = file_get_contents(ENTRIES[$index]);
		$date = get_timestamp(ENTRIES[$index]);
		file_put_contents("pagination/$paged","<h2 class=\"date\">$date</h2>$content",FILE_APPEND);
		$count++;
		if ($paged == 0) $string .= "<section><time class=\"inline\">$date</time>$content</section>";
		if ($count >= LENGTH) {
			$count = 0;
			pagination($paged,$index);
			$paged++;
			file_put_contents("pagination/$paged",$preamble);
		}
		if (TOTAL-$index<LENGTH) pagination($paged,$index);
	}
	$content = str_replace("<!--/Journal/-->", $string, file_get_contents('../fallback'));
	file_put_contents('pagination/landing',$content);
}

Updated: Fri, 27 Sep 2024 20:11:58