|
1
|
|
|
<?php |
|
2
|
|
|
/* |
|
3
|
|
|
$Id$ |
|
4
|
|
|
|
|
5
|
|
|
osCommerce, Open Source E-Commerce Solutions |
|
6
|
|
|
http://www.oscommerce.com |
|
7
|
|
|
|
|
8
|
|
|
Copyright (c) 2010 osCommerce |
|
9
|
|
|
|
|
10
|
|
|
Released under the GNU General Public License |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
use OSC\OM\HTML; |
|
14
|
|
|
use OSC\OM\OSCOM; |
|
15
|
|
|
use OSC\OM\Registry; |
|
16
|
|
|
|
|
17
|
|
|
require(OSCOM::getConfig('dir_root', 'Shop') . 'includes/classes/action_recorder.php'); |
|
18
|
|
|
|
|
19
|
|
|
class actionRecorderAdmin extends actionRecorder { |
|
20
|
|
|
function __construct($module, $user_id = null, $user_name = null) { |
|
21
|
|
|
global $PHP_SELF; |
|
22
|
|
|
|
|
23
|
|
|
$this->lang = Registry::get('Language'); |
|
24
|
|
|
|
|
25
|
|
|
$module = HTML::sanitize(str_replace(' ', '', $module)); |
|
26
|
|
|
|
|
27
|
|
|
if (defined('MODULE_ACTION_RECORDER_INSTALLED') && tep_not_null(MODULE_ACTION_RECORDER_INSTALLED)) { |
|
28
|
|
|
if (tep_not_null($module) && in_array($module . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), explode(';', MODULE_ACTION_RECORDER_INSTALLED))) { |
|
29
|
|
|
if (!class_exists($module)) { |
|
30
|
|
|
if (is_file(OSCOM::getConfig('dir_root', 'Shop') . 'includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)))) { |
|
31
|
|
|
$this->lang->loadDefinitions('Shop/modules/action_recorder/' . $module); |
|
32
|
|
|
include(OSCOM::getConfig('dir_root', 'Shop') . 'includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1))); |
|
33
|
|
|
} else { |
|
34
|
|
|
return false; |
|
|
|
|
|
|
35
|
|
|
} |
|
36
|
|
|
} |
|
37
|
|
|
} else { |
|
38
|
|
|
return false; |
|
|
|
|
|
|
39
|
|
|
} |
|
40
|
|
|
} else { |
|
41
|
|
|
return false; |
|
|
|
|
|
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
$this->_module = $module; |
|
45
|
|
|
|
|
46
|
|
|
if (!empty($user_id) && is_numeric($user_id)) { |
|
47
|
|
|
$this->_user_id = $user_id; |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
if (!empty($user_name)) { |
|
51
|
|
|
$this->_user_name = $user_name; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
$GLOBALS[$this->_module] = new $module(); |
|
55
|
|
|
$GLOBALS[$this->_module]->setIdentifier(); |
|
56
|
|
|
} |
|
57
|
|
|
} |
|
58
|
|
|
?> |
|
|
|
|
|
|
59
|
|
|
|