*/
if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
$Imagealign = array( l10n('ArtG_left'), l10n('ArtG_right'), l10n('ArtG_top'), l10n('ArtG_bottom'), l10n('ArtG_center'));
$ImagescaleMode = array( l10n('ArtG_fit'), l10n('ArtG_crop'), l10n('ArtG_noScale'));
$ImagetransitionEffect = array( l10n('ArtG_fade'), l10n('ArtG_zoom'), l10n('ArtG_pixel'));
$Thumbbarposition = array( l10n('ArtG_left'), l10n('ArtG_right'), l10n('ArtG_top'), l10n('ArtG_bottom'));
$Captionposition = array( l10n('ArtG_top'), l10n('ArtG_bottom'));
// default values
if (!isset($ext_datas)) $ext_datas = array(
// Button
'fullScreenButton' => true,
'navigationButtons' => true,
'slideshowButton' => true,
// Image
'Imagealign' => 5,
'ImagescaleMode' => 1,
'ImagecornerRadius' => '0',
'ImagetransitionEffect' => 1,
'ImageuseShadow' => true,
// Thumbnail
'Thumbnailwidth' => "60",
'Thumbnailheight' => "40",
'ThumbnailcornerRadius' => "0",
'Thumbnailalpha' => "70",
'ThumbnailoutlineColor' => "#FFFFFF",
'ThumbnailoutlineColorOnRollOver' => "#FFFFFF",
'ThumbnailoutlineColorOnClick' => "#8B0000",
'ThumbnailuseShadow' => true,
'ThumbnailusePreview' => true,
//Thumbbar
'Thumbbarposition' => 4,
'ThumbbarscrollSpeed' => "10",
// Caption
'Captionposition' => 2,
'CaptionbgAlpha' => "30",
'Captioncolor' => "#FFFFFF",
'CaptionbgColor' => "#000000",
'CaptionfontName' => "Verdana",
'CaptionfontSize' => "12",
// Preloader
'Preloaderalpha' => "100",
'PreloaderusePreloader' => true,
// Preview
'Previewwidth' => '100',
'Previewheight' => '200',
'Previewalpha' => '100',
'PreviewoutlineColor' => '#FFFFFF',
'PreviewcornerRadius' => '0',
'PreviewuseShadow' => true,
//Slideshow
'Slideshowstart' => false,
'Slideshowdelay' => "3",
'Slideshowloop' => true,
'SlideshowstopAutoOnClick' => true,
//Sound
'SoundsonRollOver' => "",
'SoundonClick' => "",
);
// Enregistrement de la configuration
if (isset($_POST['submit']) and !is_adviser())
{
foreach ($ext_datas as $key =>$value)
{
if ($key == "fullScreenButton" or $key == "navigationButtons" or $key == "slideshowButton"
or $key == "ImageuseShadow" or $key == "ThumbnailuseShadow" or $key == "ThumbnailusePreview"
or $key == "PreloaderusePreloader" or $key == "PreviewuseShadow" or $key == "Slideshowstart"
or $key == "Slideshowloop" or $key == "SlideshowstopAutoOnClick")
$ext_datas[$key] = isset($_POST['ArtG_'.$key]);
else
$ext_datas[$key] = $_POST['ArtG_'.$key];
}
}
foreach ($ext_datas as $key => $value)
{
if ($key == "fullScreenButton" or $key == "navigationButtons" or $key == "slideshowButton"
or $key == "ImageuseShadow" or $key == "ThumbnailuseShadow" or $key == "ThumbnailusePreview"
or $key == "PreloaderusePreloader" or $key == "PreviewuseShadow" or $key == "Slideshowstart"
or $key == "Slideshowloop" or $key == "SlideshowstopAutoOnClick")
$template->assign(array( 'ArtG_'.$key => (($ext_datas[$key]) ? 'checked="checked"': '')));
elseif ($key == "Imagealign")
{
$i=1;
foreach ( $Imagealign as $order ) //on parcours le tableau
{
$template->append('ArtG_Imagealign',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Imagealign'] == $i ? 'selected' : '')));
$i++;
}
}
elseif ($key == "ImagescaleMode")
{
$i=1;
foreach ( $ImagescaleMode as $order ) //on parcours le tableau
{
$template->append('ArtG_ImagescaleMode',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['ImagescaleMode'] == $i ? 'selected' : '')));
$i++;
}
}
elseif ($key == "ImagetransitionEffect")
{
$i=1;
foreach ( $ImagetransitionEffect as $order ) //on parcours le tableau
{
$template->append('ArtG_ImagetransitionEffect',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['ImagetransitionEffect'] == $i ? 'selected' : '')));
$i++;
}
}
elseif ($key == "Thumbbarposition")
{
$i=1;
foreach ( $Thumbbarposition as $order ) //on parcours le tableau
{
$template->append('ArtG_Thumbbarposition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Thumbbarposition'] == $i ? 'selected' : '')));
$i++;
}
}
elseif ($key == "Captionposition")
{
$i=1;
foreach ( $Captionposition as $order ) //on parcours le tableau
{
$template->append('ArtG_Captionposition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Captionposition'] == $i ? 'selected' : '')));
$i++;
}
}
else
$template->assign(array( 'ArtG_'.$key => $ext_datas[$key]));
}
$template->assign(array('OTHERS_SCRIPT' =>
'
'));
$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
?>