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