//////////////////////////////////////////////////////////
/// The purpose of this script is to convert the list.txt
/// data from the old format (which was used for DigiOz
/// Guestbook 1.0 to 1.6 to the new Object Oriented
/// Serialized format used in Guestbook Version 1.7.
//////////////////////////////////////////////////////////
Date:", "|", $value);
$value = str_replace("
From:", "|", $value);
$value = str_replace("
Email: ", "|", $value);
$value = str_replace("
Message:", "|", $value);
$msgArray = explode("|", $value);
$tmpDate = $msgArray[1];
$tmpFrom = $msgArray[2];
$tmpEmail = $msgArray[3];
$tmpMessage = $msgArray[4];
$tmpEmail = str_replace('"','"', $tmpEmail);
$tmpEmail = str_replace("'","'", $tmpEmail);
$tmpFrom = strip_tags($tmpFrom);
$tmpFrom = str_replace('"','"', $tmpFrom);
$tmpFrom = str_replace("'","'", $tmpFrom);
$tmpMessage = strip_tags($tmpMessage);
$tmpMessage = str_replace('"','"', $tmpMessage);
$tmpMessage = str_replace("'","'", $tmpMessage);
if($tmpDate != "" && $tmpFrom != "" && $tmpEmail != "" && $tmpMessage != "")
{
//echo "DATE: ".$tmpDate."
";
//echo "FROM: ".$tmpFrom."
";
//echo "EMAIL: ".$tmpEmail."
";
//echo "MESSAGE: ".$tmpMessage."
";
$a = new gbClass();
$a->setGBVars($tmpDate,$tmpFrom,$tmpEmail,$tmpMessage);
@ $fp = fopen("list_converted.txt","a");
flock($fp, 2);
$data = serialize($a)."";
fwrite($fp, $data);
flock($fp, 3);
fclose($fp);
}
}
echo "Guestbook Entry Conversion Completed!";
?>