hpdl
|
1300
|
1
|
<?php
|
|
2
|
/*
|
|
3
|
$Id: $
|
|
4
|
|
|
5
|
osCommerce, Open Source E-Commerce Solutions
|
|
6
|
http://www.oscommerce.com
|
|
7
|
|
|
8
|
Copyright (c) 2007 osCommerce
|
|
9
|
|
hpdl
|
1498
|
10
|
This program is free software; you can redistribute it and/or modify
|
|
11
|
it under the terms of the GNU General Public License v2 (1991)
|
|
12
|
as published by the Free Software Foundation.
|
hpdl
|
1300
|
13
|
*/
|
|
14
|
|
|
15
|
if ( !class_exists('osC_Summary') ) {
|
|
16
|
include('includes/classes/summary.php');
|
|
17
|
}
|
|
18
|
|
|
19
|
class osC_Summary_administrators_log extends osC_Summary {
|
|
20
|
|
|
21
|
/* Class constructor */
|
|
22
|
|
|
23
|
function osC_Summary_administrators_log() {
|
hpdl
|
1492
|
24
|
global $osC_Language;
|
|
25
|
|
|
26
|
$osC_Language->loadIniFile('modules/summary/administrators_log.php');
|
|
27
|
|
|
28
|
$this->_title = $osC_Language->get('summary_administrators_log_title');
|
hpdl
|
1407
|
29
|
$this->_title_link = osc_href_link_admin(FILENAME_DEFAULT, 'administrators_log');
|
hpdl
|
1300
|
30
|
|
|
31
|
if ( osC_Access::hasAccess('administrators_log') ) {
|
|
32
|
$this->_setData();
|
|
33
|
}
|
|
34
|
}
|
|
35
|
|
|
36
|
/* Private methods */
|
|
37
|
|
|
38
|
function _setData() {
|
hpdl
|
1492
|
39
|
global $osC_Database, $osC_Language;
|
hpdl
|
1300
|
40
|
|
|
41
|
$this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' .
|
|
42
|
' <thead>' .
|
|
43
|
' <tr>' .
|
hpdl
|
1492
|
44
|
' <th>' . $osC_Language->get('summary_administrators_log_table_heading_users') . '</th>' .
|
|
45
|
' <th>' . $osC_Language->get('summary_administrators_log_table_heading_module') . '</th>' .
|
|
46
|
' <th>' . $osC_Language->get('summary_administrators_log_table_heading_date') . '</th>' .
|
hpdl
|
1300
|
47
|
' </tr>' .
|
|
48
|
' </thead>' .
|
|
49
|
' <tbody>';
|
|
50
|
|
|
51
|
$Qlog = $osC_Database->query('select count(al.id) as total, al.id, al.module, a.user_name, al.datestamp from :table_administrators_log al, :table_administrators a where al.module in (":modules") and al.administrators_id = a.id group by al.id order by al.id desc limit 6');
|
|
52
|
$Qlog->bindTable(':table_administrators_log', TABLE_ADMINISTRATORS_LOG);
|
|
53
|
$Qlog->bindTable(':table_administrators', TABLE_ADMINISTRATORS);
|
|
54
|
$Qlog->bindRaw(':modules', implode('", "', $_SESSION['admin']['access']));
|
|
55
|
$Qlog->execute();
|
|
56
|
|
|
57
|
while ( $Qlog->next() ) {
|
|
58
|
$this->_data .= ' <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' .
|
hpdl
|
1407
|
59
|
' <td>' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, 'administrators_log&lID=' . $Qlog->valueInt('id') . '&action=info'), osc_icon('log.png') . ' ' . $Qlog->valueProtected('user_name')) . '</td>' .
|
hpdl
|
1300
|
60
|
' <td>' . $Qlog->value('module') . ' (' . $Qlog->valueInt('total') . ')</td>' .
|
frank
|
1763
|
61
|
' <td>' . osC_DateTime::getShort($Qlog->value('datestamp')) . '</td>' .
|
hpdl
|
1300
|
62
|
' </tr>';
|
|
63
|
}
|
|
64
|
|
|
65
|
$this->_data .= ' </tbody>' .
|
|
66
|
'</table>';
|
|
67
|
|
|
68
|
$Qlog->freeResult();
|
|
69
|
}
|
|
70
|
}
|
|
71
|
?>
|