fancy HTML function fancy_design($fname) { global $HTML_PATH, $FANCY_PATH, $LANGUAGE, $LANGUAGES, $counter, $original_index, $publication_date; // Get the contents of the file from $HTML_PATH $content = oneLiner("$HTML_PATH/$fname", true); // CSS file linking $content = preg_replace("|/", '', $content); // Whole page table and backgrounds $wpbegin = '
'; $bnavt = ''; $lnavt = ''; $space = ''; // Navheader backgound $content = preg_replace("/<\\/DIV\\s*>/Us", $wpbegin . '' . $lnavt . '

' . $space . '
', $content); // Navfooter backgound $content = preg_replace("/<\\/DIV\\s*>/Us", '
' . $space . '
', $content); // Fix copyright page fault... if ($fname == "copyright.html") { $content = preg_replace("/&copy;/", "©", $content); $content = preg_replace("/)|", "\\1 ", $content); $content = preg_replace("|( )|", "\\1 ", $content); } // Fix the original manual index to look far better... elseif ($fname == "$original_index") { // Find out manual generation date if (preg_match('|([\\d-]+)
|U', $content, $match)) { $publication_date = $match[1]; } else { $publication_date = 'n/a'; } // Modify the index file to meet our needs preg_match('|CLASS=\"title\"\\s*>(.*)(.*) 

'; $content = preg_replace("/(/Us", "", $content); preg_match('|(.*)|U', $content, $match); $content = preg_replace("|(CLASS=\"title\"\\s+>).*().*((.*)|U", "", $content); } // Print out that new file to $FANCY_PATH $fp = fopen("$FANCY_PATH/$fname", "w"); $content = setDocumentCharset($content, $LANGUAGES[$LANGUAGE]['mime_charset_name']); fputs_wrapper($fp, $content); fclose($fp); // Print out a message to see the progress echo "$FANCY_PATH/$fname ready...\n"; $counter++; } // fancy_design() function end ?>