1 | <?php |
---|
2 | global $prefixeTable; |
---|
3 | if (!defined('CL_SET_PLUGINS_TABLE')) define('CL_SET_PLUGINS_TABLE', $prefixeTable.'cl_set_plugins'); |
---|
4 | $path = SET_PLUGINS_PATH; |
---|
5 | $plg_data = implode( '', file($path.'main.inc.php') ); |
---|
6 | if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) ) |
---|
7 | { |
---|
8 | $set_plugins_plugin['name'] = trim( $val[1] ); |
---|
9 | } |
---|
10 | if (preg_match("|Version: (.*)|", $plg_data, $val)) |
---|
11 | { |
---|
12 | $set_plugins_plugin['version'] = trim($val[1]); |
---|
13 | } |
---|
14 | if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) ) |
---|
15 | { |
---|
16 | $set_plugins_plugin['uri'] = trim($val[1]); |
---|
17 | } |
---|
18 | if ($desc = load_language('description.txt', $path.'/', array('return' => true))) |
---|
19 | { |
---|
20 | $set_plugins_plugin['description'] = trim($desc); |
---|
21 | } |
---|
22 | elseif ( preg_match("|Description: (.*)|", $plg_data, $val) ) |
---|
23 | { |
---|
24 | $set_plugins_plugin['description'] = trim($val[1]); |
---|
25 | } |
---|
26 | if ( preg_match("|Author: (.*)|", $plg_data, $val) ) |
---|
27 | { |
---|
28 | $set_plugins_plugin['author'] = trim($val[1]); |
---|
29 | } |
---|
30 | if ( preg_match("|Author URI: (.*)|", $plg_data, $val) ) |
---|
31 | { |
---|
32 | $set_plugins_plugin['author uri'] = trim($val[1]); |
---|
33 | } |
---|
34 | if (!empty($set_plugins_plugin['uri']) and strpos($set_plugins_plugin['uri'] , 'extension_view.php?eid=')) |
---|
35 | { |
---|
36 | list( , $extension) = explode('extension_view.php?eid=', $set_plugins_plugin['uri']); |
---|
37 | if (is_numeric($extension)) $set_plugins_plugin['extension'] = $extension; |
---|
38 | } |
---|
39 | // IMPORTANT SECURITY ! |
---|
40 | $set_plugins_plugin = array_map('htmlspecialchars', $set_plugins_plugin); |
---|
41 | |
---|
42 | global $cl_set_plugins_plugin, $cl_set_plugins_version; |
---|
43 | $cl_set_plugins_version = $set_plugins_plugin['version'] ; |
---|
44 | $cl_set_plugins_plugin = $set_plugins_plugin; |
---|
45 | |
---|
46 | ?> |
---|