dokeos-help
[ class tree: dokeos-help ] [ index: dokeos-help ] [ all elements ]

Source for file allowed_html_tags.php

Documentation is available at allowed_html_tags.php

  1. <?php
  2. /*
  3. ==============================================================================
  4.     Dokeos - elearning and course management software
  5.  
  6.     Copyright (c) 2004-2005 Dokeos S.A.
  7.     Copyright (c) Bart Mollet, Hogeschool Gent
  8.  
  9.     For a full list of contributors, see "credits.txt".
  10.     The full license can be read in "license.txt".
  11.  
  12.     This program is free software; you can redistribute it and/or
  13.     modify it under the terms of the GNU General Public License
  14.     as published by the Free Software Foundation; either version 2
  15.     of the License, or (at your option) any later version.
  16.  
  17.     See the GNU General Public License for more details.
  18.  
  19.     Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  20.     Mail: info@dokeos.com
  21. ==============================================================================
  22. */
  23. /**
  24. ==============================================================================
  25. *    This     script displays a help window with an overview of the allowed HTML-
  26. *   tags  and their attributes.
  27. *
  28. *    @package dokeos.help
  29. ==============================================================================
  30. */
  31. // name of the language file that needs to be included 
  32. $language_file 'help';
  33. include ('../inc/global.inc.php');
  34. require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
  35. require_once (api_get_path(LIBRARY_PATH).'formvalidator/Rule/HTML.php');
  36. $language_code Database :: get_language_isocode($language_interface);
  37. header('Content-Type: text/html; charset='.$charset);
  38. ?>
  39. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  40. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $language_code?>" lang="<?php echo $language_code?>">
  41. <head>
  42. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
  43. <title>
  44. <?php echo get_lang('AllowedHTMLTags')?>
  45. </title>
  46. <style type="text/css" media="screen, projection">
  47. /*<![CDATA[*/
  48. @import "<?php echo api_get_path(WEB_CODE_PATH)?>css/public_admin/default.css";
  49. /*]]>*/
  50. </style>
  51. <?php
  52. if(api_get_setting('stylesheets')<>'')
  53. {
  54.     ?>
  55.     <style type="text/css" media="screen, projection">
  56.     /*<![CDATA[*/
  57.     @import "<?php echo api_get_path(WEB_CODE_PATH)?>css/<?php echo api_get_setting('stylesheets');?>/default.css";
  58.     /*]]>*/
  59.     </style>
  60.     <?php
  61. }
  62. ?>
  63. </head>
  64. <body>
  65. <div style="margin:10px;">
  66. <div style="text-align:right;"><a href="javascript:window.close();"><?php echo get_lang('Close')?></a></div>
  67. <h4>
  68. <?php echo get_lang('AllowedHTMLTags')?>
  69. </h4>
  70. <?php
  71. $html_type $_SESSION['status'== COURSEMANAGER TEACHER_HTML STUDENT_HTML;
  72. $fullpage $_GET['fullpage'== '0' false true;
  73. $tags HTML_QuickForm_Rule_HTML :: get_allowed_tags($html_type,$fullpage);
  74. $table_header array();
  75. $table_header[]array('tag',true);
  76. $table_header[]array('attributes',false);
  77. foreach ($tags as $tag => $attributes)
  78. {
  79.     $row array();
  80.     $row['<kbd>'.$tag.'</kbd>';
  81.     $row['<kbd>&nbsp;'.implode(', ',array_keys($attributes)).'</kbd>';
  82.     $table_data[$row;
  83. }
  84. Display::display_sortable_table($table_header,$table_data,array(),array(),array('fullpage'=>$_GET['fullpage']));
  85. ?>
  86. <div style="text-align:right;"><a href="javascript:window.close();"><?php echo get_lang('Close')?></a></div>
  87. </div>
  88. </body>
  89. </html>

Documentation generated on Thu, 12 Jun 2008 12:57:32 -0500 by phpDocumentor 1.4.1