if (file_exists("title.txt")) { $content = file("title.txt"); $title = rtrim($content[0]); } else { $title = "SimpleViewer Gallery"; } $backgroundColor = "0x000000"; if (file_exists("colors.txt")) { // Format of the file should be // one color per line, lines beginning with "//" are ignored // First color is background // Second color is text color // Third color is frame color $content = file("colors.txt"); foreach ($content as $line) { if (preg_match("/^ *\/\/.*$/", $line) == FALSE) { $colors[] = $line; } } if ($colors[0]) $backgroundColor = rtrim($colors[0]); if ($colors[1]) $textColor = rtrim($colors[1]); if ($colors[2]) $frameColor = rtrim($colors[2]); } ?>