legal_list.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /* For licensing terms, see /dokeos_license.txt */
  3. $language_file = 'admin';
  4. $cidReset = true;
  5. require_once '../inc/global.inc.php';
  6. $this_section = SECTION_PLATFORM_ADMIN;
  7. api_protect_admin_script();
  8. $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
  9. $tool_name = get_lang('TermsAndConditions');
  10. Display :: display_header($tool_name);
  11. require_once api_get_path(LIBRARY_PATH).'legal.lib.php';
  12. $parameters['sec_token'] = Security::get_token();
  13. // action menu
  14. echo '<div class="actions" style="height:22px;">';
  15. echo '<div style="float:right;">
  16. <a href="'.api_get_path(WEB_CODE_PATH).'admin/legal_add.php">'.Display::return_icon('edit.gif',get_lang('EditTermsAndConditions'),'').get_lang('EditTermsAndConditions').'</a>&nbsp;&nbsp;
  17. </div><br />';
  18. echo '</div>';
  19. // Actions
  20. if (isset ($_GET['action'])) {
  21. if ($_GET['action'] == 'show_message')
  22. Display :: display_normal_message(Security::remove_XSS(stripslashes($_GET['message'])));
  23. Security::clear_token();
  24. }
  25. $table = new SortableTable('conditions', 'count_mask', 'get_legal_data_mask',2);
  26. $table->set_additional_parameters($parameters);
  27. $table->set_header(0, get_lang('Version'), false, 'width="15px"');
  28. $table->set_header(1, get_lang('Language'), false, 'width="30px"');
  29. $table->set_header(2, get_lang('Content'),false);
  30. $table->set_header(3, get_lang('Changes'), false, 'width="60px"');
  31. $table->set_header(4, get_lang('Type'), false, 'width="60px"');
  32. $table->set_header(5, get_lang('Date'), false, 'width="50px"');
  33. $table->display();
  34. // this 2 "mask" function are here just because the SortableTable
  35. function get_legal_data_mask($id, $params=null, $row=null) {
  36. return LegalManager::get_legal_data($id, $params, $row);
  37. }
  38. function count_mask() {
  39. return LegalManager::count();
  40. }
  41. /*
  42. ==============================================================================
  43. FOOTER
  44. ==============================================================================
  45. */
  46. Display :: display_footer();
  47. ?>