$v) { if ($k < $restore) break; if (!preg_match('/^diff:/',$k)) continue; if ($patfp = fopen($patfile,"w")) { fputs($patfp,$v); fclose($patfp); } system("$SysPatchCmd $txtfile $patfile"); } $text = implode('',file($txtfile)); @unlink($txtfile); @unlink($patfile); return $text; } ?>