webchatdeny.php 969 B

123456789101112131415161718192021222324252627282930
  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. // including necessary files
  11. include_once './main/inc/global.inc.php';
  12. // table definitions
  13. $track_user_table = Database::get_main_table(TABLE_MAIN_USER);
  14. if (isset($_user['user_id']) && $_user['user_id'] != '') {
  15. $_user['user_id'] = intval($_user['user_id']);
  16. $sql = "update $track_user_table set chatcall_user_id = '', chatcall_date = '', chatcall_text='DENIED' where (user_id = ".$_user['user_id'].")";
  17. $result = Database::query($sql);
  18. }
  19. Display::display_header();
  20. $message = get_lang('RequestDenied').'<br /><br /><a href="javascript: history.back();">'.get_lang('Back').'</a>';
  21. Display::display_normal_message($message);
  22. /* FOOTER */
  23. Display::display_footer();