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

Source for file link_goto.php

Documentation is available at link_goto.php

  1. <?php // $Id: link_goto.php 9246 2006-09-25 13:24:53Z bmol $ 
  2. /*
  3. ============================================================================== 
  4.     Dokeos - elearning and course management software
  5.     
  6.     Copyright (c) 2004-2005 Dokeos S.A.
  7.     Copyright (c) 2003 Ghent University (UGent)
  8.     Copyright (c) 2001 Universite catholique de Louvain (UCL)
  9.     
  10.     For a full list of contributors, see "credits.txt".
  11.     The full license can be read in "license.txt".
  12.     
  13.     This program is free software; you can redistribute it and/or
  14.     modify it under the terms of the GNU General Public License
  15.     as published by the Free Software Foundation; either version 2
  16.     of the License, or (at your option) any later version.
  17.     
  18.     See the GNU General Public License for more details.
  19.     
  20.     Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
  21. ============================================================================== 
  22. */
  23. /**
  24. ============================================================================== 
  25. * This page is used to launch an event when a user clicks
  26. * on a page linked in a course.
  27. * - It gets name of URL
  28. * - It calls the event function
  29. * - It redirects the user to the linked page
  30. *                                                               |
  31. * Need the liens.id, user.user_id et cours.code when called
  32. * ?link_id=$myrow[0]&link_url=$myrow[1]                           |
  33. * url is given to avoid a new select
  34. *
  35. @author Thomas Depraetere, Hugues Peeters, Christophe Gesché - original versions
  36. @package dokeos.link
  37. ============================================================================== 
  38. */
  39.     
  40. /*
  41. ============================================================================== 
  42.         INIT SECTION
  43. ============================================================================== 
  44. */ 
  45.  
  46. include('../inc/global.inc.php');
  47. $this_section=SECTION_COURSES;
  48.  
  49. include(api_get_path(LIBRARY_PATH)."events.lib.inc.php");
  50.  
  51. $link_url $_GET['link_url'];
  52. $link_id $_GET['link_id'];
  53.  
  54. // launch event
  55. event_link($link_id);
  56.  
  57. header("Cache-Control: no-store, no-cache, must-revalidate");   // HTTP/1.1
  58. header("Cache-Control: post-check=0, pre-check=0"false);
  59. header("Pragma: no-cache");                                     // HTTP/1.0
  60. header("Location: $link_url");
  61.  
  62. //to be sure that the script stops running after the redirection
  63. exit;
  64.  
  65. ?>

Documentation generated on Thu, 12 Jun 2008 14:00:13 -0500 by phpDocumentor 1.4.1