#!/usr/local/bin/php
$Submit = $_REQUEST['Submit'];
$devlog = $_REQUEST['devlog'];
$bio = $_REQUEST['bio'];
//$devlog = ereg_replace("<", "%26lt;", $devlog);
//$devlog = ereg_replace(">", "%26gt;", $devlog);
$devlog = ereg_replace("&", "%26", $devlog);
$devlog = ereg_replace("\'", "%27", $devlog);
$devlog = ereg_replace("\n", "
", $devlog);
$devlog = ereg_replace("\r", "
", $devlog);
$devlog = stripslashes($devlog);
####################################################################################
########### Reading and Writing the new data to the devlog #############
if ($Submit == "Yes") {
#Next line tells the script which Text file to open.
$filename = "lessonplans/".$bio."/devlog.txt";
#Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F",time()));
#Puts the recently added data into html format that can be read into the Flash Movie.
$Input = "$devlog
"; // dont need to know the date
Date: $Today";
#Opens and writes the file.
$fp = fopen( $filename,"w+");
fwrite($fp, $Input, 80000);
fclose( $fp );
}
####################################################################################
########## Formatting and Printing the Data from the devlog file to the Flash Movie ##
#Next line tells the script which Text file to open.
$filename = "lessonplans/".$bio."/devlog.txt";
#Opens up the file declared above for reading
$fp = fopen( $filename,"r");
$Data = fread($fp, 80000);
fclose( $fp );
print "&devlog=";
print $Data;
####################################################################################
############### End devlog script
?>