webchatdeny.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /* For licensing terms, see /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. * Deletes the web-chat request form the user table
  9. */
  10. // name of the language file that needs to be included
  11. $language_file = 'index';
  12. // including necessary files
  13. include_once './main/inc/global.inc.php';
  14. // table definitions
  15. $track_user_table = Database::get_main_table(TABLE_MAIN_USER);
  16. if (isset($_user['user_id']) && $_user['user_id'] != '') {
  17. $_user['user_id'] = intval($_user['user_id']);
  18. $sql = "update $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='DENIED' where (user_id = ".$_user['user_id'].")";
  19. $result = Database::query($sql);
  20. }
  21. Display::display_header();
  22. $message = get_lang('RequestDenied').'<br /><br /><a href="javascript: history.back();">'.get_lang('Back').'</a>';
  23. Display::display_normal_message($message);
  24. /* FOOTER */
  25. Display::display_footer();