1 | <?php |
---|
2 | //header("Content-Type: application/xml; charset=UTF-8"); |
---|
3 | |
---|
4 | //$module['ext_datas'] = (!empty($module['ext_datas']) ? unserialize($module['ext_datas']) : array('')); |
---|
5 | // module['ext_datas'] doit etre deja unserialise... |
---|
6 | |
---|
7 | // Parameters for module |
---|
8 | |
---|
9 | define('PHPWG_ROOT_PATH','../../../../'); |
---|
10 | |
---|
11 | include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); |
---|
12 | include_once FLASHGAL_PATH.'include/class.inc.php'; |
---|
13 | $home = null; |
---|
14 | $catid = null ; |
---|
15 | $permalinkcat = null; |
---|
16 | |
---|
17 | if (isset($_GET['home'])) |
---|
18 | { |
---|
19 | $home = true; |
---|
20 | $page['section'] = 'categories'; |
---|
21 | } |
---|
22 | elseif (isset($_GET['catid'])) |
---|
23 | { |
---|
24 | $catid = $_GET['catid']; |
---|
25 | $page['section'] = 'categories'; |
---|
26 | $page['category']['id'] = $catid; |
---|
27 | } |
---|
28 | elseif (isset($_GET['permalink'])) |
---|
29 | { |
---|
30 | $permalink = $_GET['permalink']; |
---|
31 | $page['section'] = 'categories'; |
---|
32 | $page['category']['id'] = $permalink; |
---|
33 | } |
---|
34 | else |
---|
35 | { |
---|
36 | include(PHPWG_ROOT_PATH.'include/section_init.inc.php'); |
---|
37 | |
---|
38 | $home = (($page['section'] == 'categories') and empty($page['category'])) ? true : null ; |
---|
39 | $catid = ($page['section'] == 'categories' and |
---|
40 | isset($page['category'])) ? $page['category']['id'] : null ; |
---|
41 | $permalinkcat = empty($page['category']['permalink']) ? null : $page['category']['permalink']; |
---|
42 | } |
---|
43 | |
---|
44 | $flashgal = new flashgal($catid, $home, $permalinkcat); |
---|
45 | $module = $flashgal->module; |
---|
46 | |
---|
47 | |
---|
48 | $module['ext_datas'] = (!empty($module['ext_datas']) ? unserialize($module['ext_datas']) : array('')); |
---|
49 | |
---|
50 | foreach ($module['ext_datas'] as $key => $value) |
---|
51 | { |
---|
52 | $module['ext_datas'][$key] = str_replace("#", "", $value); |
---|
53 | } |
---|
54 | |
---|
55 | echo '<?xml version="1.0"?> |
---|
56 | |
---|
57 | <settings |
---|
58 | thumb_bg_color="'.$module['ext_datas']['thumb_bg_color'].'" |
---|
59 | thumb_bg_over="'.$module['ext_datas']['thumb_bg_over'].'" |
---|
60 | scroll_but_bg="'.$module['ext_datas']['scroll_but_bg'].'" |
---|
61 | scroll_but_arrow="'.$module['ext_datas']['scroll_but_arrow'].'" |
---|
62 | scroll_but_bg_over="'.$module['ext_datas']['scroll_but_bg_over'].'" |
---|
63 | scroll_but_arrow_over="'.$module['ext_datas']['scroll_but_arrow_over'].'" |
---|
64 | big_pic_border="'.$module['ext_datas']['big_pic_border'].'" |
---|
65 | next_pic_bg="'.$module['ext_datas']['next_pic_bg'].'" |
---|
66 | next_pic_arrow="'.$module['ext_datas']['next_pic_arrow'].'" |
---|
67 | next_pic_bg_over="'.$module['ext_datas']['next_pic_bg_over'].'" |
---|
68 | next_pic_arrow_over="'.$module['ext_datas']['next_pic_arrow_over'].'" |
---|
69 | background_color="'.$module['ext_datas']['background_color'].'" |
---|
70 | text_color="'.$module['ext_datas']['text_color'].'" |
---|
71 | |
---|
72 | text_visible="'.($module['ext_datas']['text_visible'] ? "on" : "off").'" |
---|
73 | fullscreen_visible="'.($module['ext_datas']['fullscreen_visible'] ? "on" : "off").'" |
---|
74 | />'; |
---|
75 | |
---|
76 | ?> |
---|