BGC Massmod

PHP PMS Background colors mass modifier <?php

$files = array_merge(glob("*.PMS"), glob("*.pms"));;

// these are ctf_Steel's colors, // note: alpha is useless // C = unsigned char--- B   R   G  A $new_top = pack("CCCC", 74, 63, 74, 0); // top $new_bot = pack("CCCC", 39, 39, 22, 0); // bottom

echo "Found ". count($files). " file(s) - processing...\n\n";

$i = 1;

foreach($files as $file){ echo $i. ". " . $file. " ... ";	$contents = file_get_contents($file, FILE_BINARY); // replace that $mod = substr_replace($contents, $new_top, 4+1+38+1+24, 4); $mod = substr_replace($mod, $new_bot, 4+1+38+1+24+4, 4); // overwrite file_put_contents($file, $mod); echo " ... OK!\n"; $i++; }

?>