webchatdeny.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /* For licensing terms, see /dokeos_license.txt */
  3. /**
  4. * @todo can't this be moved to a different file so that we can delete this file?
  5. * Is this still in use? If not, then it should be removed or maybe offered as an extension
  6. */
  7. /**
  8. ==============================================================================
  9. * Deletes the web-chat request form the user table
  10. ==============================================================================
  11. */
  12. // name of the language file that needs to be included
  13. $language_file = 'index';
  14. // including necessary files
  15. include_once './main/inc/global.inc.php';
  16. // table definitions
  17. $track_user_table = Database::get_main_table(TABLE_MAIN_USER);
  18. if (isset($_user['user_id']) && $_user['user_id'] != '') {
  19. $_user['user_id'] = intval($_user['user_id']);
  20. $sql = "update $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='DENIED' where (user_id = ".$_user['user_id'].")";
  21. $result = Database::query($sql);
  22. }
  23. Display::display_header();
  24. $message = get_lang('RequestDenied').'<br /><br /><a href="javascript: history.back();">'.get_lang('Back').'</a>';
  25. Display::display_normal_message($message);
  26. /*
  27. ==============================================================================
  28. FOOTER
  29. ==============================================================================
  30. */
  31. Display::display_footer();