rendered paste body<html> <head> <title>Pastebin</title> </head> <body> <?php require ( "database.php" ); require ( "highlight.php" ); require ( "xmlparser.php" ); if ( !isset ( $_REQUEST['id'] ) ) die ( "ID not specified!" ); database_connect (); $array = database_retrieve ( $_REQUEST['id'] ); $text = htmlentities ( $array ['Text'] ); $xml_parser = new CXmlParser; $rules = $xml_parser->parse ( "rules.xml" ); $highlighted_text = apply_rule ( $rules ['RULE'][$array ['Language']], $text ); $lines = explode ( "\n", $highlighted_text ); ?> <table border="1" cellpadding="2" width="50" height="50" > <tr> <td> <?php print ( "Language: ". $rules ['RULE'][$array['Language']]['attributes']['NAME'] ); ?> </td> </tr> <tr> <td> <?php print ( "ID: " . $array['ID'] ); ?> </td> </tr> <tr> <td> <?php print ( "Date: " . $array['Date'] ); ?> </td> </tr> <tr> <td> <table name="input_text" rows="25" cols="80"> </td> <td> </td> <td nowrap align="left"> <?php print ( "<pre>\n" . $highlighted_text . "\n</pre>" ); ?> </td> </td> </tr> </table> <form method="post" action="submit.php"> <input type="hidden" name="input_language" value="<?php print ( $array ['Language'] ); ?>"> Faire des changements:<br> <textarea name="input_text" rows="25" cols="80"><?php print ( "\n" . $text ); ?></textarea> <br><br> <input type="submit" value="Valider"> </form> </body></html>