openobject.php 783 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Chamilo metadata/openobject.php
  4. * 2004/08/27
  5. * Copyright (C) 2006 rene.haentjens@UGent.be - see metadata/md_funcs.php
  6. * @package chamilo.metadata
  7. */
  8. /**
  9. * Chamilo Metadata: general script for opening an object
  10. * URL parameters:
  11. * - eid= entry-id = object-id = type.identifier, e.g. 'Document.12';
  12. */
  13. require("md_funcs.php");
  14. // name of the language file that needs to be included
  15. /*
  16. $language_file = 'Whatever';
  17. */
  18. require("../inc/global.inc.php");
  19. $this_section=SECTION_COURSES;
  20. getpar('EID', 'Entry IDentifier');
  21. if (!($dotpos = strpos(EID, '.'))) give_up('No . in ' . EID);
  22. require('md_' . strtolower(substr(EID, 0, $dotpos)) . '.php');
  23. $mdObj = new mdobject($_course, substr(EID, $dotpos + 1));
  24. header('Location: ' . $mdObj->mdo_url);
  25. exit;
  26. ?>