changeset 259 | 112debff64bd |
parent 165 | d53cc29308f4 |
child 261 | 5f1cd51bf1be |
258:8be996c3740d | 259:112debff64bd |
---|---|
60 function get_security_log($num = false) |
60 function get_security_log($num = false) |
61 { |
61 { |
62 global $db, $session, $paths, $template, $plugins; // Common objects |
62 global $db, $session, $paths, $template, $plugins; // Common objects |
63 if ( $session->auth_level < USER_LEVEL_ADMIN ) |
63 if ( $session->auth_level < USER_LEVEL_ADMIN ) |
64 { |
64 { |
65 $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author) VALUES("security","seclog_unauth",UNIX_TIMESTAMP(),"' . $db->escape($_SERVER['REMOTE_ADDR']) . '","' . $db->escape($session->username) . '");'); |
65 $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author) VALUES(\'security\',\'seclog_unauth\',' . time() . ',"' . $db->escape($_SERVER['REMOTE_ADDR']) . '","' . $db->escape($session->username) . '");'); |
66 if ( !$q ) |
66 if ( !$q ) |
67 $db->_die(); |
67 $db->_die(); |
68 die('Security log: unauthorized attempt to fetch. Call has been logged and reported to the administrators.'); |
68 die('Security log: unauthorized attempt to fetch. Call has been logged and reported to the administrators.'); |
69 } |
69 } |
70 |
70 |