filler.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php // $Id: index.php 22269 2009-07-21 15:06:15Z juliomontoya $
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Index of the admin tools
  5. *
  6. * @package chamilo.admin
  7. */
  8. // name of the language file that needs to be included <br />
  9. $language_file=array('admin','tracking');
  10. // resetting the course id
  11. $cidReset=true;
  12. // including some necessary chamilo files
  13. require_once '../inc/global.inc.php';
  14. require_once api_get_path(LIBRARY_PATH).'security.lib.php';
  15. // setting the section (for the tabs)
  16. $this_section=SECTION_PLATFORM_ADMIN;
  17. // Access restrictions
  18. api_protect_admin_script(true);
  19. $nameTools = get_lang('PlatformAdmin');
  20. // setting breadcrumbs
  21. $interbreadcrumb[] = array ("url" => 'index.php', "name" => $nameTools);
  22. // setting the name of the tool
  23. $nameTools = get_lang('DataFiller');
  24. $output = array();
  25. if (!empty($_GET['fill'])) {
  26. require api_get_path('SYS_TEST_PATH').'datafiller/fill_users.php';
  27. $output = fill_users();
  28. }
  29. // Displaying the header
  30. Display::display_header($nameTools);
  31. $result = '';
  32. if (count($output)>0) {
  33. $result = '<div class="filler-report">'."\n";
  34. $result .= '<div class="filler-report-title">'.$output[0]['title'].'</div>'."\n";
  35. $result .= '<table>';
  36. foreach ($output as $line) {
  37. $result .= '<tr>';
  38. $result .= '<td class="filler-report-data-init">'.$line['line-init'].'</td><td class="filler-report-data">'.$line['line-info'].'</td>';
  39. $result .= '</tr>'."\n";
  40. }
  41. $result .= '</table>';
  42. $result .= '</div>';
  43. Display::display_normal_message($result);
  44. }
  45. ?>
  46. <div class="admin_section">
  47. <h4><?php Display::display_icon('bug.gif', 'DataFiller'); echo ' '.api_ucfirst(get_lang('DataFiller'));?></h4>
  48. <div><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls');?></div>
  49. <ul>
  50. <li><a href="filler.php?fill=users"><?php echo get_lang('FillUsers');?></a></li>
  51. </ul>
  52. </div>
  53. <?php
  54. /* FOOTER */
  55. Display::display_footer();