Changeset 3599 for extensions/Flash_Gallery/modules/FlashGallery/config.php
- Timestamp:
- Jul 16, 2009, 12:43:16 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Flash_Gallery/modules/FlashGallery/config.php
r3531 r3599 1 1 <?php 2 //header("Content-Type: application/xml; charset=UTF-8");3 2 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 3 // Parameters XML for module FlashGallery 8 4 9 5 define('PHPWG_ROOT_PATH','../../../../'); 10 6 11 7 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 8 17 if (isset($_GET['home'])) 9 // recuperation des parametres dans la base (ext_datas) 10 $query = ' 11 SELECT ext_datas 12 FROM ' . FLASHGAL_TABLE . ' 13 WHERE type LIKE "%FlashGallery"' 14 . ' LIMIT 1'; 15 16 $result = pwg_query($query); 17 18 // Module non dispo 19 if (!($module = mysql_fetch_assoc($result))) 18 20 { 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; 21 echo '<?xml version="1.0"?> 22 <settings 23 />'; 33 24 } 34 25 else 35 26 { 36 include(PHPWG_ROOT_PATH.'include/section_init.inc.php');27 $module['ext_datas'] = (!empty($module['ext_datas']) ? unserialize($module['ext_datas']) : array('')); 37 28 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']; 29 foreach ($module['ext_datas'] as $key => $value) 30 { 31 $module['ext_datas'][$key] = str_replace("#", "", $value); 32 } 33 34 echo '<?xml version="1.0"?> 35 36 <settings 37 thumb_bg_color="'.$module['ext_datas']['thumb_bg_color'].'" 38 thumb_bg_over="'.$module['ext_datas']['thumb_bg_over'].'" 39 scroll_but_bg="'.$module['ext_datas']['scroll_but_bg'].'" 40 scroll_but_arrow="'.$module['ext_datas']['scroll_but_arrow'].'" 41 scroll_but_bg_over="'.$module['ext_datas']['scroll_but_bg_over'].'" 42 scroll_but_arrow_over="'.$module['ext_datas']['scroll_but_arrow_over'].'" 43 big_pic_border="'.$module['ext_datas']['big_pic_border'].'" 44 next_pic_bg="'.$module['ext_datas']['next_pic_bg'].'" 45 next_pic_arrow="'.$module['ext_datas']['next_pic_arrow'].'" 46 next_pic_bg_over="'.$module['ext_datas']['next_pic_bg_over'].'" 47 next_pic_arrow_over="'.$module['ext_datas']['next_pic_arrow_over'].'" 48 background_color="'.$module['ext_datas']['background_color'].'" 49 text_color="'.$module['ext_datas']['text_color'].'" 50 51 text_visible="'.($module['ext_datas']['text_visible'] ? "on" : "off").'" 52 fullscreen_visible="'.($module['ext_datas']['fullscreen_visible'] ? "on" : "off").'" 53 />'; 42 54 } 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 <settings58 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 55 ?>
Note: See TracChangeset
for help on using the changeset viewer.