This repository was archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathproduct.php
60 lines (51 loc) · 1.82 KB
/
product.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
$dont_check_login = true;
?>
<?php
$content_class = true;
$class_names[] = 'ec_product_view';
?>
<?php
include_once("includes/functions/loader.inc");
if ($continue) {
$reflector = new ReflectionClass($class);
$fnname = $reflector->getFileName();
$fdir = dirname($fnname);
$include_file_names = glob($fdir . DS . "*.inc");
$css_file_names = glob($fdir . "/*.css");
$template_file_names = glob($fdir . DS . "*_template.php");
if ($showContextMenu) {
$js_file_names = glob($fdir . "/*.js");
$js_file_paths = [];
foreach ($js_file_names as $key => $js_file_name) {
if (strpos($js_file_name, 'modules')) {
$js_file_path = str_replace('\\', '/', substr($js_file_name, strpos($js_file_name, 'modules')));
} else if (strpos($js_file_name, 'extensions')) {
$js_file_path = str_replace('\\', '/', substr($js_file_name, strpos($js_file_name, 'extensions')));
}
array_push($js_file_paths, $js_file_path);
}
}
$css_file_paths = [];
foreach ($css_file_names as $key => $css_file_name) {
if (strpos($css_file_name, 'modules')) {
$css_file_path = str_replace('\\', '/', substr($css_file_name, strpos($css_file_name, 'modules')));
} else if (strpos($css_file_name, 'extensions')) {
$css_file_path = str_replace('\\', '/', substr($css_file_name, strpos($css_file_name, 'extensions')));
} else if (strpos($css_file_name, 'engine')) {
$css_file_path = str_replace('\\', '/', substr($css_file_name, strpos($css_file_name, 'engine')));
}
array_push($css_file_paths, $css_file_path);
}
foreach ($include_file_names as $key => $pathname) {
include_once "$pathname";
}
$custom_inc_file_name = HOME_DIR . '/custom/include/' . $class . '_include.inc';
if (file_exists($custom_inc_file_name)) {
include_once "$custom_inc_file_name";
}
} else {
return;
}
include_once(THEME_DIR . '/product_template.inc');
?>