latex.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html>
  3. <head>
  4. <title>LaTeX Code</title>
  5. </head>
  6. <body>
  7. <?php // $Id: latex.php,v 1.1 2006/04/05 07:18:46 pcool Exp $
  8. /*
  9. ==============================================================================
  10. Dokeos - elearning and course management software
  11. Copyright (c) 2004-2006 Dokeos S.A.
  12. Copyright (c) 2003 Ghent University (UGent)
  13. Copyright (c) Patrick Cool <patrick.cool@UGent.be>, Ghent University
  14. For a full list of contributors, see "credits.txt".
  15. The full license can be read in "license.txt".
  16. This program is free software; you can redistribute it and/or
  17. modify it under the terms of the GNU General Public License
  18. as published by the Free Software Foundation; either version 2
  19. of the License, or (at your option) any later version.
  20. See the GNU General Public License for more details.
  21. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  22. Mail: info@dokeos.com
  23. ==============================================================================
  24. */
  25. /*
  26. ==============================================================================
  27. INIT SECTION
  28. ==============================================================================
  29. */
  30. include("../inc/global.inc.php");
  31. /*
  32. ==============================================================================
  33. FUNCTIONS
  34. ==============================================================================
  35. */
  36. // put your functions here
  37. // if the list gets large, divide them into different sections:
  38. // display functions, tool logic functions, database functions
  39. // try to place your functions into an API library or separate functions file - it helps reuse
  40. /*
  41. ==============================================================================
  42. MAIN CODE
  43. ==============================================================================
  44. */
  45. $code = Security::remove_XSS($_GET['code']);
  46. echo '<div id="latex_code">';
  47. echo '<h3>'.get_lang('LatexCode').'</h3>';
  48. echo stripslashes($code);
  49. echo '</div>';
  50. echo '<div id="latex_image">';
  51. echo '<h3>'.get_lang('LatexFormula').'</h3>';
  52. echo '<img src="'.api_get_path(WEB_COURSE_PATH).$_course['path'].'/temp/'.$code.'" alt="'.get_lang('LatexCode').'"/>';
  53. echo '</div>';
  54. /*
  55. ==============================================================================
  56. FOOTER
  57. ==============================================================================
  58. */
  59. ?>
  60. </body>
  61. </html>