The calling arrangement of webmove.pl must have changed.\n", "Please get someone to update this script.\n", "(File left in temp directory)

\n"; break; case 2: echo "

The filename this script used was incorrect.\n", "Someone is changing files on the server or the directory\n", "structure has changed. (File left in temp directory)

\n"; break; case 3: echo "

The size argument was not a number!\n", "Something is wrong with the script.\n", "(File left in temp directory)

\n"; break; case 4: echo "

The max size specified by this script is unreasonable.\n", "Please fix that. (File left in temp directory)"; break; case 5: echo "

The input file is too large.\n", "What did you upload? (File left in temp directory)

"; break; case 6: echo "

Hmmm... the file couldn't have been created by me:\n", "I only append to existing files.\n", "(File left in temp directory)

\n"; break; case 7: echo "

Unable to make a backup means there must be something\n", "wrong with the server. Please check things out for me.\n", "(File left in temp directory)

\n"; break; case 8: echo "

The copy could not complete.\n", "Are you out of diskspace?

\n"; break; case 9: echo "

The copied file is no longer an append of the old file.\n", "Something is wrong with webmove.pl.

\n"; break; case 10: echo "

The file I attempted to move is the same as the one\n", "already there so I did nothing.

\n"; break; case 11: echo "

$out_filename does not exist.\n", "Fix a problem with this script.

\n"; break; case 12: echo "

Something is wrong with the server.\n", "The file was changed in copying.

\n"; break; case 13: echo "

Not being able to restore the backup means the current\n", "page is wrong, but the previous version is still on the\n", "server. Please correct as soon as possible.

\n"; break; default: echo "

Unknown error code:$webmove_return:!\n", "Check webmove.pl to see what's changed.

\n"; break; } return $webmove_return; } /* Lookup $username and $password in auth file. * Read the auth file line by line. If we have a match between the first entry * and the username then read password. md5sum password and see what we get. */ function authorizeLevelByFile($username, $password, $authfile="/home/badger/private_html/auth") { $readauth=fopen($authfile,"r"); while (!feof($readauth)) { $authline=fgets($readauth,255); if (ereg("^$username:",$authline)) { $autharray = split(":",$authline,3); $autharray[2]=chop($autharray[2]); if ($autharray[1] == md5($password)) { switch ($autharray[2]) { case "reader": $allow=1; break; case "writer": $allow=2; break; default: $allow=0; break; } } break; } } fclose($readauth); return $allow; } function printTop($title,$SCRIPT_FILENAME,$menu_style) { ?> <?php echo("$title\n"); ?>

Pages in the Rambling

    Current Ramble"); } else { echo("
  • Current Ramble"); } if (($current_file != "archives.php")) { echo("
  • Main Archives Page\n"); } else { echo("
  • Main Archives Page\n"); } if (($current_file != "writer.php")) { echo("
  • Toshio may Submit an Entry\n"); } else { echo("
  • Toshio may Submit an Entry\n"); } ?>


There's no place like home


"); for ($i=0; $i "); ?> ©

\n"; // Iterate over the lines in the file. while ($line=each($input_file)) { // If the line is blank then insert

. if (ereg("^[[:space:]]$",$line["value"])) { $output[]="

"; // If the line is one of my headers then put it in its own paragraph } elseif (ereg("^[[:space:]]*\[[^]]+\][[:space:]]*$",$line["value"])) { if (!ereg("

$",$output[count($output)-1])) { $output[]="

"; } $output[]=$line["value"]; $output[]="

"; // If the line is short check whether we should format it as a poem. } elseif (strlen($line["value"]) < 60) { /* For the Ramblings, I define a poem as a collection of two or * more lines shorter than 60 characters in length which are * terminated by a blank line. */ // Check if the previous line was also short. if ((strlen($output[count($output)-1]) < 60) && !ereg("

",$output[count($output)-1])) { // This is a poem. $holding=$output[count($output)-1]; $output[count($output)-1]="

\n"; $output[]=$holding."
\n"; $output[]=$line["value"]."
\n"; $nextline=current($input_file); while (!ereg("^[[:space:]]*$",$nextline)) { $output[]=$nextline."
\n"; $nextline=next($input_file); } $output[]="
"; } else { // False alarm. Add this line as is. $output[]=$line["value"]; } // Line should be entered as is. } else { $output[]=$line["value"]; } } // Finish the paragraph. if (!ereg("",$output[count($output)-1])) { $output[]="

"; } return $output; } function directoryList($path='.') { // We read the files from the directory in and save them into an array. $dirhandle=opendir($path); while (($file=readdir($dirhandle))!="") { $list[count($list)]=$file; } closedir($dirhandle); sort($list); return $list; } function listEntries($path='.') { $listing=directoryList($path); for ($i = 0; $i < count($listing); $i++) { if (ereg("^[0-9]{8}$",$listing[$i])) { $entries[count($entries)]=$listing[$i]; } } return $entries; } function filenameToDate($filename) { ereg("([0-9]{4})([0-9]{2})([0-9]{2})",$filename,$date); $year=$date[1]; $numeric_month=$date[2]; $day=$date[3]; switch ($numeric_month) { case 1: $month="January"; break; case 2: $month="February"; break; case 3: $month="March"; break; case 4: $month="April"; break; case 5: $month="May"; break; case 6: $month="June"; break; case 7: $month="July"; break; case 8: $month="August"; break; case 9: $month="September"; break; case 10: $month="October"; break; case 11: $month="November"; break; case 12: $month="December"; break; default: $month=$numeric_month; break; } return "$day $month $year"; } ?>