<?php
/**
 * la.plume Micro CMS
 * ==================
 * COPYRIGHT Patrick Taylor http://www.mini-print.com/
 */

$suggestion = "<br>Check your server's write permissions: directories CHMOD 755 / files CHMOD 644 or 664.";

if (!file_exists("../checkup.txt")) {
	$checkup = "../checkup.txt";
	@touch($checkup);
	if (file_exists($checkup)) {
		$fp0 = @fopen($checkup, "wb");
		if ($fp0) {
			if (is_writable($checkup)) {
				fwrite($fp0, "Checkup.");
			} else {
				$notice = "<p class=\"notice\">A test file was created but is not writable.$suggestion</p>\n";
			}
			fclose($fp0);
			$notice = "<p class=\"notice\">A test file <em>checkup.txt</em> was created successfully and will be deleted automatically.</p>\n";
		} else {
			$notice = "<p class=\"notice\">A test file was created but could not be not opened.$suggestion</p>\n";
		}
	} else {
		$notice = "<p class=\"notice\">The test file was not created.$suggestion</p>\n";
	}
}

echo $notice;

?>