latex.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. /* For licensing terms, see /license.txt */
  9. /* INIT SECTION */
  10. include '../inc/global.inc.php';
  11. /* FUNCTIONS */
  12. // put your functions here
  13. // if the list gets large, divide them into different sections:
  14. // display functions, tool logic functions, database functions
  15. // try to place your functions into an API library or separate functions file - it helps reuse
  16. /* MAIN CODE */
  17. $code = Security::remove_XSS($_GET['code']);
  18. echo '<div id="latex_code">';
  19. echo '<h3>'.get_lang('LatexCode').'</h3>';
  20. echo stripslashes($code);
  21. echo '</div>';
  22. echo '<div id="latex_image">';
  23. echo '<h3>'.get_lang('LatexFormula').'</h3>';
  24. echo '<img src="'.api_get_path(WEB_COURSE_PATH).$_course['path'].'/temp/'.$code.'" alt="'.get_lang('LatexCode').'"/>';
  25. echo '</div>';
  26. /* FOOTER */
  27. ?>
  28. </body>
  29. </html>