
Poniższy skrypt przerobi plik abw na jako taki HTML

<?php echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>'; // read content // tekst $texts = $text[2]; // grafika $extras = $extra[0]; { // jeżeli są grafiki /załączniki to pojedź dalej $xml = simplexml_load_string($extras); $iter = 0; { foreach($xml->d as $d) { { $images[$filename] = $filename.'.'.$tab[1]; file_put_contents($filename.'.'.$tab[1], $image_content); $iter++; } } // przerabiamy wywołania do grafik na img src foreach($img[1] as $key => $val) { } } } // tabelki preg_match_all('#<cell props="bot-attach:([0-9]*); left-attach:([0-9]*); right-attach:([0-9]*); top-attach:([0-9]*)">#es', $texts, $table); $tr = 0; foreach($table[0] as $key => $val) { IF($tr != $table[4][$key]) { $tr = $table[4][$key]; } else { } } // wypunktowanie preg_match_all('#<c props="([a-zA-Z0-9 _;:-]*) list-style:Bullet List; ([a-zA-Z0-9 _;:-]*)">(.*?)</c>#es', $texts, $li); foreach($li[0] as $key => $val) { } preg_match_all('#<p level="(.*?) list-style:Numbered List; ([a-zA-Z0-9 _;:-]*)">(.*?)</p>#es', $texts, $li2); foreach($li2[0] as $key => $val) { } // czyszczenie, poprawki //highlight_string($texts); //echo '<BR><BR><HR><BR>'; // kod HTML jest cienki ale ujdzie.. albo do Tidy albo do ręcznych poprawek ?> </body></html>